=================================================================== RCS file: /cvs/prex-old/boot/arm/cats/bootinfo.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- prex-old/boot/arm/cats/bootinfo.c 2008/07/17 19:10:36 1.1 +++ prex-old/boot/arm/cats/bootinfo.c 2008/07/17 22:00:25 1.2 @@ -29,7 +29,10 @@ #include #include +#include "cyclone_boot.h" +extern uint32_t ebsabootaddr; + /* * Setup boot information. */ @@ -37,6 +40,7 @@ setup_bootinfo(struct boot_info **bpp) { struct boot_info *bp; + struct ebsaboot *ebp; bp = (struct boot_info *)BOOT_INFO; memset(bp, 0, BOOT_INFO_SIZE); @@ -46,9 +50,19 @@ bp->video.text_x = 30; bp->video.text_y = 20; - /* printk("hi_mem=%x lo_mem=%x\n", hi_mem, lo_mem); */ - bp->main_mem.start = 0x00000000; - bp->main_mem.size = 0x2000000; /* 32MB */ + ebp = (struct ebsaboot *)ebsabootaddr; + if (ebp->bt_magic != BT_MAGIC_NUMBER_CATS && + ebp->bt_magic != BT_MAGIC_NUMBER_EBSA) { + panic("Incorrect firmware signature"); + } + + printk("phys_start=0x%x phys_end=0x%x free_start=0x%x bootstring='%s' pciclk=%u mhz, %s firmware\n", + ebp->bt_memstart, ebp->bt_memend, ebp->bt_memavail, + (char *)ebp->bt_args, ebp->bt_pciclk / 1000000, + ebp->bt_magic == BT_MAGIC_NUMBER_CATS ? "cats" : "ebsa"); + + bp->main_mem.start = ebp->bt_memavail; + bp->main_mem.size = ebp->bt_memend - ebp->bt_memavail; *bpp = bp; }