Commit b213fdd5 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Update VDU HAL device for new OMAPVideo driver, fix MVA-based cache/TLB...

Update VDU HAL device for new OMAPVideo driver, fix MVA-based cache/TLB maintenance ops aborting on ARMv7, add warning to VDU driver about inconsistent state variables during screen mode changes

  hdr/VideoDevice - removed Address2 and Device2 fields as it makes more sense for them to be in the device specific field (which for OMAP3 is a pointer to an OMAP3-specific struct)
  s/VMSAv6 - Modify data abort handler to ignore aborts that are generated by MVA-based cache/TLB maintenance ops. Unlike earlier ARM architectures, MVA-based ops can abort under ARMv7 if the page has no mapping to a physical address.
  s/vdu/vdudriver - Add a warning about VDU driver state variables (particularly CursorAddr) being left in invalid states during the execution of mode changes. This can cause problems if any attempt is made to output to the screen during the mode change (e.g. as a result of an abort)
  Tested on rev C2 beagleboard. Video device changes mean that OMAP3 HAL 0.23 will be needed for ROM compilation to succeed.

Version 5.35, Tagged as 'Kernel-5_35-4_79_2_98_2_24'
parent 114948c8
......@@ -13,11 +13,11 @@
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.35"
Module_Version SETA 535
Module_MinorVersion SETS ""
Module_Date SETS "20 Feb 2010"
Module_ApplicationDate SETS "20-Feb-10"
Module_MinorVersion SETS ""
Module_Date SETS "28 Feb 2010"
Module_ApplicationDate SETS "28-Feb-10"
Module_ComponentName SETS "Kernel"
Module_ComponentPath SETS "castle/RiscOS/Sources/Kernel"
Module_FullVersion SETS "5.35 ("
Module_HelpVersion SETS "5.35 (20 Feb 2010)"
Module_FullVersion SETS "5.35 ("
Module_HelpVersion SETS "5.35 (28 Feb 2010)"
......@@ -5,19 +5,19 @@
#define Module_MajorVersion_CMHG 5.35
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 20 Feb 2010
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 28 Feb 2010
#define Module_MajorVersion "5.35"
#define Module_Version 535
#define Module_MinorVersion ""
#define Module_Date "20 Feb 2010"
#define Module_MinorVersion ""
#define Module_Date "28 Feb 2010"
#define Module_ApplicationDate "20-Feb-10"
#define Module_ApplicationDate "28-Feb-10"
#define Module_ComponentName "Kernel"
#define Module_ComponentPath "castle/RiscOS/Sources/Kernel"
#define Module_FullVersion "5.35 ("
#define Module_HelpVersion "5.35 (20 Feb 2010)"
#define Module_FullVersion "5.35 ("
#define Module_HelpVersion "5.35 (28 Feb 2010)"
#define Module_LibraryVersionInfo "5:35"
......@@ -26,12 +26,10 @@ Included_Hdr_VideoDevice SETL {TRUE}
; Device for VDU video devices
^ 0
# HALDeviceSize
HALDevice_VDUAddress2 # 4
HALDevice_VDUDevice2 # 4
HALDevice_VDUDeviceSpecificField # 4
HALDevice_VDU_Size * :INDEX: @
^ 0
# HALDeviceSize
HALDevice_VDUDeviceSpecificField # 4
HALDevice_VDU_Size * :INDEX: @
......@@ -552,15 +552,30 @@ DAbPreVeneer ROUT
SUB r11, r2, #8*4 ; r11 -> register bank
STR r4, [sp, #7*4] ; store aborter's PC in user register bank
[ {TRUE}
; For now, don't attempt any fixup on ARMv6+, since we'll get it wrong
B %FT90
; B %FT90
TST r0, #T32_bit ; were they in Thumb mode? if so, give up now
[ {TRUE}
; For now, the only fixup we do is for MVA-based cache/TLB ops, which can abort on ARMv7 if the specified MVA doesn't have a mapping.
; MVA cache ops have the form coproc=p15, CRn=c7, opc1=0, opc2=1
; MVA TLB ops have the form coproc=p15, CRn=c8, opc=0, opc2=1
; Note that some non-MVA ops also follow the above rules - at the moment we make no attempt to filter those false-positives out
; This code is also written from the perspective of running on an ARMv7 CPU - behaviour under ARMv6 hasn't been checked!
LDR r10, [r4, #-8] ; Get aborting instruction
CMP r10, #&F0000000
BHS %FT90 ; Ignore cc=NV, which is MCR2 encoding
LDR r9, =&0FFF0FF0 ; Mask of interesting bits
AND r10,r10,r9
LDR r9, =&0E000F30 ; Desired value, minus CRn
EOR r10,r10,r9
CMP r10, #&70000 ; CRn=c7?
CMPNE r10, #&80000 ; CRn=c8?
BEQ %FT70 ; It's an MVA-based op. Ignore the abort and resume execution
B %FT90 ; Else skip the old & broken LDR/STR fixup code and go straight to the exception handler,
;ARM 810 or StrongARM allow signed byte load or half-word load/stores - not supported at present
;***KJB - need to think about LDRH family
LDR r10, [r4, #-8]! ; r10 = actual instruction that aborted, and r4 points to it
......@@ -803,6 +803,8 @@ mchsub_3
; try to extend the amount of screen memory
! 0, "Need to fix ModeChangeSub to not leave CursorAddr, etc. pointing to unmapped pages during DA resize. Causes bad stuff should an abort occur/screen output be attempted!" ; Note that even enlarging the DA can leave the pointers in a bad state, due to the way the screen DA handler shuffles down/unmaps the lower mapping of VRAM before the higher copy is enlarged
MOV R0, #2 ; expand screen memory
SWI XOS_ChangeDynamicArea
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