X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/f8903fddbc2a42d68bfe42a0fb6cf93ed3a14277..8ba7e5b28a7f23ebf2423df41379516c8cbac6b5:/aseg-paging/pagingstub.c?ds=sidebyside diff --git a/aseg-paging/pagingstub.c b/aseg-paging/pagingstub.c index 782bf0f..941be86 100644 --- a/aseg-paging/pagingstub.c +++ b/aseg-paging/pagingstub.c @@ -170,6 +170,17 @@ static void pt_setup(int tseg_start, int tseg_size) { addmap(0x1F0000 + i * 0x1000, tseg_start + i * 0x1000); } +void init_and_run(void) +{ + if (!initialized) + { + smi_init(); + initialized = 1; + } + + smi_entry(); +} + void c_entry(void) { paging_enb = 0; @@ -209,15 +220,6 @@ void c_entry(void) outb(0x80, 0x07); - if (!initialized) - { - smi_init(); /* Run the firstrun. */ - outb(0x80, 0x08); - - initialized = 1; - } - - outb(0x80, 0x09); - ps_switch_stack(smi_entry, 0x270000); + ps_switch_stack(init_and_run, 0x270000); outb(0x80, 0xFA); }