\r
[Packages]\r
MdePkg/MdePkg.dec\r
- MdeModulePkg/MdeModulePkg.dec\r
IntelFrameworkPkg/IntelFrameworkPkg.dec\r
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
\r
BaseMemoryLib\r
DevicePathLib\r
UefiLib\r
- BaseLib\r
UefiDriverEntryPoint\r
DebugLib\r
\r
//\r
TimeOut = 0;\r
Msr.Data = READ_MSR (SerialDevice->IsaIo, SerialDevice->BaseAddress);\r
- while (Msr.Bits.Dcd == 1 && (!Msr.Bits.Cts ^ FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) {\r
+ while ((Msr.Bits.Dcd == 1) && ((Msr.Bits.Cts == 0) || FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) {\r
gBS->Stall (TIMEOUT_STALL_INTERVAL);\r
TimeOut++;\r
if (TimeOut > 5) {\r
Msr.Data = READ_MSR (SerialDevice->IsaIo, SerialDevice->BaseAddress);\r
}\r
\r
- if (Msr.Bits.Dcd== 0 || (Msr.Bits.Cts ^ FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) {\r
+ if ((Msr.Bits.Dcd == 0) && ((Msr.Bits.Cts == 1) || FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) {\r
IsaSerialFifoRemove (&SerialDevice->Transmit, &Data);\r
WRITE_THR (SerialDevice->IsaIo, SerialDevice->BaseAddress, Data);\r
}\r
if ((StopBits < OneStopBit) || (StopBits > TwoStopBits)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
- //\r
- // for DataBits = 5, StopBits can not set TwoStopBits\r
- //\r
- // if ((DataBits == 5) && (StopBits == TwoStopBits)) {\r
- // return EFI_INVALID_PARAMETER;\r
- // }\r
+\r
//\r
// for DataBits = 6,7,8, StopBits can not set OneFiveStopBits\r
//\r
\r
#include <Library/DebugLib.h>\r
#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/BaseLib.h>\r
#include <Library/UefiLib.h>\r
#include <Library/DevicePathLib.h>\r
#include <Library/BaseMemoryLib.h>\r
IN EFI_BDS_ARCH_PROTOCOL *This\r
);\r
\r
+\r
+/**\r
+ Perform the memory test base on the memory test intensive level,\r
+ and update the memory resource.\r
+\r
+ @param Level The memory test intensive level.\r
+\r
+ @retval EFI_STATUS Success test all the system memory and update\r
+ the memory resource\r
+\r
+**/\r
+EFI_STATUS\r
+BdsMemoryTest (\r
+ IN EXTENDMEM_COVERAGE_LEVEL Level\r
+ );\r
+\r
+/**\r
+\r
+ This routine is called to see if there are any capsules we need to process.\r
+ If the boot mode is not UPDATE, then we do nothing. Otherwise find the\r
+ capsule HOBS and produce firmware volumes for them via the DXE service.\r
+ Then call the dispatcher to dispatch drivers from them. Finally, check\r
+ the status of the updates.\r
+\r
+ This function should be called by BDS in case we need to do some\r
+ sort of processing even if there is no capsule to process. We\r
+ need to do this if an earlier update went away and we need to\r
+ clear the capsule variable so on the next reset PEI does not see it and\r
+ think there is a capsule available.\r
+\r
+ @param BootMode the current boot mode\r
+\r
+ @retval EFI_INVALID_PARAMETER boot mode is not correct for an update\r
+ @retval EFI_SUCCESS There is no error when processing capsule\r
+\r
+**/\r
+EFI_STATUS\r
+BdsProcessCapsules (\r
+ EFI_BOOT_MODE BootMode\r
+ );\r
+\r
#endif\r
\r
EFI_HANDLE mBdsImageHandle;\r
\r
-extern EFI_STATUS BdsMemoryTest (EXTENDMEM_COVERAGE_LEVEL Level);\r
-extern EFI_STATUS ProcessCapsules (EFI_BOOT_MODE BootMode);\r
-\r
/**\r
\r
Install Boot Device Selection Protocol\r
//\r
// Setup some platform policy here\r
//\r
- PlatformBdsPolicyBehavior (&DriverOptionList, &BootOptionList, ProcessCapsules, BdsMemoryTest);\r
+ PlatformBdsPolicyBehavior (&DriverOptionList, &BootOptionList, BdsProcessCapsules, BdsMemoryTest);\r
PERF_END (NULL, "PlatformBds", "BDS", 0);\r
\r
//\r
UINTN Row;\r
CHAR16 RowString[50];\r
CHAR16 ModeString[50];\r
- CHAR16 *pStr;\r
+ CHAR16 *PStr;\r
UINTN MaxMode;\r
UINTN ValidMode;\r
EFI_STRING_ID *ModeToken;\r
// Build mode string Column x Row\r
//\r
UnicodeValueToString (ModeString, 0, Col, 0);\r
- pStr = &ModeString[0];\r
- StrnCat (pStr, L" x ", StrLen(L" x "));\r
+ PStr = &ModeString[0];\r
+ StrnCat (PStr, L" x ", StrLen(L" x "));\r
UnicodeValueToString (RowString, 0, Row, 0);\r
- pStr = &ModeString[0];\r
- StrnCat (pStr, RowString, StrLen(RowString));\r
+ PStr = &ModeString[0];\r
+ StrnCat (PStr, RowString, StrLen(RowString));\r
\r
ModeToken[Index] = HiiSetString (CallbackData->BmmHiiHandle, 0, ModeString, NULL);\r
\r
\r
**/\r
EFI_STATUS\r
-ProcessCapsules (\r
+BdsProcessCapsules (\r
EFI_BOOT_MODE BootMode\r
)\r
{\r
-/**\r
+/** @file\r
Produces the Legacy Region Protocol.\r
\r
This generic implementation of the Legacy Region Protocol does not actually \r
#include <Library/DebugLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
\r
-//\r
-// Function prototypes of the Legacy Region Protocol services this module produces\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-LegacyRegionDecode (\r
- IN EFI_LEGACY_REGION_PROTOCOL *This,\r
- IN UINT32 Start,\r
- IN UINT32 Length,\r
- IN BOOLEAN *On\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-LegacyRegionLock (\r
- IN EFI_LEGACY_REGION_PROTOCOL *This,\r
- IN UINT32 Start,\r
- IN UINT32 Length,\r
- OUT UINT32 *Granularity OPTIONAL\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-LegacyRegionBootLock (\r
- IN EFI_LEGACY_REGION_PROTOCOL *This,\r
- IN UINT32 Start,\r
- IN UINT32 Length,\r
- OUT UINT32 *Granularity OPTIONAL\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-LegacyRegionUnlock (\r
- IN EFI_LEGACY_REGION_PROTOCOL *This,\r
- IN UINT32 Start,\r
- IN UINT32 Length,\r
- OUT UINT32 *Granularity OPTIONAL\r
- );\r
-\r
-//\r
-// Module global for the handle the Legacy Region Protocol is installed\r
-//\r
-EFI_HANDLE mLegacyRegionHandle = NULL;\r
-\r
-//\r
-// Module global for the Legacy Region Protocol instance that is installed onto\r
-// mLegacyRegionHandle\r
-//\r
-EFI_LEGACY_REGION_PROTOCOL mLegacyRegion = {\r
- LegacyRegionDecode,\r
- LegacyRegionLock,\r
- LegacyRegionBootLock,\r
- LegacyRegionUnlock\r
-};\r
-\r
/**\r
Sets hardware to decode or not decode a region.\r
\r
return EFI_SUCCESS;\r
}\r
\r
+//\r
+// Module global for the handle the Legacy Region Protocol is installed\r
+//\r
+EFI_HANDLE mLegacyRegionHandle = NULL;\r
+\r
+//\r
+// Module global for the Legacy Region Protocol instance that is installed onto\r
+// mLegacyRegionHandle\r
+//\r
+EFI_LEGACY_REGION_PROTOCOL mLegacyRegion = {\r
+ LegacyRegionDecode,\r
+ LegacyRegionLock,\r
+ LegacyRegionBootLock,\r
+ LegacyRegionUnlock\r
+};\r
+\r
/**\r
The user Entry Point for module LegacyRegionDxe. The user code starts with this function.\r
\r