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

Preserve R12 across HAL device calls

Detail:
  s/Adfs12, s/IDEDetect - Ensure R12 is preserved over HAL device calls, the calling conventions allow the HAL to clobber it
Admin:
  Tested on Iyonix
  Fixes abort during ROM init


Version 3.51. Tagged as 'ADFS-3_51'
parent 74deb4a5
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.50"
Module_Version SETA 350
Module_MajorVersion SETS "3.51"
Module_Version SETA 351
Module_MinorVersion SETS ""
Module_Date SETS "05 Jan 2016"
Module_ApplicationDate SETS "05-Jan-16"
Module_Date SETS "10 Jan 2016"
Module_ApplicationDate SETS "10-Jan-16"
Module_ComponentName SETS "ADFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/ADFS/ADFS"
Module_FullVersion SETS "3.50"
Module_HelpVersion SETS "3.50 (05 Jan 2016)"
Module_FullVersion SETS "3.51"
Module_HelpVersion SETS "3.51 (10 Jan 2016)"
END
/* (3.50)
/* (3.51)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.50
#define Module_MajorVersion_CMHG 3.51
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 05 Jan 2016
#define Module_Date_CMHG 10 Jan 2016
#define Module_MajorVersion "3.50"
#define Module_Version 350
#define Module_MajorVersion "3.51"
#define Module_Version 351
#define Module_MinorVersion ""
#define Module_Date "05 Jan 2016"
#define Module_Date "10 Jan 2016"
#define Module_ApplicationDate "05-Jan-16"
#define Module_ApplicationDate "10-Jan-16"
#define Module_ComponentName "ADFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/ADFS/ADFS"
#define Module_FullVersion "3.50"
#define Module_HelpVersion "3.50 (05 Jan 2016)"
#define Module_LibraryVersionInfo "3:50"
#define Module_FullVersion "3.51"
#define Module_HelpVersion "3.51 (10 Jan 2016)"
#define Module_LibraryVersionInfo "3:51"
......@@ -269,8 +269,10 @@ WinInit ROUT
MOV R2,SP
MOV R1,#-1
LDR R0,HAL_IDEDevice_pointer
Push "R12"
MOV LR,PC
LDR PC,[R0,#HALDevice_IDEControllerInfo]
Pull "R12"
MOV R6,#0
CMPVC R0,#4*4
SETV LO
......@@ -288,8 +290,10 @@ WinInit ROUT
MOV R2,SP
MOV R1,#0 ; bus 0
LDR R0,HAL_IDEDevice_pointer
Push "R12"
MOV LR,PC
LDR PC,[R0,#HALDevice_IDEControllerInfo]
Pull "R12"
Pull "R2-R8,R14"
BVS %FT05
CMP R0,#8*4
......@@ -365,8 +369,10 @@ WinInit ROUT
MOV R2,SP
MOV R1,#1 ; bus 1
LDR R0,HAL_IDEDevice_pointer
Push "R12"
MOV LR,PC
LDR PC,[R0,#HALDevice_IDEControllerInfo]
Pull "R12"
Pull "R2-R8,R14"
BVS %FT05
CMP R0,#32
......
......@@ -682,14 +682,14 @@ WinIDESetTimings
MOV R3, R7
BL WinIDEGetTimingForDevice
Push "R0-R3"
Push "R0-R3,R12"
LDRB R1, [R9,#WinIDEBusNo]
TEQ R6, #WinIDENoDevice
MOVEQ R2, #0
ADDNE R2, SP, #4*4+0
ADDNE R2, SP, #5*4+0
TEQ R7, #WinIDENoDevice
MOVEQ R3, #0
ADDNE R3, SP, #4*4+8
ADDNE R3, SP, #5*4+8
[ Debug23
DREG R1,"Bus ",cc,Integer
DREG R2,", Block1=",cc
......@@ -706,7 +706,7 @@ WinIDESetTimings
LDR R0, HAL_IDEDevice_pointer
MOV LR, PC
LDR PC, [R0,#HALDevice_IDESetModes]
Pull "R0-R3"
Pull "R0-R3,R12"
MOV R3, R0
TEQ R6, #WinIDENoDevice
......@@ -753,8 +753,10 @@ WinIDEDetectCableType ROUT
DREG R1, "Cable of bus ",cc,Integer
]
LDR R0, HAL_IDEDevice_pointer
Push "R12"
MOV LR, PC
LDR PC, [R0, #HALDevice_IDECableID]
Pull "R12"
TEQ R0, #0 ; If we see CBLID- line high
BEQ %40 ; then it's definitely 40-way
......@@ -1079,9 +1081,10 @@ WinIDESetDefaultTimings
MOV R2,SP
ADD R3,SP,#8
LDR R0,HAL_IDEDevice_pointer
Push "R12"
MOV LR,PC
LDR PC,[R0,#HALDevice_IDESetModes]
ADD SP,SP,#16
LDR R12, [SP], #20
MOV LR,#0
LDR R0,[SP]
sbaddr R1,WinIDEDriveDMAFlags
......
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