Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 312 → Rev 313

/shark/trunk/oslib/xlib/xbios.c
26,6 → 26,9
#include <ll/i386/x-bios.h>
#include <ll/i386/mem.h>
 
#include <ll/i386/advtimer.h>
#include <ll/i386/apic.h>
 
FILE(X-BIOS);
 
/* The interface between X (and 32 bit PM) and BIOS (which runs at 16 bits */
36,16 → 39,24
/* Assembler gate JMP instruction */
extern void _x_callBIOS(void);
X_CALLBIOS *xbc = x_bios_address();
DWORD msr1 = 0,msr2 = 0;
 
/* Send interrupt request & register through the X_Info structure */
xbc->_irqno = service;
memcpy(&(xbc->_ir),in,sizeof(X_REGS16));
memcpy(&(xbc->_sr),s,sizeof(X_SREGS16));
#ifdef __APIC__
rdmsr(APIC_BASE_MSR,msr1,msr2);
disable_APIC_timer();
#endif
/* Back to RM to execute the BIOS routine */
_x_callBIOS();
 
/* Get the return register values */
#ifdef __APIC__
wrmsr(APIC_BASE_MSR,msr1,msr2);
enable_APIC_timer();
#endif
memcpy(out,&(xbc->_or),sizeof(X_REGS16));
memcpy(s,&(xbc->_sr),sizeof(X_SREGS16));
}