Commit 82f55aab authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Update to work with zero page relocation

Detail:
  s/FileCore, s/FileCore00, s/InitDieSvc - Try using OS_ReadSysInfo 6 to get IRQsema & CannotReset locations before falling back on legacy values. Store results in module workspace.
  s/FileCore05 - Commented out unused CheckEscape routine to avoid having to update it
  s/FileCore15 - Debugging code updated to use OS_ReadSysInfo 6 to fetch IRQsema ptr. Can't always rely on workspace version since workspace might not be set up yet.
  s/FileCore25, s/FileCore30, s/FileCore80 - Use IRQsema & CannotReset pointers from workspace
Admin:
  Tested on rev A2 BB-xM


Version 3.39. Tagged as 'FileCore-3_39'
parent 90136a90
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.38"
Module_Version SETA 338
Module_MajorVersion SETS "3.39"
Module_Version SETA 339
Module_MinorVersion SETS ""
Module_Date SETS "14 Mar 2011"
Module_ApplicationDate SETS "14-Mar-11"
Module_Date SETS "04 Aug 2011"
Module_ApplicationDate SETS "04-Aug-11"
Module_ComponentName SETS "FileCore"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/FileCore"
Module_FullVersion SETS "3.38"
Module_HelpVersion SETS "3.38 (14 Mar 2011)"
Module_FullVersion SETS "3.39"
Module_HelpVersion SETS "3.39 (04 Aug 2011)"
END
/* (3.38)
/* (3.39)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.38
#define Module_MajorVersion_CMHG 3.39
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Mar 2011
#define Module_Date_CMHG 04 Aug 2011
#define Module_MajorVersion "3.38"
#define Module_Version 338
#define Module_MajorVersion "3.39"
#define Module_Version 339
#define Module_MinorVersion ""
#define Module_Date "14 Mar 2011"
#define Module_Date "04 Aug 2011"
#define Module_ApplicationDate "14-Mar-11"
#define Module_ApplicationDate "04-Aug-11"
#define Module_ComponentName "FileCore"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/FileCore"
#define Module_FullVersion "3.38"
#define Module_HelpVersion "3.38 (14 Mar 2011)"
#define Module_LibraryVersionInfo "3:38"
#define Module_FullVersion "3.39"
#define Module_HelpVersion "3.39 (04 Aug 2011)"
#define Module_LibraryVersionInfo "3:39"
......@@ -47,6 +47,7 @@ GetHAL SETS ""
GET Hdr:NewErrors
GET Hdr:Territory
GET Hdr:CPU.Arch
GET Hdr:OSRSI6
GET DebugOpts.s
GET MyMacros.s
......
......@@ -759,6 +759,9 @@ ExtraPairs * 2
^ 0,SB
PrivateWord # 4 ;back ptr to private word ;MUST BE FIRST
DefectSpace # 4 ;workspace relative
ptr_IRQsema # 4 ;Pointer to kernel IRQsema var
ptr_CannotReset # 4 ;Pointer to kernel CannotReset var
;Globals that get initialised
......
......@@ -504,7 +504,7 @@ WriteCommonLoop
Pull "R0-R3,PC"
] ; NoARMv6 :LOR: NoUnaligned
[ {FALSE}
; ===========
; CheckEscape
; ===========
......@@ -520,6 +520,7 @@ CheckEscape
TSTS R1,#EscapeBit
MOVEQ R0,#IntEscapeErr
Pull "R1,PC"
]
; ===========
; GetRandomId
......
......@@ -25,6 +25,25 @@
; if address to big.
[ Dev
; Ugly but necessary because debug macros can get called before
; workspace is set up
; Exits NE if IRQsema <> 0
MACRO
CheckIRQsema
Push "r0-r2,lr"
MOV r0, #6
MOV r1, #0
MOV r2, #OSRSI6_IRQsema
SWI XOS_ReadSysInfo
MOVVS r2, #0
CMP r2, #0
LDREQ r2, =Legacy_IRQsema
LDR r2, [r2]
TEQ r2, #0
Pull "r0-r2,lr"
MEND
PHEX
SavePSR R4
[ DebugSwitch
......@@ -34,9 +53,7 @@ PHEX
BNE PHEXIT1
]
[ :LNOT: IrqDebug
MOV R3, #IRQsema
LDR R3, [R3]
TEQS R3, #0
CheckIRQsema
BNE PHEXIT1 ;return if IRQ thread
]
MOV R3, LR
......@@ -230,8 +247,16 @@ ExceptionCommon
wrhex R13
mess ,NL
MOV LR, #IRQsema
LDR LR, [LR]
Push "r0-r2"
MOV r0, #6
MOV r1, #0
MOV r2, #OSRSI6_IRQsema
SWI XOS_ReadSysInfo
MOVVS r2, #0
CMP r2, #0
LDREQ r2, =Legacy_IRQsema
LDR lr, [r2]
Pull "r0-r2"
wrhex LR
mess ,"IRQsema",NL
EHANG
......@@ -251,9 +276,7 @@ Mess1 ;R0,R1,LR stacked
MOVNE PC, R1
]
[ :LNOT: IrqDebug
MOV LR, #IRQsema
LDR LR, [LR]
TEQS LR, #0
CheckIRQsema
MOVNE PC, R1 ;skip if IRQ thread, return NE
]
......@@ -1929,7 +1952,7 @@ BackgroundClaimFiq ROUT
TEQS R2, #0
BNE %FT90 ;already claimed
MOV R1, #IRQsema
LDR R1, ptr_IRQsema
LDR R1, [R1]
TEQS R1, #0
MOVEQ R1, #Service_ClaimFIQ
......
......@@ -1112,7 +1112,7 @@ ExtendFileCache
10
LDRB LR, ReEntrance ;cant be done if foregound threaded in
TEQS LR, #0
MOVNE LR, #IRQsema
LDRNE LR, ptr_IRQsema
LDRNE LR, [LR] ;and entering from background
TEQNES LR, #0
TOGPSR Z_bit, LR
......
......@@ -1185,7 +1185,7 @@ LightEntryFlagErr
20
[ MOS_Version > 120
; AND aren't entered from IRQ mode
MOVEQ R1, #IRQsema
LDREQ R1, ptr_IRQsema
LDREQ R1, [R1]
[ DebugR
DREG R1, "S="
......@@ -1234,8 +1234,8 @@ FileCoreExit ROUT
STRPLB LR, ReEntrance
[ Dev
BNE %FT01
MOV LR, #0
LDRB LR, [LR, #CannotReset]
LDR LR, ptr_CannotReset
LDRB LR, [LR]
TEQS LR, #0
wrhex LR, NE
mess NE, "CannotReset",NL
......
......@@ -2280,7 +2280,7 @@ BackgroundOps ROUT
Push "lr"
[ F ;FOR DEBUGGING
; Return if IRQsema set
MOV LR, #IRQsema
LDR LR, ptr_IRQsema
LDR LR, [LR]
TEQS LR, #0
BNE BackgroundOpsExit
......@@ -2303,7 +2303,7 @@ BackgroundOps ROUT
BLEQ UpdateProcess ;(R0)
[ F ;FOR DEBUGGING
MOV LR, #IRQsema
LDR LR, ptr_IRQsema
LDR LR, [LR]
TEQS LR, #0
STRNEB R1, Interlocks
......@@ -2812,7 +2812,7 @@ TestFileCacheGrowable ROUT
LDRB LR, ReEntrance ;cant be done if foregound threaded in
TEQS LR, #0
MOVNE LR, #IRQsema
LDRNE LR, ptr_IRQsema
LDRNE LR, [LR] ;and entering from background
TEQNES LR, #0
TOGPSR Z_bit, LR
......@@ -5043,10 +5043,10 @@ LessValid ROUT
]
Push "R0,R1,LR"
SETPSR I_bit, LR,, R1
MOV R0, #0
LDRB LR, [R0,#CannotReset]
LDR R0, ptr_CannotReset
LDRB LR, [R0]
ADD LR, LR, #1
STRB LR, [R0,#CannotReset]
STRB LR, [R0]
RestPSR R1,,cf
Pull "R0,R1,PC"
......@@ -5061,10 +5061,10 @@ MoreValid ROUT
]
Push "R0,R1,LR"
SETPSR I_bit, LR,, R1
MOV R0, #0
LDRB LR, [R0,#CannotReset]
LDR R0, ptr_CannotReset
LDRB LR, [R0]
SUB LR, LR, #1
STRB LR, [R0,#CannotReset]
STRB LR, [R0]
RestPSR R1,,cf
Pull "R0,R1,PC"
......
......@@ -138,6 +138,24 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
STR SB, [R11]
STR R11, PrivateWord
Push "r0-r2"
MOV r0, #6
MOV r1, #0
MOV r2, #OSRSI6_IRQsema
SWI XOS_ReadSysInfo
MOVVS r2, #0
CMP r2, #0
LDREQ r2, =Legacy_IRQsema
STR r2, ptr_IRQsema
MOV r0, #6
MOV r2, #OSRSI6_CannotReset
SWI XOS_ReadSysInfo
MOVVS r2, #0
CMP r2, #0
LDREQ r2, =Legacy_CannotReset
STR r2, ptr_CannotReset
Pull "r0-r2"
sbaddr R3, DirCache
[ Debug1
DREG SB, "Static base:"
......
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