Correct duplicate /cpus and more (Laurent Vivier)

Correct duplicate /cpus
Correct mmu properties in /chosen
Add mmu methods to /cpus/<cpu>


git-svn-id: svn://coreboot.org/openbios/openbios-devel@341 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2009-01-02 07:41:40 +00:00
parent 1ad40beb94
commit b2692171f9
5 changed files with 12 additions and 13 deletions

View File

@@ -489,7 +489,7 @@ arch_of_init( void )
#endif
snprintf(buf, sizeof(buf), "/cpus/%s", cpu->name);
ofmem_register(find_dev(buf));
node_methods_init();
node_methods_init(buf);
#ifdef USE_RTAS
if( !(ph=find_dev("/rtas")) )

View File

@@ -25,7 +25,7 @@ extern char of_rtas_start[], of_rtas_end[];
extern void call_elf( ulong elf_entry );
/* methods.c */
extern void node_methods_init( void );
extern void node_methods_init( const char *cpuname );
/* main.c */
extern void boot( void );

View File

@@ -149,7 +149,7 @@ NODE_METHODS( ciface ) = {
/************************************************************************/
DECLARE_NODE( memory, INSTALL_OPEN, 0, "/memory" );
DECLARE_NODE( mmu, INSTALL_OPEN, 0, "/cpu@0" );
DECLARE_UNNAMED_NODE( mmu, INSTALL_OPEN, 0 );
DECLARE_NODE( mmu_ciface, 0, 0, "+/openprom/client-services" );
@@ -291,14 +291,21 @@ NODE_METHODS( mmu_ciface ) = {
/************************************************************************/
void
node_methods_init( void )
node_methods_init( const char *cpuname )
{
phandle_t chosen, ph;
#ifdef USE_RTAS
REGISTER_NODE( rtas );
#endif
REGISTER_NODE( ciface );
REGISTER_NODE( memory );
REGISTER_NODE( mmu );
REGISTER_NODE_METHODS( mmu, cpuname );
REGISTER_NODE( mmu_ciface );
REGISTER_NODE( tty );
chosen = find_dev("/chosen");
if (chosen) {
ph = find_dev(cpuname);
set_int_property(chosen, "mmu", ph);
}
}

View File

@@ -37,7 +37,6 @@
:noname
" rtc" " rtc" preopen
" memory" " /memory" preopen
" mmu" " /cpu@0" preopen
\ " stdout" " /packages/terminal-emulator" preopen
" stdout" " screen" preopen
" stdin" " adb-keyboard" preopen

View File

@@ -35,13 +35,6 @@ new-device
: close ;
finish-device
new-device
" cpus" device-name
" cpus" device-type
1 encode-int " #address-cells" property
0 encode-int " #size-cells" property
finish-device
\ -------------------------------------------------------------
\ /packages
\ -------------------------------------------------------------