From 9374e88693d2558fe7fb0b477d8d94805c619abc Mon Sep 17 00:00:00 2001 From: Greg Haerr Date: Wed, 30 Oct 2024 18:13:51 -0700 Subject: [PATCH 1/3] Remove XMS A20 line status at boot --- elks/arch/i86/mm/xms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elks/arch/i86/mm/xms.c b/elks/arch/i86/mm/xms.c index 9bc447262..deab1c9e4 100644 --- a/elks/arch/i86/mm/xms.c +++ b/elks/arch/i86/mm/xms.c @@ -8,8 +8,8 @@ #include #include #include - #include +#include #include /* linear address to start XMS buffer allocations from */ @@ -51,10 +51,10 @@ int xms_init(void) return 0; } #endif - printk("A20 was %s", verify_a20()? "on" : "off"); + debug("A20 was %s", verify_a20()? "on" : "off"); enable_a20_gate(); enabled = verify_a20(); - printk(" now %s, ", enabled? "on" : "off"); + debug(" now %s, ", enabled? "on" : "off"); if (!enabled) { printk("disabled, A20 error, "); return 0; From d0671aa372b2598142a1995dac1b7b4e9914c009 Mon Sep 17 00:00:00 2001 From: Greg Haerr Date: Wed, 30 Oct 2024 18:16:23 -0700 Subject: [PATCH 2/3] Remove commented out incorrect precision timer code --- elks/arch/i86/lib/prectimer.c | 9 --------- libc/debug/prectimer.c | 9 --------- 2 files changed, 18 deletions(-) diff --git a/elks/arch/i86/lib/prectimer.c b/elks/arch/i86/lib/prectimer.c index dd64dca96..37a692d8a 100644 --- a/elks/arch/i86/lib/prectimer.c +++ b/elks/arch/i86/lib/prectimer.c @@ -113,21 +113,12 @@ unsigned long get_ptime(void) count = lo | hi; pticks = lastcount - count; lastcount = count; -#if 1 if ((int)pticks < 0) { /* wrapped, jiffies is higher */ pticks += MAX_PTICK; /* = MAX_PTICK - count + lastcount */ jdiff--; /* adjust jiffies for wrap, won't ever be negative */ } if (jdiff < 4286) /* < ~42.86s */ return jdiff * (unsigned long)MAX_PTICK + pticks; -#else /* incorrect (old) version - to be removed */ - if ((int)pticks < 0) /* wrapped */ - pticks += MAX_PTICK; /* = MAX_PTICK - count + lastcount */ - if (jdiff < 2) /* < 10ms: 1..11931 */ - return pticks; - if (jdiff < 4286) /* < ~42.86s */ - return (jdiff - 1) * (unsigned long)MAX_PTICK + pticks; -#endif return 0; /* overflow displays 0s */ } diff --git a/libc/debug/prectimer.c b/libc/debug/prectimer.c index dd64dca96..37a692d8a 100644 --- a/libc/debug/prectimer.c +++ b/libc/debug/prectimer.c @@ -113,21 +113,12 @@ unsigned long get_ptime(void) count = lo | hi; pticks = lastcount - count; lastcount = count; -#if 1 if ((int)pticks < 0) { /* wrapped, jiffies is higher */ pticks += MAX_PTICK; /* = MAX_PTICK - count + lastcount */ jdiff--; /* adjust jiffies for wrap, won't ever be negative */ } if (jdiff < 4286) /* < ~42.86s */ return jdiff * (unsigned long)MAX_PTICK + pticks; -#else /* incorrect (old) version - to be removed */ - if ((int)pticks < 0) /* wrapped */ - pticks += MAX_PTICK; /* = MAX_PTICK - count + lastcount */ - if (jdiff < 2) /* < 10ms: 1..11931 */ - return pticks; - if (jdiff < 4286) /* < ~42.86s */ - return (jdiff - 1) * (unsigned long)MAX_PTICK + pticks; -#endif return 0; /* overflow displays 0s */ } From faf275b139ddccbcd53bf411b62dbddcb3459f31 Mon Sep 17 00:00:00 2001 From: Greg Haerr Date: Wed, 30 Oct 2024 18:19:54 -0700 Subject: [PATCH 3/3] Move linuxmt/fdreg.h to arch/fdreg.h --- elks/arch/i86/drivers/block/directfd.c | 2 +- elks/include/{linuxmt => arch}/fdreg.h | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename elks/include/{linuxmt => arch}/fdreg.h (100%) diff --git a/elks/arch/i86/drivers/block/directfd.c b/elks/arch/i86/drivers/block/directfd.c index 3052dc6d8..8d2a6d788 100644 --- a/elks/arch/i86/drivers/block/directfd.c +++ b/elks/arch/i86/drivers/block/directfd.c @@ -86,7 +86,6 @@ #include #include #include -#include #include #include #include @@ -94,6 +93,7 @@ #include #include +#include #include #include #include diff --git a/elks/include/linuxmt/fdreg.h b/elks/include/arch/fdreg.h similarity index 100% rename from elks/include/linuxmt/fdreg.h rename to elks/include/arch/fdreg.h