diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-02-16 13:49:33 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-02-16 13:49:33 -0800 |
commit | b4ce3fadde8ffb9b306e8d33bb2710f2f8faadae (patch) | |
tree | 05d91de057b91d186a85167894d21e9a8575f125 | |
parent | 28f47a6b7c78aca4ad9991010502e650e8c80b04 (diff) | |
download | syslinux-b4ce3fadde8ffb9b306e8d33bb2710f2f8faadae.tar.gz |
fs: move the disk cache into high memory
Move the disk cache out of the DOS memory area.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | core/fs/diskio.c | 5 | ||||
-rw-r--r-- | core/layout.inc | 16 |
2 files changed, 7 insertions, 14 deletions
diff --git a/core/fs/diskio.c b/core/fs/diskio.c index eddcd8d8..4c965cd8 100644 --- a/core/fs/diskio.c +++ b/core/fs/diskio.c @@ -308,11 +308,12 @@ struct device * device_init(uint8_t devno, bool cdrom, sector_t part_start, uint16_t bsHeads, uint16_t bsSecPerTrack) { static struct device dev; + static char diskcache[128*1024] __aligned(4096); dev.disk = disk_init(devno, cdrom, part_start, bsHeads, bsSecPerTrack); - dev.cache_data = core_cache_buf; - dev.cache_size = sizeof core_cache_buf; + dev.cache_data = diskcache; + dev.cache_size = sizeof diskcache; return &dev; } diff --git a/core/layout.inc b/core/layout.inc index 50998023..baf45b92 100644 --- a/core/layout.inc +++ b/core/layout.inc @@ -120,7 +120,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 3000h +xfer_buf_seg equ 2000h core_xfer_buf equ xfer_buf_seg << 4 serial_buf_size equ 4096 ; Should be a power of 2 @@ -141,16 +141,8 @@ serial_buf_size equ 4096 ; Should be a power of 2 auxseg resb aux_size ; -; Bounce buffer for I/O to high mem -; Note: we keep all the segments page-aligned, even if that probably -; is somewhat excessive. Sector alignment is obligatory, however. +; Segment for the real mode code (needed as long as we have a in-kernel +; loader and/or COM16 support. ; - - global cache_seg, core_cache_buf -cache_seg equ 4000h ; 64K area for metadata cache -core_cache_buf equ cache_seg << 4 -real_mode_seg equ 5000h - -pktbuf_seg equ cache_seg ; PXELINUX packet buffers - +real_mode_seg equ xfer_buf_seg + 1000h comboot_seg equ real_mode_seg ; COMBOOT image loading zone |