diff --git a/SamsungPlatformPkg/ArndaleBoardPkg/arndale-Exynos5250.dsc b/SamsungPlatformPkg/ArndaleBoardPkg/arndale-Exynos5250.dsc index 941c6e5..69f2e73 100755 --- a/SamsungPlatformPkg/ArndaleBoardPkg/arndale-Exynos5250.dsc +++ b/SamsungPlatformPkg/ArndaleBoardPkg/arndale-Exynos5250.dsc @@ -36,6 +36,7 @@ # Exynos5250 ArndaleBoard Specific Libraries SerialPortLib|SamsungPlatformPkg/ExynosPkg/Exynos5250/Library/SerialPortLib/SerialPortLib_Evt1.inf + SerialPortExtLib|SamsungPlatformPkg/ExynosPkg/Exynos5250/Library/SerialPortLib/SerialPortExtLib_Evt1.inf TimerLib|SamsungPlatformPkg/ExynosPkg/Exynos5250/Library/TimerLib/TimerLib.inf RealTimeClockLib|SamsungPlatformPkg/ExynosPkg/Exynos5250/Library/RealTimeClockLib/RealTimeClockLib.inf ExynosLib|SamsungPlatformPkg/ExynosPkg/Exynos5250/Library/ExynosLib/ExynosLib.inf @@ -196,10 +197,10 @@ [PcdsPatchableInModule] ## This PCD defines the Console output column and the default value is 25 according to UEFI spec - gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|53 + #gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow|53 ## This PCD defines the Console output row and the default value is 80 according to UEFI spec - gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|75 + #gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn|75 ################################################################################ @@ -276,11 +277,11 @@ EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf - #MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf + MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf - EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf - #EmbeddedPkg/SerialDxe/SerialDxe.inf + #EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf + EmbeddedPkg/SerialDxe/SerialDxe.inf MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf #MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf diff --git a/SamsungPlatformPkg/ArndaleBoardPkg/arndale-Exynos5250.fdf b/SamsungPlatformPkg/ArndaleBoardPkg/arndale-Exynos5250.fdf index 8b5a5a7..c2333d5 100755 --- a/SamsungPlatformPkg/ArndaleBoardPkg/arndale-Exynos5250.fdf +++ b/SamsungPlatformPkg/ArndaleBoardPkg/arndale-Exynos5250.fdf @@ -166,11 +166,11 @@ READ_LOCK_STATUS = TRUE # Multiple Console IO support # INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf - #INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf + INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf - INF EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf - #INF EmbeddedPkg/SerialDxe/SerialDxe.inf + #INF EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf + INF EmbeddedPkg/SerialDxe/SerialDxe.inf INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf #INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf diff --git a/SamsungPlatformPkg/ExynosPkg/Exynos5250/Library/SerialPortLib/SerialPortExtLib_Evt1.c b/SamsungPlatformPkg/ExynosPkg/Exynos5250/Library/SerialPortLib/SerialPortExtLib_Evt1.c new file mode 100644 index 0000000..bded70f --- /dev/null +++ b/SamsungPlatformPkg/ExynosPkg/Exynos5250/Library/SerialPortLib/SerialPortExtLib_Evt1.c @@ -0,0 +1,113 @@ +/** @file + Serial I/O Port library functions with no library constructor/destructor + + Copyright (c) 2012, ARM Ltd. All rights reserved.
+ + This program and the accompanying materials + 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 + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include + +#include +#include +#include +#include + +//#include + +/** + Set new attributes to PL011. + + @param BaudRate The baud rate of the serial device. If the baud rate is not supported, + the speed will be reduced down to the nearest supported one and the + variable's value will be updated accordingly. + @param ReceiveFifoDepth The number of characters the device will buffer on input. If the specified + value is not supported, the variable's value will be reduced down to the + nearest supported one. + @param Timeout If applicable, the number of microseconds the device will wait + before timing out a Read or a Write operation. + @param Parity If applicable, this is the EFI_PARITY_TYPE that is computed or checked + as each character is transmitted or received. If the device does not + support parity, the value is the default parity value. + @param DataBits The number of data bits in each character + @param StopBits If applicable, the EFI_STOP_BITS_TYPE number of stop bits per character. + If the device does not support stop bits, the value is the default stop + bit value. + + @retval EFI_SUCCESS All attributes were set correctly on the serial device. + @retval EFI_INVALID_PARAMETERS One or more of the attributes has an unsupported value. + +**/ +RETURN_STATUS +EFIAPI +SerialPortSetAttributes ( + IN UINT64 BaudRate, + IN UINT32 ReceiveFifoDepth, + IN UINT32 Timeout, + IN EFI_PARITY_TYPE Parity, + IN UINT8 DataBits, + IN EFI_STOP_BITS_TYPE StopBits + ) +{ + return SerialPortInitialize(); +#if 0 + return PL011UartInitializePort ( + (UINTN)PcdGet64 (PcdSerialRegisterBase), + BaudRate, + ReceiveFifoDepth, + Parity, + DataBits, + StopBits); +#endif +} + +/** + Set the serial device control bits. + + @param Control Control bits which are to be set on the serial device. + + @retval EFI_SUCCESS The new control bits were set on the serial device. + @retval EFI_UNSUPPORTED The serial device does not support this operation. + @retval EFI_DEVICE_ERROR The serial device is not functioning correctly. + +**/ +RETURN_STATUS +EFIAPI +SerialPortSetControl ( + IN UINT32 Control + ) +{ +#if 0 + return PL011UartSetControl ((UINTN)PcdGet64 (PcdSerialRegisterBase), Control); +#endif + return EFI_SUCCESS; +} + +/** + Get the serial device control bits. + + @param Control Control signals read from the serial device. + + @retval EFI_SUCCESS The control bits were read from the serial device. + @retval EFI_DEVICE_ERROR The serial device is not functioning correctly. + +**/ +RETURN_STATUS +EFIAPI +SerialPortGetControl ( + OUT UINT32 *Control + ) +{ +#if 0 + return PL011UartGetControl ((UINTN)PcdGet64 (PcdSerialRegisterBase), Control); +#endif + return EFI_SUCCESS; +} + diff --git a/SamsungPlatformPkg/ExynosPkg/Exynos5250/Library/SerialPortLib/SerialPortExtLib_Evt1.inf b/SamsungPlatformPkg/ExynosPkg/Exynos5250/Library/SerialPortLib/SerialPortExtLib_Evt1.inf new file mode 100644 index 0000000..04f73ed --- /dev/null +++ b/SamsungPlatformPkg/ExynosPkg/Exynos5250/Library/SerialPortLib/SerialPortExtLib_Evt1.inf @@ -0,0 +1,43 @@ +#/** @file +# +# Component description file for PL011SerialPortLib module +# +# Copyright (c) 2011-2012, ARM Ltd. All rights reserved.
+# +# This program and the accompanying materials +# 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 +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +#**/ + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = SerialPortExtLib + FILE_GUID = 2be281f1-c506-4558-bd98-d6930e6de9d6 + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = SerialPortExtLib + +[Sources.common] + SerialPortExtLib_Evt1.c + +[LibraryClasses] + IoLib + PcdLib + +[Packages] + EmbeddedPkg/EmbeddedPkg.dec + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + SamsungPlatformPkg/ExynosPkg/Exynos5250/ExynosPkg.dec + +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits