Commit 6af85ea2 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Add a NOP after the mode change in MoreSWIs.s to sync with CallASWI module.

Add two more DebugTX in the reset sequence to announce power on reset and CMOS reset code paths.
In STB land the range of permitted dates is extended from 2020 (a bit close!) to 2037 when Unix time wraps.

Version 5.35, 4.79.2.133. Tagged as 'Kernel-5_35-4_79_2_133'
parent 596dd5ae
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.132"
Module_Date SETS "05 Jan 2012"
Module_ApplicationDate SETS "05-Jan-12"
Module_MinorVersion SETS "4.79.2.133"
Module_Date SETS "15 Jan 2012"
Module_ApplicationDate SETS "15-Jan-12"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.132)"
Module_HelpVersion SETS "5.35 (05 Jan 2012) 4.79.2.132"
Module_FullVersion SETS "5.35 (4.79.2.133)"
Module_HelpVersion SETS "5.35 (15 Jan 2012) 4.79.2.133"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.132
#define Module_Date_CMHG 05 Jan 2012
#define Module_MinorVersion_CMHG 4.79.2.133
#define Module_Date_CMHG 15 Jan 2012
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.132"
#define Module_Date "05 Jan 2012"
#define Module_MinorVersion "4.79.2.133"
#define Module_Date "15 Jan 2012"
#define Module_ApplicationDate "05-Jan-12"
#define Module_ApplicationDate "15-Jan-12"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.132)"
#define Module_HelpVersion "5.35 (05 Jan 2012) 4.79.2.132"
#define Module_FullVersion "5.35 (4.79.2.133)"
#define Module_HelpVersion "5.35 (15 Jan 2012) 4.79.2.133"
#define Module_LibraryVersionInfo "5:35"
......@@ -52,7 +52,7 @@ XOS_SubstituteArgs_code
XOS_SubstituteArgs32_code ROUT
WritePSRc SVC_mode, R12 ; enable IRQs
NOP
Push "R0-R8, lr"
ADD R8, R4, R3
......
......@@ -711,7 +711,7 @@ kbdwait
BNE kbdwait
kbdthere
]
]
]
[ ValidateCMOS
; Do a POR if some super-critical values are shagged or if checksum is invalid.
......@@ -750,30 +750,17 @@ reset_loop
BNE cmos_reset
]
; Year should be >=1995, <=2020
; (2020 is arbitrary, but everything breaks soon after that)
; Year should be >=1995, <=2037 (when 32 bit signed Unix time breaks)
MOV R0, #YearCMOS+1
BL Read
TEQ R0, #19
BNE check20
; 20th century: year should be 95 to 99
MOV R0, #YearCMOS
BL Read
CMP r0,#95
BLT cmos_reset
CMP r0,#99
BHI cmos_reset
B checkboot
check20
TEQ R0, #20
BNE cmos_reset
; 21st century: year should <= 20
MOV R0, #YearCMOS
MOV R1, R0
MOV R0, #YearCMOS+0
BL Read
CMP R0, #20
MOV R2, #100
MLA R0, R2, R1, R0
LDR R1, =1995
SUB R0, R0, R1
CMP R0, #2037 - 1995
BHI cmos_reset
checkboot
......@@ -794,6 +781,7 @@ checkboot
BNE cmos_reset
TST R1, #OSStartFlag_POR
BEQ no_cmos_reset ; not a power on reset
DebugTX "POR detected"
[ CheckProtectionLink
TST R1, #OSStartFlag_NoCMOSReset
BNE no_cmos_reset
......@@ -873,6 +861,7 @@ cmos_reset
[ STB
ADD sp, sp, #4 ; junk CannotReset flag from stack
]
DebugTX "Reset CMOS"
MOVNE R0, #0 ; even the econet station number
MOVEQ R0, #1
|
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment