mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 13:44:33 +02:00
ArmPlatformPkg/ArmVExpressPkg: Add System ID of FVP models to VE LCD driver.
- Setting DVI fails on VE models. The FVP models behave the same. These have updated SYS ID numbers and they need to be added to the driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14564 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4ca88ec73f
commit
48999d26c5
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
* Header defining Versatile Express constants (Base addresses, sizes, flags)
|
* Header defining Versatile Express constants (Base addresses, sizes, flags)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011, ARM Limited. All rights reserved.
|
* Copyright (c) 2011-2013, ARM Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are licensed and made available under the terms and conditions of the BSD License
|
* are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -95,4 +95,35 @@
|
|||||||
// Can not access the battery backed-up hardware clock on the Versatile Express motherboard
|
// Can not access the battery backed-up hardware clock on the Versatile Express motherboard
|
||||||
#define SYS_CFG_RTC VIRTUAL_SYS_CFG(ARM_VE_UNSUPPORTED,1)
|
#define SYS_CFG_RTC VIRTUAL_SYS_CFG(ARM_VE_UNSUPPORTED,1)
|
||||||
|
|
||||||
|
//
|
||||||
|
// System ID
|
||||||
|
//
|
||||||
|
// All RTSM VE models have the same System ID : 0x225F500
|
||||||
|
//
|
||||||
|
// FVP models have a different System ID.
|
||||||
|
// Default Base model System ID : 0x00201100
|
||||||
|
// [31:28] Rev - Board revision: 0x0 = Rev A
|
||||||
|
// [27:16] HBI - HBI board number in BCD: 0x020 = v8 Base Platform
|
||||||
|
// [15:12] Variant - Build variant of board: 0x1 = Variant B. (GIC 64k map)
|
||||||
|
// [11:8] Plat - Platform type: 0x1 = Model
|
||||||
|
// [7:0] FPGA - FPGA build, BCD coded: 0x00
|
||||||
|
//
|
||||||
|
//HBI = 010 = Foundation Model
|
||||||
|
//HBI = 020 = Base Platform
|
||||||
|
//
|
||||||
|
// And specifically, the GIC register banks start at the following
|
||||||
|
// addresses:
|
||||||
|
// Variant = 0 Variant = 1
|
||||||
|
//GICD 0x2c001000 0x2f000000
|
||||||
|
//GICC 0x2c002000 0x2c000000
|
||||||
|
//GICH 0x2c004000 0x2c010000
|
||||||
|
//GICV 0x2c006000 0x2c020000
|
||||||
|
|
||||||
|
// The default SYS_IDs. These can be changed when starting the model.
|
||||||
|
#define ARM_RTSM_SYS_ID (0x225F500)
|
||||||
|
#define ARM_FVP_BASE_SYS_ID (0x00201100)
|
||||||
|
#define ARM_FVP_FOUNDATION_SYS_ID (0x00101100)
|
||||||
|
|
||||||
|
#define ARM_FVP_SYS_ID_VARIANT_MASK (UINT32)(0xFUL << 12)
|
||||||
|
|
||||||
#endif /* VEXPRESSMOTHERBOARD_H_ */
|
#endif /* VEXPRESSMOTHERBOARD_H_ */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
|
|
||||||
Copyright (c) 2011, ARM Ltd. All rights reserved.<BR>
|
Copyright (c) 2011-2013, ARM Ltd. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -234,6 +234,7 @@ LcdPlatformSetMode (
|
|||||||
UINT32 LcdSite;
|
UINT32 LcdSite;
|
||||||
UINT32 OscillatorId;
|
UINT32 OscillatorId;
|
||||||
SYS_CONFIG_FUNCTION Function;
|
SYS_CONFIG_FUNCTION Function;
|
||||||
|
UINT32 SysId;
|
||||||
|
|
||||||
if (ModeNumber >= LcdPlatformGetMaxMode ()) {
|
if (ModeNumber >= LcdPlatformGetMaxMode ()) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
@ -261,14 +262,20 @@ LcdPlatformSetMode (
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
// On the ARM Versatile Express Model (RTSM) the value of the SysId is equal to 0x225F500.
|
// The FVP foundation model does not have an LCD.
|
||||||
// Note: The DVI Mode is not modelled on RTSM
|
// On the FVP models the GIC variant in encoded in bits [15:12].
|
||||||
if (MmioRead32 (ARM_VE_SYS_ID_REG) != 0x225F500) {
|
// Note: The DVI Mode is not modelled by RTSM or FVP models.
|
||||||
// Set the DVI into the new mode
|
SysId = MmioRead32 (ARM_VE_SYS_ID_REG);
|
||||||
Status = ArmPlatformSysConfigSet (SYS_CFG_DVIMODE, mResolutions[ModeNumber].Mode);
|
if (SysId != ARM_RTSM_SYS_ID) {
|
||||||
if (EFI_ERROR(Status)) {
|
// Take out the FVP GIC variant to reduce the permutations.
|
||||||
ASSERT_EFI_ERROR (Status);
|
SysId &= ~ARM_FVP_SYS_ID_VARIANT_MASK;
|
||||||
return Status;
|
if (SysId != (ARM_FVP_BASE_SYS_ID & ~ARM_FVP_SYS_ID_VARIANT_MASK)) {
|
||||||
|
// Set the DVI into the new mode
|
||||||
|
Status = ArmPlatformSysConfigSet (SYS_CFG_DVIMODE, mResolutions[ModeNumber].Mode);
|
||||||
|
if (EFI_ERROR(Status)) {
|
||||||
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user