Commit 34e39bc3 authored by Jeffrey Lee's avatar Jeffrey Lee Committed by Ben Avison
Browse files

Let VCHIQ know which page list format to use

VCHIQ bulk transfers on Pi 4 use a different page list format, in order
to allow for full use of the larger 36bit physical address space. Add a
flags word to the VCHIQ HAL device so that we can let the VCHIQ module
know what page list format it should use for the machine we're running
on.
parent 5984aed1
......@@ -4,18 +4,18 @@
*
*/
#define Module_MajorVersion_CMHG 0.82
#define Module_MinorVersion_CMHG Pi4.15
#define Module_MinorVersion_CMHG Pi4.16
#define Module_Date_CMHG 18 Feb 2020
#define Module_MajorVersion "0.82"
#define Module_Version 82
#define Module_MinorVersion "Pi4.15"
#define Module_MinorVersion "Pi4.16"
#define Module_Date "18 Feb 2020"
#define Module_ApplicationDate "18-Feb-20"
#define Module_ComponentName "HAL_BCM2835"
#define Module_FullVersion "0.82 (Pi4.15)"
#define Module_HelpVersion "0.82 (18 Feb 2020) Pi4.15"
#define Module_FullVersion "0.82 (Pi4.16)"
#define Module_HelpVersion "0.82 (18 Feb 2020) Pi4.16"
#define Module_LibraryVersionInfo "0:82"
......@@ -70,8 +70,11 @@ HALDevice_VCHIQARMToVCOffset # 4
HALDevice_VCHIQVCDoorbell # 4 ; Doorbell to interrupt VC
HALDevice_VCHIQARMDoorbell # 4 ; Doorbell to interrupt us
HALDevice_VCHIQInitVC # 4
HALDevice_VCHIQFlags # 4
HALDevice_VCHIQ_Size * :INDEX: @
VCHIQFlag_Use36bitAddrs * 1
; Device-specific struct for the VDU device
^ 0
......
......@@ -68,7 +68,7 @@ VCHIQ_Dev
HALDeviceField Type, HALDeviceType_Comms + HALDeviceComms_InterProc
HALDeviceField ID, HALDeviceID_InterProc_VCHIQ
HALDeviceField Location, HALDeviceBus_Sys + HALDeviceSysBus_AHB ; Guess
HALDeviceField Version, 0
HALDeviceField Version, 1 ; API 0.1
HALDeviceField Description, VCHIQ_Description
HALDeviceField Address, 0
HALDeviceField Reserved1, 0
......@@ -84,6 +84,7 @@ VCHIQ HALDeviceField ARMToVCOffset, 0 ; filled in later
VCHIQ HALDeviceField VCDoorbell, VCHIQ_VCDoorbell
VCHIQ HALDeviceField ARMDoorbell, VCHIQ_ARMDoorbell
VCHIQ HALDeviceField InitVC, VCHIQ_InitVC
VCHIQ HALDeviceField Flags, 0 ; filled in later
ASSERT . - %A0 = HALDevice_VCHIQ_Size
VCHIQ_Description
......@@ -102,6 +103,12 @@ VCHIQ_InitDevices ROUT
LDR a1, FB_CacheMode
STR a1, [a2, #HALDevice_VCHIQARMToVCOffset]
MOV a1, #0
CPUDetect ip
; Raspberry Pi 4 / BCM2838 uses a different page list format to allow
; for a 36bit physical address range
ORRHI a1, a1, #VCHIQFlag_Use36bitAddrs
STR a1, [a2, #HALDevice_VCHIQFlags]
MOV a1, #0
MOV lr, pc
LDR pc, OSentries+4*OS_AddDevice
EXIT
......
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