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:
parent
acad0a6ed4
commit
ad4ec34fe8
28
src/post.c
28
src/post.c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue