Commit e91f79e2 authored by ROOL's avatar ROOL 🤖
Browse files

Keep disc copy in sync with kernel when CMOS is reset

Detail:
  Check for a CMOS reset and re-save the disc copy if one happened, otherwise the kernel's default set is lost.
  The kernel clears the bit whenever there *isn't* a CMOS reset, so it doesn't matter what the state of the bit is trapped in the disc copy.
Admin:
  Submission for USB bounty.

Version 0.18. Tagged as 'SDCMOS-0_18'
parent 181b8cde
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.17"
Module_Version SETA 17
Module_MajorVersion SETS "0.18"
Module_Version SETA 18
Module_MinorVersion SETS ""
Module_Date SETS "15 Oct 2016"
Module_ApplicationDate SETS "15-Oct-16"
Module_Date SETS "12 Aug 2017"
Module_ApplicationDate SETS "12-Aug-17"
Module_ComponentName SETS "SDCMOS"
Module_ComponentPath SETS "cddl/RiscOS/Sources/HWSupport/SD/SDCMOS"
Module_FullVersion SETS "0.17"
Module_HelpVersion SETS "0.17 (15 Oct 2016)"
Module_FullVersion SETS "0.18"
Module_HelpVersion SETS "0.18 (12 Aug 2017)"
END
/* (0.17)
/* (0.18)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.17
#define Module_MajorVersion_CMHG 0.18
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 15 Oct 2016
#define Module_Date_CMHG 12 Aug 2017
#define Module_MajorVersion "0.17"
#define Module_Version 17
#define Module_MajorVersion "0.18"
#define Module_Version 18
#define Module_MinorVersion ""
#define Module_Date "15 Oct 2016"
#define Module_Date "12 Aug 2017"
#define Module_ApplicationDate "15-Oct-16"
#define Module_ApplicationDate "12-Aug-17"
#define Module_ComponentName "SDCMOS"
#define Module_ComponentPath "cddl/RiscOS/Sources/HWSupport/SD/SDCMOS"
#define Module_FullVersion "0.17"
#define Module_HelpVersion "0.17 (15 Oct 2016)"
#define Module_LibraryVersionInfo "0:17"
#define Module_FullVersion "0.18"
#define Module_HelpVersion "0.18 (12 Aug 2017)"
#define Module_LibraryVersionInfo "0:18"
......@@ -152,6 +152,18 @@ CallBackFromInit ROUT
MOV r2, r12
SWI XOS_Claim
BVS %F90
; See if a CMOS reset has occurred, if so our copy on the SD card
; is stale and we need to write out the Kernel's clean reset copy
MOV r0, #OsByte_ReadCMOS
MOV r1, #SystemSpeedCMOS
SWI XOS_Byte
MOVVS r2, #0
TST r2, #CMOSResetBit
MOVNE r0, #OsByte_WriteCMOS
SWINE XOS_Byte ; just echo it back to trigger a SaveCMOS
CLRV
Pull "r0-r6, lr" ; separate instructions to reduce warnings
Pull "pc"
......
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