aboutsummaryrefslogtreecommitdiffstats
path: root/isolinux.asm
diff options
context:
space:
mode:
Diffstat (limited to 'isolinux.asm')
-rw-r--r--isolinux.asm100
1 files changed, 8 insertions, 92 deletions
diff --git a/isolinux.asm b/isolinux.asm
index d9e6682c..b3a4a7ac 100644
--- a/isolinux.asm
+++ b/isolinux.asm
@@ -21,36 +21,25 @@
%define IS_ISOLINUX 1
%include "macros.inc"
+%include "config.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.
+; Some semi-configurable constants... change on your own risk.
;
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)
NULLFILE equ 0 ; Zero byte == null file name
-HIGHMEM_MAX equ 037FFFFFFh ; DEFAULT highest address for an initrd
%assign HIGHMEM_SLOP 128*1024 ; Avoid this much memory near the top
-DEFAULT_BAUD equ 9600 ; Default baud rate for serial port
-BAUD_DIVISOR equ 115200 ; Serial port parameter
MAX_OPEN_LG2 equ 6 ; log2(Max number of open files)
MAX_OPEN equ (1 << MAX_OPEN_LG2)
SECTORSIZE_LG2 equ 11 ; 2048 bytes/sector (El Torito requirement)
SECTORSIZE equ (1 << SECTORSIZE_LG2)
;
-; Should be updated with every release to avoid bootsector/SYS file mismatch
-;
-%define version_str VERSION ; Must be 4 characters long!
-%define date DATE_STR ; Defined from the Makefile
-%define year '2002'
-
-;
; The following structure is used for "virtual kernels"; i.e. LILO-style
; option labels. The options we permit here are `kernel' and `append
; Since there is no room in the bottom 64K for all of these, we
@@ -173,6 +162,7 @@ InitRDCNameLen resw 1 ; Length of unmangled initrd name
NextCharJump resw 1 ; Routine to interpret next print char
SetupSecs resw 1 ; Number of setup sectors
A20Test resw 1 ; Counter for testing status of A20
+A20Type resw 1 ; A20 type
CmdLineLen resw 1 ; Length of command line including null
GraphXSize resw 1 ; Width of splash screen file
VGAPos resw 1 ; Pointer into VGA memory
@@ -713,6 +703,11 @@ all_read:
TRACER '>'
;
+; Common initialization code
+;
+%include "cpuinit.inc"
+
+;
; Clear Files structures
;
mov di,Files
@@ -720,85 +715,6 @@ all_read:
xor eax,eax
rep stosd
-;
-; Check that no moron is trying to boot Linux on a 286 or so. According
-; to Intel, the way to check is to see if the high 4 bits of the FLAGS
-; register are either all stuck at 1 (8086/8088) or all stuck at 0
-; (286 in real mode), if not it is a 386 or higher. They didn't
-; say how to check for a 186/188, so I *hope* it falls out as a 8086
-; or 286 in this test.
-;
-; Also, provide an escape route in case it doesn't work.
-;
-check_escapes:
- mov ah,02h ; Check keyboard flags
- int 16h
- mov [KbdFlags],al ; Save for boot prompt check
- test al,04h ; Ctrl->skip 386 check
- jnz skip_checks
-test_8086:
- pushf ; Get flags
- pop ax
- and ax,0FFFh ; Clear top 4 bits
- push ax ; Load into FLAGS
- popf
- pushf ; And load back
- pop ax
- and ax,0F000h ; Get top 4 bits
- cmp ax,0F000h ; If set -> 8086/8088
- je not_386
-test_286:
- pushf ; Get flags
- pop ax
- or ax,0F000h ; Set top 4 bits
- push ax
- popf
- pushf
- pop ax
- and ax,0F000h ; Get top 4 bits
- jnz is_386 ; If not clear -> 386
-not_386:
- mov si,err_not386
- call writestr
- jmp kaboom
-is_386:
- ; Now we know it's a 386 or higher
-;
-; Now check that there is sufficient low (DOS) memory
-;
- int 12h
- cmp ax,(real_mode_seg+0xa00) >> 6
- jae enough_ram
- mov si,err_noram
- call writestr
- jmp kaboom
-enough_ram:
-skip_checks:
-
-;
-; Check if we're 386 (as opposed to 486+); if so we need to blank out
-; the WBINVD instruction
-;
-; We check for 486 by setting EFLAGS.AC
-;
- pushfd ; Save the good flags
- pushfd
- pop eax
- mov ebx,eax
- xor eax,(1 << 18) ; AC bit
- push eax
- popfd
- pushfd
- pop eax
- popfd ; Restore the original flags
- xor eax,ebx
- jnz is_486
-;
-; 386 - Looks like we better blot out the WBINVD instruction
-;
- mov byte [try_wbinvd],0c3h ; Near RET
-is_486:
-
;
; Now we're all set to start with our *real* business. First load the
; configuration file (if any) and parse it.