From 74af3ea158569bf9d6e82098ad5976a87fe07ae1 Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Fri, 22 Feb 2019 22:40:13 +0000 Subject: [PATCH] Do not hardcode preboot timeout, use PREBOOT_TIMEOUT macro. git-svn-id: svn://kolibrios.org@7586 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/boot/bootcode.inc | 3 ++- kernel/trunk/boot/preboot.inc | 3 ++- kernel/trunk/bootbios.asm | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/trunk/boot/bootcode.inc b/kernel/trunk/boot/bootcode.inc index 40983c6532..02c35b5bff 100644 --- a/kernel/trunk/boot/bootcode.inc +++ b/kernel/trunk/boot/bootcode.inc @@ -830,7 +830,8 @@ end if if defined extended_primary_loader sub ax, [preboot_timeout] else - sub ax, 18*5 + ; bios 0x1A timer runs at ~18 ticks per second + sub ax, 18*PREBOOT_TIMEOUT end if jae .timergo neg ax diff --git a/kernel/trunk/boot/preboot.inc b/kernel/trunk/boot/preboot.inc index d91a55f338..b47a8c94e1 100644 --- a/kernel/trunk/boot/preboot.inc +++ b/kernel/trunk/boot/preboot.inc @@ -31,7 +31,8 @@ preboot_device db 0 ; boot device ;!!!! 0 - autodetect !!!! preboot_biosdisk db 0 ; use V86 to access disks through BIOS (1-yes, 2-no) if defined extended_primary_loader -preboot_timeout dw 5*18 ; timeout in 1/18th of second for config settings screen +; timeout in 1/18th of second for config settings screen +preboot_timeout dw PREBOOT_TIMEOUT*18 end if if $>0x200 diff --git a/kernel/trunk/bootbios.asm b/kernel/trunk/bootbios.asm index 260a2ddb45..7039a6769f 100644 --- a/kernel/trunk/bootbios.asm +++ b/kernel/trunk/bootbios.asm @@ -11,6 +11,7 @@ include 'encoding.inc' include 'const.inc' os_code = code_l - tmp_gdt +PREBOOT_TIMEOUT = 5 ; seconds use16 org 0x0