Commit 6142809f authored by Kevin Bracey's avatar Kevin Bracey
Browse files

RCMM changes made the Kernel not report the type of I/O chip fitted correctly.

This has been fixed. In addition, SMC669 and UMC669 chips are reported as
a different chip configuration by OS_ReadSysInfo 3 (values 4 and 5
respectively).
A few assertions added to catch the remaining cases where the RCMM stuff
won't work - those cases will involve a bit more reordering of hardware
initialisation.

Version 5.00. Tagged as 'Kernel-5_00'
parent 15d157ef
......@@ -6,9 +6,9 @@
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
Module_MajorVersion SETS "4.99"
Module_Version SETA 499
Module_MajorVersion SETS "5.00"
Module_Version SETA 500
Module_MinorVersion SETS ""
Module_Date SETS "19 Oct 1999"
Module_FullVersion SETS "4.99"
Module_FullVersion SETS "5.00"
END
/* (4.99)
/* (5.00)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 4.99
#define Module_MajorVersion_CMHG 5.00
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 19 Oct 1999
#define Module_MajorVersion "4.99"
#define Module_Version 499
#define Module_MajorVersion "5.00"
#define Module_Version 500
#define Module_MinorVersion ""
#define Module_Date "19 Oct 1999"
#define Module_FullVersion "4.99"
#define Module_FullVersion "5.00"
......@@ -206,6 +206,7 @@ OldOpt SETA {OPT}
; amg 07/12/96 Renaissance. Shifted ResetType (which is a public export) so it'll
; stay in the same place.
; 21-Jul-98 NDT Added PixelRate. Moved KernelModeSelector to make space.
; 19-Oct-99 KJB Moved IOSystemType into SkippedTables.
;
; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
; Memory map:
......@@ -1035,6 +1036,8 @@ ProcessorFlags # 1 ; Processor flags (IMB, Arch4 etc)
! 0, "ProcessorFlags at ":CC::STR:(ProcessorFlags)
]
IOSystemType # 1 ; 0 => old I/O subsystem, 1 => IOEB+82C710 system, 2..255 => ?
AlignSpace 32 ; skipped bit must end on 32-byte boundary (due to speedup)
SkippedTablesEnd # 0
......@@ -1237,7 +1240,6 @@ MOShasFIQ # 1
FIQclaim_interlock # 1
CallBack_Flag # 1
IRQ_CallBack_Flag * CallBack_Flag
IOSystemType # 1 ; 0 => old I/O subsystem, 1 => IOEB+82C710 system, 2..255 => ?
MonitorLeadType # 1 ; some function of the monitor lead inputs, as yet undetermined
AlignSpace
......
......@@ -18,6 +18,19 @@
; The only two hooks in this file used externally are IRQ_Test_CTRL_or_R_Pressed
; and SetUpKbd.
; These asserts are to do with the need to pull forward the combo chip configuration.
; As the code presently stands, ConfigureCombo will only work without calling
; ReadMachineType and PowerHardware in these conditions.
;
; The reason for not calling them is that they mess with variables and VIDC things
; that aren't ready yet.
;
; ConfigureCombo etc only write to IOSystemType, which has now been moved to SkippedTables
; so it doesn't get wiped by ClearPhysRam.
ASSERT IO_Type = "IOMD"
ASSERT :LNOT: BatManSupport
UART2 * ComboBase + &2F8*4 ; -> base of UART 2
^ 0, R2
......@@ -86,17 +99,10 @@ SetUpKbd
; We're going to be using the serial port on the combo chip, so we need to
; pull forward the combo chip initialisation from PMF.osinit.
[ StorkPowerSave
BL PowerHardware ;On Stork, ensure Combo chip, Winnie, Floppy etc are powered
]
[ STB
BL ConfigureCombo
|
[ IO_Type = "IOMD"
BL Configure37C665 ;RiscPC, Kryten and Stork use only SMC 37C665
|
BL Configure82C710 ;Earlier code copes with 82C710,82C711 and 37C665
]
]
; Set up the serial port
......
......@@ -1161,11 +1161,14 @@ ReadSysInfo_Code ROUT
; Bits in IOSystemType
IOST_IOEB * 1 ; On IOMD systems this really means IOMD.
IOST_82C710 * 2
IOST_LC * 4
IOST_82C711 * 8
IOST_37C665 * 16
IOST_COMBOMASK * 7
IOST_82C710 * 1
IOST_82C711 * 2
IOST_37C665 * 3
IOST_37C669 * 4
IOST_UMC669 * 5
IOST_IOEB * 8 ; On IOMD systems this really means IOMD.
IOST_LC * 16
[ MorrisSupport
IOST_7500 * 32 ;Running on ARM7500 (Morris) so actually IOMDL and VIDC2L
IOST_BATMAN * 64 ;Stork keyboard/battery controller seems to be present
......@@ -1189,7 +1192,7 @@ IOST_BATMAN * 64 ;Stork keyboard/battery controller seems to be present
ORRNE r2, r2, #&00000100 ;NE, Morris based machine with IOMDL
ORRNE r2, r2, #&00010000 ;NE, and VIDC2L
]
ANDS r1, r0, #IOST_82C710 :OR: IOST_82C711 :OR: IOST_37C665
ANDS r1, r0, #IOST_COMBOMASK
MOVNE r1, #1 ; make r1 0 or 1
[ IO_Type = "IOMD"
......@@ -1199,8 +1202,8 @@ IOST_BATMAN * 64 ;Stork keyboard/battery controller seems to be present
LDR r0, =&00010100
]
|
ASSERT IOST_IOEB = 1
AND r0, r0, #IOST_IOEB ; and r0 0 or 1
ANDS r0, r0, #IOST_IOEB
MOVNE r0, #1 ; make r1 0 or 1
[ VIDC_Type = "VIDC20"
ORR r0, r0, #&01000000
]
......@@ -1211,23 +1214,23 @@ IOST_BATMAN * 64 ;Stork keyboard/battery controller seems to be present
;
; in: r0 = 3
;
; out: r0 = I/O chip base features mask 710 711 665
; Bits 0..3 Base IDE type 1 1 1
; Bits 4..7 Base FDC type 1 1 1
; Bits 8..11 Base parallel type 1 1 1
; Bits 12..15 Base 1st serial type 1 1 1
; Bits 16..19 Base 2nd serial type 0 1 1
; Bits 20..23 Base Config type 1 2 3
; Bits 24..31 Reserved 0 0 0
; out: r0 = I/O chip base features mask 710 711 665 669 UMC669
; Bits 0..3 Base IDE type 1 1 1 1 1
; Bits 4..7 Base FDC type 1 1 1 1 1
; Bits 8..11 Base parallel type 1 1 1 1 1
; Bits 12..15 Base 1st serial type 1 1 1 1 1
; Bits 16..19 Base 2nd serial type 0 1 1 1 1
; Bits 20..23 Base Config type 1 2 3 4 5
; Bits 24..31 Reserved 0 0 0 0 0
;
; r1 = I/O chip extra features mask 710 711 665
; Bits 0..3 IDE extra features 0 0 0
; Bits 4..7 FDC extra features 0 0 0
; Bits 8..11 parallel extra features 0 0 1
; Bits 12..15 1st serial extra features 0 0 1
; Bits 16..19 2nd serial extra features 0 0 1
; Bits 20..23 config extra features 0 0 0
; Bits 24..31 Reserved 0 0 0
; r1 = I/O chip extra features mask 710 711 665 669 UMC669
; Bits 0..3 IDE extra features 0 0 0 0 0
; Bits 4..7 FDC extra features 0 0 0 0 0
; Bits 8..11 parallel extra features 0 0 1 1 1
; Bits 12..15 1st serial extra features 0 0 1 1 1
; Bits 16..19 2nd serial extra features 0 0 1 1 1
; Bits 20..23 config extra features 0 0 0 0 0
; Bits 24..31 Reserved 0 0 0 0 0
;
; r2-r4 undefined (reserved for future expansion)
;
......@@ -1235,15 +1238,17 @@ IOST_BATMAN * 64 ;Stork keyboard/battery controller seems to be present
30
MOV r0, #0 ; used as index and as default value
LDRB r1, [r0, #IOSystemType]
TST r1, #IOST_82C710
LDRNE r0, =&00101111
MOVNE r1, #0
TST r1, #IOST_82C711
LDRNE r0, =&00211111
MOVNE r1, #0
TST r1, #IOST_37C665
LDRNE r0, =&00311111
LDRNE r1, =&00011100
ANDS r1, r1, #IOST_COMBOMASK
TEQ r1, #IOST_82C710
LDREQ r0, =&00101111
MOVEQ r1, #0
TEQ r1, #IOST_82C711
LDREQ r0, =&00211111
MOVEQ r1, #0
CMP r1, #IOST_37C665
LDRHS r0, =&00011111
ORRHS r0, r0, r1, LSL #20
LDRHS r1, =&00011100
MOV r2, #0
MOV r3, #0
MOV r4, #0
......
......@@ -126,10 +126,11 @@ BuffPtrInitLoop
BL ReadHardCMOSDefaults
20
BL ReadCMOSDefaults
[ Keyboard_Type <> "RCMM" ; On RCMM machines, this is done in SetUpKbd
[ StorkPowerSave
BL PowerHardware ;On Stork, ensure Combo chip, Winnie, Floppy etc are powered
]
[ Keyboard_Type <> "RCMM" ; On RCMM machines, this is done in SetUpKbd.
[ STB
BL ConfigureCombo
|
......@@ -656,7 +657,10 @@ ReadMachineType ENTRY "r0-r12"
10
]
MOV r1, #0 ; normal Hsync and address pointer
STRB r0, [r1, #IOSystemType]
LDRB r3, [r1, #IOSystemType]
AND r3, r3, #IOST_COMBOMASK ; preserve combo type which may already
ORR r3, r3, r0 ; be in there on RCMM machines
STRB r3, [r1, #IOSystemType]
; now read monitor lead type.
......@@ -1106,8 +1110,7 @@ ConfigureCombo ENTRY "r0-r2"
STRB lr, [r0, #UMC_CSR] ; exit config mode
TEQ r2, #2_00111110 ; Value for CR0 from ConfigUMC8669Table
;665s and 669s offer the same features as far as
MOVEQ r1, #IOST_37C665 ; OS_ReadSysInfo(3) is concerned, so use same value for both
MOVEQ r1, #IOST_UMC669
MOVNE r1, #0 ; Don't know what this is, give up
B %FT30
......@@ -1121,14 +1124,14 @@ ConfigureCombo ENTRY "r0-r2"
LDRNEB lr, [r1], #1 ; if not then get config data
STRNEB lr, [r2, #SMC_data-SMC_CSR] ; and write it
BNE %BT20
;665s and 669s offer the same features as far as
MOV r1, #IOST_37C665 ; OS_ReadSysInfo(3) is concerned, so use same value for both
MOV r1, #IOST_37C669
; Record type of chip found
30
MOV r0, #0
LDRB lr, [r0, #IOSystemType]
BIC lr, lr, #IOST_82C710 :OR: IOST_82C711 :OR: IOST_37C665
BIC lr, lr, #IOST_COMBOMASK
ORR lr, lr, r1
STRB lr, [r0, #IOSystemType]
......@@ -1312,7 +1315,7 @@ Configure82C710 ENTRY "r0,r1"
30
MOV r0, #0
LDRB lr, [r0, #IOSystemType]
BIC lr, lr, #IOST_82C710 :OR: IOST_82C711 :OR: IOST_37C665
BIC lr, lr, #IOST_COMBOMASK
ORR lr, lr, r1
STRB lr, [r0, #IOSystemType]
......@@ -1393,7 +1396,7 @@ Configure37C665 ENTRY "r0,r1"
30
MOV r0, #0
LDRB lr, [r0, #IOSystemType]
BIC lr, lr, #IOST_82C710 :OR: IOST_82C711 :OR: IOST_37C665
BIC lr, lr, #IOST_COMBOMASK
ORR lr, lr, r1
STRB lr, [r0, #IOSystemType]
......
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