]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Refine new library instances according to review comments.
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 24 Nov 2008 05:55:41 +0000 (05:55 +0000)
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 24 Nov 2008 05:55:41 +0000 (05:55 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6692 6f19259b-4bc3-4df7-8a09-765794883524

13 files changed:
MdePkg/Library/DxePciLibPciRootBridgeIo/DxePciLibPciRootBridgeIo.inf
MdePkg/Library/DxePciLibPciRootBridgeIo/PciLib.c
MdePkg/Library/DxePciSegmentLibPciRootBridgeIo/DxePciSegmentLibPciRootBridgeIo.inf
MdePkg/Library/DxePciSegmentLibPciRootBridgeIo/PciSegmentLib.c
MdePkg/Library/DxePciSegmentLibPciRootBridgeIo/PciSegmentLib.h
MdePkg/Library/PeiPciLibPciCfg2/PciLib.c
MdePkg/Library/PeiPciLibPciCfg2/PeiPciLibPciCfg2.inf
MdePkg/Library/PeiPciSegmentLibPciCfg2/PciSegmentLib.c
MdePkg/Library/PeiPciSegmentLibPciCfg2/PeiPciSegmentLibPciCfg2.inf
MdePkg/Library/UefiPalLib/UefiPalLib.c
MdePkg/Library/UefiPalLib/UefiPalLib.inf
MdePkg/Library/UefiSalLib/UefiSalLib.c
MdePkg/Library/UefiSalLib/UefiSalLib.inf

index 31df9a80f99d7a1445dedfdb97b4c4e8df295413..9c6f35d9dda393fa668712fb18df25db9546d30e 100644 (file)
@@ -1,5 +1,5 @@
 # @file\r
-# Component description file for PCI Lib using PCI Root Bridge I/O Protocol\r
+# PCI Library that layers on top of the PCI Root Bridge I/O Protocol.\r
 #\r
 # This library produces the APIs from the PCI Library and implements these APIs\r
 #  by calling into the PCI Root Bridge I/O Protocol. The PCI Root Bridge I/O Protocol is\r
@@ -7,7 +7,7 @@
 #  This library binds to the first PCI Root Bridge I/O Protocol in the platform. As a result,\r
 #  it should only be used on platforms that contain a single PCI root bridge.\r
 #\r
-# Copyright (c) 2007, Intel Corporation.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
index 3c690aa70af62723ac2702ce4ea49aec1089f5bd..a408b0a0f1e8eb8fb5bfa12d1b30ffdbad459547 100644 (file)
   ASSERT (((A) & (~0xfffffff | (M))) == 0)\r
 \r
 /**\r
-  Translate PCI Lib address into format of PCI CFG2 PPI.\r
+  Translate PCI Lib address into format of PCI Root Bridge I/O Protocol.\r
 \r
   @param  A  Address that encodes the PCI Bus, Device, Function and\r
              Register.\r
 \r
 **/\r
-#define PCI_TO_PCICFG2_ADDRESS(A) \\r
-  (((A) << 4) & 0xff000000) | (((A) >> 4) & 0x00000700) | (((A) << 1) & 0x001f0000) | ((UINT64)((A) & 0xFFF) << 32)\r
+#define PCI_TO_PCI_ROOT_BRIDGE_IO_ADDRESS(A) \\r
+  ((((A) << 4) & 0xff000000) | (((A) >> 4) & 0x00000700) | (((A) << 1) & 0x001f0000) | (LShiftU64((A) & 0xfff, 32)))\r
 \r
 //\r
 // Global varible to cache pointer to PCI Root Bridge I/O protocol.\r
@@ -101,7 +101,7 @@ DxePciLibPciRootBridgeIoReadWorker (
   mPciRootBridgeIo->Pci.Read (\r
                           mPciRootBridgeIo,\r
                           Width,\r
-                          PCI_TO_PCICFG2_ADDRESS (Address),\r
+                          PCI_TO_PCI_ROOT_BRIDGE_IO_ADDRESS (Address),\r
                           1,\r
                           &Data\r
                           );\r
@@ -135,7 +135,7 @@ DxePciLibPciRootBridgeIoWriteWorker (
   mPciRootBridgeIo->Pci.Write (\r
                           mPciRootBridgeIo,\r
                           Width,\r
-                          PCI_TO_PCICFG2_ADDRESS (Address),\r
+                          PCI_TO_PCI_ROOT_BRIDGE_IO_ADDRESS (Address),\r
                           1,\r
                           &Data\r
                           );\r
@@ -1228,7 +1228,7 @@ PciReadBuffer (
   UINTN                             ReturnValue;\r
 \r
   ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);\r
-  ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);\r
+  ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);\r
 \r
   if (Size == 0) {\r
     return Size;\r
@@ -1241,7 +1241,7 @@ PciReadBuffer (
   //\r
   ReturnValue = Size;\r
 \r
-  if ((StartAddress & 1) != 0) {\r
+  if ((StartAddress & BIT0) != 0) {\r
     //\r
     // Read a byte if StartAddress is byte aligned\r
     //\r
@@ -1251,7 +1251,7 @@ PciReadBuffer (
     Buffer = (UINT8*)Buffer + 1;\r
   }\r
 \r
-  if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) {\r
+  if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) {\r
     //\r
     // Read a word if StartAddress is word aligned\r
     //\r
@@ -1326,7 +1326,7 @@ PciWriteBuffer (
   UINTN                             ReturnValue;\r
 \r
   ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);\r
-  ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);\r
+  ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);\r
 \r
   if (Size == 0) {\r
     return 0;\r
@@ -1339,7 +1339,7 @@ PciWriteBuffer (
   //\r
   ReturnValue = Size;\r
 \r
-  if ((StartAddress & 1) != 0) {\r
+  if ((StartAddress & BIT0) != 0) {\r
     //\r
     // Write a byte if StartAddress is byte aligned\r
     //\r
@@ -1349,7 +1349,7 @@ PciWriteBuffer (
     Buffer = (UINT8*)Buffer + 1;\r
   }\r
 \r
-  if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) {\r
+  if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) {\r
     //\r
     // Write a word if StartAddress is word aligned\r
     //\r
index f30247b38d10f95b5027d0aa3408fea0206ca575..abb442f8f6aa8d1fc8afcdda6516e72fac541a71 100644 (file)
@@ -1,5 +1,5 @@
 # @file\r
-# Component description file for PCI Segment Lib using PCI Root Bridge I/O Protocol\r
+# PCI Segment Library that layers on top of the PCI Root Bridge I/O Protocol.\r
 #\r
 # This library produces the APIs from the PCI Library and implements these APIs\r
 #  by calling into the PCI Root Bridge I/O Protocols that are present in the platform.\r
@@ -7,7 +7,7 @@
 #  This library binds to all of the PCI Root Bridge I/O Protocols in the platform and handles\r
 #  the translation from a PCI segment number into a specific PCI Root Bridge I/O Protocol.\r
 #\r
-# Copyright (c) 2007, Intel Corporation.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
index 705ec526bd937899ffced91912af6e1e9ed365db..058d2debc68b36368aeb8f146ce68b45d2d22c0d 100644 (file)
@@ -1,5 +1,5 @@
 /** @file\r
-  Functions accessing PCI configuration registers on any supported PCI segment\r
+  PCI Segment Library implementation using PCI Root Bridge I/O Protocol.\r
 \r
   Copyright (c) 2007 - 2008, Intel Corporation All rights\r
   reserved. This program and the accompanying materials are\r
@@ -96,8 +96,7 @@ PciSegmentLibConstructor (
     ASSERT (Descriptors->Desc != ACPI_END_TAG_DESCRIPTOR);\r
   }\r
 \r
-  Status = gBS->FreePool(HandleBuffer);\r
-  ASSERT_EFI_ERROR (Status);\r
+  FreePool(HandleBuffer);\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -194,7 +193,7 @@ DxePciSegmentLibPciRootBridgeIoReadWorker (
   PciRootBridgeIo->Pci.Read (\r
                          PciRootBridgeIo,\r
                          Width,\r
-                         PCI_TO_PCICFG2_ADDRESS (Address),\r
+                         PCI_TO_PCI_ROOT_BRIDGE_IO_ADDRESS (Address),\r
                          1,\r
                          &Data\r
                          );\r
@@ -233,7 +232,7 @@ DxePciSegmentLibPciRootBridgeIoWriteWorker (
   PciRootBridgeIo->Pci.Write (\r
                          PciRootBridgeIo,\r
                          Width,\r
-                         PCI_TO_PCICFG2_ADDRESS (Address),\r
+                         PCI_TO_PCI_ROOT_BRIDGE_IO_ADDRESS (Address),\r
                          1,\r
                          &Data\r
                          );\r
@@ -1288,7 +1287,7 @@ PciSegmentBitFieldAndThenOr32 (
   If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().\r
   If Size > 0 and Buffer is NULL, then ASSERT().\r
 \r
-  @param  StartAddress  Starting Address that encodes the PCI Segment, Bus, Device,\r
+  @param  StartAddress  Starting address that encodes the PCI Segment, Bus, Device,\r
                         Function and Register.\r
   @param  Size          Size in bytes of the transfer.\r
   @param  Buffer        Pointer to a buffer receiving the data read.\r
@@ -1320,7 +1319,7 @@ PciSegmentReadBuffer (
   //\r
   ReturnValue = Size;\r
 \r
-  if ((StartAddress & 1) != 0) {\r
+  if ((StartAddress & BIT0) != 0) {\r
     //\r
     // Read a byte if StartAddress is byte aligned\r
     //\r
@@ -1330,7 +1329,7 @@ PciSegmentReadBuffer (
     Buffer = (UINT8*)Buffer + 1;\r
   }\r
 \r
-  if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) {\r
+  if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) {\r
     //\r
     // Read a word if StartAddress is word aligned\r
     //\r
@@ -1386,7 +1385,7 @@ PciSegmentReadBuffer (
   If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().\r
   If Size > 0 and Buffer is NULL, then ASSERT().\r
 \r
-  @param  StartAddress  Starting Address that encodes the PCI Segment, Bus, Device,\r
+  @param  StartAddress  Starting address that encodes the PCI Segment, Bus, Device,\r
                         Function and Register.\r
   @param  Size          Size in bytes of the transfer.\r
   @param  Buffer        Pointer to a buffer containing the data to write.\r
@@ -1418,7 +1417,7 @@ PciSegmentWriteBuffer (
   //\r
   ReturnValue = Size;\r
 \r
-  if ((StartAddress & 1) != 0) {\r
+  if ((StartAddress & BIT0) != 0) {\r
     //\r
     // Write a byte if StartAddress is byte aligned\r
     //\r
@@ -1428,7 +1427,7 @@ PciSegmentWriteBuffer (
     Buffer = (UINT8*)Buffer + 1;\r
   }\r
 \r
-  if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) {\r
+  if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) {\r
     //\r
     // Write a word if StartAddress is word aligned\r
     //\r
index 2ed7dfe0a8627393321b11adb25f7c407cf707a9..00129edea6bb405ee4e16f97115df9e8c5dcaac7 100644 (file)
@@ -47,13 +47,13 @@ typedef struct {
   ASSERT (((A) & (0xf0000000 | (M))) == 0)\r
 \r
 /**\r
-  Translate PCI Lib address into format of PCI CFG2 PPI.\r
+  Translate PCI Lib address into format of PCI Root Bridge I/O Protocol\r
 \r
   @param  A  Address that encodes the PCI Bus, Device, Function and\r
              Register.\r
 \r
 **/\r
-#define PCI_TO_PCICFG2_ADDRESS(A) \\r
-  (((A) << 4) & 0xff000000) | (((A) >> 4) & 0x00000700) | (((A) << 1) & 0x001f0000) | ((UINT64)((A) & 0xFFF) << 32)\r
+#define PCI_TO_PCI_ROOT_BRIDGE_IO_ADDRESS(A) \\r
+  ((((A) << 4) & 0xff000000) | (((A) >> 4) & 0x00000700) | (((A) << 1) & 0x001f0000) | (LShiftU64((A) & 0xfff, 32)))\r
 \r
 #endif\r
index d3d96790c51701ce194d9ebd81ca9d293d85819a..63b1b9fc172807f2de4446818327d88d59243426 100644 (file)
@@ -42,7 +42,7 @@
 \r
 **/\r
 #define PCI_TO_PCICFG2_ADDRESS(A) \\r
-  (((A) << 4) & 0xff000000) | (((A) >> 4) & 0x00000700) | (((A) << 1) & 0x001f0000) | ((UINT64)((A) & 0xFFF) << 32)\r
+  ((((A) << 4) & 0xff000000) | (((A) >> 4) & 0x00000700) | (((A) << 1) & 0x001f0000) | (LShiftU64((A) & 0xfff, 32)))\r
 \r
 /**\r
   Internal worker function to read a PCI configuration register.\r
@@ -1210,7 +1210,7 @@ PciReadBuffer (
   UINTN                             ReturnValue;\r
 \r
   ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);\r
-  ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);\r
+  ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);\r
 \r
   if (Size == 0) {\r
     return Size;\r
@@ -1223,7 +1223,7 @@ PciReadBuffer (
   //\r
   ReturnValue = Size;\r
 \r
-  if ((StartAddress & 1) != 0) {\r
+  if ((StartAddress & BIT0) != 0) {\r
     //\r
     // Read a byte if StartAddress is byte aligned\r
     //\r
@@ -1233,7 +1233,7 @@ PciReadBuffer (
     Buffer = (UINT8*)Buffer + 1;\r
   }\r
 \r
-  if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) {\r
+  if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) {\r
     //\r
     // Read a word if StartAddress is word aligned\r
     //\r
@@ -1308,7 +1308,7 @@ PciWriteBuffer (
   UINTN                             ReturnValue;\r
 \r
   ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);\r
-  ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);\r
+  ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);\r
 \r
   if (Size == 0) {\r
     return 0;\r
@@ -1321,7 +1321,7 @@ PciWriteBuffer (
   //\r
   ReturnValue = Size;\r
 \r
-  if ((StartAddress & 1) != 0) {\r
+  if ((StartAddress & BIT0) != 0) {\r
     //\r
     // Write a byte if StartAddress is byte aligned\r
     //\r
@@ -1331,7 +1331,7 @@ PciWriteBuffer (
     Buffer = (UINT8*)Buffer + 1;\r
   }\r
 \r
-  if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) {\r
+  if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) {\r
     //\r
     // Write a word if StartAddress is word aligned\r
     //\r
index 3fce912cf72ec94b4c43a0b148279d791ab01108..5abfff9f46806da24d07d6affe2918a550c22dd9 100644 (file)
@@ -1,5 +1,5 @@
 # @file\r
-# Component description file for PCI Lib using PCI CFG2 PPI\r
+# PCI Library that layers on top of the PCI CFG2 PPI.\r
 #\r
 # This library produces the APIs from the PCI Library and implements\r
 #  these APIs by calling into the EFI_PEI_PCI CFG2 PPI. One or more EFI_PEI_PCI CFG2\r
@@ -7,7 +7,7 @@
 #  the first PPI found, so this library instance should only be used platforms\r
 #  with a single PCI segment.\r
 #\r
-# Copyright (c) 2007, Intel Corporation.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -25,7 +25,7 @@
   FILE_GUID                      = FA3AD693-D58A-4619-960B-8EE85C914870\r
   MODULE_TYPE                    = PEIM\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = PciLib|PEIM\r
+  LIBRARY_CLASS                  = PciLib|PEIM SEC PEI_CORE\r
   EDK_RELEASE_VERSION            = 0x00020000\r
   EFI_SPECIFICATION_VERSION      = 0x00020000\r
 \r
@@ -33,7 +33,7 @@
 #\r
 # The following information is for reference only and not required by the build tools.\r
 #\r
-#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC (EBC is for build only)\r
 #\r
 \r
 [Sources.common]\r
index 92f0846e29e1fc51025b938ec5f47a18101ee47e..54ff1cbe65b4a8681d4702b87bd64fadf7848414 100644 (file)
@@ -42,7 +42,7 @@
 \r
 **/\r
 #define PCI_TO_PCICFG2_ADDRESS(A) \\r
-  (((A) << 4) & 0xff000000) | (((A) >> 4) & 0x00000700) | (((A) << 1) & 0x001f0000) | ((UINT64)((A) & 0xFFF) << 32)\r
+  ((((A) << 4) & 0xff000000) | (((A) >> 4) & 0x00000700) | (((A) << 1) & 0x001f0000) | (LShiftU64((A) & 0xfff, 32)))\r
 \r
 /**\r
   Gets PCI CFG2 PPI.\r
@@ -1206,7 +1206,7 @@ PciSegmentBitFieldAndThenOr32 (
   If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().\r
   If Size > 0 and Buffer is NULL, then ASSERT().\r
 \r
-  @param  StartAddress  Starting Address that encodes the PCI Segment, Bus, Device,\r
+  @param  StartAddress  Starting address that encodes the PCI Segment, Bus, Device,\r
                         Function and Register.\r
   @param  Size          Size in bytes of the transfer.\r
   @param  Buffer        Pointer to a buffer receiving the data read.\r
@@ -1238,7 +1238,7 @@ PciSegmentReadBuffer (
   //\r
   ReturnValue = Size;\r
 \r
-  if ((StartAddress & 1) != 0) {\r
+  if ((StartAddress & BIT0) != 0) {\r
     //\r
     // Read a byte if StartAddress is byte aligned\r
     //\r
@@ -1248,7 +1248,7 @@ PciSegmentReadBuffer (
     Buffer = (UINT8*)Buffer + 1;\r
   }\r
 \r
-  if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) {\r
+  if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) {\r
     //\r
     // Read a word if StartAddress is word aligned\r
     //\r
@@ -1304,7 +1304,7 @@ PciSegmentReadBuffer (
   If ((StartAddress & 0xFFF) + Size) > 0x1000, then ASSERT().\r
   If Size > 0 and Buffer is NULL, then ASSERT().\r
 \r
-  @param  StartAddress  Starting Address that encodes the PCI Segment, Bus, Device,\r
+  @param  StartAddress  Starting address that encodes the PCI Segment, Bus, Device,\r
                         Function and Register.\r
   @param  Size          Size in bytes of the transfer.\r
   @param  Buffer        Pointer to a buffer containing the data to write.\r
@@ -1336,7 +1336,7 @@ PciSegmentWriteBuffer (
   //\r
   ReturnValue = Size;\r
 \r
-  if ((StartAddress & 1) != 0) {\r
+  if ((StartAddress & BIT0) != 0) {\r
     //\r
     // Write a byte if StartAddress is byte aligned\r
     //\r
@@ -1346,7 +1346,7 @@ PciSegmentWriteBuffer (
     Buffer = (UINT8*)Buffer + 1;\r
   }\r
 \r
-  if (Size >= sizeof (UINT16) && (StartAddress & 2) != 0) {\r
+  if (Size >= sizeof (UINT16) && (StartAddress & BIT1) != 0) {\r
     //\r
     // Write a word if StartAddress is word aligned\r
     //\r
index 85a1231511b56ab1b5efb908fc04b5223511aef5..938610b04507479f9b4397eeb15eb33c4bb6050a 100644 (file)
@@ -1,5 +1,5 @@
 # @file\r
-# This driver implements PCI Segment Lib using PCI CFG2 PPI.\r
+# PCI Segment Library that layers on top of the PCI CFG2 PPI.\r
 #\r
 # This library produces the APIs from the PCI Segment Library and\r
 #  implements these APIs by calling into the EFI_PEI_PCI CFG2 PPI. One or more\r
@@ -24,7 +24,7 @@
   FILE_GUID                      = 254901AD-7DB7-45f8-93C8-93D579398D9F\r
   MODULE_TYPE                    = PEIM\r
   VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = PciSegmentLib|PEIM\r
+  LIBRARY_CLASS                  = PciLib|PEIM SEC PEI_CORE\r
   EDK_RELEASE_VERSION            = 0x00020000\r
   EFI_SPECIFICATION_VERSION      = 0x00020000\r
 \r
@@ -32,7 +32,7 @@
 #\r
 # The following information is for reference only and not required by the build tools.\r
 #\r
-#  VALID_ARCHITECTURES           = IA32 X64 IPF\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC (EBC is for build only)\r
 #\r
 \r
 [Sources.common]\r
index e2550387bab706404514f2e4fbeb81a5149fe23d..f646fd40f849d0a32bc3b48a57abbe84aa19a355 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-  PAL Library implementation built upon UEFI.\r
+  PAL Library implementation retrieving the PAL Entry Point from the SAL System Table\r
+  register in the EFI System Confguration Table.\r
 \r
   Copyright (c) 2007 - 2008, Intel Corporation All rights\r
   reserved. This program and the accompanying materials are\r
@@ -41,12 +42,12 @@ UINT64               mPalProcEntry;
   returned or undefined result may occur during the execution of the procedure.\r
   This function is only available on IPF.\r
 \r
-  @param Index - The PAL procedure Index number.\r
-  @param Arg2  - The 2nd parameter for PAL procedure calls.\r
-  @param Arg3  - The 3rd parameter for PAL procedure calls.\r
-  @param Arg4  - The 4th parameter for PAL procedure calls.\r
+  @param  Index  The PAL procedure Index number.\r
+  @param  Arg2   The 2nd parameter for PAL procedure calls.\r
+  @param  Arg3   The 3rd parameter for PAL procedure calls.\r
+  @param  Arg4   The 4th parameter for PAL procedure calls.\r
 \r
-  @return structure returned from the PAL Call procedure, including the status and return value.\r
+  @return Structure returned from the PAL Call procedure, including the status and return value.\r
 \r
 **/\r
 PAL_CALL_RETURN\r
@@ -76,7 +77,7 @@ PalCall (
 \r
   The constructor function looks up the SAL System Table in the EFI System Configuration\r
   Table. Once the SAL System Table is found, the PAL Entry Point in the SAL System Table\r
-  will be derived and stored inot a global variable for library usage.\r
+  will be derived and stored into a global variable for library usage.\r
   It will ASSERT() if the SAL System Table cannot be found or the data in the SAL System\r
   Table is not the valid data.\r
 \r
@@ -105,9 +106,9 @@ UefiPalLibConstructor (
   ASSERT_EFI_ERROR (Status);\r
 \r
   //\r
-  // Move the SAL System Table point to the first Entry\r
-  // Due to the SAL Entry is in ascending order with the Entry type,\r
-  // the type 0 Entry should be the first if exist.\r
+  // Check the first entry of SAL System Table,\r
+  // because the SAL entry is in ascending order with the entry type,\r
+  // the type 0 entry should be the first if exist.\r
   //\r
   SalStEntryDes = (SAL_ST_ENTRY_POINT_DESCRIPTOR *)(SalSystemTable + 1);\r
 \r
index ae2a5644727b58b9a77ff49ac6f3ec2fde177852..61cf6b0f9ae6d131ad2d82a4cf61e2ca15096156 100644 (file)
@@ -1,10 +1,10 @@
 # @file\r
-# Uefi Instance of PAL Library Class\r
+# UEFI Instance of PAL Library Class.\r
 #\r
-# This library implements the PAL Library Class by getting the PAL entry from SAL System\r
-# Table, and use AsmPalCall to produce the Pal Call.\r
+# This instance of PAL library retrieves the PAL Entry Point from the SAL System Table\r
+# register in the EFI System Confguration Table.\r
 #\r
-# Copyright (c) 2007, Intel Corporation.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -21,7 +21,7 @@
   BASE_NAME                      = UefiPalLib\r
   FILE_GUID                      = B7F30170-9E5F-482a-B553-A145A5787003\r
   MODULE_TYPE                    = UEFI_DRIVER\r
-  VERSION_STRING                 = 1.04\r
+  VERSION_STRING                 = 1.0\r
   LIBRARY_CLASS                  = PalLib|UEFI_DRIVER UEFI_APPLICATION\r
   EDK_RELEASE_VERSION            = 0x00020000\r
   EFI_SPECIFICATION_VERSION      = 0x00020000\r
index e41cc0d980cb2458b12d11aece7b0eb9f87f695c..f4319ed11c55f3963e46b596acfd4a5327f754fe 100644 (file)
@@ -1,5 +1,6 @@
 /** @file\r
-  SAL Library implementation built upon UEFI.\r
+  SAL Library implementation retrieving the SAL Entry Point from the SAL System Table\r
+  register in the EFI System Confguration Table.\r
 \r
   Copyright (c) 2007 - 2008, Intel Corporation All rights\r
   reserved. This program and the accompanying materials are\r
@@ -85,7 +86,7 @@ SalCall (
 \r
   The constructor function looks up the SAL System Table in the EFI System Configuration\r
   Table. Once the SAL System Table is found, the SAL Entry Point in the SAL System Table\r
-  will be derived and stored inot a global variable for library usage.\r
+  will be derived and stored into a global variable for library usage.\r
   It will ASSERT() if the SAL System Table cannot be found or the data in the SAL System\r
   Table is not the valid data.\r
 \r
@@ -114,9 +115,9 @@ UefiSalLibConstructor (
   ASSERT_EFI_ERROR (Status);\r
 \r
   //\r
-  // Move the SAL System Table point to the first Entry\r
-  // Due to the SAL Entry is in ascending order with the Entry type,\r
-  // the type 0 Entry should be the first if exist.\r
+  // Check the first entry of SAL System Table,\r
+  // because the SAL entry is in ascending order with the entry type,\r
+  // the type 0 entry should be the first if exist.\r
   //\r
   SalStEntryDes = (SAL_ST_ENTRY_POINT_DESCRIPTOR *)(SalSystemTable + 1);\r
 \r
@@ -128,7 +129,7 @@ UefiSalLibConstructor (
   mPlabel.EntryPoint = SalStEntryDes->SalProcEntry;\r
   mPlabel.GP = SalStEntryDes->SalGlobalDataPointer;\r
   //\r
-  // Make sure the EntryPoint has the real value\r
+  // Make sure the EntryPoint has the valid value\r
   //\r
   ASSERT ((mPlabel.EntryPoint != 0) && (mPlabel.GP != 0));\r
 \r
index 60fe4eae00579aab7c7e7967287cdc8a334dea14..54fff89f2701d18b0c4d10d939d5c52182bbd24a 100644 (file)
@@ -1,10 +1,10 @@
 # @file\r
-# The library implements the UEFI SAL Library Class.\r
+# UEFI Instance of SAL Library Class.\r
 #\r
-# The library implements the UEFI SAL Library Class.\r
-#  This library is for boot service only modules.\r
+# This instance of SAL library retrieves the SAL Entry Point from the SAL System Table\r
+# register in the EFI System Confguration Table.\r
 #\r
-# Copyright (c) 2007, Intel Corporation.\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -21,7 +21,7 @@
   BASE_NAME                      = UefiSalLib\r
   FILE_GUID                      = 4ABCFD77-4A33-4089-B003-5F09BCA940A2\r
   MODULE_TYPE                    = UEFI_DRIVER\r
-  VERSION_STRING                 = 1.04\r
+  VERSION_STRING                 = 1.0\r
   LIBRARY_CLASS                  = SalLib|UEFI_DRIVER UEFI_APPLICATION\r
   EDK_RELEASE_VERSION            = 0x00020000\r
   EFI_SPECIFICATION_VERSION      = 0x00020000\r
@@ -41,5 +41,4 @@
 \r
 [LibraryClasses]\r
   UefiLib\r
-  BaseLib\r
   DebugLib\r