37,28 → 37,27 |
void X_callBIOS(int service,X_REGS16 *in,X_REGS16 *out,X_SREGS16 *s) |
{ |
/* Assembler gate JMP instruction */ |
extern BYTE use_tsc, use_apic; |
extern void _x_callBIOS(void); |
X_CALLBIOS *xbc = x_bios_address(); |
#ifdef __APIC__ |
DWORD msr1 = 0,msr2 = 0; |
#endif |
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__ |
if (use_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__ |
if (use_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)); |
} |