Commit a11f352f authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Update to support alternate HAL sizes

Detail:
  s/Boot, s/Top - Now uses OSROM_HALSize for the HAL size instead of fixed 64K constant.
Admin:
  Tested in ROM softload with 64K & 32K HAL sizes.
  However, Aemulor doesn't seem to like a 32K HAL size.


Version 0.32. Tagged as 'Tungsten-0_32'
parent ae45fb7f
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.31"
Module_Version SETA 31
Module_MajorVersion SETS "0.32"
Module_Version SETA 32
Module_MinorVersion SETS ""
Module_Date SETS "04 Dec 2011"
Module_ApplicationDate SETS "04-Dec-11"
Module_Date SETS "06 Dec 2011"
Module_ApplicationDate SETS "06-Dec-11"
Module_ComponentName SETS "Tungsten"
Module_ComponentPath SETS "castle/RiscOS/Sources/HAL/Tungsten"
Module_FullVersion SETS "0.31"
Module_HelpVersion SETS "0.31 (04 Dec 2011)"
Module_FullVersion SETS "0.32"
Module_HelpVersion SETS "0.32 (06 Dec 2011)"
END
/* (0.31)
/* (0.32)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.31
#define Module_MajorVersion_CMHG 0.32
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 04 Dec 2011
#define Module_Date_CMHG 06 Dec 2011
#define Module_MajorVersion "0.31"
#define Module_Version 31
#define Module_MajorVersion "0.32"
#define Module_Version 32
#define Module_MinorVersion ""
#define Module_Date "04 Dec 2011"
#define Module_Date "06 Dec 2011"
#define Module_ApplicationDate "04-Dec-11"
#define Module_ApplicationDate "06-Dec-11"
#define Module_ComponentName "Tungsten"
#define Module_ComponentPath "castle/RiscOS/Sources/HAL/Tungsten"
#define Module_FullVersion "0.31"
#define Module_HelpVersion "0.31 (04 Dec 2011)"
#define Module_LibraryVersionInfo "0:31"
#define Module_FullVersion "0.32"
#define Module_HelpVersion "0.32 (06 Dec 2011)"
#define Module_LibraryVersionInfo "0:32"
......@@ -17,6 +17,7 @@
GET Hdr:System
GET Hdr:Machine.<Machine>
GET Hdr:ImageSize.<ImageSize>
GET Hdr:HALSize.<HALSize>
GET Hdr:MEMM.ARM600
......@@ -27,7 +28,7 @@
GET hdr.StaticWS
GET hdr.80321
; This version assumes a RISC OS image starting 64K after us.
; This version assumes a RISC OS image starting OSROM_HALSize bytes after us.
AREA |Asm$$Code|, CODE, READONLY, PIC
......@@ -107,7 +108,7 @@ rom_checkedout_ok
BL generate_POR_flags
ORR a1, a1, #OSStartFlag_RAMCleared
ADRL a2, HAL_Base + 64*1024 ; a2 -> RISC OS image
ADRL a2, HAL_Base + OSROM_HALSize ; a2 -> RISC OS image
ADR a3, HALdescriptor
MOV a4, v1
CallOSM OS_Start
......@@ -116,7 +117,7 @@ rom_checkedout_ok
HALdescriptor DATA
DCD HALFlag_NCNBWorkspace
DCD HAL_Base - HALdescriptor
DCD 64*1024
DCD OSROM_HALSize
DCD HAL_EntryTable - HALdescriptor
DCD HAL_Entries
DCD HAL_WsSize
......
......@@ -18,6 +18,7 @@
GET Hdr:System
GET Hdr:Machine.<Machine>
GET Hdr:ImageSize.<ImageSize>
GET Hdr:HALSize.<HALSize>
GET Hdr:PCI
GET Hdr:MEMM.ARM600
......@@ -81,7 +82,7 @@ restart
MCR p15, 0, a1, c7, c7 ; invalidate caches
MCR p15, 0, a1, c8, c7 ; invalidate TLBs
ADRL v1, HAL_Base + 64*1024 ; v1 -> RISC OS image
ADRL v1, HAL_Base + OSROM_HALSize ; v1 -> RISC OS image
LDR v8, [v1, #OSHdr_Entries]
ADD v8, v8, v1 ; v8 -> RISC OS entry table
......@@ -173,10 +174,10 @@ copy_rom_to_ram
ADRL v1, HAL_Base
LDR v2, =OSROM_ImageSize * 1024
|
ADRL v1, HAL_Base + 64*1024
ADRL v1, HAL_Base + OSROM_HALSize
LDR v2, [v1, #OSHdr_ImageSize]
SUB v1, v1, #64*1024 ; start of ROM
ADD v2, v2, #64*1024 ; size of ROM
SUB v1, v1, #OSROM_HALSize ; start of ROM
ADD v2, v2, #OSROM_HALSize ; size of ROM
]
BL get_end_of_ram
SUB a2, a1, v2 ; a2 -> start of RAM copy
......
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