Subject: Re: Changing kernel base address (was: Re: Heads up: shared arm include files)
To: Mike Pumford <mpumford@black-star.demon.co.uk>
From: Chris Gilbert <chris@buzzbee.freeserve.co.uk>
List: port-arm32
Date: 01/22/2001 10:52:22
On Monday 22 January 2001  2:11 am, Mike Pumford wrote:

> > > Hi Mike,
> >
> > As I'm not around this weekend I thought I'd send you the patch I've done
> > (non-working)  See if you can see anything that looks wrong or if you've
> > missed something in your changes.  One thought I had was to not enable
> > the console till the 2nd mapping has completed...
>
> I have got things working with IOMD remapped. I added some code in initarm
> to remap the IOMD and VIDC before consinit gets called. Both your patches
> and mine were being bitten by a flaw in the kernel build system for arm32.
>
> The kernel build process does not do any depency checking for assembler
> files so assembler files do not get rebuilt if a header that they depend on
> is changed. iomd_iic.S uses the IOMD base address defined in iomd.h. These
> routines are first invoked in initarm and when they were not being rebuilt
> the kernel crashed when attempting to read the reboot count from the CMOS.
> The final mapping I went for is:
>
> 0xf7000000      IOMD
> 0xf7100000      VIDC
> 0xf7200000      IO base (podules)
> 0xf7400000      VRAM (or video DRAM)
> 0xf8000000	EASI podule space.
>
> This is still a bit wasteful but it avoids the assembler in iomd_iic.S
> having to do anything complicated to load the IOMD base address.
>
> My patch (including the VM space growth) is attached.

Looks fine other than as a comment says you've not checked RO4.  Looks like 
we need the bootloader to pass in current page table address.  Looking in the 
bootloader the page table addrs are:
RO3: 0x02c00000
RO4: 0x08000000

Perhaps it's easier to not start the console until we've got our page tables 
in place?  That way we don't need to extend the bootloader, we just have to 
hope we make it through the primary boot.  We could have a debug define to 
allow output providing you know the booting OS version.

Chris