]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/DxeIpl/LegacyTable.c
BaseTools: use existing shared variable
[mirror_edk2.git] / DuetPkg / DxeIpl / LegacyTable.c
index 539cf25732e93544c67794e37daa53e5d88fa211..1c822f867d33194a49beb1c2af947bf6318bcd47 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2006 - 2010, 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
 http://opensource.org/licenses/bsd-license.php                                            \r
@@ -316,9 +316,17 @@ PrepareFadtTable (
   if (AcpiDescription->PM_TMR_BLK.Address == 0) {\r
     AcpiDescription->PM_TMR_BLK.Address          = Fadt->PmTmrBlk;\r
     AcpiDescription->PM_TMR_BLK.AddressSpaceId   = EFI_ACPI_3_0_SYSTEM_IO;\r
-    AcpiDescription->PM_TMR_BLK.RegisterBitWidth = (UINT8) ((AcpiDescription->TMR_VAL_EXT == 0) ? 24 : 32);\r
   }\r
 \r
+  //\r
+  // It's possible that the PM_TMR_BLK.RegisterBitWidth is always 32,\r
+  //  we need to set the correct RegisterBitWidth value according to the TMR_VAL_EXT\r
+  //  A zero indicates TMR_VAL is implemented as a 24-bit value. \r
+  //  A one indicates TMR_VAL is implemented as a 32-bit value\r
+  //\r
+  AcpiDescription->PM_TMR_BLK.RegisterBitWidth = (UINT8) ((AcpiDescription->TMR_VAL_EXT == 0) ? 24 : 32);\r
+  \r
+\r
   return ;\r
 }\r
 \r