Commit 5519f1d8 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Add new HAL entry, HAL_UARTDefault. Make use of Hdr:SerialOp & OS_SerialOp 10.

Detail:
  hdr/HALEntries - Brought in line with RPi branch, plus addition of new HAL_UARTDefault HAL entry, to allow DualSerial to determine which (if any) of the HAL UARTs should be the default UART accessed via OS_SerialOp
  s/GetAll - Add GET of Hdr:SerialOp
  s/PMF/osbyte - Use OS_SerialOp 10 when constructing filename to open for OS_Byte 2
Admin:
  Tested in OMAP3, Tungsten ROMs


Version 5.35, 4.79.2.152. Tagged as 'Kernel-5_35-4_79_2_152'
parent ef95917b
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS "4.79.2.151"
Module_Date SETS "26 May 2012"
Module_ApplicationDate SETS "26-May-12"
Module_MinorVersion SETS "4.79.2.152"
Module_Date SETS "04 Jun 2012"
Module_ApplicationDate SETS "04-Jun-12"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 (4.79.2.151)"
Module_HelpVersion SETS "5.35 (26 May 2012) 4.79.2.151"
Module_FullVersion SETS "5.35 (4.79.2.152)"
Module_HelpVersion SETS "5.35 (04 Jun 2012) 4.79.2.152"
END
......@@ -5,19 +5,19 @@
*
*/
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG 4.79.2.151
#define Module_Date_CMHG 26 May 2012
#define Module_MinorVersion_CMHG 4.79.2.152
#define Module_Date_CMHG 04 Jun 2012
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion "4.79.2.151"
#define Module_Date "26 May 2012"
#define Module_MinorVersion "4.79.2.152"
#define Module_Date "04 Jun 2012"
#define Module_ApplicationDate "26-May-12"
#define Module_ApplicationDate "04-Jun-12"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 (4.79.2.151)"
#define Module_HelpVersion "5.35 (26 May 2012) 4.79.2.151"
#define Module_FullVersion "5.35 (4.79.2.152)"
#define Module_HelpVersion "5.35 (04 Jun 2012) 4.79.2.152"
#define Module_LibraryVersionInfo "5:35"
......@@ -30,145 +30,149 @@ HALFlag_LimitVideoRAM * 1:SHL:1
; Entries to the HAL from the OS
^ 0
EntryNo_HAL_Init # 1
EntryNo_HAL_IRQEnable # 1
EntryNo_HAL_IRQDisable # 1
EntryNo_HAL_IRQClear # 1
EntryNo_HAL_IRQSource # 1
EntryNo_HAL_IRQStatus # 1
EntryNo_HAL_FIQEnable # 1
EntryNo_HAL_FIQDisable # 1
EntryNo_HAL_FIQDisableAll # 1
EntryNo_HAL_FIQClear # 1
EntryNo_HAL_FIQSource # 1
EntryNo_HAL_FIQStatus # 1
EntryNo_HAL_Timers # 1
EntryNo_HAL_TimerDevice # 1
EntryNo_HAL_TimerGranularity # 1
EntryNo_HAL_TimerMaxPeriod # 1
EntryNo_HAL_TimerSetPeriod # 1
EntryNo_HAL_TimerPeriod # 1
EntryNo_HAL_TimerReadCountdown # 1
EntryNo_HAL_CounterRate # 1
EntryNo_HAL_CounterPeriod # 1
EntryNo_HAL_CounterRead # 1
EntryNo_HAL_CounterDelay # 1
EntryNo_HAL_NVMemoryType # 1
EntryNo_HAL_NVMemorySize # 1
EntryNo_HAL_NVMemoryPageSize # 1
EntryNo_HAL_NVMemoryProtectedSize # 1
EntryNo_HAL_NVMemoryProtection # 1
EntryNo_HAL_NVMemoryIICAddress # 1
EntryNo_HAL_NVMemoryRead # 1
EntryNo_HAL_NVMemoryWrite # 1
EntryNo_HAL_IICBuses # 1
EntryNo_HAL_IICType # 1
EntryNo_HAL_IICSetLines # 1
EntryNo_HAL_IICReadLines # 1
EntryNo_HAL_IICDevice # 1
EntryNo_HAL_IICTransfer # 1
EntryNo_HAL_IICMonitorTransfer # 1
EntryNo_HAL_VideoFlybackDevice # 1
EntryNo_HAL_Video_SetMode # 1
EntryNo_HAL_Video_WritePaletteEntry # 1
EntryNo_HAL_Video_WritePaletteEntries # 1
EntryNo_HAL_Video_ReadPaletteEntry # 1
EntryNo_HAL_Video_SetInterlace # 1
EntryNo_HAL_Video_SetBlank # 1
EntryNo_HAL_Video_SetPowerSave # 1
EntryNo_HAL_Video_UpdatePointer # 1
EntryNo_HAL_Video_SetDAG # 1
EntryNo_HAL_Video_VetMode # 1
EntryNo_HAL_Video_PixelFormats # 1
EntryNo_HAL_Video_Features # 1
EntryNo_HAL_Video_BufferAlignment # 1
EntryNo_HAL_Video_OutputFormat # 1
EntryNo_HAL_MatrixColumns # 1
EntryNo_HAL_MatrixScan # 1
EntryNo_HAL_TouchscreenType # 1
EntryNo_HAL_TouchscreenRead # 1
EntryNo_HAL_TouchscreenMode # 1
EntryNo_HAL_TouchscreenMeasure # 1
EntryNo_HAL_MachineID # 1 ; ReadSysInfo 2
EntryNo_HAL_ControllerAddress # 1 ; Memory 9
EntryNo_HAL_HardwareInfo # 1 ; ReadSysInfo 2
EntryNo_HAL_SuperIOInfo # 1 ; ReadSysInfo 3
EntryNo_HAL_PlatformInfo # 1 ; ReadSysInfo 8
EntryNo_HAL_CleanerSpace # 1
EntryNo_HAL_UARTPorts # 1
EntryNo_HAL_UARTStartUp # 1
EntryNo_HAL_UARTShutdown # 1
EntryNo_HAL_UARTFeatures # 1
EntryNo_HAL_UARTReceiveByte # 1
EntryNo_HAL_UARTTransmitByte # 1
EntryNo_HAL_UARTLineStatus # 1
EntryNo_HAL_UARTInterruptEnable # 1
EntryNo_HAL_UARTRate # 1
EntryNo_HAL_UARTFormat # 1
EntryNo_HAL_UARTFIFOSize # 1
EntryNo_HAL_UARTFIFOClear # 1
EntryNo_HAL_UARTFIFOEnable # 1
EntryNo_HAL_UARTFIFOThreshold # 1
EntryNo_HAL_UARTInterruptID # 1
EntryNo_HAL_UARTBreak # 1
EntryNo_HAL_UARTModemControl # 1
EntryNo_HAL_UARTModemStatus # 1
EntryNo_HAL_UARTDevice # 1
EntryNo_HAL_Reset # 1
EntryNo_HAL_DebugRX # 1
EntryNo_HAL_DebugTX # 1
EntryNo_HAL_PCIFeatures # 1
EntryNo_HAL_PCIReadConfigByte # 1
EntryNo_HAL_PCIReadConfigHalfword # 1
EntryNo_HAL_PCIReadConfigWord # 1
EntryNo_HAL_PCIWriteConfigByte # 1
EntryNo_HAL_PCIWriteConfigHalfword # 1
EntryNo_HAL_PCIWriteConfigWord # 1
EntryNo_HAL_PCISpecialCycle # 1
EntryNo_HAL_PCISlotTable # 1
EntryNo_HAL_PCIAddresses # 1
EntryNo_HAL_ATAControllerInfo # 1
EntryNo_HAL_ATASetModes # 1
EntryNo_HAL_ATACableID # 1
EntryNo_HAL_InitDevices # 1
EntryNo_HAL_KbdScanSetup # 1
EntryNo_HAL_KbdScan # 1
EntryNo_HAL_KbdScanFinish # 1
EntryNo_HAL_KbdScanInterrupt # 1
EntryNo_HAL_PhysInfo # 1
EntryNo_HAL_USBControllerInfo # 1
EntryNo_HAL_MonitorLeadID # 1
EntryNo_HAL_Video_Render # 1
EntryNo_HAL_USBPortPower # 1
EntryNo_HAL_USBPortStatus # 1
EntryNo_HAL_USBPortIRQ # 1
EntryNo_HAL_Video_IICOp # 1
EntryNo_HAL_TimerIRQClear # 1
EntryNo_HAL_TimerIRQStatus # 1
EntryNo_HAL_ExtMachineID # 1 ; ReadSysInfo 10
EntryNo_HAL_Init # 1 ; 0
EntryNo_HAL_IRQEnable # 1 ; 1
EntryNo_HAL_IRQDisable # 1 ; 2
EntryNo_HAL_IRQClear # 1 ; 3
EntryNo_HAL_IRQSource # 1 ; 4
EntryNo_HAL_IRQStatus # 1 ; 5
EntryNo_HAL_FIQEnable # 1 ; 6
EntryNo_HAL_FIQDisable # 1 ; 7
EntryNo_HAL_FIQDisableAll # 1 ; 8
EntryNo_HAL_FIQClear # 1 ; 9
EntryNo_HAL_FIQSource # 1 ; 10
EntryNo_HAL_FIQStatus # 1 ; 11
EntryNo_HAL_Timers # 1 ; 12
EntryNo_HAL_TimerDevice # 1 ; 13
EntryNo_HAL_TimerGranularity # 1 ; 14
EntryNo_HAL_TimerMaxPeriod # 1 ; 15
EntryNo_HAL_TimerSetPeriod # 1 ; 16
EntryNo_HAL_TimerPeriod # 1 ; 17
EntryNo_HAL_TimerReadCountdown # 1 ; 18
EntryNo_HAL_CounterRate # 1 ; 19
EntryNo_HAL_CounterPeriod # 1 ; 20
EntryNo_HAL_CounterRead # 1 ; 21
EntryNo_HAL_CounterDelay # 1 ; 22
EntryNo_HAL_NVMemoryType # 1 ; 23
EntryNo_HAL_NVMemorySize # 1 ; 24
EntryNo_HAL_NVMemoryPageSize # 1 ; 25
EntryNo_HAL_NVMemoryProtectedSize # 1 ; 26
EntryNo_HAL_NVMemoryProtection # 1 ; 27
EntryNo_HAL_NVMemoryIICAddress # 1 ; 28
EntryNo_HAL_NVMemoryRead # 1 ; 29
EntryNo_HAL_NVMemoryWrite # 1 ; 30
EntryNo_HAL_IICBuses # 1 ; 31
EntryNo_HAL_IICType # 1 ; 32
EntryNo_HAL_IICSetLines # 1 ; 33
EntryNo_HAL_IICReadLines # 1 ; 34
EntryNo_HAL_IICDevice # 1 ; 35
EntryNo_HAL_IICTransfer # 1 ; 36
EntryNo_HAL_IICMonitorTransfer # 1 ; 37
EntryNo_HAL_VideoFlybackDevice # 1 ; 38
EntryNo_HAL_Video_SetMode # 1 ; 39
EntryNo_HAL_Video_WritePaletteEntry # 1 ; 40
EntryNo_HAL_Video_WritePaletteEntries # 1 ; 41
EntryNo_HAL_Video_ReadPaletteEntry # 1 ; 42
EntryNo_HAL_Video_SetInterlace # 1 ; 43
EntryNo_HAL_Video_SetBlank # 1 ; 44
EntryNo_HAL_Video_SetPowerSave # 1 ; 45
EntryNo_HAL_Video_UpdatePointer # 1 ; 46
EntryNo_HAL_Video_SetDAG # 1 ; 47
EntryNo_HAL_Video_VetMode # 1 ; 48
EntryNo_HAL_Video_PixelFormats # 1 ; 49
EntryNo_HAL_Video_Features # 1 ; 50
EntryNo_HAL_Video_BufferAlignment # 1 ; 51
EntryNo_HAL_Video_OutputFormat # 1 ; 52
EntryNo_HAL_MatrixColumns # 1 ; 53
EntryNo_HAL_MatrixScan # 1 ; 54
EntryNo_HAL_TouchscreenType # 1 ; 55
EntryNo_HAL_TouchscreenRead # 1 ; 56
EntryNo_HAL_TouchscreenMode # 1 ; 57
EntryNo_HAL_TouchscreenMeasure # 1 ; 58
EntryNo_HAL_MachineID # 1 ; 59, ReadSysInfo 2
EntryNo_HAL_ControllerAddress # 1 ; 60, Memory 9
EntryNo_HAL_HardwareInfo # 1 ; 61, ReadSysInfo 2
EntryNo_HAL_SuperIOInfo # 1 ; 62, ReadSysInfo 3
EntryNo_HAL_PlatformInfo # 1 ; 63, ReadSysInfo 8
EntryNo_HAL_CleanerSpace # 1 ; 64
EntryNo_HAL_UARTPorts # 1 ; 65
EntryNo_HAL_UARTStartUp # 1 ; 66
EntryNo_HAL_UARTShutdown # 1 ; 67
EntryNo_HAL_UARTFeatures # 1 ; 68
EntryNo_HAL_UARTReceiveByte # 1 ; 69
EntryNo_HAL_UARTTransmitByte # 1 ; 70
EntryNo_HAL_UARTLineStatus # 1 ; 71
EntryNo_HAL_UARTInterruptEnable # 1 ; 72
EntryNo_HAL_UARTRate # 1 ; 73
EntryNo_HAL_UARTFormat # 1 ; 74
EntryNo_HAL_UARTFIFOSize # 1 ; 75
EntryNo_HAL_UARTFIFOClear # 1 ; 76
EntryNo_HAL_UARTFIFOEnable # 1 ; 77
EntryNo_HAL_UARTFIFOThreshold # 1 ; 78
EntryNo_HAL_UARTInterruptID # 1 ; 79
EntryNo_HAL_UARTBreak # 1 ; 80
EntryNo_HAL_UARTModemControl # 1 ; 81
EntryNo_HAL_UARTModemStatus # 1 ; 82
EntryNo_HAL_UARTDevice # 1 ; 83
EntryNo_HAL_Reset # 1 ; 84
EntryNo_HAL_DebugRX # 1 ; 85
EntryNo_HAL_DebugTX # 1 ; 86
EntryNo_HAL_PCIFeatures # 1 ; 87
EntryNo_HAL_PCIReadConfigByte # 1 ; 88
EntryNo_HAL_PCIReadConfigHalfword # 1 ; 89
EntryNo_HAL_PCIReadConfigWord # 1 ; 90
EntryNo_HAL_PCIWriteConfigByte # 1 ; 91
EntryNo_HAL_PCIWriteConfigHalfword # 1 ; 92
EntryNo_HAL_PCIWriteConfigWord # 1 ; 93
EntryNo_HAL_PCISpecialCycle # 1 ; 94
EntryNo_HAL_PCISlotTable # 1 ; 95
EntryNo_HAL_PCIAddresses # 1 ; 96
EntryNo_HAL_ATAControllerInfo # 1 ; 97
EntryNo_HAL_ATASetModes # 1 ; 98
EntryNo_HAL_ATACableID # 1 ; 99
EntryNo_HAL_InitDevices # 1 ; 100
EntryNo_HAL_KbdScanSetup # 1 ; 101
EntryNo_HAL_KbdScan # 1 ; 102
EntryNo_HAL_KbdScanFinish # 1 ; 103
EntryNo_HAL_KbdScanInterrupt # 1 ; 104
EntryNo_HAL_PhysInfo # 1 ; 105
EntryNo_HAL_USBControllerInfo # 1 ; 106
EntryNo_HAL_MonitorLeadID # 1 ; 107
EntryNo_HAL_Video_Render # 1 ; 108
EntryNo_HAL_USBPortPower # 1 ; 109
EntryNo_HAL_USBPortStatus # 1 ; 110
EntryNo_HAL_USBPortIRQ # 1 ; 111
EntryNo_HAL_Video_IICOp # 1 ; 112
EntryNo_HAL_TimerIRQClear # 1 ; 113
EntryNo_HAL_TimerIRQStatus # 1 ; 114
EntryNo_HAL_ExtMachineID # 1 ; 115, ReadSysInfo 10
EntryNo_HAL_Video_FramestoreAddress # 1 ; 116
EntryNo_HAL_UARTDefault # 1 ; 117
KnownHALEntries # 0 ; Used inside Kernel
......
......@@ -74,6 +74,7 @@
GET Hdr:Debug
GET Hdr:nvram
GET Hdr:PortMan
GET Hdr:SerialOp
GET s.PMF.DEF ; Common with 6502 code in the keyboard
Protocol
......
......@@ -309,11 +309,34 @@ Osbyte02 ROUT
TEQ r0, #0 ; if a stream open already
BNE %FT20 ; then skip
SUB sp, sp, #64
MOV r3, sp
ADR r1, SerialInFilename
12
LDRB r0, [r1], #1
CMP r0, #0
STRNEB r0, [r3], #1
BNE %BT12
MOV r0, #SerialOp_GetDeviceName
SWI XOS_SerialOp
; r1 should now be correct device name or preserved on error
; i.e. left pointing at our default name
ADD lr, sp, #63
14
SUBS r0, r1, lr ; Basic buffer overflow check
LDRNEB r0, [r1], #1
CMPNE r0, #0
STRB r0, [r3], #1
BNE %BT14
MOV r0, #open_read + open_mustopen
ADR r1, SerialInFilename ; open serial stream for input
MOV r1, sp ; open serial stream for input
SWI XOS_Find
STRVCB r0, SerialInHandle ; if did open then store handle
; (may store same value if already open, but who cares?)
ADD sp, sp, #64
20
Pull "r0"
LDRB R1, InputStream ; old input stream
......@@ -323,7 +346,7 @@ Osbyte02 ROUT
LTORG
SerialInFilename
= "Serial#Buffer1:", 0
= "Devices#Buffer1:$.", 0, "Serial", 0
ALIGN
; Select output stream
......@@ -1091,7 +1114,7 @@ Osbyte99
; Update pseudo 6850 control register and soft copy
Osbyte9C
MOV r0, #7 ; OS_SerialOp to modify 6850 control register
MOV r0, #SerialOp_Modify6850 ; OS_SerialOp to modify 6850 control register
SWI XOS_SerialOp
MyOsbyte
......
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