Commit 2a3ad40a authored by Jeffrey Lee's avatar Jeffrey Lee Committed by ROOL
Browse files

Fix compressed ROM support

When PhysRamTable was updated to store addresses in page units instead
of byte units (commit df4efb68), the code which allocates the ROM
decompression workspace didn't get updated, causing it to break. Add a
few extra shifts to the code in order to account for the changes.

Fixes issue reported on forums with (compressed) OMAP3 ROM failing to
boot: https://www.riscosopen.org/forum/forums/5/topics/16446

Version 6.57. Tagged as 'Kernel-6_57'
parent 46081bca
......@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
Module_MajorVersion SETS "6.56"
Module_Version SETA 656
Module_MajorVersion SETS "6.57"
Module_Version SETA 657
Module_MinorVersion SETS ""
Module_Date SETS "28 Apr 2021"
Module_ApplicationDate SETS "28-Apr-21"
Module_Date SETS "30 Apr 2021"
Module_ApplicationDate SETS "30-Apr-21"
Module_ComponentName SETS "Kernel"
Module_FullVersion SETS "6.56"
Module_HelpVersion SETS "6.56 (28 Apr 2021)"
Module_FullVersion SETS "6.57"
Module_HelpVersion SETS "6.57 (30 Apr 2021)"
END
/* (6.56)
/* (6.57)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 6.56
#define Module_MajorVersion_CMHG 6.57
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 28 Apr 2021
#define Module_Date_CMHG 30 Apr 2021
#define Module_MajorVersion "6.56"
#define Module_Version 656
#define Module_MajorVersion "6.57"
#define Module_Version 657
#define Module_MinorVersion ""
#define Module_Date "28 Apr 2021"
#define Module_Date "30 Apr 2021"
#define Module_ApplicationDate "28-Apr-21"
#define Module_ApplicationDate "30-Apr-21"
#define Module_ComponentName "Kernel"
#define Module_FullVersion "6.56"
#define Module_HelpVersion "6.56 (28 Apr 2021)"
#define Module_LibraryVersionInfo "6:56"
#define Module_FullVersion "6.57"
#define Module_HelpVersion "6.57 (30 Apr 2021)"
#define Module_LibraryVersionInfo "6:57"
......@@ -1392,22 +1392,22 @@ ROMDecompAlign_$pt * 20
STR v7, [sp, #8] ; Overwrite stacked WS size
MOV v6, #ROMDecompWSAddr_$pt ; Current log addr
26
ADD v2, v2, v5
BIC v2, v2, v5 ; MB-aligned physram
ADD v2, v2, v5, LSR #12
BIC v2, v2, v5, LSR #12 ; MB-aligned physram
LDMIA v1, {a2, a3}
SUB a2, v2, a2 ; Amount of bank used
SUB a2, a3, a2 ; Amount of bank remaining
MOVS a2, a2, ASR #ROMDecompAlign_$pt ; Round down to nearest MB
SUB a2, v2, a2 ; Amount of bank used (page units)
RSB a2, a2, a3, LSR #12 ; Amount of bank remaining (page units)
MOVS a2, a2, ASR #ROMDecompAlign_$pt-12 ; Round down to nearest MB
LDRLE v2, [v1, #8]! ; Move to next bank if 0MB left
BLE %BT26
CMP a2, v7, LSR #ROMDecompAlign_$pt
MOVHS a4, v7
MOVLO a4, a2, LSL #ROMDecompAlign_$pt ; a4 = amount to take
MOV a1, v2 ; set up parameters for MapIn call
MOV a1, v2, LSL #12 ; set up parameters for MapIn call
MOV a2, v6
MOV a3, #OSAP_None
SUB v7, v7, a4 ; Decrease amount to allocate
ADD v2, v2, a4 ; Increase physram ptr
ADD v2, v2, a4, LSR #12 ; Increase physram ptr
ADD v6, v6, a4 ; Increase logram ptr
BL Init_MapIn_$pt
CMP v7, #0
......
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