Subject: Re: Changing kernel base address (was: Re: Heads up: shared arm include files)
To: None <port-arm32@netbsd.org>
From: Chris Gilbert <chris@buzzbee.freeserve.co.uk>
List: port-arm32
Date: 01/19/2001 07:48:35
On Friday 19 January 2001  1:50 am, Reinoud Zandijk wrote:
> Hi Mike, Robert,
>
> On Fri, 19 Jan 2001, Mike Pumford wrote:
> > > >Right I have now done some tinkering and it turns out that moving
> > > > VIDC/IOMD and the podules is not that straightforward as tweaking a
> > > > few #defines and recompiling. The code in initarm assumes that these
> > > > have been mapped by the bootloader at f6000000. I have a partial work
> > > > round for this but the kernels crash after switching to the final
> > > > page tables. On a more positive note it is possible to move the VRAM
> > > > (or video DRAM) without too much effort.
>
> I'll have a look at it .... as far as i know i can move stuff around the
> way i like on my bootloader... so i'd be most interested to see if it
> really would crash if i change this !! Hmm... maybe some other constants
> need tweeking ... will see !

Well looking at the code it's initially a case of getting the first mapping 
done without any printf's or the consinit, as the existing bootloader does 
hardcode the vidc and iomd to a particular address.  Once the initial mapping 
is done then you call consinit.

> > [IOMD code snipped]
> >
> > > Why not delete it and add any extra checks needed to iomdattach().
>
> In a way it looks sensible, but there are more changes than just the iomd
> as far as i know ....
>
> > It's not actually a problem while running initarm (you just have to do
> > the mapping yourself in initarm) Unofortunately relocating IOMD and VIDC
> > seems to cause a kernel trap some time after switching to the full kernel
> > page tables. However it does make sense to do this check elsewhere.
>
> Memory mapping is quite unforgiving yes.... it just crashes... with no
> warnings ...

All I can think of is that something needs aligning to a particular boundary, 
and the changes haven't allowed for it.  (note that I'm working on some 
changes indepentantly of mike, although I'll probably mail him my diff)

Cheers,
Chris