core: move xfer_buf_seg to segment 3, and add a collision assert
authorH. Peter Anvin <hpa@zytor.com>
Wed, 3 Jun 2009 00:09:41 +0000 (17:09 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 3 Jun 2009 00:09:41 +0000 (17:09 -0700)
Move the xfer_buf_seg to segment 3 (0x30000) for now; this is more
generous than I hope we will use but makes development easier.

Add an assert to the linker script that the .auxseg/.lowmem segments
don't collide with xfer_buf_seg.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/layout.inc
core/syslinux.ld

index ded0bf3..3f5a745 100644 (file)
@@ -99,7 +99,7 @@ RBFG_brainfuck:       resb 2048               ; Bigger than an Ethernet packet...
 ; This stuff really should come from the linker...
 ;
                global  xfer_buf_seg, core_xfer_buf
-xfer_buf_seg   equ 2000h
+xfer_buf_seg   equ 3000h
 core_xfer_buf  equ xfer_buf_seg << 4
 
 serial_buf_size        equ 4096                ; Should be a power of 2
@@ -127,12 +127,12 @@ auxseg            resb aux_size
 
 %if IS_ISOLINUX
 ; ISOLINUX doesn't have a block cache yet
-real_mode_seg  equ 3000h
+real_mode_seg  equ 4000h
 %else
                global cache_seg, core_cache_buf
-cache_seg      equ 3000h               ; 64K area for metadata cache
+cache_seg      equ 4000h               ; 64K area for metadata cache
 core_cache_buf equ cache_seg << 4
-real_mode_seg  equ 4000h
+real_mode_seg  equ 5000h
 
 pktbuf_seg     equ cache_seg           ; PXELINUX packet buffers
 %endif
index 44d3b54..d97cde5 100644 (file)
@@ -204,6 +204,10 @@ SECTIONS
        __high_clear_len = __high_clear_end - __high_clear_start;
        __high_clear_dwords = (__high_clear_len + 3) >> 2;
 
+
+       __assert_high = ASSERT(__high_clear_end <= core_xfer_buf,
+       "auxseg/lowmem region collides with xfer_buf_seg");
+
        /*
         * 32-bit code.  This is a hack for the moment due to the
         * real-mode segments also allocated.