Merge recent changes to bochs-bios CVS head.

Slightly different order to rom-scanning.
This commit is contained in:
Kevin O'Connor 2008-02-27 10:27:00 -05:00
parent bdce35fbdc
commit a2e7380fdf
2 changed files with 16 additions and 8 deletions

View File

@ -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

View File

@ -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);
}