Commit 02832075 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Fix for spurious IIC access when probing

When HAL_NVMemoryType reports NVMemoryFlag_MaybeIIC the kernel tries to probe a number of common/known addresses on startup, however the result of the probe is stored around line 1346 without a value value for zero page in R2.
This is sufficiently early on that the default data abort handler (from when probing the ARM's abort model) is still in place so the stores are silently skipped.
Due to the RAM clear the NVRamBase (and size) are 0, which later on in ValChecksum result in a zero length IIC probe to address &01.
Now, R2 is initialised.

Version 5.35, 4.79.2.239. Tagged as 'Kernel-5_35-4_79_2_239'
parent 72eab294
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.238"
Module_Date SETS "18 Sep 2014"
Module_ApplicationDate SETS "18-Sep-14"
Module_MinorVersion SETS "4.79.2.239"
Module_Date SETS "01 Oct 2014"
Module_ApplicationDate SETS "01-Oct-14"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.238)"
Module_HelpVersion SETS "5.35 (18 Sep 2014) 4.79.2.238"
Module_FullVersion SETS "5.35 (4.79.2.239)"
Module_HelpVersion SETS "5.35 (01 Oct 2014) 4.79.2.239"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.238
#define Module_Date_CMHG 18 Sep 2014
#define Module_MinorVersion_CMHG 4.79.2.239
#define Module_Date_CMHG 01 Oct 2014
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.238"
#define Module_Date "18 Sep 2014"
#define Module_MinorVersion "4.79.2.239"
#define Module_Date "01 Oct 2014"
#define Module_ApplicationDate "18-Sep-14"
#define Module_ApplicationDate "01-Oct-14"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.238)"
#define Module_HelpVersion "5.35 (18 Sep 2014) 4.79.2.238"
#define Module_FullVersion "5.35 (4.79.2.239)"
#define Module_HelpVersion "5.35 (01 Oct 2014) 4.79.2.239"
#define Module_LibraryVersionInfo "5:35"
......@@ -1198,6 +1198,7 @@ InitCMOSCache Entry "r1-r6, sb,r12"
CallHAL HAL_NVMemoryType
MOV R5, R0
ANDS R0, R0, #NVMemoryFlag_Provision
ASSERT NVMemoryFlag_None = 0
BEQ InitCMOSCache_NoCMOS
; If it's only a maybe, then we probe
......@@ -1340,6 +1341,7 @@ InitCMOSCache_NoCMOS
5
; Set the NVRam count
LDR R2, =ZeroPage
STRB R1, [R2, #NVRamBase]
STRB R4, [R2, #NVRamSize]
STRB R5, [R2, #NVRamPageSize]
......
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