wok-next diff syslinux/stuff/iso2exe/bootlinux.c @ rev 15981
syslinux-tools: add meminfo.exe
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Mar 01 19:10:36 2014 +0000 (2014-03-01) |
parents | df021be024df |
children | 647e4ebbbcae |
line diff
1.1 --- a/syslinux/stuff/iso2exe/bootlinux.c Sat Mar 01 10:30:44 2014 +0000 1.2 +++ b/syslinux/stuff/iso2exe/bootlinux.c Sat Mar 01 19:10:36 2014 +0000 1.3 @@ -103,6 +103,17 @@ 1.4 #endasm 1.5 } 1.6 1.7 +static unsigned extendedramsizeinkb(void) 1.8 +{ 1.9 +#asm 1.10 + mov ah, #0x88 1.11 + int 0x15 1.12 + jnc gottop 1.13 + xor ax, ax 1.14 +gottop: 1.15 +#endasm 1.16 +} 1.17 + 1.18 static void load(struct mem *p, unsigned long size) 1.19 { 1.20 if (vm86()) 1.21 @@ -117,9 +128,9 @@ 1.22 } 1.23 p->align = PAGE_SIZE; 1.24 break; 1.25 - case 4096: // first initrd : skip 0xF00000 .. 0x1000000 mapping hole 1.26 - initrd_addr = (p->base + size > 0xF00000 && 1.27 - p->base < 0x1000000) ? 0x1000000 : p->base; 1.28 + case 4096: // first initrd : skip mapping hole before 16M 1.29 + initrd_addr = (extendedramsizeinkb() > 24000U) ? 1.30 + 0x1000000 : p->base; 1.31 p->align = 4; 1.32 } 1.33 while (size) {