Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/evbarm/smdk2xx0



On Mon, 12 May 2003, Jason Thorpe wrote:

> On Monday, May 12, 2003, at 09:20  PM, Hiroyuki Bessho wrote:
>
> > Log Message:
> > enable the domain 15 during bootstrap, as new pmap_map_section() use
> > it.
>
> This shouldn't be necessary, right?  Won't this code in initarm() do
> what is needed?

Well, the exact procedure for bootstrapping the DACR *could* be different
for each port, depending on what the firmware/bootloader does.

>          cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2))
> |DOMAIN_CLIENT);

At this point, we're still running in the L1 set up by firmware. We don't
know which domain number it used when writing the L1 entries (although I
guess we could either probe the L1, or just OR-in client domain#15 with
the current DACR contents), so it is assumed to be domain#0. This is
covered by the '| DOMAIN_CLIENT' part of the above statement.

Since we're about to switch to our own L1, which uses client domain#15
for the kernel, we need to make sure both domains are valid.

Come to think of it, the best solution would be simply to set all 16
domains to 'client' in the DACR at this point...

>          setttb(kernel_l1pt.pv_pa);

Switch to our own L1.

>          cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2));

We can now disable the firmware/bootstrap domain number.

I expect the above sequence will work for most ARM32 ports, but it's
something to bear in mind for the future.

Cheers, Steve

-- 

Wasabi Systems Inc. - The NetBSD Company - http://www.wasabisystems.com/




Home | Main Index | Thread Index | Old Index