From d427a3f85aa7dc136d98cdb1ac242f875ed35fa7 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 1 Mar 2008 14:02:41 -0500 Subject: [PATCH] Implement basic "eoi_jmp_post" code to post step. --- src/biosvar.h | 7 +++++-- src/post.c | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/biosvar.h b/src/biosvar.h index 0dd603b..a5afe54 100644 --- a/src/biosvar.h +++ b/src/biosvar.h @@ -52,8 +52,11 @@ struct bios_data_area_s { u8 floppy_return_status[7]; u8 other1[0x7]; // 40:50 - u8 other2[0x1c]; - // 40:6c + u8 other2[0x10]; + // 40:60 + u8 other3[0x7]; + u32 jump_cs_ip; + u8 dummy; u32 timer_counter; // 40:70 u8 timer_rollover; diff --git a/src/post.c b/src/post.c index ce7c9fb..e566e83 100644 --- a/src/post.c +++ b/src/post.c @@ -548,6 +548,19 @@ 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() { @@ -559,11 +572,8 @@ check_restart_status() // Normal post return; - // XXX -#if 0 if (status == 0x05) eoi_jmp_post(); -#endif BX_PANIC("Unimplemented shutdown status: %02x\n",(Bit8u)status); } -- 2.25.1