Browse Source

Set carry flag before calling INT 15,e801 and INT 15,e820.

Ignore carry flag for INT 15,88; the Ralf Brown interrupt list says
that CF is unreliable for this call.
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
53935e9dc6
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      src/arch/i386/firmware/pcbios/memmap.c

+ 4
- 4
src/arch/i386/firmware/pcbios/memmap.c View File

76
 	unsigned int extmem;
76
 	unsigned int extmem;
77
 
77
 
78
 	REAL_EXEC ( rm_mem_e801,
78
 	REAL_EXEC ( rm_mem_e801,
79
+		    "stc\n\t"
79
 		    "int $0x15\n\t"
80
 		    "int $0x15\n\t"
80
 		    "pushfw\n\t"
81
 		    "pushfw\n\t"
81
 		    "popw %w0\n\t",
82
 		    "popw %w0\n\t",
111
 	uint16_t extmem;
112
 	uint16_t extmem;
112
 
113
 
113
 	REAL_EXEC ( rm_mem_88,
114
 	REAL_EXEC ( rm_mem_88,
114
-		    "int $0x15\n\t"
115
-		    "jnc 1f\n\t"
116
-		    "xorw %%ax, %%ax\n\t"
117
-		    "\n1:\n\t",
115
+		    /* Ignore CF; it is not reliable for this call */
116
+		    "int $0x15\n\t",
118
 		    1,
117
 		    1,
119
 		    OUT_CONSTRAINTS ( "=a" ( extmem ) ),
118
 		    OUT_CONSTRAINTS ( "=a" ( extmem ) ),
120
 		    IN_CONSTRAINTS ( "a" ( 0x8800 ) ),
119
 		    IN_CONSTRAINTS ( "a" ( 0x8800 ) ),
155
 
154
 
156
 	do {
155
 	do {
157
 		REAL_EXEC ( rm_mem_e820,
156
 		REAL_EXEC ( rm_mem_e820,
157
+			    "stc\n\t"
158
 			    "int $0x15\n\t"
158
 			    "int $0x15\n\t"
159
 			    "pushfw\n\t"
159
 			    "pushfw\n\t"
160
 			    "popw %w0\n\t",
160
 			    "popw %w0\n\t",

Loading…
Cancel
Save