Subject: Re: NetBSD booting NetBSD on a TS-7xxx
To: Valeriy E. Ushakov <>
From: Jesse Off <>
List: port-arm
Date: 12/04/2006 16:30:21
----- Original Message ----- 
From: "Valeriy E. Ushakov" <>
To: <>
Sent: Monday, December 04, 2006 2:46 PM
Subject: Re: NetBSD booting NetBSD on a TS-7xxx

> On Mon, Dec 04, 2006 at 10:44:18 -0700, Jesse Off wrote:
>> I recently wrote a program to allow NetBSD to boot other OS' from
>> within NetBSD itself.
> BTW, are you aware of kloader(4) that's been in the kernel for a few
> years?
>    MI:         sys/dev/kloader.c
>    MD (e.g.):  sys/arch/hpcsh/hpcsh/kloader_machdep.c
> It doesn't support ARM yet.  It only supports MIPS and SH3, where
> there's a magic VA == PA region, but extending it to support ARM
> shouldn't be a problem.

I was aware of this, but wanted a 100% userspace solution that would work 
with currently deployed NetBSD ARM kernels.  I wasn't as certain extending 
kloader to support ARM would be easier than modifying what I already had to 
do for Linux anyway.   I wrote the one I had to do for Linux in a fairly 
generic way and porting it to NetBSD was only a couple hours.

Also, I looked at the current kloader code and got an uneasy feeling about 
the way uvm_pglistalloc() was used to allocate the temporary image memory. 
It wasn't obvious to me how the code guaranteed a source page would not be 
clobbered before being copied to its eventual destination and also wasn't 
obvious to me how you could change the kernel based on the execution of a 
script (it seems hardcoded with option KLOADER_KERNEL_PATH).

//Jesse Off