Alter the MMU properties as suggested by the UltraSPARC-II device tree prtconf output in the Debian sparc-utils package and

Solaris 9 boot; i.e. remove the /CPU/mmu device, relocate its methods to /virtual-memory, and alter the /chosen mmu property so 
that it now points to /virtual-memory. This helps both Solaris 9 and OpenSolaris boot further along the way.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@859 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Mark Cave-Ayland
2010-08-25 16:58:55 +00:00
committed by Mark Cave-Ayland
parent c18674a4f7
commit 28fed458ff
2 changed files with 5 additions and 26 deletions

View File

@@ -446,7 +446,7 @@ NODE_METHODS( memory ) = {
{ "SUNW,retain", mem_retain },
};
DECLARE_UNNAMED_NODE(mmu, INSTALL_OPEN, 0);
DECLARE_NODE(mmu, INSTALL_OPEN, 0, "/virtual-memory");
NODE_METHODS(mmu) = {
{ "open", mmu_open },
@@ -462,33 +462,18 @@ NODE_METHODS(mmu) = {
void ob_mmu_init(const char *cpuname, uint64_t ram_size)
{
char nodebuff[256];
/* memory node */
REGISTER_NODE_METHODS(memory, "/memory");
/* MMU node */
snprintf(nodebuff, sizeof(nodebuff), "/%s", cpuname);
push_str(nodebuff);
fword("find-device");
fword("new-device");
push_str("mmu");
fword("device-name");
fword("finish-device");
snprintf(nodebuff, sizeof(nodebuff), "/%s/mmu", cpuname);
REGISTER_NODE_METHODS(mmu, nodebuff);
REGISTER_NODE_METHODS(mmu, "/virtual-memory");
ofmem_register(find_dev("/memory"), find_dev("/virtual-memory"));
push_str("/chosen");
fword("find-device");
push_str(nodebuff);
push_str("/virtual-memory");
fword("open-dev");
fword("encode-int");
push_str("mmu");

View File

@@ -31,19 +31,13 @@ new-device
external
: open true ;
: close ;
\ claim ( phys size align -- base )
\ : claim 2drop ;
\ release ( phys size -- )
\ see arch/sparc64/lib.c for methods
finish-device
new-device
" virtual-memory" device-name
external
: open true ;
: close ;
\ claim ( phys size align -- base )
\ : claim 2drop ;
\ release ( phys size -- )
\ see arch/sparc64/lib.c for methods
finish-device
" /options" find-device