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

Sort out hard ROM size for HALs with no hard ROM

Previously HAL_PhysInfo took one of two routes to get the arrangment table of arrangement table size.
Reorganised to accept a subreason to allow other physical info to be requested.


Version 5.35, 4.79.2.161. Tagged as 'Kernel-5_35-4_79_2_161'
parent 2b88f4fb
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.160"
Module_Date SETS "06 Jul 2012"
Module_ApplicationDate SETS "06-Jul-12"
Module_MinorVersion SETS "4.79.2.161"
Module_Date SETS "09 Jul 2012"
Module_ApplicationDate SETS "09-Jul-12"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.160)"
Module_HelpVersion SETS "5.35 (06 Jul 2012) 4.79.2.160"
Module_FullVersion SETS "5.35 (4.79.2.161)"
Module_HelpVersion SETS "5.35 (09 Jul 2012) 4.79.2.161"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.160
#define Module_Date_CMHG 06 Jul 2012
#define Module_MinorVersion_CMHG 4.79.2.161
#define Module_Date_CMHG 09 Jul 2012
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.160"
#define Module_Date "06 Jul 2012"
#define Module_MinorVersion "4.79.2.161"
#define Module_Date "09 Jul 2012"
#define Module_ApplicationDate "06-Jul-12"
#define Module_ApplicationDate "09-Jul-12"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.160)"
#define Module_HelpVersion "5.35 (06 Jul 2012) 4.79.2.160"
#define Module_FullVersion "5.35 (4.79.2.161)"
#define Module_HelpVersion "5.35 (09 Jul 2012) 4.79.2.161"
#define Module_LibraryVersionInfo "5:35"
......@@ -188,6 +188,12 @@ OSHW_DeviceEnumerate # 1
OSHW_DeviceEnumerateChrono # 1
OSHW_MaxSubreason # 1 ; Used in despatch inside Kernel
; PhysInfo
^ 0
PhysInfo_GetTableSize # 1
PhysInfo_WriteTable # 1
PhysInfo_HardROM # 1
; NVMemory
NVMemoryFlag_None * 0
......
......@@ -447,11 +447,11 @@ NotAvailable * &88888888
;
MemoryPhysSize
[ HAL
Entry "r0,r3,sb,ip"
Entry "r0-r1,r3,sb,ip"
AddressHAL
MOV r0, #0
MOV r0, #PhysInfo_GetTableSize
ADD r1, sp, #4
CallHAL HAL_PhysInfo
MOV r1, r0
MOV r2, #4*1024
EXIT
|
......@@ -476,10 +476,11 @@ MemoryReadPhys ROUT
[ HAL
Entry "r0-r12"
AddressHAL
MOV r0, r1
SUB sp, sp, #4
MOV r1, sp
MOV r0, #PhysInfo_WriteTable
SUB sp, sp, #8
MOV r2, sp
CallHAL HAL_PhysInfo ; fills in everything except DRAM
LDR r0, [sp], #4
LDR r11, [sp], #4
; r0 to r11 is DRAM or not present.
......@@ -715,8 +716,15 @@ MemoryAmounts ROUT
MOVEQ r1, #0
B %FT97
30
! 0, "Sort out hard ROM size for HALs with no hard ROM"
MOV r1, #4*1024*1024 ; Bodge for IOMD and Tungsten
Push "r0, sb, ip"
AddressHAL
MOV r0, #PhysInfo_HardROM
SUB sp, sp, #8
MOV r2, sp
CallHAL HAL_PhysInfo
LDMIA sp!, {r0-r1}
SUB r1, r1, r0 ; ROM = ROMPhysTop - ROMPhysBot
Pull "r0, sb, ip"
B %FT97
40
LDR r1, =ZeroPage
......
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