Subject: Re: Still can't alloc physical memory in cpu_setup().
To: Alexander Funcke <funcke@daemon.se>
From: Gregory McGarry <g.mcgarry@ieee.org>
List: tech-kern
Date: 05/07/2002 13:51:02
Alexander Funcke wrote:

> I'm now running NetBSD-current and want to add support for National's
> Geode SCx200 family. One of the features on the chip is an scratchpad
> RAM area.
> 
> The physical address is at gx_base and the area is GX_BASE_SIZE bytes.
> This code is executed from cpu_setup() in arch/i386/i386/machdep.c
> for the particular CPU.
> 
> Running this code tell me kernel_map equals NULL, so I guess uvm_init()
> hasn't taken place? even though I believed it had...

init386() is called before main().  cpu_startup() is called from main()
after uvm_init() though.
 
> anyways, I don't have a kernel_map, but I still want to alloc this area,
> should I just wait until later in the startup or is there away to do this
> before uvm_init?

Depends what you want to do with the allocated space.  The longer
you can defer it, the easier it will be.

	-- Gregory McGarry <g.mcgarry@ieee.org>