#\r
# Post Code Library that writes post code values to I/O port 0x80.\r
#\r
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
[LibraryClasses]\r
IoLib\r
PcdLib\r
+ DebugLib\r
\r
\r
[Pcd]\r
gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask ## CONSUMES\r
-\r
+ gEfiMdePkgTokenSpaceGuid.PcdPort80DataWidth ## CONSUMES\r
/** @file\r
Post Code Library instance that writes post code values to I/O port 0x80.\r
\r
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
#include <Library/PostCodeLib.h>\r
#include <Library/PcdLib.h>\r
#include <Library/IoLib.h>\r
+#include <Library/DebugLib.h>\r
\r
/**\r
Sends an 32-bit value to a POST card.\r
IN UINT32 Value\r
)\r
{\r
- IoWrite8 (0x80, (UINT8)(Value));\r
+ switch (PcdGet8 (PcdPort80DataWidth)) {\r
+ case 8:\r
+ IoWrite8 (0x80, (UINT8)(Value));\r
+ break;\r
+ case 16:\r
+ IoWrite16 (0x80, (UINT16)(Value));\r
+ break;\r
+ case 32:\r
+ IoWrite32 (0x80, Value);\r
+ break;\r
+ default:\r
+ //\r
+ // Assert on the invalid data width\r
+ //\r
+ ASSERT (FALSE);\r
+ break;\r
+ }\r
+ \r
return Value;\r
}\r
\r
IN CONST CHAR8 *Description OPTIONAL\r
)\r
{\r
- IoWrite8 (0x80, (UINT8)(Value));\r
+ PostCode (Value);\r
return Value;\r
}\r
\r
# @Expression 0x80000002 | (gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask & 0xFC) == 0\r
gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0|UINT8|0x0000000b\r
\r
+ ## The bit width of data to be written to Port80. The default value is 8.\r
+ # @Prompt Port80 Data Width\r
+ # @ValidList 0x80000001 | 8, 16, 32\r
+ gEfiMdePkgTokenSpaceGuid.PcdPort80DataWidth|8|UINT8|0x0000002d\r
+\r
## This value is used to configure X86 Processor FSB clock.\r
# @Prompt FSB Clock.\r
gEfiMdePkgTokenSpaceGuid.PcdFSBClock|200000000|UINT32|0x0000000c\r