Pārlūkot izejas kodu

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 gadus atpakaļ
vecāks
revīzija
53935e9dc6
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. 4
    4
      src/arch/i386/firmware/pcbios/memmap.c

+ 4
- 4
src/arch/i386/firmware/pcbios/memmap.c Parādīt failu

@@ -76,6 +76,7 @@ static unsigned int extmemsize_e801 ( void ) {
76 76
 	unsigned int extmem;
77 77
 
78 78
 	REAL_EXEC ( rm_mem_e801,
79
+		    "stc\n\t"
79 80
 		    "int $0x15\n\t"
80 81
 		    "pushfw\n\t"
81 82
 		    "popw %w0\n\t",
@@ -111,10 +112,8 @@ static unsigned int extmemsize_88 ( void ) {
111 112
 	uint16_t extmem;
112 113
 
113 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 117
 		    1,
119 118
 		    OUT_CONSTRAINTS ( "=a" ( extmem ) ),
120 119
 		    IN_CONSTRAINTS ( "a" ( 0x8800 ) ),
@@ -155,6 +154,7 @@ static int meme820 ( struct memory_region *memmap, unsigned int entries ) {
155 154
 
156 155
 	do {
157 156
 		REAL_EXEC ( rm_mem_e820,
157
+			    "stc\n\t"
158 158
 			    "int $0x15\n\t"
159 159
 			    "pushfw\n\t"
160 160
 			    "popw %w0\n\t",

Notiek ielāde…
Atcelt
Saglabāt