Commit 3c60aa69 authored by Jeffrey Lee's avatar Jeffrey Lee

Disable error block validity checks

Detail:
  The error block checks introduced in Kernel-5_35-4_79_2_313 are generating a few too many false positives and edge cases, so take the safe option of just disabling them rather than trying to tweak the rules further. Error pointers will still be checked, but the content of the error blocks will not.
  hdr/Options - Add CheckErrorBlocks switch so we can easily turn the code back on again in the future if necessary
  s/Kernel - Switch out all the code relating to error number checks, except for the dummy load of the first word of the error block, since that's still useful as a pointer validity check
  hdr/KernelWS - Revise SWIDespatch_Size definition so it's easier for it to cope with the various factors which may affect the despatcher size
Admin:
  Tested on PandaBoard
  Relevant discussion:
  https://www.riscosopen.org/forum/forums/11/topics/11133


Version 6.04. Tagged as 'Kernel-6_04'
parent b05cb85a
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "6.03"
Module_Version SETA 603
Module_MajorVersion SETS "6.04"
Module_Version SETA 604
Module_MinorVersion SETS ""
Module_Date SETS "19 Apr 2018"
Module_ApplicationDate SETS "19-Apr-18"
Module_Date SETS "24 Apr 2018"
Module_ApplicationDate SETS "24-Apr-18"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "6.03"
Module_HelpVersion SETS "6.03 (19 Apr 2018)"
Module_FullVersion SETS "6.04"
Module_HelpVersion SETS "6.04 (24 Apr 2018)"
END
/* (6.03)
/* (6.04)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 6.03
#define Module_MajorVersion_CMHG 6.04
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Apr 2018
#define Module_Date_CMHG 24 Apr 2018
#define Module_MajorVersion "6.03"
#define Module_Version 603
#define Module_MajorVersion "6.04"
#define Module_Version 604
#define Module_MinorVersion ""
#define Module_Date "19 Apr 2018"
#define Module_Date "24 Apr 2018"
#define Module_ApplicationDate "19-Apr-18"
#define Module_ApplicationDate "24-Apr-18"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "6.03"
#define Module_HelpVersion "6.03 (19 Apr 2018)"
#define Module_LibraryVersionInfo "6:3"
#define Module_FullVersion "6.04"
#define Module_HelpVersion "6.04 (24 Apr 2018)"
#define Module_LibraryVersionInfo "6:4"
......@@ -1722,15 +1722,18 @@ BranchToSWIExit |#| 4
SvcTable |#| &400
GBLA SWIDespatch_Size
SWIDespatch_Size SETA 38*4
[ SupportARMT
[ ZeroPage = 0
SWIDespatch_Size * 41*4
|
SWIDespatch_Size * 42*4
]
|
SWIDespatch_Size * 39*4 ; can save 2 instructions if no Thumb
SWIDespatch_Size SETA SWIDespatch_Size + 2*4
]
[ ZeroPage <> 0
SWIDespatch_Size SETA SWIDespatch_Size + 4
]
[ CheckErrorBlocks
SWIDespatch_Size SETA SWIDespatch_Size + 4
]
SWIDespatch |#| SWIDespatch_Size
......
......@@ -189,6 +189,9 @@ SyncPageTables SETL (MEMM_Type = "VMSAv6") :LOR: CacheablePageTables ; Any p
GBLL UseNewFX0Error
UseNewFX0Error SETL ((Version :AND: 1) = 1) ; Whether *FX 0 should show the ROM link date instead of the UtilityModule date
GBLL CheckErrorBlocks
CheckErrorBlocks SETL {FALSE} ; Attempt to check whether error blocks are valid (in addition to the error pointer checks)
GBLS GetMessages
[ International
GetMessages SETS "GET s.MsgCode"
......
......@@ -484,8 +484,12 @@ SWIReturnWithCallBackFlag * {PC}-SWIRelocation
BLO BadErrPtr + SWIRelocation
TST r0, #3
LDREQ r10, [r0] ; If we crash here, R12 will be the SWI number that returned the bad pointer (better than crashing later with no clue what SWI caused the problem)
[ CheckErrorBlocks
TSTEQ r10, #&7f :SHL: 24 ; Check reserved bits in error number
BNE BadErrPtr2 + SWIRelocation
|
BNE BadErrPtr + SWIRelocation
]
BadErrPtrReturn * {PC}-SWIRelocation
TST r12, #Auto_Error_SWI_bit
BNE callback_checking + SWIRelocation ; we need to do this for X errors even if the callback flags
......@@ -723,6 +727,7 @@ VSet_GenerateError ROUT
LDRB r11, [r10, #CallBack_Flag]
B SWIReturnWithCallBackFlag
[ CheckErrorBlocks
; In: r10-r12 stacked
; r0 = error pointer
; r10 = error number (maybe)
......@@ -767,6 +772,7 @@ BadErrPtr2
LDR r10, =XMessageTrans_ErrorLookup
TEQ r10, r12
BEQ BadErrPtrReturn
] ; CheckErrorBlocks
; In: r10-r12 stacked
; r11 = CallBack_Flag
; r12 = SWI number
......
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