aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-06-02 17:09:41 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-06-02 17:09:41 -0700
commit390ab32864ad3fcbe58096a2e2fdcf6465f173fe (patch)
tree81b93bd27978c12d8e6f61f331373ba1641441d7
parentc0e6f47b3219e27ba23a1bc4d19696e6d19d1682 (diff)
downloadsyslinux-390ab32864ad3fcbe58096a2e2fdcf6465f173fe.tar.gz
syslinux-390ab32864ad3fcbe58096a2e2fdcf6465f173fe.tar.xz
syslinux-390ab32864ad3fcbe58096a2e2fdcf6465f173fe.zip
core: move xfer_buf_seg to segment 3, and add a collision assert
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>
-rw-r--r--core/layout.inc8
-rw-r--r--core/syslinux.ld4
2 files changed, 8 insertions, 4 deletions
diff --git a/core/layout.inc b/core/layout.inc
index ded0bf31..3f5a7457 100644
--- a/core/layout.inc
+++ b/core/layout.inc
@@ -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
diff --git a/core/syslinux.ld b/core/syslinux.ld
index 44d3b548..d97cde54 100644
--- a/core/syslinux.ld
+++ b/core/syslinux.ld
@@ -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.