From 2bb82b2e05ad96787722ef99bc429e31afb1e94e Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 12 Feb 2008 13:09:07 -0800 Subject: [PATCH] Change command line limit to 2047 characters Change the command line limit to 2047 characters, which is also the current kernel limit. As a result, shuffle around the memory layout to make the larger buffers fit. TODO: consider moving vgafontbuf to getcseg, and try to make do with fewer command line-sized buffers. --- config.inc | 2 +- dnsresolv.inc | 2 +- extlinux.asm | 2 +- layout.inc | 11 ++++++----- pxelinux.asm | 1 + 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/config.inc b/config.inc index 0d1ff36..d199597 100644 --- a/config.inc +++ b/config.inc @@ -19,7 +19,7 @@ %ifndef _CONFIG_INC %define _CONFIG_INC -max_cmd_len equ 511 ; Must be &3; 255 is the kernel limit +max_cmd_len equ 2047 ; Must be &3; 2047 is the kernel limit HIGHMEM_MAX equ 037FFFFFFh ; DEFAULT highest address for an initrd DEFAULT_BAUD equ 9600 ; Default baud rate for serial port BAUD_DIVISOR equ 115200 ; Serial port parameter diff --git a/dnsresolv.inc b/dnsresolv.inc index 8d90256..f31c578 100644 --- a/dnsresolv.inc +++ b/dnsresolv.inc @@ -150,7 +150,7 @@ dns_skiplabel: .rdata: equ $ endstruc - section .bss + section .bss2 alignb 2 DNSSendBuf resb DNS_MAX_PACKET DNSRecvBuf resb DNS_MAX_PACKET diff --git a/extlinux.asm b/extlinux.asm index aa78589..551d02b 100644 --- a/extlinux.asm +++ b/extlinux.asm @@ -111,7 +111,7 @@ trackbufsize equ 8192 trackbuf resb trackbufsize ; Track buffer goes here ; ends at 2800h - section .bss1 + section .bss SuperBlock resb 1024 ; ext2 superblock SuperInfo resq 16 ; DOS superblock expanded ClustSize resd 1 ; Bytes/cluster ("block") diff --git a/layout.inc b/layout.inc index ba6b231..c800f1b 100644 --- a/layout.inc +++ b/layout.inc @@ -48,9 +48,10 @@ STACK_START equ TEXT_START-STACK_SIZE section .config align=4 valign=16 follows=.bcopy32 vfollows=.bcopy32 section .config.end nobits valign=4 vfollows=.config - ; Use .bss1 for things that doesn't have to be in low memory, - ; but are in order to offload .bss - section .bss1 nobits valign=16 vfollows=.config.end + ; Use .bss for things that doesn't have to be in low memory; + ; with .bss1 and .bss2 to offload. .earlybss should be used + ; for things that absolutely have to be below 0x7c00. + section .bss nobits valign=16 vfollows=.config.end ; Warning here: RBFG build 22 randomly overwrites ; memory location [0x5680,0x576c), possibly more. It @@ -66,7 +67,7 @@ RBFG_brainfuck: resb 2048 ; Bigger than an Ethernet packet... %if IS_PXELINUX section .bss2 nobits valign=16 vfollows=.rbfg %else - section .bss2 nobits valign=16 vfollows=.bss1 + section .bss2 nobits valign=16 vfollows=.bss %endif section .text start=TEXT_START @@ -87,7 +88,7 @@ RBFG_brainfuck: resb 2048 ; Bigger than an Ethernet packet... section .uibss nobits align=16 follows=.adv ; Normal bss... - section .bss nobits align=16 follows=.uibss + section .bss1 nobits align=16 follows=.uibss ; Reserve space for stack section .stack nobits align=16 start=STACK_START diff --git a/pxelinux.asm b/pxelinux.asm index f9e911c..a015c3f 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -237,6 +237,7 @@ pxe_unload_stack_pkt_len equ $-pxe_unload_stack_pkt alignb 16 ; BOOTP/DHCP packet buffer + section .bss2 alignb 16 packet_buf resb 2048 ; Transfer packet packet_buf_size equ $-packet_buf -- 2.7.4