wok diff linld/stuff/src/LOAD.CPP @ rev 22176

linld: spare up to 30k more for zImage
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Nov 08 20:55:40 2019 +0100 (2 months ago)
parents a0dccc5d133d
children 65ea21135647
line diff
     1.1 --- a/linld/stuff/src/LOAD.CPP	Fri Nov 08 10:47:52 2019 +0100
     1.2 +++ b/linld/stuff/src/LOAD.CPP	Fri Nov 08 20:55:40 2019 +0100
     1.3 @@ -119,7 +119,7 @@
     1.4  #define topseg() 0x9000
     1.5  #endif
     1.6  u16 rm_size;
     1.7 -static u8 pm_high;	// @ = @rm_size + 2, see JUMP.ASM
     1.8 +u8 pm_high;		// @ = @rm_size + 2, see JUMP.ASM
     1.9  static u8* rm_buf;	// @ = @rm_size + 3, see JUMP.ASM
    1.10  struct image_himem imgs[2];
    1.11  
    1.12 @@ -211,7 +211,13 @@
    1.13      // Try to load kernel high, maybe even blindly storing it
    1.14      // in unallocated memory as a last resort
    1.15  
    1.16 +#ifdef	MOVE_SETUP
    1.17 +    extern unsigned rm_offset;
    1.18 +    if((u16)(((m->fallback=(u32(u16(_CS)+(u16(heap_top)>>4)+1)<<4))
    1.19 +             +m->size-rm_offset)>>16) >=
    1.20 +#else
    1.21      if((u16)(((m->fallback=(u32(u16(_CS)+(u16(heap_top)>>4)+1)<<4))+m->size)>>16) >=
    1.22 +#endif
    1.23  		 (u16)(topseg()>>12) || _pm_high) {
    1.24          m->fallback = base_himem;
    1.25      }