Commit 288a5a15 authored by Ben Avison's avatar Ben Avison
Browse files

Support for reading (fake) CMOS

Detail:
  * Moved the NVMemory entries out of s.Stubs into s.CMOS.
  * Removed default list of CMOS contents and replaced with a block of zeros.
    It was never in physical address order and wasn't being used anyway.
    Default CMOS belongs in the kernel in any case.
  * Reports NVMemory type 3 (HAL calls) rather than 0 (no CMOS).
  * No longer reports a Delete power-on (CMOS reset) on every boot.
Admin:
  Tested on Raspberry Pi

Version 0.12. Tagged as 'BCM2835-0_12'
parent 985c7199
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.11"
Module_Version SETA 11
Module_MajorVersion SETS "0.12"
Module_Version SETA 12
Module_MinorVersion SETS ""
Module_Date SETS "07 Jul 2012"
Module_ApplicationDate SETS "07-Jul-12"
Module_Date SETS "15 Jul 2012"
Module_ApplicationDate SETS "15-Jul-12"
Module_ComponentName SETS "BCM2835"
Module_ComponentPath SETS "mixed/RiscOS/Sources/HAL/BCM2835"
Module_FullVersion SETS "0.11"
Module_HelpVersion SETS "0.11 (07 Jul 2012)"
Module_FullVersion SETS "0.12"
Module_HelpVersion SETS "0.12 (15 Jul 2012)"
END
/* (0.11)
/* (0.12)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.11
#define Module_MajorVersion_CMHG 0.12
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 07 Jul 2012
#define Module_Date_CMHG 15 Jul 2012
#define Module_MajorVersion "0.11"
#define Module_Version 11
#define Module_MajorVersion "0.12"
#define Module_Version 12
#define Module_MinorVersion ""
#define Module_Date "07 Jul 2012"
#define Module_Date "15 Jul 2012"
#define Module_ApplicationDate "07-Jul-12"
#define Module_ApplicationDate "15-Jul-12"
#define Module_ComponentName "BCM2835"
#define Module_ComponentPath "mixed/RiscOS/Sources/HAL/BCM2835"
#define Module_FullVersion "0.11"
#define Module_HelpVersion "0.11 (07 Jul 2012)"
#define Module_LibraryVersionInfo "0:11"
#define Module_FullVersion "0.12"
#define Module_HelpVersion "0.12 (15 Jul 2012)"
#define Module_LibraryVersionInfo "0:12"
......@@ -32,523 +32,53 @@
AREA |ARM$$data|, CODE, READONLY, PIC
EXPORT cmos
EXPORT HAL_NVMemoryType
EXPORT HAL_NVMemorySize
EXPORT HAL_NVMemoryPageSize
EXPORT HAL_NVMemoryProtectedSize
EXPORT HAL_NVMemoryProtection
EXPORT HAL_NVMemoryRead
EXPORT HAL_NVMemoryWrite
cmos_size * 2048 ; arbitrary choice
UND #&C305 ; get it?
DCD cmos_end - cmos
DCD cmos_size
cmos
DCD &eb00fe00
DCD &00001a00
DCD &54100000
DCD &2c0a0820
DCD &00000290
DCD &00000000
DCD &00000000
DCD &00000703
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &01000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &0000140b
DCD &40ff7ca4
DCD &00c101ff
DCD &00000011
DCD &00400800
DCD &000000f0
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00010b00
DCD &00000030
DCD &50027600
DCD &00406f00
DCD &988c0040
DCD &00000707
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00800090
DCD &00000000
DCD &00000000
DCD &00000000
DCD &0aea0000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
DCD &00000000
cmos_end
% cmos_size
HAL_NVMemoryType
; HAL provides calls to access NVMemory, physical locations 0-15 are read/write
LDR a1, =3 :OR: 1:SHL:10 :OR: 1:SHL:11
MOV pc,lr
HAL_NVMemorySize
MOV a1,#cmos_size
MOV pc,lr
HAL_NVMemoryPageSize
MOV a1,#cmos_size
MOV pc,lr
HAL_NVMemoryProtectedSize
MOV a1,#0
MOV pc,lr
HAL_NVMemoryProtection
MOV pc,lr
HAL_NVMemoryRead
ADRL ip,cmos
ADD ip,ip,a1
MOVS a1,a3
nvr_lp LDRNEB a4,[ip],#1
STRNEB a4,[a2],#1
SUBNES a3,a3,#1
BNE nvr_lp
MOV pc,lr
HAL_NVMemoryWrite
MOV a1,a3
MOV pc,lr
END
......@@ -36,8 +36,6 @@
GET hdr.BCM2835
GET hdr.StaticWS
IMPORT cmos
IMPORT workspace
[ HALDebug
......@@ -53,14 +51,6 @@
EXPORT HAL_IICTransfer
EXPORT HAL_IICMonitorTransfer
EXPORT HAL_NVMemoryType
EXPORT HAL_NVMemorySize
EXPORT HAL_NVMemoryPageSize
EXPORT HAL_NVMemoryProtectedSize
EXPORT HAL_NVMemoryProtection
EXPORT HAL_NVMemoryRead
EXPORT HAL_NVMemoryWrite
EXPORT HAL_ATAControllerInfo
EXPORT HAL_KbdScanSetup
......@@ -104,38 +94,6 @@ HAL_IICMonitorTransfer
HALStub "HAL_IICMonitorTransfer"
MOV pc,lr
HAL_NVMemoryType
HALStub "HAL_NVMemoryType"
MOV a1,#0