Commit 20d59436 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Update SCSI podule driver for more recent SCSI switchers

The SCSISoftWD33C93 driver was used as a test bed for the SCSI switcher, but a typo in the supported features mask meant that it didn't work any longer after SCSI switch 2.01 (version 2.00 didn't check the features mask, hence it worked).
Makefile
* Can now produce either SCSILog or standalone SCSIDriver or SCSISoft module, based on the TARGET and/or COMPONENT
SCSIEquates
* Shuffle some common equates around so the same header can be used with SCSILog and SCSIDriver
SCSIMacros
* A cut and paste fumble meant the DisableIRQs macro actually left them enabled
* Lined up
SCSIDriver
* Changed to accept podule numbers 0-7 for Risc PC (was 0-3)
* Get the base address from Podule manager rather than IOC era logical addresses
* Chopped out some long redundant switches
* Use PSR manipulation macros to allow 26 or 26/32 or 32 bit compatible variants
* Fix typo in features mask to &22 (was &21)
* Use PLP after PHPSEI rather than RestPSR, the preserve value from PHPSEI is not guaranteed RestPSR compatible
* Don't re-register a second time on Service_Reset, this is not needed in the loaded-from-ROM; loaded-from-disc; or reinit cases (since the module initialisation already registers), and don't wipe the workspace when a client to SCSI switcher (it get's very confused as transactions are in play)
SCSILog
* Delete defines now taken from SCSIEquates
* Get the base address from Podule manager rather than IOC era logical addresses
* Changed to accept podule numbers 0-7 for Risc PC (was 0-3)

Requires HdrSrc-2_32
Tested on AKA31 podule, on a StrongARM RISC OS 3.70, and a StrongARM RISC OS 5.20, in both SCSISoftWD33C93 and SCSIDriver configurations connected to a CD-ROM drive and harddisc, copying the contents of a random CD onto the harddisc.

Version 1.18. Tagged as 'SCSIDriver-1_18'
parent aca62eb9
......@@ -14,34 +14,20 @@
#
# Makefile for SCSI Driver
#
# ***********************************
# *** C h a n g e L i s t ***
# ***********************************
# Date Name Description
# ---- ---- -----------
# 25-May-94 AMcC Created.
#
COMPONENT ?= SCSIdriver
#
# Program specific options:
#
HEADER1 = SCSI
HEADER2 = SCSIErr
COMPONENT ?= SCSIDriver
HEADER1 = SCSI
HEADER2 = SCSIErr
ASMCHEADER1 = SCSIErr
EXPORTS = ${C_EXP_HDR}.${ASMCHEADER1}
EXPORTS = ${C_EXP_HDR}.${ASMCHEADER1}
ROM_SOURCE = s.${COMPONENT}
RESOURCES = no
ROM_SOURCE = s.${COMPONENT}
ifeq (${TARGET},SCSISoftWD33C93)
ASFLAGS = -pd "soft SETL {TRUE}"
endif
include StdTools
include AAsmModule
#
# Generic rules:
#
clean::
${WIPE} o ${WFLAGS}
@@echo ${COMPONENT}: cleaned
# Dynamic dependencies:
| Copyright 2013 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
| Use 'Disc' environment for 26/32 neutral
mkdir o
mkdir rm
objasm -Stamp -quit -ihdr -i<Hdr$Dir>.Global -i<Hdr$Dir>.Interface -i<Hdr$Dir>.Interface2 -pd "APCS SETS \"APCS-32\"" -pd "Machine SETS \"All\"" -g -o o.SCSILoader s.SCSILoader
link -bin -o rm.Loader o.SCSILoader
echo SCSILoader: loader built
\ No newline at end of file
| Copyright 2013 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
| http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine rom TARGET=SCSISoftWD33C93
amu_machine rom COMPONENT=SCSILog
; > Version
GET VersionASM
GBLS Date
GBLS VString
GBLA Version
Date SETS Module_Date
VString SETS Module_MajorVersion
Version SETA Module_Version
; faff to create BCD version number
SoftwareVersionNumber EQU ((Version/100)*256)+((Version/10):MOD:10)*16+(Version:MOD:10)
SoftwareExtensions EQU &1000FFFF ;bitset of features
HardwareVersionNumber EQU &00000100 ;b31..8/b7..0 major/minor version
HardwareExtensions EQU &0000FFFF ;bitset of features
END
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.17"
Module_Version SETA 117
Module_MajorVersion SETS "1.18"
Module_Version SETA 118
Module_MinorVersion SETS ""
Module_Date SETS "22 Aug 2013"
Module_ApplicationDate SETS "22-Aug-13"
Module_Date SETS "24 Aug 2013"
Module_ApplicationDate SETS "24-Aug-13"
Module_ComponentName SETS "SCSIDriver"
Module_ComponentPath SETS "castle/RiscOS/Sources/HWSupport/SCSI/SCSIDriver"
Module_FullVersion SETS "1.17"
Module_HelpVersion SETS "1.17 (22 Aug 2013)"
Module_FullVersion SETS "1.18"
Module_HelpVersion SETS "1.18 (24 Aug 2013)"
END
/* (1.17)
/* (1.18)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.17
#define Module_MajorVersion_CMHG 1.18
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 22 Aug 2013
#define Module_Date_CMHG 24 Aug 2013
#define Module_MajorVersion "1.17"
#define Module_Version 117
#define Module_MajorVersion "1.18"
#define Module_Version 118
#define Module_MinorVersion ""
#define Module_Date "22 Aug 2013"
#define Module_Date "24 Aug 2013"
#define Module_ApplicationDate "22-Aug-13"
#define Module_ApplicationDate "24-Aug-13"
#define Module_ComponentName "SCSIDriver"
#define Module_ComponentPath "castle/RiscOS/Sources/HWSupport/SCSI/SCSIDriver"
#define Module_FullVersion "1.17"
#define Module_HelpVersion "1.17 (22 Aug 2013)"
#define Module_LibraryVersionInfo "1:17"
#define Module_FullVersion "1.18"
#define Module_HelpVersion "1.18 (24 Aug 2013)"
#define Module_LibraryVersionInfo "1:18"
......@@ -62,6 +62,23 @@ INITIALISED EQU &00000040
ERROR EQU &00000080
;------------------------------------------------------------------------------
;
; Declared version/capabilities
; =============================
;
SoftwareVersionNumber EQU ((Module_Version/100)*256)+((Module_Version/10):MOD:10)*16+(Module_Version:MOD:10)
SoftwareExtensions EQU &1000FFFF ;bitset of features
HardwareVersionNumber EQU &00000100 ;b31..8/b7..0 major/minor version
HardwareExtensions EQU &0000FFFF ;bitset of features
[ :LNOT::DEF:soft
GBLL soft
soft SETL {FALSE} ; so it can be included by SCSILog, actual value doesn't matter
]
[ :LNOT::DEF:debug
GBLL debug
debug SETL {FALSE} ; so it can be included by SCSILog, actual value doesn't matter
]
;------------------------------------------------------------------------------
;
......@@ -365,7 +382,7 @@ TARGET_UNEXPECTEDDISCONNECT EQU &0700 ;Target dropped dead!!!
; The SRAM is visible as 16 x 4K pages (PAGECOUNT x PAGELEN),
; Data transfer between MainRam & SRAM is by a fast data copier using LDM/STM
; in chunks of PAGELEN bytes or less.
; Data transfer between SRAM & SBIC uses the DMAC controler and is in chunks
; Data transfer between SRAM & SBIC uses the DMAC controller and is in chunks
; of PAGELEN bytes or less.
;
; For each slot, we maintain a record of the MainRam address,SRAMpage,
......@@ -542,11 +559,9 @@ ControlBits # 4
HoldCmd # 4 ;Used to hold SBIC state around MessageIN
HoldPhase # 4 ; MessageOut phases
HoldCount # 4
[ bugfix2
Suppress # 4 ;Bit mask of messages (out) to be suppressed
; normally zero, holds CTL_Suppress after
; MESSAGE_COMMANDCOMPLETE received
]
HardClearDevCBEnd # 0 ;Extent of clearing/initialise for 'hard' initialise
deviceRecSize # 0
;
......@@ -560,10 +575,10 @@ deviceRecSize # 0
;
^ 0,WsPtr
DEVICEptr # 4 ;0 or ->DevCB(0..7)
PODULEptr # 4 ;Typicaly &03343000 (for slot 0)
DMACptr # 4 ;Typicaly &03003000 (for slot 0)
SRAMptr # 4 ;Typicaly &03000000 (for slot 0)
HostID # 4 ;0..7, typicaly 7
PODULEptr # 4 ;Typically &03343000 (for slot 0)
DMACptr # 4 ;Typically &03003000 (for slot 0)
SRAMptr # 4 ;Typically &03000000 (for slot 0)
HostID # 4 ;0..7, typically 7
ClearWSStart # 0
......
......@@ -42,7 +42,7 @@
ASSERT (:INDEX:PODULEptr)=4
ASSERT (:INDEX:DMACptr)=8
BL DoAddressCard
BL DoAddressCard
;LDMIB WsPtr,{rPODULEptr,rDMACptr} ;>>>do this here???
MEND
;
......@@ -52,8 +52,8 @@
MACRO
ForEachCard $routinename
mess ,"ForEachCard - Entry", NL
ADRL R6,$routinename
BL DoForEachCard
ADRL R6,$routinename
BL DoForEachCard
mess ,"ForEachCard - Exit", NL
MEND
;
......@@ -99,9 +99,9 @@ $label MOV$cc R14, #$sbic.Hi
STR$cc.B R14, SBICaddress
LDR$cc.B $arm, SBICindirect
LDR$cc.B R14, SBICindirect
ORR$cc $arm,R14,$arm,LSL #8 ;0000HHMM
ORR$cc $arm,R14,$arm,LSL #8 ;0000HHMM
LDR$cc.B R14, SBICindirect
ORR$cc $arm,R14,$arm,LSL #8 ;00HHMMLL
ORR$cc $arm,R14,$arm,LSL #8 ;00HHMMLL
MEND
;
;
......@@ -116,11 +116,11 @@ $label MOV$cc R14, #$sbic.Hi
$label wrSBIC24 $arm, $sbic, $cc
$label MOV$cc R14, #$sbic.Hi
STR$cc.B R14, SBICaddress
MOV$cc $arm,$arm,ROR #16 ;xxHHmmll->mmllxxHH
MOV$cc $arm,$arm,ROR #16 ;xxHHmmll->mmllxxHH
STR$cc.B $arm, SBICindirect
MOV$cc $arm,$arm,ROR #24 ;MMllxxhh->llxxhhMM
MOV$cc $arm,$arm,ROR #24 ;MMllxxhh->llxxhhMM
STR$cc.B $arm, SBICindirect
MOV$cc $arm,$arm,ROR #24 ;LLxxhhmm->xxhhmmLL
MOV$cc $arm,$arm,ROR #24 ;LLxxhhmm->xxhhmmLL
STR$cc.B $arm, SBICindirect
MEND
;
......@@ -163,19 +163,19 @@ $label STR$cc.B $arm,PR_PageReg
;
MACRO
$label InitJoinMask $mask
$label MOV $mask, #&00FF0000
ORR $mask,$mask,#&FF000000
$label MOV $mask, #&00FF0000
ORR $mask,$mask,#&FF000000
MEND
MACRO
$label JoinHWords $dst,$lo,$hi,$mask
[ "$mask"=""
$label BIC $lo,$lo,#&00FF0000
BIC $lo,$lo,#&FF000000
$label BIC $lo,$lo,#&00FF0000
BIC $lo,$lo,#&FF000000
|
$label BIC $lo,$lo,$mask
$label BIC $lo,$lo,$mask
]
ORR $dst,$lo,$hi,LSL #16
ORR $dst,$lo,$hi,LSL #16
MEND
;
;
......@@ -185,10 +185,10 @@ $label BIC $lo,$lo,$mask
;
MACRO
$label SplitWord $lo,$hi
$label MOV $lo,$hi,LSL #16
MOV $hi,$hi,LSR #16
ORR $lo,$lo,$lo,ROR #16
ORR $hi,$hi,$hi,ROR #16
$label MOV $lo,$hi,LSL #16
MOV $hi,$hi,LSR #16
ORR $lo,$lo,$lo,ROR #16
ORR $hi,$hi,$hi,ROR #16
MEND
;
;
......@@ -199,11 +199,11 @@ $label MOV $lo,$hi,LSL #16
MACRO
$label RevBytes $arm, $t1,$t2, $succ
[ "$label" <> "" :LOR: "$succ" = ""
$label MVN $t1,#&FF00 ;a3=&FFFF00FF
$label MVN $t1,#&FF00 ;a3=&FFFF00FF
]
EOR $t2,$arm,$arm,ROR #16
AND $t2,$t1,$t2,LSR #8
EOR $arm,$t2,$arm,ROR #8
EOR $t2,$arm,$arm,ROR #16
AND $t2,$t1,$t2,LSR #8
EOR $arm,$t2,$arm,ROR #8
MEND
;
;
......@@ -216,8 +216,8 @@ $label MVN $t1,#&FF00 ;a3=&FFFF00FF
MACRO
$label EnableIRQs
[ No32bitCode
$label BIC Link,Link,#I_bit
TEQP PC,Link ;Preserve SVC_mode/IRQ_mode, enable IRQs
$label BIC Link,Link,#I_bit
TEQP PC,Link ;Preserve SVC_mode/IRQ_mode, enable IRQs
NOP
|
$label EnableIRQs2 Link
......@@ -234,11 +234,11 @@ $label EnableIRQs2 Link
MACRO
$label DisableIRQs
[ No32bitCode
$label ORR Link,Link,#I_bit
TEQP PC,Link ;Preserve SVC_mode/IRQ_mode, disable IRQs
$label ORR Link,Link,#I_bit
TEQP PC,Link ;Preserve SVC_mode/IRQ_mode, disable IRQs
NOP
|
$label EnableIRQs2 Link
$label DisableIRQs2 Link
]
MEND
;
......@@ -255,14 +255,14 @@ $label EnableIRQs2 Link
MACRO
$label EnableIRQs2 $t1
[ No32bitCode
$label MOV $t1,PC
BIC $t1,$t1,#I_bit
TEQP PC,$t1 ;Preserve SVC_mode/IRQ_mode, enable IRQs
$label MOV $t1,PC
BIC $t1,$t1,#I_bit
TEQP PC,$t1 ;Preserve SVC_mode/IRQ_mode, enable IRQs
NOP
|
$label MRS $t1,CPSR
BIC $t1,$t1,#I32_bit
MSR CPSR_c,$t1
$label MRS $t1,CPSR
BIC $t1,$t1,#I32_bit
MSR CPSR_c,$t1
]
MEND
;
......@@ -276,14 +276,14 @@ $label MRS $t1,CPSR
MACRO
$label DisableIRQs2 $t1
[ No32bitCode
$label MOV $t1,PC
ORR $t1,$t1,#I_bit
TEQP PC,$t1 ;Preserve SVC_mode/IRQ_mode, disable IRQs
$label MOV $t1,PC
ORR $t1,$t1,#I_bit
TEQP PC,$t1 ;Preserve SVC_mode/IRQ_mode, disable IRQs
NOP
|
$label MRS $t1,CPSR
ORR $t1,$t1,#I32_bit
MSR CPSR_c,$t1
$label MRS $t1,CPSR
ORR $t1,$t1,#I32_bit
MSR CPSR_c,$t1
]
MEND
;
......
......@@ -27,28 +27,23 @@
GBLL debug
GBLL trace
GBLL counts
GBLL preserveWSoverreset
GBLL SQ555kludge
debug SETL {FALSE}
[ debug
DString SETS " - Debugging version"
counts SETL {FALSE}
trace SETL {TRUE}
preserveWSoverreset SETL {FALSE}
DString SETS " - Debugging version"
counts SETL {FALSE}
trace SETL {TRUE}
|
DString SETS ""
counts SETL {FALSE}
trace SETL {FALSE} ; Must be false for release
preserveWSoverreset SETL {FALSE} ; Must be false for release
DString SETS ""
counts SETL {FALSE}
trace SETL {FALSE} ; Must be false for release
]
GBLL disconnect ; When true, driver defaults to allowing
disconnect SETL {FALSE} ; disconnection/reselection
GBLL SQ555kludge
SQ555kludge SETL {FALSE}
[ SQ555kludge
disconnect SETL {FALSE}
......@@ -59,12 +54,13 @@ DString SETS " - SQ555 version"
]
]
GBLL HAL
GBLL HAL ; When true, try OS_Hardware instead of poking IOC
HAL SETL {TRUE}
[ :LNOT::DEF:soft
GBLL soft ; When true, be a driver module for SCSISwitch
soft SETL {TRUE}
soft SETL {FALSE}
]
GBLL testMEMC ; When true, test for MEMC1a
testMEMC SETL :LNOT:HAL
......@@ -88,7 +84,7 @@ IRQswhenreading SETL {TRUE}
IRQswhenwriting SETL {TRUE}
rejectnaffmessages SETL {TRUE}
GBLL BigCapacity
GBLL BigCapacity ; Assume capacities > 4G are possible
BigCapacity SETL {TRUE}
GBLL readback ; Read back from podule to flush writes
......@@ -124,27 +120,20 @@ bugfix8 SETL {TRUE} ; count/size if readcapacity fails
GBLL bugfix9 ; Target disconnects during last
bugfix9 SETL {TRUE} ; 12 bytes of data out phase
GET Version
;
; Driver AMRed as V 1.01 (26 Oct 89), the following bugs have been
; found and fixed since then.
;
GBLL bugfix10 ; Tell SBIC the CDB size incase its
bugfix10 SETL Version >= 102 ; not a group 0,1 or 5 command.
bugfix10 SETL {TRUE} ; not a group 0,1 or 5 command.
GBLL efficient
efficient SETL Version >= 104
efficient SETL {TRUE}
GBLL bugfix11 ; Check CDB size
bugfix11 SETL Version >= 104
bugfix11 SETL {TRUE}
GBLL bugfix12 ; Get LUN's to work
bugfix12 SETL Version >= 104
bugfix12 SETL {TRUE}
GBLL bugfix13 ; Prevent call of UnQueueSlot from
bugfix13 SETL Version >= 104 ; Restart_DMAC_Writing when queue
bugfix13 SETL {TRUE} ; Restart_DMAC_Writing when queue
; is empty.
;************************************************
......@@ -169,6 +158,7 @@ Module_BaseAddr
GET Hdr:SCSI
GET Hdr:SCSIErr
GET hdr.SCSIMacros
GET VersionASM
GET hdr.SCSIEquates
;************************************************
......@@ -206,7 +196,7 @@ ModTitleStr
ALIGN
ModHelpStr
DCB "SCSISoftWD33C93",&09,"$VString ($Date)$DString",0
DCB "SCSISoftWD33C93",&09,"$Module_MajorVersion ($Module_Date)$DString",0
ALIGN
|
ModTitleStr
......@@ -214,7 +204,7 @@ ModTitleStr
ALIGN
ModHelpStr
DCB "SCSIDriver",&09,"$VString ($Date)$DString",0
DCB "SCSIDriver",&09,"$Module_MajorVersion ($Module_Date)$DString",0
ALIGN
]
......@@ -225,7 +215,7 @@ ModFlags
DCD ModuleFlag_32bit
]
[ :LNOT: soft
[ :LNOT:soft
HC_Table
Command Devices, 0,0
DCD 0
......@@ -236,7 +226,7 @@ HC_Table
Devices_Help
DCB "*Devices lists type, capacity and vendor details of "
DCB "attatched SCSI devices"
DCB "attached SCSI devices"
DCB 13
Devices_Syntax
DCB "Syntax: *Devices"
......@@ -300,7 +290,7 @@ Devices_Code
MOV R1,#0
LDR R4,maxCardID ; 0/1/2/3 for 1/2/3/4 cards
Devices_Co_10
MOV R0,#3
MOV R0,#3 ; Enumerate
MOV R2,StkPtr
MOV R3,#255
SWI XSCSI_Initialise
......@@ -361,7 +351,7 @@ HostVendor DCB "ACORN "
FormVendorSrc EQU (.-HostVendor)
HostProduct DCB "SCSI expansion "
FormProductSrc EQU (.-HostProduct)
HostRevision DCB VString
HostRevision DCB Module_MajorVersion
FormRevisionSrc EQU (.-HostRevision)
HostEnd
......@@ -479,17 +469,16 @@ ModIn_10
CMP R0,#" " ;
BEQ ModIn_10 ;
SUBS R3,R0,#"0" ; Accept "0"..."9",
SUBS R3,R0,#"0" ; Accept "0"..."7",
MOVLT R3,#0 ; assume anything else (non-digit
CMP R3,#9 ; or unspecified is podule zero).
MOVGT R3,#0 ;
CMP R3,#7 ; or unspecified is podule zero).
MOVHI R3,#0 ;
SWI XPodule_HardwareAddress
BICVC R11,R3,#&FF
BICVC R11,R11,#&300 ; Zap the CMOS RAM base
LDRVC R14,=Podule_BaseAddressBICMask
BICVC R11,R3,R14 ; Zap the CMOS RAM base
MOVVS R11,#0 ; R11 now holds the podule base address (for sync access)
ModIn_20
TEQ R11,#0
SUBNE R11,R11,#PoduleSpeedMask ; Reduce to slow access address from sync.
BIC R11,R11,#PoduleSpeedMask ; Reduce to slow access address from sync.
SWI XSCSI_LogList ; Ask ScsiLog for a list of Podule base
MOVVS R0,#0 ; addresses
......@@ -569,10 +558,6 @@ err_NoRoom_forworkspace
[ testMEMC
err_WrongMEMC
ADR R0,ErrorBlock_SCSI_WrongMEMC +4 ; Print the error to ensure
SWI XOS_Write0 ; it is'nt hidden from user
SWI XOS_NewLine ;
XSCSIError SCSI_WrongMEMC ; then return VS & R0->error
B exitModInit ; in usual fashion
......@@ -706,12 +691,11 @@ ModServ_30
mess ,"ModService, Service_Reset",NL
Push "R0-R11" ; Link already pushed
[ preserveWSoverreset
[ soft
; You only get Service_Reset when in ROM, and after the point of registering with
; the SCSI switcher. Clearing the queue while it's in use is bad.
|
ForEachCard SoftResetCard
]
[ soft
ForEachCard RegisterCard
]
Pull "R0-R11,PC",AL
......@@ -754,7 +738,7 @@ SCSI_Entrytable
B err_Entryunkn ; Don't do foreground transfers, the SCSI switcher will do these
B OpEntry ; using the background entry point instead
B AbortOpEntry ; For cancelling a pending background operation
B HostDescEntry ; Return host description (only used is buses are supported, as here)
B HostDescEntry ; Return host description (only used if buses are supported, as here)
maxEntry * (.-SCSI_Entrytable):SHR:2
err_Entryunkn
......@@ -2574,7 +2558,7 @@ DoMicroDelay
[ HAL
Push "R0-R3,R8,R9,R14"
MOV R0,R0,LSR #1
MOV R8,#0
MOV R8,#OSHW_CallHAL
MOV R9,#EntryNo_HAL_CounterDelay
SWI XOS_Hardware
Pull "R0-R3,R8,R9,PC",VC
......@@ -2854,33 +2838,19 @@ ClaimIRQs
[ HAL
Push "R8,R9"
MOV R0,#Podule_DevNo
MOV R8,#0
MOV R8,#OSHW_CallHAL
MOV R9,#EntryNo_HAL_IRQEnable
SWI XOS_Hardware
Pull "R8,R9"
BVC %FT10
]
[ No32bitCode
MOV R14,PC ; Hold current I_bit & F_bit
TEQP PC,#I_bit+F_bit+SVC_mode ; Disable IRQs & FIRQs
|
MRS R14,CPSR ; Hold current I_bit & F_bit
ORR R1,R14,#I32_bit+F32_bit
MSR CPSR_c,R1 ; Disable IRQs & FIRQs
]
SETPSR I_bit+F_bit,R1,,R14 ; Disable IRQs & FIQs
MOV R0,#IOC ; whilst enabling Podule IRQs
LDRB R1,[R0,#IOCIRQMSKB] ; in IOC
ORR R1,R1,#podule_IRQ_bit
STRB R1,[R0,#IOCIRQMSKB]
[ No32bitCode
TEQP PC,R14 ; Restore original I_bit & F_bit
NOP
NOP
|
MSR CPSR_c,R14 ; Restore original I_bit & F_bit
]
RestPSR R14,,cf ; Restore original state
10
Pull "R0-R4,PC",AL
......@@ -2931,7 +2901,7 @@ FreezeHardware
MOV R3,R5,LSR #14 ;
AND R3,R3,#3 ; Podule number