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

linld: spare up to 30k more for zImage (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Nov 09 13:26:32 2019 +0100 (11 months ago)
parents 10fa26e4c60d
children ee7d4644eb13
line diff
     1.1 --- a/linld/stuff/src/LOAD.CPP	Fri Nov 08 20:55:40 2019 +0100
     1.2 +++ b/linld/stuff/src/LOAD.CPP	Sat Nov 09 13:26:32 2019 +0100
     1.3 @@ -112,15 +112,14 @@
     1.4  const u32 HdrS = 'H' + ('d'<<8) + (u32('r')<<16) + (u32('S')<<24);
     1.5  
     1.6  // register value to launch the kernel real mode code
     1.7 -static u32 csip;
     1.8 +u32 csip;
     1.9  #ifdef NO386
    1.10  extern "C" u16 topseg();
    1.11  #else
    1.12  #define topseg() 0x9000
    1.13  #endif
    1.14 -u16 rm_size;
    1.15 -u8 pm_high;		// @ = @rm_size + 2, see JUMP.ASM
    1.16 -static u8* rm_buf;	// @ = @rm_size + 3, see JUMP.ASM
    1.17 +static u16 rm_size;
    1.18 +static u8* rm_buf;	// @ = @rm_size + 2, see A20.ASM
    1.19  struct image_himem imgs[2];
    1.20  
    1.21  static const char kernel_file_error[] = "Can't use kernel file";
    1.22 @@ -128,9 +127,8 @@
    1.23  
    1.24      struct	image_himem *m = &pm;
    1.25  #define _rm_buf(m)	(((u8**)(m))[-1])
    1.26 -#define _pm_high	(((u8*)(m))[-3])
    1.27 -#define _rm_size	(*(u16*)((u8*)(m)-5))
    1.28 -#define _csip		(*(u32*)((u8*)(m)-9))
    1.29 +#define _rm_size	(((u16*)(m))[-2])
    1.30 +#define _csip		(((u32*)(m))[-2])
    1.31    {
    1.32      struct kernelparams_t *kernelparams;
    1.33      kernelparams = &(((first1k_t*) (_rm_buf(m) = (u8 *)heap_top))->params);
    1.34 @@ -218,7 +216,7 @@
    1.35  #else
    1.36      if((u16)(((m->fallback=(u32(u16(_CS)+(u16(heap_top)>>4)+1)<<4))+m->size)>>16) >=
    1.37  #endif
    1.38 -		 (u16)(topseg()>>12) || _pm_high) {
    1.39 +		 (u16)(topseg()>>12) || pm_high) {
    1.40          m->fallback = base_himem;
    1.41      }
    1.42      if (((u16 *)&m->fallback)[1] == 0) {