Amusingly enough, I didn't look about how the bootloader was creating the purely identity pagetable until much later. At first, I also did go with 0x0 for ram's start with the 0x8000000 default PA_OFFSET, but at some point I was debugging why the new pagetable wouldn't work and noticed that the identity table wasn't like I imagined. I was imagining 0x80000000 onwards was mapped to 0x0 onwards as I was basically running from there, but it turns out the entries in the pagetable pointed at 0x80000000 onwards instead.
>From that and considering what I learnt about ARMv4/v5 having a format for pagetables and ARMv6/v7 having another, and looking at the supported ARMv7-based platforms, I thought it was probably the right thing to do to imitate them and just assume ram starts at 0x80000000 for our purposes. And since it worked, I settled for that. What took me a while to realise (the problem I was really debugging) was that ARMv6 does boot in legacy mode for pagetables, which is why the bootloader pagetable worked but the one the kernel prepares, which uses second-level pagetables, that are actually completely incompatible with the old format, didn't. Doing something about that (setting the control reg flag) got me as far as userspace. -- Roc Vallès Domènech On Thu, Mar 28, 2013 at 8:50 PM, Beniamino Galvani <[email protected]>wrote: > 2013/3/27 Roc Vallès <[email protected]>: > > For a couple of weeks, I've been privately working on basic Raspberry Pi > > support on my free time. > > > > I have very basic support (uart write and booting to userspace), but it's > > not cleaned up. I am also working on an article explaining the process > > followed so far with the port. > > Hi Roc, > > good work! At the address > https://code.launchpad.net/~bengal/helenos/raspberrypi you can find > the branch of HelenOS with support for Raspberry Pi. The current > status is that the kernel boots up to userspace and initializes uart, > interrupts and timer. > > Comparing your patch with the code in the branch I note only one main > difference: I see that you link the bootloader from address > BOOT_BASE=0x80008000 while I used 0x00008000 because according to the > documentation that I have, RAM is mapped from address 0. > > Do you know if there is also a mapping of RAM in the upper 2GB? Or > maybe you are using a bootloader to start HelenOS? > > Anyway, if you have more contributions regarding the Raspberry Pi, it > would be great to include them into the branch. > > Beniamino > > _______________________________________________ > HelenOS-devel mailing list > [email protected] > http://lists.modry.cz/cgi-bin/listinfo/helenos-devel >
_______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
