diff --git a/src/boot.c b/src/boot.c index af22e1eb..2a270864 100644 --- a/src/boot.c +++ b/src/boot.c @@ -28,6 +28,8 @@ print_boot_device(u16 type) if (type == 0 || type > 0x4) BX_PANIC("Bad drive type\n"); printf("Booting from %s...\n", drivetypes[type]); + + // XXX - latest cvs has BEV description } //-------------------------------------------------------------------------- @@ -40,7 +42,7 @@ print_boot_failure(u16 type, u8 reason) if (type == 0 || type > 0x3) BX_PANIC("Bad drive type\n"); - printf("Boot from %s failed", drivetypes[type]); + printf("Boot failed"); if (type < 4) { /* Report the reason too */ if (reason==0) @@ -48,7 +50,7 @@ print_boot_failure(u16 type, u8 reason) else printf(": could not read the boot disk"); } - printf("\n"); + printf("\n\n"); } static void diff --git a/src/post.c b/src/post.c index a154ac62..f19c44ae 100644 --- a/src/post.c +++ b/src/post.c @@ -465,10 +465,10 @@ callrom(u16 seg, u16 offset) } static void -rom_scan() +rom_scan(u32 start, u32 end) { - u8 *p = (u8*)0xc0000; - for (; p <= (u8*)0xe0000; p += 2048) { + u8 *p = (u8*)start; + for (; p <= (u8*)end; p += 2048) { u8 *rom = p; if (*(u16*)rom != 0xaa55) continue; @@ -549,12 +549,14 @@ post() serial_setup(); timer_setup(); pic_setup(); + + rom_scan(0xc0000, 0xc7800); + + printf("BIOS - begin\n\n"); + // XXX - need to do pci stuff //pci_setup(); init_boot_vectors(); - rom_scan(); - - printf("BIOS - begin\n\n"); floppy_drive_post(); hard_drive_post(); @@ -562,6 +564,10 @@ post() ata_init(); ata_detect(); } + + init_boot_vectors(); + rom_scan(0xc8000, 0xe0000); + callrom(0xf000, OFFSET_begin_boot); }