mirror of
https://github.com/ipxe/ipxe
synced 2026-01-31 19:49:50 +03:00
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.
This commit is contained in:
@@ -76,6 +76,7 @@ static unsigned int extmemsize_e801 ( void ) {
|
|||||||
unsigned int extmem;
|
unsigned int extmem;
|
||||||
|
|
||||||
REAL_EXEC ( rm_mem_e801,
|
REAL_EXEC ( rm_mem_e801,
|
||||||
|
"stc\n\t"
|
||||||
"int $0x15\n\t"
|
"int $0x15\n\t"
|
||||||
"pushfw\n\t"
|
"pushfw\n\t"
|
||||||
"popw %w0\n\t",
|
"popw %w0\n\t",
|
||||||
@@ -111,10 +112,8 @@ static unsigned int extmemsize_88 ( void ) {
|
|||||||
uint16_t extmem;
|
uint16_t extmem;
|
||||||
|
|
||||||
REAL_EXEC ( rm_mem_88,
|
REAL_EXEC ( rm_mem_88,
|
||||||
"int $0x15\n\t"
|
/* Ignore CF; it is not reliable for this call */
|
||||||
"jnc 1f\n\t"
|
"int $0x15\n\t",
|
||||||
"xorw %%ax, %%ax\n\t"
|
|
||||||
"\n1:\n\t",
|
|
||||||
1,
|
1,
|
||||||
OUT_CONSTRAINTS ( "=a" ( extmem ) ),
|
OUT_CONSTRAINTS ( "=a" ( extmem ) ),
|
||||||
IN_CONSTRAINTS ( "a" ( 0x8800 ) ),
|
IN_CONSTRAINTS ( "a" ( 0x8800 ) ),
|
||||||
@@ -155,6 +154,7 @@ static int meme820 ( struct memory_region *memmap, unsigned int entries ) {
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
REAL_EXEC ( rm_mem_e820,
|
REAL_EXEC ( rm_mem_e820,
|
||||||
|
"stc\n\t"
|
||||||
"int $0x15\n\t"
|
"int $0x15\n\t"
|
||||||
"pushfw\n\t"
|
"pushfw\n\t"
|
||||||
"popw %w0\n\t",
|
"popw %w0\n\t",
|
||||||
|
|||||||
Reference in New Issue
Block a user