Commit 29bce293 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Don't source padding data from zero page

Detail:
  s/ScsiFs00, s/ScsiFs15, s/ScsiFs50 - When UseSpecialScatterBlk, pad writes out to device block size by using an empty block of RMA instead of the contents of zero page.
Admin:
  Fixes crashes when high processor vectors are in use


Version 1.26. Tagged as 'SCSIFS-1_26'
parent ca864265
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "1.25"
Module_Version SETA 125
Module_MajorVersion SETS "1.26"
Module_Version SETA 126
Module_MinorVersion SETS ""
Module_Date SETS "14 Apr 2012"
Module_ApplicationDate SETS "14-Apr-12"
Module_Date SETS "26 Jun 2012"
Module_ApplicationDate SETS "26-Jun-12"
Module_ComponentName SETS "SCSIFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/SCSIFS/SCSIFS"
Module_FullVersion SETS "1.25"
Module_HelpVersion SETS "1.25 (14 Apr 2012)"
Module_FullVersion SETS "1.26"
Module_HelpVersion SETS "1.26 (26 Jun 2012)"
END
/* (1.25)
/* (1.26)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.25
#define Module_MajorVersion_CMHG 1.26
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 14 Apr 2012
#define Module_Date_CMHG 26 Jun 2012
#define Module_MajorVersion "1.25"
#define Module_Version 125
#define Module_MajorVersion "1.26"
#define Module_Version 126
#define Module_MinorVersion ""
#define Module_Date "14 Apr 2012"
#define Module_Date "26 Jun 2012"
#define Module_ApplicationDate "14-Apr-12"
#define Module_ApplicationDate "26-Jun-12"
#define Module_ComponentName "SCSIFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/SCSIFS/SCSIFS"
#define Module_FullVersion "1.25"
#define Module_HelpVersion "1.25 (14 Apr 2012)"
#define Module_LibraryVersionInfo "1:25"
#define Module_FullVersion "1.26"
#define Module_HelpVersion "1.26 (26 Jun 2012)"
#define Module_LibraryVersionInfo "1:26"
......@@ -591,6 +591,16 @@ Floppies # 1
# 2
DrvRecs # SzDrvRec*8
]
[ UseSpecialScatterBlk
; Block of 0's used for padding writes in special scatter blocks
; Previously SCSIFS used to just source the padding data from &00000000, but
; (a) that's not very nice
; (b) it doesn't work if zero page is relocated
; (c) other alternative locations (e.g. start of RMA) could contain sensitive information the user doesn't want storing to disc
; So as a compromise, sacrifice some RMA to give us a nice safe buffer to use, at least for devices with standard block sizes.
PaddingBlock # 512
]
WorkSize # 0
ALIGN
......
......@@ -263,6 +263,10 @@ NotAppropriate1
]
BNE DontNeedScatBlk
RSB R9, R4, R5, LSL R8 ;Get required dummy block length
CMP R9, #?PaddingBlock ;Too big?
BHS DontNeedScatBlk ;Let driver deal with it
[ Debug3
SWI OS_WriteS
= "Tranferring to a scatter block ..."
......@@ -276,10 +280,8 @@ NotAppropriate1
ADR R9, WriteScatBlk
STR R3, [R9, #0]
STR R4, [R9, #4]
MOV LR, #0
STR LR, [R9, #8] ;Second Block starts at address 0 and can
; be up to 2^Log2BlockSize -1 long, so
; this better be RAM !!!
ADR LR, PaddingBlock
STR LR, [R9, #8]
;Take the rounded up no. of blocks
MOV R5, R5, LSL R8 ;Convert this into bytes
......
......@@ -45,6 +45,16 @@ InitEntry ROUT ; NO REENTRANCY CHECK NEEDED
MOV SB, R2
STR SB, [R11]
[ UseSpecialScatterBlk
ADR R0, PaddingBlock
MOV R1, #0
MOV R2, #?PaddingBlock
05
SUBS R2, R2, #4
STR R1, [R0], #4
BNE %BT05
]
[ HotPlug
sbaddr R0, DrvRecs
MOV R1, #(-1:SHL:8)
......
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