From fc7c93a512f03a4ac912d4c16c3e601e199864a2 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 27 Feb 2009 07:48:07 -0800 Subject: isohdpfx: work around gas/ld miscompilation Some, unknown, version of gas or ld miscompiles a relative jump to an absolute symbol, resulting in a broken isohybrid. Implement a workaround for it by using a far jmp, which is absolute. Fortunately, the isohybrid prefix is one of the very few boot sectors we have which isn't short on space. --- mbr/isohdpfx.S | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mbr/isohdpfx.S b/mbr/isohdpfx.S index 9a97a5ee..ecb3a1a0 100644 --- a/mbr/isohdpfx.S +++ b/mbr/isohdpfx.S @@ -143,7 +143,15 @@ next: cli movw $heads, %sp - jmp isolinux_start_hybrid + + /* + * Use a ljmpw here to work around a bug in some unknown version + * of gas or ld when it comes to jumping to an absolute symbol... + * + * Look more closely into it if we ever are short on space. + */ + ljmpw $0, $isolinux_start_hybrid + jmpw *%si bad_signature: call error -- cgit v1.2.3 From 99919ef6c96e743ae610434f6ea7ac78bd7caa97 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 27 Feb 2009 11:55:23 -0800 Subject: Use YEAR, not the obsolete macro year --- core/config.inc | 5 ----- core/extlinux.asm | 2 +- core/isolinux.asm | 2 +- core/ldlinux.asm | 2 +- core/pxelinux.asm | 2 +- 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/core/config.inc b/core/config.inc index 8dd9ca6f..8ac77758 100644 --- a/core/config.inc +++ b/core/config.inc @@ -48,9 +48,4 @@ MAX_FKEYS equ 12 ; Number of F-key help files ; %include "../version.gen" -; -; Copyright year... -; -%define year '2008' - %endif ; _CONFIG_INC diff --git a/core/extlinux.asm b/core/extlinux.asm index c7a51e94..a3cb3af1 100644 --- a/core/extlinux.asm +++ b/core/extlinux.asm @@ -1551,7 +1551,7 @@ build_curdir_str: ; ----------------------------------------------------------------------------- section .data -copyright_str db ' Copyright (C) 1994-', year, ' H. Peter Anvin' +copyright_str db ' Copyright (C) 1994-', YEAR, ' H. Peter Anvin' db CR, LF, 0 err_bootfailed db CR, LF, 'Boot failed: please change disks and press ' db 'a key to continue.', CR, LF, 0 diff --git a/core/isolinux.asm b/core/isolinux.asm index 2c6d9702..764ba7d3 100644 --- a/core/isolinux.asm +++ b/core/isolinux.asm @@ -1027,7 +1027,7 @@ writestr_early equ writestr ; ----------------------------------------------------------------------------- syslinux_banner db CR, LF, 'ISOLINUX ', VERSION_STR, ' ', DATE_STR, ' ', 0 -copyright_str db ' Copyright (C) 1994-', year, ' H. Peter Anvin' +copyright_str db ' Copyright (C) 1994-', YEAR, ' H. Peter Anvin' db CR, LF, 0 isolinux_str db 'isolinux: ', 0 %ifdef DEBUG_MESSAGES diff --git a/core/ldlinux.asm b/core/ldlinux.asm index da1ddde2..d911e9f5 100644 --- a/core/ldlinux.asm +++ b/core/ldlinux.asm @@ -2049,7 +2049,7 @@ getfatsector: ; ----------------------------------------------------------------------------- section .data -copyright_str db ' Copyright (C) 1994-', year, ' H. Peter Anvin' +copyright_str db ' Copyright (C) 1994-', YEAR, ' H. Peter Anvin' db CR, LF, 0 err_bootfailed db CR, LF, 'Boot failed: please change disks and press ' db 'a key to continue.', CR, LF, 0 diff --git a/core/pxelinux.asm b/core/pxelinux.asm index a660bd6c..8229be08 100644 --- a/core/pxelinux.asm +++ b/core/pxelinux.asm @@ -2694,7 +2694,7 @@ writestr_early equ writestr section .data -copyright_str db ' Copyright (C) 1994-', year, ' H. Peter Anvin' +copyright_str db ' Copyright (C) 1994-', YEAR, ' H. Peter Anvin' db CR, LF, 0 err_bootfailed db CR, LF, 'Boot failed: press a key to retry, or wait for reset...', CR, LF, 0 bailmsg equ err_bootfailed -- cgit v1.2.3 From e41d155e6dc4dd0ca33e55209ff2198a1c882a5b Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 27 Feb 2009 11:59:28 -0800 Subject: pxelinux: abstract the handling of PXENV+ and !PXE Make the handling of PXENV+ versus !PXE simpler by abstracting the differences: push the various fields to the stack in a common order and then process them in common code. --- core/pxelinux.asm | 151 ++++++++++++++++++++---------------------------------- 1 file changed, 55 insertions(+), 96 deletions(-) diff --git a/core/pxelinux.asm b/core/pxelinux.asm index 8229be08..a0fd832d 100644 --- a/core/pxelinux.asm +++ b/core/pxelinux.asm @@ -384,7 +384,7 @@ have_pxenv: call crlf cmp ax,0201h ; API version 2.1 or higher - jb old_api + jb .old_api cmp byte [es:bx+8],2Ch ; Space for !PXE pointer? jb .pxescan les bx,[es:bx+28h] ; !PXE structure pointer @@ -398,121 +398,82 @@ have_pxenv: je have_pxe ; Otherwise, no dice, use PXENV+ structure +.old_api: les bx,[StrucPtr] + push word [es:bx+22h] ; UNDI data len + push word [es:bx+20h] ; UNDI data seg + push word [es:bx+26h] ; UNDI code len + push word [es:bx+24h] ; UNDI code seg + push dword [es:bx+0Ah] ; PXENV+ entry point -old_api: ; Need to use a PXENV+ structure - mov si,using_pxenv_msg - call writestr_early + mov si,pxenventry_msg + jmp have_entrypoint - mov eax,[es:bx+0Ah] ; PXE RM API - mov [PXEEntry],eax +have_pxe: + mov [StrucPtr],bx + mov [StrucPtr+2],es - mov si,undi_data_msg - call writestr_early - mov ax,[es:bx+20h] - call writehex4 - call crlf - mov si,undi_data_len_msg - call writestr_early - mov ax,[es:bx+22h] - call writehex4 - call crlf - mov si,undi_code_msg - call writestr_early - mov ax,[es:bx+24h] - call writehex4 - call crlf - mov si,undi_code_len_msg - call writestr_early - mov ax,[es:bx+26h] - call writehex4 - call crlf + push word [es:bx+2Eh] ; UNDI data len + push word [es:bx+28h] ; UNDI data seg + push word [es:bx+36h] ; UNDI code len + push word [es:bx+30h] ; UNDI code seg + push dword [es:bx+10h] ; !PXE entry point - ; Compute base memory size from PXENV+ structure - xor esi,esi - movzx eax,word [es:bx+20h] ; UNDI data seg - cmp ax,[es:bx+24h] ; UNDI code seg - ja .use_data - mov ax,[es:bx+24h] - mov si,[es:bx+26h] - jmp short .combine -.use_data: - mov si,[es:bx+22h] -.combine: - shl eax,4 - add eax,esi - shr eax,10 ; Convert to kilobytes - mov [RealBaseMem],ax + mov si,pxeentry_msg - mov si,pxenventry_msg - call writestr_early +have_entrypoint: + push cs + pop es ; Restore CS == DS == ES + + call writestr_early ; !PXE or PXENV+ entry found + + pop dword [PXEEntry] mov ax,[PXEEntry+2] call writehex4 mov al,':' call writechr mov ax,[PXEEntry] call writehex4 + mov si,viaplan_msg call writestr_early - jmp have_entrypoint - -have_pxe: - mov [StrucPtr],bx - mov [StrucPtr+2],es - - mov eax,[es:bx+10h] - mov [PXEEntry],eax - mov si,undi_data_msg - call writestr_early - mov eax,[es:bx+2Ah] - call writehex8 - call crlf - mov si,undi_data_len_msg - call writestr_early - mov ax,[es:bx+2Eh] - call writehex4 - call crlf mov si,undi_code_msg call writestr_early - mov eax,[es:bx+32h] - call writehex8 - call crlf - mov si,undi_code_len_msg + pop ax ; UNDI code segment + call writehex4 + xchg dx,ax + mov si,len_msg call writestr_early - mov ax,[es:bx+36h] + pop ax ; UNDI code length call writehex4 call crlf + add ax,15 + shr ax,4 + add dx,ax ; DX = seg of end of UNDI code - ; Compute base memory size from !PXE structure - xor esi,esi - mov eax,[es:bx+2Ah] - cmp eax,[es:bx+32h] - ja .use_data - mov eax,[es:bx+32h] - mov si,[es:bx+36h] - jmp short .combine -.use_data: - mov si,[es:bx+2Eh] -.combine: - add eax,esi - shr eax,10 - mov [RealBaseMem],ax - - mov si,pxeentry_msg + mov si,undi_data_msg call writestr_early - mov ax,[PXEEntry+2] - call writehex4 - mov al,':' - call writechr - mov ax,[PXEEntry] + pop ax ; UNDI data segment call writehex4 - mov si,viaplan_msg + xchg bx,ax + mov si,len_msg call writestr_early + pop ax ; UNDI data length + call writehex4 + call crlf + add ax,15 + shr ax,4 + add ax,bx ; AX = seg of end of UNDI data + + cmp ax,dx + ja .data_on_top + xchg ax,ax +.data_on_top: + ; Could we safely add 63 here before the shift? + shr ax,6 ; Convert to kilobytes + mov [RealBaseMem],ax -have_entrypoint: - push cs - pop es ; Restore CS == DS == ES ; ; Network-specific initialization @@ -2704,7 +2665,6 @@ err_udpinit db 'Failed to initialize UDP stack', CR, LF, 0 err_noconfig db 'Unable to locate configuration file', CR, LF, 0 err_damage db 'TFTP server sent an incomprehesible reply', CR, LF, 0 found_pxenv db 'Found PXENV+ structure', CR, LF, 0 -using_pxenv_msg db 'Old PXE API detected, using PXENV+ structure', CR, LF, 0 apiver_str db 'PXE API version is ',0 pxeentry_msg db '!PXE entry point found (we hope) at ', 0 pxenventry_msg db 'PXENV+ entry point found (we hope) at ', 0 @@ -2712,10 +2672,9 @@ viaplan_msg db ' via plan ' plan db 'A', CR, LF, 0 trymempxe_msg db 'Scanning memory for !PXE structure... ', 0 trymempxenv_msg db 'Scanning memory for PXENV+ structure... ', 0 -undi_data_msg db 'UNDI data segment at: ',0 -undi_data_len_msg db 'UNDI data segment size: ',0 -undi_code_msg db 'UNDI code segment at: ',0 -undi_code_len_msg db 'UNDI code segment size: ',0 +undi_data_msg db 'UNDI data segment at ',0 +undi_code_msg db 'UNDI code segment at ',0 +len_msg db ' len ', 0 cant_free_msg db 'Failed to free base memory, error ', 0 notfound_msg db 'not found', CR, LF, 0 myipaddr_msg db 'My IP address seems to be ',0 -- cgit v1.2.3 From b04916f5de7f8139607db83c184b832d6402cb0d Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 27 Feb 2009 14:33:13 -0800 Subject: YEAR is a number, not a string The macro YEAR is a number, not a string, so we have to use the asciidec macro. --- core/extlinux.asm | 5 +++-- core/isolinux.asm | 5 +++-- core/ldlinux.asm | 5 +++-- core/pxelinux.asm | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/core/extlinux.asm b/core/extlinux.asm index a3cb3af1..9684c8a9 100644 --- a/core/extlinux.asm +++ b/core/extlinux.asm @@ -1551,8 +1551,9 @@ build_curdir_str: ; ----------------------------------------------------------------------------- section .data -copyright_str db ' Copyright (C) 1994-', YEAR, ' H. Peter Anvin' - db CR, LF, 0 +copyright_str db ' Copyright (C) 1994-' + asciidec YEAR + db ' H. Peter Anvin', CR, LF, 0 err_bootfailed db CR, LF, 'Boot failed: please change disks and press ' db 'a key to continue.', CR, LF, 0 config_name db 'extlinux.conf',0 ; Unmangled form diff --git a/core/isolinux.asm b/core/isolinux.asm index 764ba7d3..8ec74e5a 100644 --- a/core/isolinux.asm +++ b/core/isolinux.asm @@ -1027,8 +1027,9 @@ writestr_early equ writestr ; ----------------------------------------------------------------------------- syslinux_banner db CR, LF, 'ISOLINUX ', VERSION_STR, ' ', DATE_STR, ' ', 0 -copyright_str db ' Copyright (C) 1994-', YEAR, ' H. Peter Anvin' - db CR, LF, 0 +copyright_str db ' Copyright (C) 1994-' + asciidec YEAR + db ' H. Peter Anvin', CR, LF, 0 isolinux_str db 'isolinux: ', 0 %ifdef DEBUG_MESSAGES startup_msg: db 'Starting up, DL = ', 0 diff --git a/core/ldlinux.asm b/core/ldlinux.asm index d911e9f5..a24f396a 100644 --- a/core/ldlinux.asm +++ b/core/ldlinux.asm @@ -2049,8 +2049,9 @@ getfatsector: ; ----------------------------------------------------------------------------- section .data -copyright_str db ' Copyright (C) 1994-', YEAR, ' H. Peter Anvin' - db CR, LF, 0 +copyright_str db ' Copyright (C) 1994-' + asciidec YEAR + db ' H. Peter Anvin', CR, LF, 0 err_bootfailed db CR, LF, 'Boot failed: please change disks and press ' db 'a key to continue.', CR, LF, 0 syslinux_cfg1 db '/boot' ; /boot/syslinux/syslinux.cfg diff --git a/core/pxelinux.asm b/core/pxelinux.asm index a0fd832d..7c535af3 100644 --- a/core/pxelinux.asm +++ b/core/pxelinux.asm @@ -2655,8 +2655,9 @@ writestr_early equ writestr section .data -copyright_str db ' Copyright (C) 1994-', YEAR, ' H. Peter Anvin' - db CR, LF, 0 +copyright_str db ' Copyright (C) 1994-' + asciidec YEAR + db ' H. Peter Anvin', CR, LF, 0 err_bootfailed db CR, LF, 'Boot failed: press a key to retry, or wait for reset...', CR, LF, 0 bailmsg equ err_bootfailed err_nopxe db "No !PXE or PXENV+ API found; we're dead...", CR, LF, 0 -- cgit v1.2.3 From e07718bcdb3ff32febb4857f0788ff8e4f19d30f Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 28 Feb 2009 10:46:59 -0800 Subject: Warn that timeout bypasses MENU PASSWD --- doc/menu.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/menu.txt b/doc/menu.txt index fd5a44da..11abce07 100644 --- a/doc/menu.txt +++ b/doc/menu.txt @@ -451,7 +451,9 @@ F12 textfile background The menu system honours the TIMEOUT command; if TIMEOUT is specified it will execute the ONTIMEOUT command if one exists, otherwise it will -pick the default menu option. +pick the default menu option. WARNING: the timeout action will bypass +password protection even if one is set for the specified or default +entry! Normally, the user can press [Tab] to edit the menu entry, and [Esc] to return to the Syslinux command line. However, if the configuration -- cgit v1.2.3 From 7757fe57f44fdc04a1e8a240eeb39f07be5d7a54 Mon Sep 17 00:00:00 2001 From: Gene Cumm Date: Sat, 28 Feb 2009 10:15:05 -0500 Subject: com32/libutil/Makefile: Duplicate spotless target Fix duplicate spotless target in com32/libutil/Makefile. Signed-off-by: Gene Cumm Signed-off-by: H. Peter Anvin --- com32/libutil/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/com32/libutil/Makefile b/com32/libutil/Makefile index 31754a91..02789ca6 100644 --- a/com32/libutil/Makefile +++ b/com32/libutil/Makefile @@ -56,8 +56,6 @@ clean: tidy spotless: clean rm -f *.lss *.a *.c32 *.com - -spotless: clean rm -f *~ \#* install: all -- cgit v1.2.3 From 33edcf72465c16b89b28b0a73d4d312d60eb84c0 Mon Sep 17 00:00:00 2001 From: Vicente Jimenez Aguilar Date: Wed, 11 Feb 2009 20:21:36 +0100 Subject: syslinux.txt: fix typo: repeated F11 Fixed typo in syslinux.txt, repeated F11 --- doc/syslinux.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/syslinux.txt b/doc/syslinux.txt index 079183a9..cd0f2f02 100644 --- a/doc/syslinux.txt +++ b/doc/syslinux.txt @@ -420,7 +420,7 @@ F2 filename F9 filename F10 filename F11 filename -F11 filename +F12 filename Displays the indicated file on the screen when a function key is pressed at the boot: prompt. This can be used to implement pre-boot online help (presumably for the kernel command line -- cgit v1.2.3 From 2c7b209155e8aa7786e71e2421544347c0f78119 Mon Sep 17 00:00:00 2001 From: Vicente Jimenez Aguilar Date: Wed, 11 Feb 2009 20:22:32 +0100 Subject: syslinux.txt: possible keystrokes now support F11 and F12 Updated syslinux.txt possible keystrokes now support F11 and F12 --- doc/syslinux.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/syslinux.txt b/doc/syslinux.txt index cd0f2f02..a51b074d 100644 --- a/doc/syslinux.txt +++ b/doc/syslinux.txt @@ -531,7 +531,7 @@ The command line prompt supports the following keystrokes: display the current Syslinux version erase one word force text mode -.. help screens (if configured) +.. help screens (if configured) equivalent to F1..F10 interrupt boot in progress interrupt boot in progress -- cgit v1.2.3 From 86e68b689ce2dd228278ef08510c6532f429501f Mon Sep 17 00:00:00 2001 From: Vicente Jimenez Aguilar Date: Wed, 11 Feb 2009 20:23:33 +0100 Subject: pxelinux.txt: tftp tsize option not needed anymore tftp tsize option don't needed anymore starting at version 3.70 --- doc/pxelinux.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/pxelinux.txt b/doc/pxelinux.txt index 8d0792f7..94d76492 100644 --- a/doc/pxelinux.txt +++ b/doc/pxelinux.txt @@ -405,7 +405,6 @@ load PXELINUX. See: The following problems are known with PXELINUX, so far: -+ Requires a TFTP server which supports the "tsize" option. + The error recovery routine doesn't work quite right. For right now, it just does a hard reset - seems good enough. + We should probably call the UDP receive function in the keyboard -- cgit v1.2.3 From 38d1e29f9a21051dc8ffee7c5b43b6fe924dee31 Mon Sep 17 00:00:00 2001 From: Vicente Jimenez Aguilar Date: Wed, 11 Feb 2009 20:24:55 +0100 Subject: syslinux.txt: documented TAB keystroke Documented TAB keystroke in syslinux.txt --- doc/syslinux.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/syslinux.txt b/doc/syslinux.txt index a51b074d..0713ca3b 100644 --- a/doc/syslinux.txt +++ b/doc/syslinux.txt @@ -531,6 +531,7 @@ The command line prompt supports the following keystrokes: display the current Syslinux version erase one word force text mode + list matching labels .. help screens (if configured) equivalent to F1..F10 interrupt boot in progress -- cgit v1.2.3 From bb86af7a4d8a0191e3f9211a7b5e23ecaf25e3ad Mon Sep 17 00:00:00 2001 From: Vicente Jimenez Aguilar Date: Wed, 11 Feb 2009 20:25:52 +0100 Subject: doc: documented Ctrl-N keystroke from PXELINUX Documented Ctrl-N keystroke from PXELINUX --- doc/pxelinux.txt | 3 +++ doc/syslinux.txt | 1 + 2 files changed, 4 insertions(+) diff --git a/doc/pxelinux.txt b/doc/pxelinux.txt index 94d76492..47aea903 100644 --- a/doc/pxelinux.txt +++ b/doc/pxelinux.txt @@ -89,6 +89,9 @@ default if it cannot find any configuration file at all; instead it will reboot after the timeout interval has expired. This keeps a machine from getting stuck indefinitely due to a boot server failure. +Starting in release 3.50, PXELINUX displays network information at +the boot prompt pressing . + PXELINUX does not support MTFTP, and I have no plans of doing so, as MTFTP is inherently broken for files more than 65535 packets (about 92 MB) in size. It is of course possible to use MTFTP for the initial diff --git a/doc/syslinux.txt b/doc/syslinux.txt index 0713ca3b..4cf89ea4 100644 --- a/doc/syslinux.txt +++ b/doc/syslinux.txt @@ -536,6 +536,7 @@ The command line prompt supports the following keystrokes: equivalent to F1..F10 interrupt boot in progress interrupt boot in progress + display network information (PXELINUX only) ++++ COMBOOT IMAGES AND OTHER OPERATING SYSTEMS ++++ -- cgit v1.2.3