Commit 03ae9cfb authored by Paul Skirrow's avatar Paul Skirrow
Browse files

Bug fix: DeviceFS was inadvertently enabling interrupts when generating the...

Bug fix: DeviceFS was inadvertently enabling interrupts when generating the Upcall to indicate that new data has arrived in an input buffer.

  DeviceFS was using OS_UpCall to generate a UpCall_DeviceRxDataPresent
  upcall for for the wake up event (when data was inserted into a dormant
  receive buffer).

  However, OS_UpCall enables interrupts, contrary to the RISC OS 3 PRM.
  Since it happened within the hardware modem interrupt handler, this is
  quite dangerous and can lead to the modem interrupt handler being
  re-entered, thereby corrupting bytes or putting bytes into the buffer in
  the wrong order.

  SCTransport v0.57 or later is needed if using this version of DeviceFS
  (since earlier versions relied on this incorrect behaviour in DeviceVS).

  Unfortunately, Pace fault 2098 still exists after making this change
  (Chip to Server transactions are very slow in Customer F 8 using a HW modem).

Version 0.52. Tagged as 'DeviceFS-0_52'
parent 3a09e401
......@@ -11,14 +11,14 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.51"
Module_Version SETA 51
Module_MajorVersion SETS "0.52"
Module_Version SETA 52
Module_MinorVersion SETS ""
Module_Date SETS "29 Nov 2000"
Module_ApplicationDate2 SETS "29-Nov-00"
Module_ApplicationDate4 SETS "29-Nov-2000"
Module_Date SETS "04 Dec 2000"
Module_ApplicationDate2 SETS "04-Dec-00"
Module_ApplicationDate4 SETS "04-Dec-2000"
Module_ComponentName SETS "DeviceFS"
Module_ComponentPath SETS "RiscOS/Sources/HWSupport/DeviceFS"
Module_FullVersion SETS "0.51"
Module_HelpVersion SETS "0.51 (29 Nov 2000)"
Module_FullVersion SETS "0.52"
Module_HelpVersion SETS "0.52 (04 Dec 2000)"
/* (0.51)
/* (0.52)
* This file is automatically maintained by srccommit, do not edit manually.
#define Module_MajorVersion_CMHG 0.51
#define Module_MajorVersion_CMHG 0.52
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 29 Nov 2000
#define Module_Date_CMHG 04 Dec 2000
#define Module_MajorVersion "0.51"
#define Module_Version 51
#define Module_MajorVersion "0.52"
#define Module_Version 52
#define Module_MinorVersion ""
#define Module_Date "29 Nov 2000"
#define Module_Date "04 Dec 2000"
#define Module_ApplicationDate2 "29-Nov-00"
#define Module_ApplicationDate4 "29-Nov-2000"
#define Module_ApplicationDate2 "04-Dec-00"
#define Module_ApplicationDate4 "04-Dec-2000"
#define Module_ComponentName "DeviceFS"
#define Module_ComponentPath "RiscOS/Sources/HWSupport/DeviceFS"
#define Module_FullVersion "0.51"
#define Module_HelpVersion "0.51 (29 Nov 2000)"
#define Module_FullVersion "0.52"
#define Module_HelpVersion "0.52 (04 Dec 2000)"
......@@ -561,7 +561,7 @@ wakeup EntryS "r0-r3"
[ wakeup_data_present
; wake up code, this is called when some data is inserted into a dormant RX buffer.
wakeup_rx ENTRY "r0-r2"
wakeup_rx ENTRY "r0-r9" ; Stack everything, in case CallAVector corrupts it
ASSERT (IRQ_mode :AND: :NOT: SVC_mode) = 0
......@@ -570,11 +570,13 @@ wakeup_rx ENTRY "r0-r2"
RestPSR r0,,c ; set SVC mode
Push "lr"
Push "r2,lr" ; Preserve r2 and lr across CallAVector
MOV r0, #UpCall_DeviceRxDataPresent
LDR r1, [r8, #file_FSwitchHandle]
Pull "lr"
; SWI XOS_UpCall
MOV r9, #UpCallV
SWI XOS_CallAVector
Pull "r2,lr"
RestPSR r2,,cf
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