Commit 4d017eb3 authored by ROOL's avatar ROOL 🤖
Browse files

Extend MonitorType configure keyword

Detail:
  Accept a monitortype of 'EDID' (as distinct from 'Auto', which uses the ID pins) to force the kernel, via ScrModes, to use the native screen mode prior to executing the boot sequence.
  Required for discless boot, this also helps if the boot sequence fails, the desktop will be entered in the monitor's native resolution, or a fallback if GraphicsV rejects that.
  The allocation of the EDID monitor type has been carefully selected to degrade to 'Auto' when used with an older OS. That way the configuration in CMOS is safe to use with softloads on top of older physical ROMs.
  When OS_ScreenMode is queried return the 'Auto' type, ie. at an API level there's no distinction.
Admin:
  Requires HdrSrc-2_67.
  Submission for the EDID bounty.

Version 5.80. Tagged as 'Kernel-5_80'
parent 79699513
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.79"
Module_Version SETA 579
Module_MajorVersion SETS "5.80"
Module_Version SETA 580
Module_MinorVersion SETS ""
Module_Date SETS "17 Feb 2017"
Module_ApplicationDate SETS "17-Feb-17"
Module_Date SETS "05 Mar 2017"
Module_ApplicationDate SETS "05-Mar-17"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.79"
Module_HelpVersion SETS "5.79 (17 Feb 2017)"
Module_FullVersion SETS "5.80"
Module_HelpVersion SETS "5.80 (05 Mar 2017)"
END
/* (5.79)
/* (5.80)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.79
#define Module_MajorVersion_CMHG 5.80
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 17 Feb 2017
#define Module_Date_CMHG 05 Mar 2017
#define Module_MajorVersion "5.79"
#define Module_Version 579
#define Module_MajorVersion "5.80"
#define Module_Version 580
#define Module_MinorVersion ""
#define Module_Date "17 Feb 2017"
#define Module_Date "05 Mar 2017"
#define Module_ApplicationDate "17-Feb-17"
#define Module_ApplicationDate "05-Mar-17"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.79"
#define Module_HelpVersion "5.79 (17 Feb 2017)"
#define Module_LibraryVersionInfo "5:79"
#define Module_FullVersion "5.80"
#define Module_HelpVersion "5.80 (05 Mar 2017)"
#define Module_LibraryVersionInfo "5:80"
......@@ -1285,7 +1285,7 @@ Config_$name._table
Config_Special_Table Ignore, "[<D>]"
Config_Special_Table MouseStep, "<D>"
Config_Special_Table MouseType, "<D>"
Config_Special_Table MonitorType, "<D> | Auto"
Config_Special_Table MonitorType, "<D> | EDID | Auto"
Config_Special_Table Sync, "<D> | Auto"
Config_Special_Table WimpMode, "<D> | Auto"
......@@ -2423,7 +2423,26 @@ Config_MouseType_showcode
B ExitShow
Config_MonitorType_setcode
10
LDRB r2, [r0], #1
CMP r2, #" "
BEQ %BT10
SUB r1, r0, #1
ADR r3, MonitorTypeNameEDID ; string to match against
MOV r4, #0 ; no other terminators for $R1
BL Module_StrCmp ; out: EQ => match, r1 -> terminator
; NE => no match, r1 preserved
; r3 corrupted in both cases
LDREQB r3, [r1]
MOVNE r0, r1
ADR r1, MonitorTypeCMOSTable
BNE %FT20
CMP r3, #" "
BGT BadConParm
MOV r2, #MonitorTypeEDID :SHR: MonitorTypeShift
MOV r4, r2
B %FT30
20
BL ReadNumAuto
BVS BadConParm
MOV r4, r2 ; save value to store in current monitortype
......@@ -2435,7 +2454,7 @@ Config_MonitorType_setcode
BHI ConParmTooBig
BL ConfigCheckEOL
BVS ExitConfig
30
LDR r0, =ZeroPage+VduDriverWorkSpace+CurrentMonitorType
STR r4, [r0] ; update current value
......@@ -2446,11 +2465,14 @@ Config_MonitorType_setcode
LTORG
MonitorTypeCMOSTable
& MonitorTypeAuto :SHR: MonitorTypeShift ; Auto value
& MonitorTypeF :SHR: MonitorTypeShift ; maximum valid number
DCD MonitorTypeAuto :SHR: MonitorTypeShift ; value for Auto
DCD MonitorTypeEDID :SHR: MonitorTypeShift ; maximum valid number
; address, mask from bit 0, shift to 1st bit in value, shift to 1st bit in CMOS
= VduCMOS, MonitorTypeBits :SHR: MonitorTypeShift, 0, MonitorTypeShift
= 0
MonitorTypeNameEDID
DCB "EDID", 0
ALIGN
Config_MonitorType_showcode ROUT
......@@ -2458,10 +2480,16 @@ Config_MonitorType_showcode ROUT
SWI XOS_WriteS
= "MonitorType ", 0
ALIGN
BVS %FT10
BVS %FT20
BL Read_Configd_MonitorType
BL PrintR0
TEQ r0, #MonitorTypeEDID :SHR: MonitorTypeShift
BNE %FT10
ADR r0, MonitorTypeNameEDID
SWI XOS_Write0
B %FT20
10
BL PrintR0
20
ADD r2, r4, #4
B ExitShow
......
......@@ -1265,6 +1265,8 @@ ReadSysInfo_InvalidReason
MOV r2, r0
LDR r1, =ZeroPage+VduDriverWorkSpace+CurrentMonitorType ; read current monitortype
LDR r1, [r1]
TEQ r1, #MonitorTypeEDID :SHR: MonitorTypeShift ; equate EDID=auto in this context
MOVEQ r1, #MonitorTypeAuto :SHR: MonitorTypeShift
BL Read_Configd_Mode
CMP r0, #-1 ; if none of the three are auto, don't bother with translation
CMPNE r1, #-1
......
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