EVBARM - layout of BootConfig structure
Richard Earnshaw <[email protected]> Mon, 11 Aug 2003 09:58:30 +0100
| Newsgroups | gmane.os.netbsd.ports.arm,gmane.os.netbsd.ports.evbarm |
|---|---|
| Organization | ARM Ltd. |
| Message-ID | <[email protected]> |
The current BootConfig structure in evbarm/include/bootconfig.h has
#define DRAM_BLOCKS 1
typedef struct _BootConfig {
PhysMem dram[DRAM_BLOCKS];
u_int dramblocks;
} BootConfig;
This is somewhat back-to-front, in that if I increase DRAM_BLOCKS (as I
wish to do) that will move the offset of the dramblocks field. I'd like
to rearrange this structure to:
typedef struct _BootConfig {
u_int dramblocks;
PhysMem dram[DRAM_BLOCKS];
} BootConfig;
so that it is possible in future to bump the size of DRAM_BLOCKS without
breaking a binary interface that is notionally shared between
netbsd/evbarm and its "bios" (having netbsd able to access a larger array
won't hurt, since the size only matters if NetBSD allocates one of these
statically, and if it doesn't then it will never access beyond
dramblocks-1 entries). However, doing so will break things if any
existing builds are already using a "bios" to probe memory.
So before I go ahead and do this, is anybody already relying on this
structure externally?
R.