aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk/msetup.c
diff options
context:
space:
mode:
Diffstat (limited to 'memdisk/msetup.c')
-rw-r--r--memdisk/msetup.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/memdisk/msetup.c b/memdisk/msetup.c
index a2067011..e5111174 100644
--- a/memdisk/msetup.c
+++ b/memdisk/msetup.c
@@ -38,7 +38,6 @@ static inline int get_e820(void)
uint64_t base;
uint64_t len;
uint32_t type;
- uint32_t extattr;
} *buf = sys_bounce;
uint32_t copied;
int range_count = 0;
@@ -46,7 +45,6 @@ static inline int get_e820(void)
memset(&regs, 0, sizeof regs);
memset(buf, 0, sizeof *buf);
- buf->extattr = 1;
do {
regs.eax.l = 0x0000e820;
@@ -61,18 +59,12 @@ static inline int get_e820(void)
if ( regs.eax.l != 0x534d4150 || copied < 20 )
break;
- if ( copied < 24 )
- buf->extattr = 1;
-
- printf("e820: %08x%08x %08x%08x %d [%x]\n",
+ printf("e820: %08x%08x %08x%08x %d\n",
(uint32_t)(buf->base >> 32), (uint32_t)buf->base,
(uint32_t)(buf->len >> 32), (uint32_t)buf->len,
- buf->type, buf->extattr);
-
- if ( !(buf->extattr & 1) )
- continue; /* Disabled range, just ignore */
+ buf->type);
- insertrange(buf->base, buf->len, buf->type, buf->extattr);
+ insertrange(buf->base, buf->len, buf->type);
range_count++;
} while ( regs.ebx.l );
@@ -86,7 +78,7 @@ static inline void get_dos_mem(void)
memset(&regs, 0, sizeof regs);
syscall(0x12, &regs, &regs);
- insertrange(0, (uint64_t)((uint32_t)regs.eax.w[0] << 10), 1, 1);
+ insertrange(0, (uint64_t)((uint32_t)regs.eax.w[0] << 10), 1);
printf(" DOS: %d K\n", regs.eax.w[0]);
}
@@ -102,10 +94,10 @@ static inline int get_e801(void)
if ( !(err = regs.eflags.l & 1) ) {
if ( regs.eax.w[0] ) {
- insertrange(0x100000, (uint64_t)((uint32_t)regs.eax.w[0] << 10), 1, 1);
+ insertrange(0x100000, (uint64_t)((uint32_t)regs.eax.w[0] << 10), 1);
}
if ( regs.ebx.w[0] ) {
- insertrange(0x1000000, (uint64_t)((uint32_t)regs.ebx.w[0] << 16), 1, 1);
+ insertrange(0x1000000, (uint64_t)((uint32_t)regs.ebx.w[0] << 16), 1);
}
printf("e801: %04x %04x\n", regs.eax.w[0], regs.ebx.w[0]);
@@ -127,7 +119,7 @@ static inline int get_88(void)
if ( !(err = regs.eflags.l & 1) ) {
if ( regs.eax.w[0] ) {
- insertrange(0x100000, (uint64_t)((uint32_t)regs.eax.w[0] << 10), 1, 1);
+ insertrange(0x100000, (uint64_t)((uint32_t)regs.eax.w[0] << 10), 1);
}
printf(" 88: %04x\n", regs.eax.w[0]);