aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2016-11-20 14:34:31 +0000
committerLeif Lindholm <leif.lindholm@linaro.org>2016-11-20 19:08:08 +0000
commit72f927604bfe79b0d7d8489d6a614eb8984402c7 (patch)
treee5964c5b703c5587a75c114709c12a10f634b776
parent845b8522fb698a63bdea91f76449d167dab9be16 (diff)
downloadOpenPlatformPkg-bbb.tar.gz
Platforms/TexasInstruments: Fix build for BBBbbb
A lot of things changed in the 2 years since we last built Beaglebone Black for EDK2. This patch fixes all resulting build failures. 1) SerialDxe moved in EDK2, from EmbeddedPkg to MdePkg. Change driver paths and add missing SerialPort functions (from edk2 Omap35xxPkg). 2) Switch to generic BaseMemoryLib. The ARM version of BaseMemoryLib used to reside under ArmPkg. It was merged into the MdePkg version which supports the other architectures. Update .dsc accordingly. 3) Migrate to ArmBaseLib. There is now only one ArmBaseLib, with the correct sources being selected by the build system. So move across to use this instead of two different flavours of ArmV7Lib. 4) Drop unneeded/bogus ArmPlatformGlobalVariableLib. 5) Use MdePkg PcdPlatformBootTimeOut. For no particularly good reason, ArmPlatformPkg used to declare its own version of PcdPlatformBootTimeOut, instead of using the one declared by MdePkg. But it got deleted, so update .dsc accordingly. 6) Add ArmMmuLib mapping. ArmMmuLib was added since 2014, so wire it up for BeagleBoneBlack. 7) Fix ArmDataSynchronizationBarrier misspelling. The core version used to have a mis-spelt name, which has since been fixed. Change BBB InterruptDxe to match. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
-rw-r--r--Platforms/TexasInstruments/BeagleBoneBlack/BeagleBoneBlack.dsc9
-rw-r--r--Platforms/TexasInstruments/BeagleBoneBlack/BeagleBoneBlack.fdf2
-rw-r--r--Platforms/TexasInstruments/BeagleBoneBlack/Drivers/InterruptDxe/HardwareInterrupt.c4
-rw-r--r--Platforms/TexasInstruments/BeagleBoneBlack/Library/SerialPortLib/SerialPortLib.c89
4 files changed, 95 insertions, 9 deletions
diff --git a/Platforms/TexasInstruments/BeagleBoneBlack/BeagleBoneBlack.dsc b/Platforms/TexasInstruments/BeagleBoneBlack/BeagleBoneBlack.dsc
index b24e52e..407b3d8 100644
--- a/Platforms/TexasInstruments/BeagleBoneBlack/BeagleBoneBlack.dsc
+++ b/Platforms/TexasInstruments/BeagleBoneBlack/BeagleBoneBlack.dsc
@@ -75,7 +75,6 @@
ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
SerialPortLib|OpenPlatformPkg/Platforms/TexasInstruments/BeagleBoneBlack/Library/SerialPortLib/SerialPortLib.inf
- SerialPortExtLib|EmbeddedPkg/Library/TemplateSerialPortExtLib/TemplateSerialPortExtLib.inf
TimerLib|OpenPlatformPkg/Platforms/TexasInstruments/BeagleBoneBlack/Library/Am335xTimerLib/Am335xTimerLib.inf
EfiResetSystemLib|EmbeddedPkg/Library/TemplateResetSystemLib/TemplateResetSystemLib.inf
RealTimeClockLib|EmbeddedPkg/Library/TemplateRealTimeClockLib/TemplateRealTimeClockLib.inf
@@ -109,7 +108,8 @@
[LibraryClasses.ARM]
- ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf
+ ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
+ ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.inf
[LibraryClasses.AARCH64]
@@ -117,7 +117,6 @@
ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf
[LibraryClasses.common.SEC]
- ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/PrePi/PrePiArmPlatformGlobalVariableLib.inf
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
ArmPlatformSecExtraActionLib|ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.inf
@@ -133,7 +132,6 @@
PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf
MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf
- ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibPrePi.inf
[LibraryClasses.common.DXE_CORE]
HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
@@ -151,7 +149,6 @@
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
PerformanceLib|MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- ArmPlatformGlobalVariableLib|ArmPlatformPkg/Library/ArmPlatformGlobalVariableLib/Dxe/DxeArmPlatformGlobalVariableLib.inf
[LibraryClasses.common.UEFI_APPLICATION]
UefiDecompressLib|IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib/BaseUefiTianoCustomDecompressLib.inf
@@ -309,7 +306,7 @@
# Use the serial console (ConIn & ConOut) and the Graphic driver (ConOut)
gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(115200,8,N,1)/VenUtf8()"
gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths|L"VenHw(D3987D4B-971A-435F-8CAF-4967EB627241)/Uart(115200,8,N,1)/VenUtf8()"
- gArmPlatformTokenSpaceGuid.PcdPlatformBootTimeOut|3
+ gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x4030B800
diff --git a/Platforms/TexasInstruments/BeagleBoneBlack/BeagleBoneBlack.fdf b/Platforms/TexasInstruments/BeagleBoneBlack/BeagleBoneBlack.fdf
index a784231..21e08ce 100644
--- a/Platforms/TexasInstruments/BeagleBoneBlack/BeagleBoneBlack.fdf
+++ b/Platforms/TexasInstruments/BeagleBoneBlack/BeagleBoneBlack.fdf
@@ -107,7 +107,7 @@ READ_LOCK_STATUS = TRUE
INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
- INF EmbeddedPkg/SerialDxe/SerialDxe.inf
+ INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
diff --git a/Platforms/TexasInstruments/BeagleBoneBlack/Drivers/InterruptDxe/HardwareInterrupt.c b/Platforms/TexasInstruments/BeagleBoneBlack/Drivers/InterruptDxe/HardwareInterrupt.c
index 13e84f8..00127c0 100644
--- a/Platforms/TexasInstruments/BeagleBoneBlack/Drivers/InterruptDxe/HardwareInterrupt.c
+++ b/Platforms/TexasInstruments/BeagleBoneBlack/Drivers/InterruptDxe/HardwareInterrupt.c
@@ -238,7 +238,7 @@ EndOfInterrupt (
)
{
MmioWrite32 (INTCPS_CONTROL, INTCPS_CONTROL_NEWIRQAGR);
- ArmDataSyncronizationBarrier ();
+ ArmDataSynchronizationBarrier ();
return EFI_SUCCESS;
}
@@ -278,7 +278,7 @@ IrqInterruptHandler (
// Needed to clear after running the handler
MmioWrite32 (INTCPS_CONTROL, INTCPS_CONTROL_NEWIRQAGR);
- ArmDataSyncronizationBarrier ();
+ ArmDataSynchronizationBarrier ();
}
//
diff --git a/Platforms/TexasInstruments/BeagleBoneBlack/Library/SerialPortLib/SerialPortLib.c b/Platforms/TexasInstruments/BeagleBoneBlack/Library/SerialPortLib/SerialPortLib.c
index 473dd92..dce4b05 100644
--- a/Platforms/TexasInstruments/BeagleBoneBlack/Library/SerialPortLib/SerialPortLib.c
+++ b/Platforms/TexasInstruments/BeagleBoneBlack/Library/SerialPortLib/SerialPortLib.c
@@ -231,3 +231,92 @@ SerialPortPoll (
return FALSE;
}
}
+
+/**
+ Sets the control bits on a serial device.
+
+ @param[in] Control Sets the bits of Control that are settable.
+
+ @retval RETURN_SUCCESS The new control bits were set on the serial device.
+ @retval RETURN_UNSUPPORTED The serial device does not support this operation.
+ @retval RETURN_DEVICE_ERROR The serial device is not functioning correctly.
+
+**/
+RETURN_STATUS
+EFIAPI
+SerialPortSetControl (
+ IN UINT32 Control
+ )
+{
+ return RETURN_UNSUPPORTED;
+}
+
+/**
+ Retrieve the status of the control bits on a serial device.
+
+ @param[out] Control A pointer to return the current control signals from the serial device.
+
+ @retval RETURN_SUCCESS The control bits were read from the serial device.
+ @retval RETURN_UNSUPPORTED The serial device does not support this operation.
+ @retval RETURN_DEVICE_ERROR The serial device is not functioning correctly.
+
+**/
+RETURN_STATUS
+EFIAPI
+SerialPortGetControl (
+ OUT UINT32 *Control
+ )
+{
+ *Control = 0;
+ if (!SerialPortPoll ()) {
+ *Control = EFI_SERIAL_INPUT_BUFFER_EMPTY;
+ }
+ return RETURN_SUCCESS;
+}
+
+/**
+ Sets the baud rate, receive FIFO depth, transmit/receice time out, parity,
+ data bits, and stop bits on a serial device.
+
+ @param BaudRate The requested baud rate. A BaudRate value of 0 will use the
+ device's default interface speed.
+ On output, the value actually set.
+ @param ReveiveFifoDepth The requested depth of the FIFO on the receive side of the
+ serial interface. A ReceiveFifoDepth value of 0 will use
+ the device's default FIFO depth.
+ On output, the value actually set.
+ @param Timeout The requested time out for a single character in microseconds.
+ This timeout applies to both the transmit and receive side of the
+ interface. A Timeout value of 0 will use the device's default time
+ out value.
+ On output, the value actually set.
+ @param Parity The type of parity to use on this serial device. A Parity value of
+ DefaultParity will use the device's default parity value.
+ On output, the value actually set.
+ @param DataBits The number of data bits to use on the serial device. A DataBits
+ vaule of 0 will use the device's default data bit setting.
+ On output, the value actually set.
+ @param StopBits The number of stop bits to use on this serial device. A StopBits
+ value of DefaultStopBits will use the device's default number of
+ stop bits.
+ On output, the value actually set.
+
+ @retval RETURN_SUCCESS The new attributes were set on the serial device.
+ @retval RETURN_UNSUPPORTED The serial device does not support this operation.
+ @retval RETURN_INVALID_PARAMETER One or more of the attributes has an unsupported value.
+ @retval RETURN_DEVICE_ERROR The serial device is not functioning correctly.
+
+**/
+RETURN_STATUS
+EFIAPI
+SerialPortSetAttributes (
+ IN OUT UINT64 *BaudRate,
+ IN OUT UINT32 *ReceiveFifoDepth,
+ IN OUT UINT32 *Timeout,
+ IN OUT EFI_PARITY_TYPE *Parity,
+ IN OUT UINT8 *DataBits,
+ IN OUT EFI_STOP_BITS_TYPE *StopBits
+ )
+{
+ return RETURN_UNSUPPORTED;
+}