Commit 6c47ed4d authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Update error block validity checks to cope with Wimp "program errors"

Detail:
  s/Kernel - With RISC OS 3.5, one of the ways Wimp_ReportError detects program errors is by bits 24-29 of the error number being set to 011011. Update our error block validity checks to allow that pattern through.
Admin:
  Tested on Raspberry Pi
  Fixes issue reported on forums:
  https://www.riscosopen.org/forum/forums/3/topics/3540?page=2#posts-60089


Version 5.65. Tagged as 'Kernel-5_65'
parent fc32d45b
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.64"
Module_Version SETA 564
Module_MajorVersion SETS "5.65"
Module_Version SETA 565
Module_MinorVersion SETS ""
Module_Date SETS "25 Nov 2016"
Module_ApplicationDate SETS "25-Nov-16"
Module_Date SETS "04 Dec 2016"
Module_ApplicationDate SETS "04-Dec-16"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.64"
Module_HelpVersion SETS "5.64 (25 Nov 2016)"
Module_FullVersion SETS "5.65"
Module_HelpVersion SETS "5.65 (04 Dec 2016)"
END
/* (5.64)
/* (5.65)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.64
#define Module_MajorVersion_CMHG 5.65
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 25 Nov 2016
#define Module_Date_CMHG 04 Dec 2016
#define Module_MajorVersion "5.64"
#define Module_Version 564
#define Module_MajorVersion "5.65"
#define Module_Version 565
#define Module_MinorVersion ""
#define Module_Date "25 Nov 2016"
#define Module_Date "04 Dec 2016"
#define Module_ApplicationDate "25-Nov-16"
#define Module_ApplicationDate "04-Dec-16"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.64"
#define Module_HelpVersion "5.64 (25 Nov 2016)"
#define Module_LibraryVersionInfo "5:64"
#define Module_FullVersion "5.65"
#define Module_HelpVersion "5.65 (04 Dec 2016)"
#define Module_LibraryVersionInfo "5:65"
......@@ -681,9 +681,20 @@ VSet_GenerateError ROUT
LDRB r11, [r10, #CallBack_Flag]
B SWIReturnWithCallBackFlag
; In: r10-r12 stacked
; r0 = error pointer
; r10 = error number (maybe)
; r11 = CallBack_Flag
; r12 = SWI number
; lr has SPSR for SWI return
BadErrPtr2
TST r0, #3 ; Repeat pointer validity check; if this is OK we know we've arrived here because of a bad error number
BNE BadErrPtr
; With RISC OS 3.5+, Wimp_ReportError interprets error numbers with bits
; 24-29 set to 011011 as being a program error
EOR r10, r10, #27 :SHL: 24
TST r10, #&3F000000
BEQ BadErrPtrReturn
; The PRM describes FileCore as returning errors in the form &0001XXYY,
; where XX = filesystem number and YY = error code. However for disc
; errors it breaks this rule and uses error numbers of the form
......@@ -715,6 +726,7 @@ BadErrPtr2
TEQ r10, r12
BEQ BadErrPtrReturn
; In: r10-r12 stacked
; r11 = CallBack_Flag
; r12 = SWI number
; lr has SPSR for SWI return
BadErrPtr ROUT
......
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