ArmPkg: Move ARM Platform drivers from ArmPkg/Drivers/ to ArmPlatformPkg/Drivers/
The idea is to keep ArmPkg responsible for the ARM architectural modules and ArmPlatformPkg the ARM development platform packages (with their respective drivers). ArmPlatformPkg: Reduce driver dependency on ArmPlatform.h - Move some driver definitions from C-Macro to PCD values - Unify PCD driver namespace git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11956 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -95,13 +95,13 @@
|
||||
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
|
||||
|
||||
# ARM PL310 L2 Cache Driver
|
||||
L2X0CacheLib|ArmPkg/Drivers/PL310L2Cache/PL310L2CacheSec.inf
|
||||
L2X0CacheLib|ArmPlatformPkg/Drivers/PL310L2Cache/PL310L2CacheSec.inf
|
||||
# ARM PL354 SMC Driver
|
||||
PL354SmcLib|ArmPkg/Drivers/PL35xSmc/PL354SmcSec.inf
|
||||
PL35xSmcLib|ArmPlatformPkg/Drivers/PL35xSmc/PL35xSmc.inf
|
||||
# ARM PL341 DMC Driver
|
||||
PL341DmcLib|ArmPkg/Drivers/PL34xDmc/PL341Dmc.inf
|
||||
PL341DmcLib|ArmPlatformPkg/Drivers/PL34xDmc/PL341Dmc.inf
|
||||
# ARM PL301 Axi Driver
|
||||
PL301AxiLib|ArmPkg/Drivers/PL301Axi/PL301Axi.inf
|
||||
PL301AxiLib|ArmPlatformPkg/Drivers/PL301Axi/PL301Axi.inf
|
||||
# ARM PL011 UART Driver
|
||||
PL011UartLib|ArmPlatformPkg/Drivers/PL011Uart/PL011Uart.inf
|
||||
|
||||
@@ -392,27 +392,45 @@
|
||||
# System Memory (1GB)
|
||||
gArmTokenSpaceGuid.PcdSystemMemoryBase|0x60000000
|
||||
gArmTokenSpaceGuid.PcdSystemMemorySize|0x40000000
|
||||
|
||||
gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterFrequencyInHz|1000000
|
||||
gEmbeddedTokenSpaceGuid.PcdTimerPeriod|100000 # expressed in 100ns units, 100,000 x 100 ns = 10,000,000 ns = 10 ms
|
||||
gArmPlatformTokenSpaceGuid.PcdSP804Timer0InterruptNum|34
|
||||
|
||||
|
||||
#
|
||||
# ARM Pcds
|
||||
#
|
||||
gArmTokenSpaceGuid.PcdArmUncachedMemoryMask|0x0000000040000000
|
||||
|
||||
|
||||
#
|
||||
# ARM PrimeCell
|
||||
#
|
||||
gArmTokenSpaceGuid.PcdPL180SysMciRegAddress|0x10000048
|
||||
gArmTokenSpaceGuid.PcdPL180MciBaseAddress|0x10005000
|
||||
|
||||
#
|
||||
# ARM PL011 - Serial Terminal
|
||||
#
|
||||
## SP804 Timer
|
||||
gEmbeddedTokenSpaceGuid.PcdEmbeddedPerformanceCounterFrequencyInHz|1000000
|
||||
gEmbeddedTokenSpaceGuid.PcdTimerPeriod|100000 # expressed in 100ns units, 100,000 x 100 ns = 10,000,000 ns = 10 ms
|
||||
gArmPlatformTokenSpaceGuid.PcdSP804TimerPeriodicInterruptNum|34
|
||||
gArmPlatformTokenSpaceGuid.PcdSP804TimerPeriodicBase|0x10011000
|
||||
gArmPlatformTokenSpaceGuid.PcdSP804TimerPerformanceBase|0x10012020
|
||||
gArmPlatformTokenSpaceGuid.PcdSP804TimerMetronomeBase|0x10012000
|
||||
|
||||
## SP805 Watchdog - Motherboard Watchdog
|
||||
gArmPlatformTokenSpaceGuid.PcdSP805WatchdogBase|0x1000F000
|
||||
## SP805 Watchdog - CoreTile Watchdog
|
||||
#gArmPlatformTokenSpaceGuid.PcdSP805WatchdogBase|0x100E5000
|
||||
|
||||
## PL011 - Serial Terminal
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x10009000
|
||||
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|38400
|
||||
|
||||
## PL031 RealTimeClock
|
||||
gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x10017000
|
||||
|
||||
## PL111 Lcd
|
||||
# PL111 CoreTile or Tuscan Standalone controller
|
||||
gArmPlatformTokenSpaceGuid.PcdPL111LcdBase|0x10020000
|
||||
# PL111 Versatile Express Motherboard controller
|
||||
#gArmPlatformTokenSpaceGuid.PcdPL111LcdBase|0x1001F000
|
||||
|
||||
## PL180 MMC/SD card controller
|
||||
gArmPlatformTokenSpaceGuid.PcdPL180SysMciRegAddress|0x10000048
|
||||
gArmPlatformTokenSpaceGuid.PcdPL180MciBaseAddress|0x10005000
|
||||
|
||||
#
|
||||
# ARM PL390 General Interrupt Controller
|
||||
@@ -532,7 +550,7 @@
|
||||
# Multimedia Card Interface
|
||||
#
|
||||
EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf
|
||||
ArmPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
|
||||
ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
|
||||
|
||||
#
|
||||
# FAT filesystem + GPT/MBR partitioning
|
||||
|
@@ -187,7 +187,7 @@ READ_LOCK_STATUS = TRUE
|
||||
# Multimedia Card Interface
|
||||
#
|
||||
INF EmbeddedPkg/Universal/MmcDxe/MmcDxe.inf
|
||||
INF ArmPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
|
||||
INF ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf
|
||||
|
||||
#
|
||||
# UEFI application (Shell Embedded Boot Loader)
|
||||
|
@@ -47,4 +47,5 @@
|
||||
#
|
||||
# For a list of mode numbers look in LcdArmVExpress.c
|
||||
#
|
||||
gArmVExpressTokenSpaceGuid.PcdPL111MaxMode|3|UINT32|0x00000003
|
||||
gArmVExpressTokenSpaceGuid.PcdPL111LcdMaxMode|3|UINT32|0x00000003
|
||||
gArmVExpressTokenSpaceGuid.PcdPL111LcdVideoModeOscId|1|UINT32|0x00000004
|
||||
|
@@ -52,10 +52,10 @@
|
||||
#define ARM_VE_SMB_PERIPH_SZ SIZE_64MB
|
||||
|
||||
// DRAM
|
||||
#define ARM_VE_DRAM_BASE 0x60000000
|
||||
#define ARM_VE_DRAM_SZ 0x40000000
|
||||
#define ARM_VE_DRAM_BASE PcdGet32 (PcdSystemMemoryBase)
|
||||
#define ARM_VE_DRAM_SZ PcdGet32 (PcdSystemMemorySize)
|
||||
// Inside the DRAM we allocate a section for the VRAM (Video RAM)
|
||||
#define LCD_VRAM_CORE_TILE_BASE 0x64000000
|
||||
#define LCD_VRAM_CORE_TILE_BASE 0x64000000
|
||||
|
||||
// External AXI between daughterboards (Logic Tile)
|
||||
#define ARM_VE_EXT_AXI_BASE 0xE0000000
|
||||
@@ -98,18 +98,6 @@
|
||||
// PL310 L2x0 Cache Controller Base Address
|
||||
//#define ARM_VE_L2x0_CTLR_BASE 0x1E00A000
|
||||
|
||||
/***********************************************************************************
|
||||
Select between Motherboard and Core Tile peripherals
|
||||
************************************************************************************/
|
||||
|
||||
// Specify which PL111 to use
|
||||
//#define PL111_CLCD_BASE PL111_CLCD_MOTHERBOARD_BASE
|
||||
#define PL111_CLCD_BASE PL111_CLCD_CORE_TILE_BASE
|
||||
|
||||
// Specify which Watchdog to use
|
||||
#define SP805_WDOG_BASE SP805_WDOG_MOTHERBOARD_BASE
|
||||
//#define SP805_WDOG_BASE SP805_WDOG_CORE_TILE_BASE
|
||||
|
||||
/***********************************************************************************
|
||||
Peripherals' misc settings
|
||||
************************************************************************************/
|
||||
@@ -130,16 +118,6 @@
|
||||
#define ARM_VE_DECPROT_BIT_NMC_TZASC_LOCK (1 << 4)
|
||||
#define ARM_VE_DECPROT_BIT_SMC_TZASC_LOCK (1 << 5)
|
||||
|
||||
// PL031 RTC - Other settings
|
||||
#define PL031_PPM_ACCURACY 300000000
|
||||
|
||||
// SP805 Watchdog - Other settings
|
||||
#define SP805_CLOCK_FREQUENCY 32000
|
||||
#define SP805_MAX_TICKS 0xFFFFFFFF
|
||||
|
||||
// PL111 Lcd
|
||||
#define PL111_CLCD_CORE_TILE_VIDEO_MODE_OSC_ID 1
|
||||
|
||||
/***********************************************************************************
|
||||
// EFI Memory Map in Permanent Memory (DRAM)
|
||||
************************************************************************************/
|
||||
|
@@ -50,4 +50,7 @@
|
||||
[FixedPcd]
|
||||
gArmPlatformTokenSpaceGuid.PcdStandalone
|
||||
|
||||
gArmTokenSpaceGuid.PcdSystemMemoryBase
|
||||
gArmTokenSpaceGuid.PcdSystemMemorySize
|
||||
|
||||
gArmTokenSpaceGuid.PcdL2x0ControllerBase
|
||||
|
@@ -23,6 +23,8 @@
|
||||
#include <Drivers/PL301Axi.h>
|
||||
#include <Drivers/SP804Timer.h>
|
||||
|
||||
#include <ArmPlatform.h>
|
||||
|
||||
#define SerialPrint(txt) SerialPortWrite ((UINT8*)(txt), AsciiStrLen(txt)+1);
|
||||
|
||||
// DDR2 timings
|
||||
@@ -121,7 +123,7 @@ ArmPlatformBootRemapping (
|
||||
/**
|
||||
Initialize controllers that must setup in the normal world
|
||||
|
||||
This function is called by the ArmPlatformPkg/Pei or ArmPlatformPkg/Pei/PlatformPeim
|
||||
This function is called by the ArmPlatformPkg/PrePi or ArmPlatformPkg/PlatformPei
|
||||
in the PEI phase.
|
||||
|
||||
**/
|
||||
|
@@ -18,6 +18,8 @@
|
||||
#include <Library/IoLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
|
||||
#include <ArmPlatform.h>
|
||||
|
||||
// Number of Virtual Memory Map Descriptors without a Logic Tile
|
||||
#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 6
|
||||
|
||||
|
@@ -21,6 +21,8 @@
|
||||
|
||||
#include <Drivers/PL310L2Cache.h>
|
||||
|
||||
#include <ArmPlatform.h>
|
||||
|
||||
/**
|
||||
Initialize the Secure peripherals and memory regions
|
||||
|
||||
|
@@ -31,6 +31,7 @@
|
||||
|
||||
[LibraryClasses]
|
||||
BaseLib
|
||||
IoLib
|
||||
|
||||
[Guids]
|
||||
|
||||
|
@@ -195,7 +195,7 @@ LcdPlatformGetMaxMode (
|
||||
// This could be because the specific implementation of PL111 has certain limitations.
|
||||
|
||||
// Set the maximum mode allowed
|
||||
return (PcdGet32(PcdPL111MaxMode));
|
||||
return (PcdGet32(PcdPL111LcdMaxMode));
|
||||
}
|
||||
|
||||
EFI_STATUS
|
||||
@@ -221,7 +221,7 @@ LcdPlatformSetMode (
|
||||
break;
|
||||
case ARM_VE_DAUGHTERBOARD_1_SITE:
|
||||
Function = SYS_CFG_OSC_SITE1;
|
||||
OscillatorId = PL111_CLCD_CORE_TILE_VIDEO_MODE_OSC_ID;
|
||||
OscillatorId = (UINT32)PcdGet32(PcdPL111LcdVideoModeOscId);
|
||||
break;
|
||||
default:
|
||||
return EFI_UNSUPPORTED;
|
||||
|
@@ -33,15 +33,6 @@
|
||||
BaseLib
|
||||
ArmPlatformSysConfigLib
|
||||
|
||||
[Guids]
|
||||
|
||||
[Protocols]
|
||||
|
||||
[FeaturePcd]
|
||||
|
||||
[FixedPcd.common]
|
||||
gArmVExpressTokenSpaceGuid.PcdPL111MaxMode
|
||||
|
||||
[Pcd.common]
|
||||
|
||||
[Depex]
|
||||
[Pcd]
|
||||
gArmVExpressTokenSpaceGuid.PcdPL111LcdMaxMode
|
||||
gArmVExpressTokenSpaceGuid.PcdPL111LcdVideoModeOscId
|
||||
|
Reference in New Issue
Block a user