|
@@ -50,26 +50,23 @@ static void empty_8042 ( void )
|
50
|
50
|
*/
|
51
|
51
|
void gateA20_set ( void ) {
|
52
|
52
|
static char reentry_guard = 0;
|
53
|
|
- uint16_t flags, status;
|
|
53
|
+ unsigned int discard_a;
|
|
54
|
+ unsigned int flags;
|
54
|
55
|
|
55
|
56
|
if ( reentry_guard )
|
56
|
57
|
return;
|
57
|
58
|
reentry_guard = 1;
|
58
|
59
|
|
59
|
|
- REAL_EXEC ( rm_enableA20,
|
60
|
|
- "sti\n\t"
|
61
|
|
- "stc\n\t"
|
62
|
|
- "int $0x15\n\t"
|
63
|
|
- "pushfw\n\t"
|
64
|
|
- "popw %%bx\n\t"
|
65
|
|
- "cli\n\t",
|
66
|
|
- 2,
|
67
|
|
- OUT_CONSTRAINTS ( "=a" ( status ), "=b" ( flags ) ),
|
68
|
|
- IN_CONSTRAINTS ( "a" ( Enable_A20 ) ),
|
69
|
|
- CLOBBER ( "ecx", "edx", "ebp", "esi", "edi" ) );
|
|
60
|
+ __asm__ __volatile__ ( REAL_CODE ( "sti\n\t"
|
|
61
|
+ "stc\n\t"
|
|
62
|
+ "int $0x15\n\t"
|
|
63
|
+ "pushfw\n\t"
|
|
64
|
+ "popw %w0\n\t"
|
|
65
|
+ "cli\n\t" )
|
|
66
|
+ : "=r" ( flags ), "=a" ( discard_a )
|
|
67
|
+ : "a" ( Enable_A20 ) );
|
70
|
68
|
|
71
|
|
- if ( ( flags & CF ) ||
|
72
|
|
- ( ( status >> 8 ) & 0xff ) ) {
|
|
69
|
+ if ( flags & CF ) {
|
73
|
70
|
/* INT 15 method failed, try alternatives */
|
74
|
71
|
#ifdef IBM_L40
|
75
|
72
|
outb(0x2, 0x92);
|