fix a stupid bug in malloc.

add debug printks. 

make dtc put 'root' as the first_node, instead of making the last node
be the first node .... much happier in linuxbios. 

sprintf is broken ... dammit. I hope someone will fix it. I've got about
another week of full-time I can spend on this and then I go back to part
time. So I'm going to need some help soon.

other fixups, and also, make the dts conform to the needs of the device
tree. So we have a domain0 and a device (0,0) that is the north. 

Mostly things are working, but we're STILL not getting any memory in the
LB tables from the north. The device tree is a bitch. 

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@175 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Ronald G. Minnich 2007-03-03 00:39:30 +00:00
commit 53283b1e36
9 changed files with 91 additions and 18 deletions

View file

@ -59,7 +59,7 @@ void *malloc(size_t size)
die("OUT OF MEMORY\n");
}
size = (size + 3) & 3; /* Align */
size = (size + 3) & (~3); /* Align */
p = free_mem_ptr;
free_mem_ptr += size;

View file

@ -62,6 +62,7 @@ it with the version available from LANL.
*/
int stage2(void)
{
void show_all_devs(void);
post_code(0x20);
dev_init();
@ -69,7 +70,11 @@ int stage2(void)
* before printk can be used
*/
post_code(0x30);
dev_phase1();
dev_phase1();
show_all_devs();
// printk_notice("LinuxBIOS-%s%s %s booting...\n",
// linuxbios_version, linuxbios_extra_version, linuxbios_build);
// printk_notice("LinuxBIOS-%s%s %s booting...\n",
// linuxbios_version, linuxbios_extra_version, linuxbios_build);
@ -80,27 +85,33 @@ int stage2(void)
*/
post_code(0x40);
dev_phase2();
show_all_devs();
/* walk physical devices and add any dynamic devices to the
* device tree
*/
post_code(0x30);
dev_root_phase3();
show_all_devs();
/* Compute and assign the bus resources. */
post_code(0x40);
dev_phase4();
show_all_devs();
/* Now actually enable devices on the bus */
post_code(0x50);
dev_root_phase5();
show_all_devs();
/*initialize devices on the bus */
post_code(0x60);
dev_phase6();
dev_phase6();
show_all_devs();
post_code(0x70);
write_tables();
show_all_devs();
return 0;
}