Cleanup start logic in post.

Merge eoi_jmp_post() with check_restart_status() - it makes the logic
a little simpler to understand.
This commit is contained in:
Kevin O'Connor 2008-03-02 23:25:11 -05:00
parent acad0a6ed4
commit ad4ec34fe8
1 changed files with 12 additions and 16 deletions

View File

@ -548,19 +548,6 @@ init_dma()
outb(0x00, PORT_DMA2_MASK_REG);
}
static void
eoi_jmp_post()
{
// XXX - this is supposed to jump without changing any memory -
// but the stack has been altered by the time the code gets here.
eoi_both_pics();
struct bregs br;
memset(&br, 0, sizeof(br));
br.cs = bda->jump_cs_ip >> 16;
br.ip = bda->jump_cs_ip;
call16(&br);
}
static void
check_restart_status()
{
@ -572,10 +559,19 @@ check_restart_status()
// Normal post
return;
if (status == 0x05)
eoi_jmp_post();
if (status != 0x05) {
BX_PANIC("Unimplemented shutdown status: %02x\n", status);
return;
}
BX_PANIC("Unimplemented shutdown status: %02x\n", status);
// XXX - this is supposed to jump without changing any memory -
// but the stack has been altered by the time the code gets here.
eoi_both_pics();
struct bregs br;
memset(&br, 0, sizeof(br));
br.cs = bda->jump_cs_ip >> 16;
br.ip = bda->jump_cs_ip;
call16(&br);
}
void VISIBLE