for csrc in $(CSRC) ; do $(CC) $(INCLUDE) -M $$csrc >> .depend ; done
for nsrc in $(NASMSRC) ; do $(NASM) -DDEPEND $(NINCLUDE) -o `echo $$nsrc | sed -e 's/\.asm/\.bin/'` -M $$nsrc >> .depend ; done
+depend:
+ rm -f .depend
+ $(MAKE) .depend
+
# Hook to add private Makefile targets for the maintainer.
-include Makefile.private
--- /dev/null
+;; $Id$
+;; -----------------------------------------------------------------------
+;;
+;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+;; Bostom MA 02111-1307, USA; either version 2 of the License, or
+;; (at your option) any later version; incorporated herein by reference.
+;;
+;; -----------------------------------------------------------------------
+
+;;
+;; bios.inc
+;;
+;; Header file for the BIOS data structures etc.
+;;
+
+%ifndef _BIOS_INC
+%define _BIOS_INC
+
+ absolute 4*1Eh ; In the interrupt table
+fdctab equ $
+fdctab1 resw 1
+fdctab2 resw 1
+ absolute 0400h
+serial_base resw 4 ; Base addresses for 4 serial ports
+ absolute 0413h
+BIOS_fbm resw 1 ; Free Base Memory (kilobytes)
+ absolute 046Ch
+BIOS_timer resw 1 ; Timer ticks
+ absolute 0472h
+BIOS_magic resw 1 ; BIOS reset magic
+ absolute 0484h
+BIOS_vidrows resb 1 ; Number of screen rows
+
+%endif ; _BIOS_INC
;
; ****************************************************************************
-; Note: The Makefile builds one version with DEBUG_MESSAGES automatically.
-; %define DEBUG_TRACERS ; Uncomment to get debugging tracers
-; %define DEBUG_MESSAGES ; Uncomment to get debugging messages
-
-%ifdef DEBUG_TRACERS
-
-%macro TRACER 1
- call debug_tracer
- db %1
-%endmacro
-
-%else ; DEBUG_TRACERS
-
-%macro TRACER 1
-%endmacro
-
-%endif ; DEBUG_TRACERS
+%include "macros.inc"
+%include "kernel.inc"
+%include "bios.inc"
+%include "tracers.inc"
;
; Some semi-configurable constants... change on your own risk. Most are imposed
; by the kernel.
;
+my_id equ isolinux_id
max_cmd_len equ 255 ; Must be odd; 255 is the kernel limit
FILENAME_MAX_LG2 equ 8 ; log2(Max filename size Including final null)
FILENAME_MAX equ (1 << FILENAME_MAX_LG2)
%define version_str VERSION ; Must be 4 characters long!
%define date DATE_STR ; Defined from the Makefile
%define year '2002'
-;
-; Debgging stuff
-;
-; %define debug 1 ; Uncomment to enable debugging
-;
-; ID for SYSLINUX (reported to kernel)
-;
-syslinux_id equ 033h ; SYSLINUX (3) 3 = ISOLINUX
-
-;
-; Segments used by Linux
-;
-real_mode_seg equ 5000h
-fake_setup_seg equ real_mode_seg+020h
-
- struc real_mode_seg_t
- resb 20h-($-$$) ; org 20h
-kern_cmd_magic resw 1 ; 0020 Magic # for command line
-kern_cmd_offset resw 1 ; 0022 Offset for kernel command line
- resb 497-($-$$) ; org 497d
-bs_setupsecs resb 1 ; 01F1 Sectors for setup code (0 -> 4)
-bs_rootflags resw 1 ; 01F2 Root readonly flag
-bs_syssize resw 1 ; 01F4
-bs_swapdev resw 1 ; 01F6 Swap device (obsolete)
-bs_ramsize resw 1 ; 01F8 Ramdisk flags, formerly ramdisk size
-bs_vidmode resw 1 ; 01FA Video mode
-bs_rootdev resw 1 ; 01FC Root device
-bs_bootsign resw 1 ; 01FE Boot sector signature (0AA55h)
-su_jump resb 1 ; 0200 0EBh
-su_jump2 resb 1 ; 0201 Size of following header
-su_header resd 1 ; 0202 New setup code: header
-su_version resw 1 ; 0206 See linux/arch/i386/boot/setup.S
-su_switch resw 1 ; 0208
-su_setupseg resw 1 ; 020A
-su_startsys resw 1 ; 020C
-su_kver resw 1 ; 020E Kernel version pointer
-su_loader resb 1 ; 0210 Loader ID
-su_loadflags resb 1 ; 0211 Load high flag
-su_movesize resw 1 ; 0212
-su_code32start resd 1 ; 0214 Start of code loaded high
-su_ramdiskat resd 1 ; 0218 Start of initial ramdisk
-su_ramdisklen equ $ ; Length of initial ramdisk
-su_ramdisklen1 resw 1 ; 021C
-su_ramdisklen2 resw 1 ; 021E
-su_bsklugeoffs resw 1 ; 0220
-su_bsklugeseg resw 1 ; 0222
-su_heapend resw 1 ; 0224
-su_pad1 resw 1 ; 0226
-su_cmd_line_ptr resd 1 ; 0228
-su_ramdisk_max resd 1 ; 022C
- resb (9000h-12)-($-$$) ; Were bootsect.S puts it...
-linux_stack equ $ ; 8FF4
-linux_fdctab equ $
- resb 9000h-($-$$)
-cmd_line_here equ $ ; 9000 Should be out of the way
- endstruc
-
-;
-; Kernel command line signature
-;
-CMD_MAGIC equ 0A33Fh ; Command line magic
-
-;
-; Magic number of su_header field
-;
-HEADER_ID equ 'HdrS' ; HdrS (in littleendian hex)
-
-;
-; Flags for the su_loadflags field
-;
-LOAD_HIGH equ 01h ; Large kernel, load high
-CAN_USE_HEAP equ 80h ; Boot loader reports heap size
;
; The following structure is used for "virtual kernels"; i.e. LILO-style
;
; Segment assignments in the bottom 640K
; 0000h - main code/data segment (and BIOS segment)
-; 5000h - real_mode_seg
;
+real_mode_seg equ 5000h
vk_seg equ 4000h ; Virtual kernels
xfer_buf_seg equ 3000h ; Bounce buffer for I/O to high mem
comboot_seg equ 2000h ; COMBOOT image loading zone
%endif
%endif
-;
-; For our convenience: define macros for jump-over-unconditinal jumps
-;
-%macro jmpz 1
- jnz %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpnz 1
- jz %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpe 1
- jne %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpne 1
- je %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpc 1
- jnc %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpnc 1
- jc %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpb 1
- jnb %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpnb 1
- jb %%skip
- jmp %1
-%%skip:
-%endmacro
-
-;
-; Macros similar to res[bwd], but which works in the code segment (after
-; section .text)
-;
-%macro zb 1
- times %1 db 0
-%endmacro
-
-%macro zw 1
- times %1 dw 0
-%endmacro
-
-%macro zd 1
- times %1 dd 0
-%endmacro
-
; ---------------------------------------------------------------------------
-; BEGIN THE BIOS/CODE/DATA SEGMENT
+; BEGIN CODE
; ---------------------------------------------------------------------------
- absolute 0400h
-serial_base resw 4 ; Base addresses for 4 serial ports
- absolute 0413h
-BIOS_fbm resw 1 ; Free Base Memory (kilobytes)
- absolute 046Ch
-BIOS_timer resw 1 ; Timer ticks
- absolute 0472h
-BIOS_magic resw 1 ; BIOS reset magic
- absolute 0484h
-BIOS_vidrows resb 1 ; Number of screen rows
-
;
; Memory below this point is reserved for the BIOS and the MBR
;
; and that we are clueful
;
new_kernel:
- mov byte [es:su_loader],syslinux_id ; Show some ID
+ mov byte [es:su_loader],my_id ; Show some ID
movzx ax,byte [es:bs_setupsecs] ; Variable # of setup sectors
mov [SetupSecs],ax
;
--- /dev/null
+;; $Id$
+;; -----------------------------------------------------------------------
+;;
+;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+;; Bostom MA 02111-1307, USA; either version 2 of the License, or
+;; (at your option) any later version; incorporated herein by reference.
+;;
+;; -----------------------------------------------------------------------
+
+;;
+;; kernel.inc
+;;
+;; Header file for the kernel interface definitions
+;;
+
+%ifndef _KERNEL_INC
+%define _KERNEL_INC
+
+;;
+;; Structure of the real_mode_seg
+;;
+
+ struc real_mode_seg_t
+ resb 20h-($-$$) ; org 20h
+kern_cmd_magic resw 1 ; 0020 Magic # for command line
+kern_cmd_offset resw 1 ; 0022 Offset for kernel command line
+ resb 497-($-$$) ; org 497d
+bs_setupsecs resb 1 ; 01F1 Sectors for setup code (0 -> 4)
+bs_rootflags resw 1 ; 01F2 Root readonly flag
+bs_syssize resw 1 ; 01F4
+bs_swapdev resw 1 ; 01F6 Swap device (obsolete)
+bs_ramsize resw 1 ; 01F8 Ramdisk flags, formerly ramdisk size
+bs_vidmode resw 1 ; 01FA Video mode
+bs_rootdev resw 1 ; 01FC Root device
+bs_bootsign resw 1 ; 01FE Boot sector signature (0AA55h)
+su_jump resb 1 ; 0200 0EBh
+su_jump2 resb 1 ; 0201 Size of following header
+su_header resd 1 ; 0202 New setup code: header
+su_version resw 1 ; 0206 See linux/arch/i386/boot/setup.S
+su_switch resw 1 ; 0208
+su_setupseg resw 1 ; 020A
+su_startsys resw 1 ; 020C
+su_kver resw 1 ; 020E Kernel version pointer
+su_loader resb 1 ; 0210 Loader ID
+su_loadflags resb 1 ; 0211 Load high flag
+su_movesize resw 1 ; 0212
+su_code32start resd 1 ; 0214 Start of code loaded high
+su_ramdiskat resd 1 ; 0218 Start of initial ramdisk
+su_ramdisklen equ $ ; Length of initial ramdisk
+su_ramdisklen1 resw 1 ; 021C
+su_ramdisklen2 resw 1 ; 021E
+su_bsklugeoffs resw 1 ; 0220
+su_bsklugeseg resw 1 ; 0222
+su_heapend resw 1 ; 0224
+su_pad1 resw 1 ; 0226
+su_cmd_line_ptr resd 1 ; 0228
+su_ramdisk_max resd 1 ; 022C
+ resb (9000h-12)-($-$$) ; Were bootsect.S puts it...
+linux_stack equ $ ; 8FF4
+linux_fdctab equ $
+ resb 9000h-($-$$)
+cmd_line_here equ $ ; 9000 Should be out of the way
+ endstruc
+
+;
+; Kernel command line signature
+;
+CMD_MAGIC equ 0A33Fh ; Command line magic
+
+;
+; Magic number of su_header field
+;
+HEADER_ID equ 'HdrS' ; HdrS (in littleendian hex)
+
+;
+; Flags for the su_loadflags field
+;
+LOAD_HIGH equ 01h ; Large kernel, load high
+CAN_USE_HEAP equ 80h ; Boot loader reports heap size
+
+;
+; ID codes for various modules
+;
+syslinux_id equ 031h ; 3 = SYSLINUX family; 1 = SYSLINUX
+pxelinux_id equ 032h ; 3 = SYSLINUX family; 2 = PXELINUX
+isolinux_id equ 033h ; 3 = SYSLINUX family; 3 = PXELINUX
+
+%endif ; _KERNEL_INC
;
; ****************************************************************************
+%include "macros.inc"
+%include "kernel.inc"
+%include "bios.inc"
+%include "tracers.inc"
+
;
; Some semi-configurable constants... change on your own risk. Most are imposed
; by the kernel.
;
+my_id equ syslinux_id
max_cmd_len equ 255 ; Must be odd; 255 is the kernel limit
retry_count equ 6 ; How patient are we with the disk?
HIGHMEM_MAX equ 037FFFFFFh ; DEFAULT highest address for an initrd
%define version_str VERSION ; Must be 4 characters long!
%define date DATE_STR ; Defined from the Makefile
%define year '2002'
-;
-; Debgging stuff
-;
-; %define debug 1 ; Uncomment to enable debugging
-;
-; ID for SYSLINUX (reported to kernel)
-;
-syslinux_id equ 031h ; SYSLINUX (3) version 1.x (1)
-;
-; Segments used by Linux
-;
-; Note: the real_mode_seg is supposed to be 9000h, but some device drivers
-; hog some of high memory. Therefore, we load it at 7000:0000h and copy
-; it before starting the Linux kernel.
-;
-real_mode_seg equ 7000h
-fake_setup_seg equ real_mode_seg+020h
-
- struc real_mode_seg_t
- resb 20h-($-$$) ; org 20h
-kern_cmd_magic resw 1 ; 0020 Magic # for command line
-kern_cmd_offset resw 1 ; 0022 Offset for kernel command line
- resb 497-($-$$) ; org 497d
-bs_setupsecs resb 1 ; 01F1 Sectors for setup code (0 -> 4)
-bs_rootflags resw 1 ; 01F2 Root readonly flag
-bs_syssize resw 1 ; 01F4
-bs_swapdev resw 1 ; 01F6 Swap device (obsolete)
-bs_ramsize resw 1 ; 01F8 Ramdisk flags, formerly ramdisk size
-bs_vidmode resw 1 ; 01FA Video mode
-bs_rootdev resw 1 ; 01FC Root device
-bs_bootsign resw 1 ; 01FE Boot sector signature (0AA55h)
-su_jump resb 1 ; 0200 0EBh
-su_jump2 resb 1 ; 0201 Size of following header
-su_header resd 1 ; 0202 New setup code: header
-su_version resw 1 ; 0206 See linux/arch/i386/boot/setup.S
-su_switch resw 1 ; 0208
-su_setupseg resw 1 ; 020A
-su_startsys resw 1 ; 020C
-su_kver resw 1 ; 020E Kernel version pointer
-su_loader resb 1 ; 0210 Loader ID
-su_loadflags resb 1 ; 0211 Load high flag
-su_movesize resw 1 ; 0212
-su_code32start resd 1 ; 0214 Start of code loaded high
-su_ramdiskat resd 1 ; 0218 Start of initial ramdisk
-su_ramdisklen equ $ ; Length of initial ramdisk
-su_ramdisklen1 resw 1 ; 021C
-su_ramdisklen2 resw 1 ; 021E
-su_bsklugeoffs resw 1 ; 0220
-su_bsklugeseg resw 1 ; 0222
-su_heapend resw 1 ; 0224
-su_pad1 resw 1 ; 0226
-su_cmd_line_ptr resd 1 ; 0228
-su_ramdisk_max resd 1 ; 022C
- resb (9000h-12)-($-$$) ; The setup is up to 32K long
-linux_stack equ $ ; 8FF4
-linux_fdctab equ $
- resb 9000h-($-$$)
-cmd_line_here equ $ ; 9000 Should be out of the way
- endstruc
-
-;
-; Kernel command line signature
-;
-CMD_MAGIC equ 0A33Fh ; Command line magic
-
-;
-; Magic number of su_header field
-;
-HEADER_ID equ 'HdrS' ; HdrS (in littleendian hex)
-
-;
-; Flags for the su_loadflags field
-;
-LOAD_HIGH equ 01h ; Large kernel, load high
-CAN_USE_HEAP equ 80h ; Boot loader reports heap size
;
; The following structure is used for "virtual kernels"; i.e. LILO-style
; which load a driver into low RAM (evil!!)
;
; 0000h - main code/data segment (and BIOS segment)
-; 7000h - real_mode_seg
;
+real_mode_seg equ 7000h
fat_seg equ 5000h ; 128K area for FAT (2x64K)
vk_seg equ 4000h ; Virtual kernels
xfer_buf_seg equ 3000h ; Bounce buffer for I/O to high mem
comboot_seg equ 2000h ; COMBOOT image loading zone
-;
-; For our convenience: define macros for jump-over-unconditinal jumps
-;
-%macro jmpz 1
- jnz %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpnz 1
- jz %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpe 1
- jne %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpne 1
- je %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpc 1
- jnc %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpnc 1
- jc %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpb 1
- jnb %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpnb 1
- jb %%skip
- jmp %1
-%%skip:
-%endmacro
-
-;
-; Macros similar to res[bwd], but which works in the code segment (after
-; section .text)
-;
-%macro zb 1
- times %1 db 0
-%endmacro
-
-%macro zw 1
- times %1 dw 0
-%endmacro
-
-%macro zd 1
- times %1 dd 0
-%endmacro
-
; ---------------------------------------------------------------------------
-; BEGIN THE BIOS/CODE/DATA SEGMENT
+; BEGIN CODE
; ---------------------------------------------------------------------------
- absolute 4*1Eh ; In the interrupt table
-fdctab equ $
-fdctab1 resw 1
-fdctab2 resw 1
-
- absolute 0400h
-serial_base resw 4 ; Base addresses for 4 serial ports
-
- absolute 0484h
-BIOS_vidrows resb 1 ; Number of screen rows
;
; Memory below this point is reserved for the BIOS and the MBR
; and that we are clueful
;
new_kernel:
- mov byte [es:su_loader],syslinux_id ; Show some ID
+ mov byte [es:su_loader],my_id ; Show some ID
movzx ax,byte [es:bs_setupsecs] ; Variable # of setup sectors
mov [SetupSecs],ax
;
--- /dev/null
+;; $Id$
+;; -----------------------------------------------------------------------
+;;
+;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+;; Bostom MA 02111-1307, USA; either version 2 of the License, or
+;; (at your option) any later version; incorporated herein by reference.
+;;
+;; -----------------------------------------------------------------------
+
+;;
+;; macros.inc
+;;
+;; Convenient macros
+;;
+
+%ifndef _MACROS_INC
+%define _MACROS_INC
+
+;
+; For our convenience: define macros for jump-over-unconditinal jumps
+;
+%macro jmpz 1
+ jnz %%skip
+ jmp %1
+%%skip:
+%endmacro
+
+%macro jmpnz 1
+ jz %%skip
+ jmp %1
+%%skip:
+%endmacro
+
+%macro jmpe 1
+ jne %%skip
+ jmp %1
+%%skip:
+%endmacro
+
+%macro jmpne 1
+ je %%skip
+ jmp %1
+%%skip:
+%endmacro
+
+%macro jmpc 1
+ jnc %%skip
+ jmp %1
+%%skip:
+%endmacro
+
+%macro jmpnc 1
+ jc %%skip
+ jmp %1
+%%skip:
+%endmacro
+
+%macro jmpb 1
+ jnb %%skip
+ jmp %1
+%%skip:
+%endmacro
+
+%macro jmpnb 1
+ jb %%skip
+ jmp %1
+%%skip:
+%endmacro
+
+;
+; Macros similar to res[bwd], but which works in the code segment (after
+; section .text)
+;
+%macro zb 1
+ times %1 db 0
+%endmacro
+
+%macro zw 1
+ times %1 dw 0
+%endmacro
+
+%macro zd 1
+ times %1 dd 0
+%endmacro
+
+;
+; Macros for network byte order of constants
+;
+%define htons(x) ( ( ((x) & 0FFh) << 8 ) + ( ((x) & 0FF00h) >> 8 ) )
+%define ntohs(x) htons(x)
+%define htonl(x) ( ( ((x) & 0FFh) << 24) + ( ((x) & 0FF00h) << 8 ) + ( ((x) & 0FF0000h) >> 8 ) + ( ((x) & 0FF000000h) >> 24) )
+%define ntohl(x) htonl(x)
+
+%endif ; _MACROS_INC
;
; ****************************************************************************
-
+%include "macros.inc"
+%include "kernel.inc"
+%include "bios.inc"
+%include "tracers.inc"
%include "pxe.inc"
;
-; Macros for byte order of constants
-;
-%define htons(x) ( ( ((x) & 0FFh) << 8 ) + ( ((x) & 0FF00h) >> 8 ) )
-%define ntohs(x) htons(x)
-%define htonl(x) ( ( ((x) & 0FFh) << 24) + ( ((x) & 0FF00h) << 8 ) + ( ((x) & 0FF0000h) >> 8 ) + ( ((x) & 0FF000000h) >> 24) )
-%define ntohl(x) htonl(x)
-
-;
; Some semi-configurable constants... change on your own risk. Most are imposed
; by the kernel.
;
+my_id equ pxelinux_id
max_cmd_len equ 255 ; Must be odd; 255 is the kernel limit
FILENAME_MAX_LG2 equ 6 ; log2(Max filename size Including final null)
FILENAME_MAX equ (1 << FILENAME_MAX_LG2)
%define version_str VERSION ; Must be 4 characters long!
%define date DATE_STR ; Defined from the Makefile
%define year '2002'
-;
-; Debgging stuff
-;
-; %define debug 1 ; Uncomment to enable debugging
-;
-; ID for SYSLINUX (reported to kernel)
-;
-syslinux_id equ 032h ; SYSLINUX (3) 2 = PXELINUX
-;
-; Segments used by Linux
-;
-; Note: the real_mode_seg is supposed to be 9000h, but PXE uses that
-; memory. Therefore, we load it at 5000:0000h and copy it before starting
-; the Linux kernel.
-;
-real_mode_seg equ 5000h
-fake_setup_seg equ real_mode_seg+020h
-
- struc real_mode_seg_t
- resb 20h-($-$$) ; org 20h
-kern_cmd_magic resw 1 ; 0020 Magic # for command line
-kern_cmd_offset resw 1 ; 0022 Offset for kernel command line
- resb 497-($-$$) ; org 497d
-bs_setupsecs resb 1 ; 01F1 Sectors for setup code (0 -> 4)
-bs_rootflags resw 1 ; 01F2 Root readonly flag
-bs_syssize resw 1 ; 01F4
-bs_swapdev resw 1 ; 01F6 Swap device (obsolete)
-bs_ramsize resw 1 ; 01F8 Ramdisk flags, formerly ramdisk size
-bs_vidmode resw 1 ; 01FA Video mode
-bs_rootdev resw 1 ; 01FC Root device
-bs_bootsign resw 1 ; 01FE Boot sector signature (0AA55h)
-su_jump resb 1 ; 0200 0EBh
-su_jump2 resb 1 ; 0201 Size of following header
-su_header resd 1 ; 0202 New setup code: header
-su_version resw 1 ; 0206 See linux/arch/i386/boot/setup.S
-su_switch resw 1 ; 0208
-su_setupseg resw 1 ; 020A
-su_startsys resw 1 ; 020C
-su_kver resw 1 ; 020E Kernel version pointer
-su_loader resb 1 ; 0210 Loader ID
-su_loadflags resb 1 ; 0211 Load high flag
-su_movesize resw 1 ; 0212
-su_code32start resd 1 ; 0214 Start of code loaded high
-su_ramdiskat resd 1 ; 0218 Start of initial ramdisk
-su_ramdisklen equ $ ; Length of initial ramdisk
-su_ramdisklen1 resw 1 ; 021C
-su_ramdisklen2 resw 1 ; 021E
-su_bsklugeoffs resw 1 ; 0220
-su_bsklugeseg resw 1 ; 0222
-su_heapend resw 1 ; 0224
-su_pad1 resw 1 ; 0226
-su_cmd_line_ptr resd 1 ; 0228
-su_ramdisk_max resd 1 ; 022C
- resb (9000h-12)-($-$$) ; Were bootsect.S puts it...
-linux_stack equ $ ; 8FF4
-linux_fdctab equ $
- resb 9000h-($-$$)
-cmd_line_here equ $ ; 9000 Should be out of the way
- endstruc
-
-;
-; Kernel command line signature
-;
-CMD_MAGIC equ 0A33Fh ; Command line magic
-
-;
-; Magic number of su_header field
-;
-HEADER_ID equ 'HdrS' ; HdrS (in littleendian hex)
-
-;
-; Flags for the su_loadflags field
-;
-LOAD_HIGH equ 01h ; Large kernel, load high
-CAN_USE_HEAP equ 80h ; Boot loader reports heap size
;
; The following structure is used for "virtual kernels"; i.e. LILO-style
;
; Segment assignments in the bottom 640K
; 0000h - main code/data segment (and BIOS segment)
-; 5000h - real_mode_seg
;
+real_mode_seg equ 5000h
vk_seg equ 4000h ; Virtual kernels
xfer_buf_seg equ 3000h ; Bounce buffer for I/O to high mem
comboot_seg equ 2000h ; COMBOOT image loading zone
%endif
%endif
-;
-; For our convenience: define macros for jump-over-unconditinal jumps
-;
-%macro jmpz 1
- jnz %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpnz 1
- jz %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpe 1
- jne %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpne 1
- je %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpc 1
- jnc %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpnc 1
- jc %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpb 1
- jnb %%skip
- jmp %1
-%%skip:
-%endmacro
-
-%macro jmpnb 1
- jb %%skip
- jmp %1
-%%skip:
-%endmacro
-
-;
-; Macros similar to res[bwd], but which works in the code segment (after
-; section .text)
-;
-%macro zb 1
- times %1 db 0
-%endmacro
-
-%macro zw 1
- times %1 dw 0
-%endmacro
-
-%macro zd 1
- times %1 dd 0
-%endmacro
-
; ---------------------------------------------------------------------------
-; BEGIN THE BIOS/CODE/DATA SEGMENT
+; BEGIN CODE
; ---------------------------------------------------------------------------
- absolute 0400h
-serial_base resw 4 ; Base addresses for 4 serial ports
- absolute 0413h
-BIOS_fbm resw 1 ; Free Base Memory (kilobytes)
- absolute 046Ch
-BIOS_timer resw 1 ; Timer ticks
- absolute 0472h
-BIOS_magic resw 1 ; BIOS reset magic
- absolute 0484h
-BIOS_vidrows resb 1 ; Number of screen rows
-
;
; Memory below this point is reserved for the BIOS and the MBR
;
; and that we are clueful
;
new_kernel:
- mov byte [es:su_loader],syslinux_id ; Show some ID
+ mov byte [es:su_loader],my_id ; Show some ID
movzx ax,byte [es:bs_setupsecs] ; Variable # of setup sectors
mov [SetupSecs],ax
;
--- /dev/null
+;; $Id$
+;; -----------------------------------------------------------------------
+;;
+;; Copyright 1994-2002 H. Peter Anvin - All Rights Reserved
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+;; Bostom MA 02111-1307, USA; either version 2 of the License, or
+;; (at your option) any later version; incorporated herein by reference.
+;;
+;; -----------------------------------------------------------------------
+
+;;
+;; tracers.inc
+;;
+;; Debugging tracers
+;;
+
+%ifndef _TRACERS_INC
+%define _TRACERS_INC
+
+; Note: The Makefile builds one version with DEBUG_MESSAGES automatically.
+; %define DEBUG_TRACERS ; Uncomment to get debugging tracers
+; %define DEBUG_MESSAGES ; Uncomment to get debugging messages
+
+%ifdef DEBUG_TRACERS
+
+%macro TRACER 1
+ call debug_tracer
+ db %1
+%endmacro
+
+%else ; DEBUG_TRACERS
+
+%macro TRACER 1
+%endmacro
+
+%endif ; DEBUG_TRACERS
+
+%endif ; _TRACERS_INC