From 390ab32864ad3fcbe58096a2e2fdcf6465f173fe Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 2 Jun 2009 17:09:41 -0700 Subject: [PATCH] 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 --- core/layout.inc | 8 ++++---- core/syslinux.ld | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/layout.inc b/core/layout.inc index ded0bf3..3f5a745 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 44d3b54..d97cde5 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. -- 2.7.4