Subject: Re: NetBSD/arm32 fails to boot with RISCOS 4
To: None <port-arm32@netbsd.org>
From: Dave Daniels <Davedan@arcade.demon.co.uk>
List: port-arm32
Date: 08/13/1999 19:18:53
In the absence of anybody else saying anything, I have been
looking at the NetBSD boot problem to see what has to be done to
fix it. However my experience of programming at this low a level
is zero and I do not fully understand what is going on nor do I
have all the information needed. In particular BtRiscBSD uses a
number of constants in the code that no longer works without
explaining what they are for. Could anybody shed any light on
them?
     
The ones that I am interested in are:
In the code that plugs addresses directly into the page tables
is the statement:
 
        WriteWord(0x02c00000 + (logical >> 10) & 0xfffffffc,
          0x00000ffe | (physical & 0xfffff000));
   
What does the constant 0x00000ffe signify? I am wondering if this
code can be replaced by calls to OS_Memory to find the physical
page numbers that correspond the the addresses being inserted (the
variable 'physical' in the above statement) and then the page
tables updated with a call to OS_SetMemMapEntries. Does anyone
have any comments?
   
In a similar vein, a couple of lines later there is the comment
'Map the IO up high so we can get at it' followed by the lines:
  
    WriteWord(0x02c0c000 + (0xf6000000 >> 18) & 0xfffffffc,
      0x00000412 | (0x03200000 & 0xfffff000));
    WriteWord(0x02c0c000 + (0xf6100000 >> 18) & 0xfffffffc,
      0x00000412 | (0x03400000 & 0xfffff000));
 
Again this is updating the page table, but could anyone explain
all the magic numbers used here? What is the significance of
shifting what I assume is the logical address the I/O will be
mapped to (0xf6000000) by 18? I guess that this maps the address
on to a megabyte boundary instead of a 4K byte page one. The
base address of the area being overwritten (0x2c0c000) is different
too. What is this? What does the flag value 0x00000412 mean?
   
I doubt if 'OS_SetMemMapEntries' can be used here.
     
I suppose that there is no guarentee that sorting out this code
will solve the problems with the loader but I guess I can only
try it and see.
    
I guess that the lack of 'me too!' messages on here could signify
either that nobody uses NetBSD/arm32 on a RiscPC any more or that
I am on the bleeding edge and am the only person who has tried
NetBSD with RISCOS 4. Which is it?
  
Dave
-- 
    ___  ___  ___  ___  ___  ___   |  Free Internet E-mail and Usenet News  | 
|  /   \/   \/   \/   \/   \/   \  | +44 20 8654 2212 +44 20 8655 4412/1811 |
|    A    R    C    A    D    E    |   Croydon  UK  -  Fidonet#2:254/27.0   |
|     The Definitive Acorn BBS     | http://arcade.demon.co.uk  at weekends |