Works, needs more support

This commit is contained in:
Ronald G. Minnich 2002-04-08 17:13:26 +00:00
commit 495ae152e9
2 changed files with 37 additions and 17 deletions

View file

@ -277,18 +277,6 @@ void hardwaremain(int boot_complete)
pci_enable();
post_code(0x89);
// it's not clear where I should do this. We'll try here.
// Seems to be ok in practice.
#if CONFIG_REALMODE_IDT == 1
printk_debug("INSTALL REAL-MODE IDT\n");
setup_realmode_idt();
#endif
#if CONFIG_VGABIOS == 1
printk_debug("DO THE VGA BIOS\n");
do_vgabios();
post_code(0x90);
#endif
// generic mainboard fixup
mainboard_fixup();
@ -332,6 +320,20 @@ void hardwaremain(int boot_complete)
/* make certain we are the only cpu running in linuxBIOS */
wait_for_other_cpus();
// we do this right here because:
// - all the hardware is working, and some VGA bioses seem to need
// that
// - we need page 0 below for linuxbios tables.
#if CONFIG_REALMODE_IDT == 1
printk_debug("INSTALL REAL-MODE IDT\n");
setup_realmode_idt();
#endif
#if CONFIG_VGABIOS == 1
printk_debug("DO THE VGA BIOS\n");
do_vgabios();
post_code(0x93);
#endif
/* Now that we have collected all of our information
* write our configuration tables.
*/
@ -347,3 +349,6 @@ void hardwaremain(int boot_complete)
}

View file

@ -49,7 +49,7 @@ __asm__ __volatile__ (
"callbiosint16:\n"
// clean up the int #. To save space we put it in the lower
// byte. But the top 24 bits are junk.
"andl $0xffffff00, %eax\n"
"andl $0xff, %eax\n"
// this push does two things:
// - put the INT # on the stack as a parameter
// - provides us with a temp for the %cr0 mods.
@ -115,7 +115,8 @@ __asm__ __volatile__ (
enum {
PCIBIOS = 0x1a
PCIBIOS = 0x1a,
MEMSIZE = 0x12
};
#ifdef CONFIG_PCIBIOS
int
@ -161,14 +162,28 @@ biosint(
intnumber, eax, ebx, ecx, edx);
printk_debug("biosint: ebp 0x%lx esp 0x%lx edi 0x%lx esi 0x%lx\n", ebp, esp, edi, esi);
printk_debug("biosint: ip 0x%x cs 0x%x flags 0x%x\n", ip, cs, flags);
// cases in a good compiler are just as good as your own tables.
switch (intnumber) {
#ifdef CONFIG_PCIBIOS
if (intnumber == PCIBIOS)
ret = pcibios( &edi, &esi, &ebp, &esp, &ebx, &edx, &ecx, &eax, &flags);
case PCIBIOS:
ret = pcibios( &edi, &esi, &ebp, &esp,
&ebx, &edx, &ecx, &eax, &flags);
break;
#endif
case MEMSIZE:
// who cares.
eax = 64 * 1024;
ret = 0;
break;
default:
printk_info(__FUNCTION__ ": Unsupport int #0x%x\n",
intnumber);
break;
}
if (ret)
flags |= 1; // carry flags
else
flags &= ~1;
#endif
stackflags = flags;
return ret;
}