summaryrefslogtreecommitdiffstats
path: root/src/arch
diff options
context:
space:
mode:
authorMichael Brown2006-05-24 15:28:39 +0200
committerMichael Brown2006-05-24 15:28:39 +0200
commite8550035afe8030352dae542a32bea048804c6e6 (patch)
tree1df541c449b2a1d3903a3e76c7e5c64b28e28c70 /src/arch
parentUpdated to REAL_CODE(). (diff)
downloadipxe-e8550035afe8030352dae542a32bea048804c6e6.tar.gz
ipxe-e8550035afe8030352dae542a32bea048804c6e6.tar.xz
ipxe-e8550035afe8030352dae542a32bea048804c6e6.zip
Updated to REAL_CODE()
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/firmware/pcbios/gateA20.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/arch/i386/firmware/pcbios/gateA20.c b/src/arch/i386/firmware/pcbios/gateA20.c
index bbee376d9..5a27e7069 100644
--- a/src/arch/i386/firmware/pcbios/gateA20.c
+++ b/src/arch/i386/firmware/pcbios/gateA20.c
@@ -50,26 +50,23 @@ static void empty_8042 ( void )
*/
void gateA20_set ( void ) {
static char reentry_guard = 0;
- uint16_t flags, status;
+ unsigned int discard_a;
+ unsigned int flags;
if ( reentry_guard )
return;
reentry_guard = 1;
- REAL_EXEC ( rm_enableA20,
- "sti\n\t"
- "stc\n\t"
- "int $0x15\n\t"
- "pushfw\n\t"
- "popw %%bx\n\t"
- "cli\n\t",
- 2,
- OUT_CONSTRAINTS ( "=a" ( status ), "=b" ( flags ) ),
- IN_CONSTRAINTS ( "a" ( Enable_A20 ) ),
- CLOBBER ( "ecx", "edx", "ebp", "esi", "edi" ) );
+ __asm__ __volatile__ ( REAL_CODE ( "sti\n\t"
+ "stc\n\t"
+ "int $0x15\n\t"
+ "pushfw\n\t"
+ "popw %w0\n\t"
+ "cli\n\t" )
+ : "=r" ( flags ), "=a" ( discard_a )
+ : "a" ( Enable_A20 ) );
- if ( ( flags & CF ) ||
- ( ( status >> 8 ) & 0xff ) ) {
+ if ( flags & CF ) {
/* INT 15 method failed, try alternatives */
#ifdef IBM_L40
outb(0x2, 0x92);