]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Refine the file/function comments to follow doxygen format
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 12 Apr 2010 04:38:44 +0000 (04:38 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 12 Apr 2010 04:38:44 +0000 (04:38 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10359 6f19259b-4bc3-4df7-8a09-765794883524

15 files changed:
PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
PcAtChipsetPkg/8254TimerDxe/Timer.c
PcAtChipsetPkg/8254TimerDxe/Timer.h
PcAtChipsetPkg/IsaAcpiDxe/ComponentName.c
PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c
PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c
PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.h
PcAtChipsetPkg/KbcResetDxe/Reset.c
PcAtChipsetPkg/KbcResetDxe/Reset.h
PcAtChipsetPkg/KbcResetDxe/ResetEntry.c
PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf
PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridge.c
PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
PcAtChipsetPkg/PciHostBridgeDxe/PciRootBridgeIo.c

index ca9ab1a54e83b7c4bc66a3ac6b10c843ef6b38fd..6006c572a6001a5235d00f5741ef466f1bf63d27 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # \r
-# Copyright (c) 2005 - 2010, Intel Corporation                                                         \r
-# All rights reserved. This program and the accompanying materials                          \r
+# Copyright (c) 2005 - 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
@@ -9,12 +9,8 @@
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 #\r
-#  Module Name:\r
-#   Timer.inf\r
-#\r
-#  Abstract:\r
-#\r
 ##\r
+\r
 [Defines]\r
   INF_VERSION                    = 0x00010005\r
   BASE_NAME                      = Timer\r
index 2874301bbcae60e0acd630fc6091a665b6e55952..6cf99d5e82ee9e30e4ec3fee9084fb23ee2b951a 100644 (file)
@@ -1,7 +1,8 @@
-/*++\r
+/** @file\r
+  Timer Architectural Protocol as defined in the DXE CIS\r
 \r
-Copyright (c) 2005 - 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2005 - 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
@@ -9,16 +10,7 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-\r
-Module Name:\r
-\r
- Timer.c\r
-\r
-Abstract:\r
-\r
-  Timer Architectural Protocol as defined in the DXE CIS\r
-\r
---*/\r
+**/\r
 \r
 #include "Timer.h"\r
 \r
@@ -61,54 +53,33 @@ volatile UINT64           mTimerPeriod = 0;
 //\r
 // Worker Functions\r
 //\r
+/**\r
+  Sets the counter value for Timer #0 in a legacy 8254 timer.\r
+\r
+  @param Count    The 16-bit counter value to program into Timer #0 of the legacy 8254 timer.\r
+**/\r
 VOID\r
 SetPitCount (\r
   IN UINT16  Count\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Sets the counter value for Timer #0 in a legacy 8254 timer.\r
-\r
-Arguments:\r
-\r
-  Count - The 16-bit counter value to program into Timer #0 of the legacy 8254 timer.\r
-\r
-Returns: \r
-\r
-  None\r
-\r
---*/\r
 {\r
   IoWrite8 (TIMER_CONTROL_PORT, 0x36);\r
   IoWrite8 (TIMER0_COUNT_PORT, (UINT8)(Count & 0xff));\r
   IoWrite8 (TIMER0_COUNT_PORT, (UINT8)((Count >> 8) & 0xff));\r
 }\r
 \r
+/**\r
+  8254 Timer #0 Interrupt Handler\r
+\r
+  @param InterruptType    The type of interrupt that occured\r
+  @param SystemContext    A pointer to the system context when the interrupt occured\r
+**/\r
 VOID\r
 EFIAPI\r
 TimerInterruptHandler (\r
   IN EFI_EXCEPTION_TYPE   InterruptType,\r
   IN EFI_SYSTEM_CONTEXT   SystemContext\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  8254 Timer #0 Interrupt Handler\r
-\r
-Arguments:\r
-\r
-  InterruptType - The type of interrupt that occured\r
-\r
-  SystemContext - A pointer to the system context when the interrupt occured\r
-\r
-Returns: \r
-\r
-  None\r
-\r
---*/\r
 {\r
   EFI_TPL OriginalTPL;\r
 \r
@@ -126,53 +97,43 @@ Returns:
   gBS->RestoreTPL (OriginalTPL);\r
 }\r
 \r
+/**\r
+\r
+  This function registers the handler NotifyFunction so it is called every time\r
+  the timer interrupt fires.  It also passes the amount of time since the last\r
+  handler call to the NotifyFunction.  If NotifyFunction is NULL, then the\r
+  handler is unregistered.  If the handler is registered, then EFI_SUCCESS is\r
+  returned.  If the CPU does not support registering a timer interrupt handler,\r
+  then EFI_UNSUPPORTED is returned.  If an attempt is made to register a handler\r
+  when a handler is already registered, then EFI_ALREADY_STARTED is returned.\r
+  If an attempt is made to unregister a handler when a handler is not registered,\r
+  then EFI_INVALID_PARAMETER is returned.  If an error occurs attempting to\r
+  register the NotifyFunction with the timer interrupt, then EFI_DEVICE_ERROR\r
+  is returned.\r
+\r
+\r
+  @param This             The EFI_TIMER_ARCH_PROTOCOL instance.\r
+  @param NotifyFunction   The function to call when a timer interrupt fires.  This\r
+                          function executes at TPL_HIGH_LEVEL.  The DXE Core will\r
+                          register a handler for the timer interrupt, so it can know\r
+                          how much time has passed.  This information is used to\r
+                          signal timer based events.  NULL will unregister the handler.\r
+\r
+  @retval        EFI_SUCCESS            The timer handler was registered.\r
+  @retval        EFI_UNSUPPORTED        The platform does not support timer interrupts.\r
+  @retval        EFI_ALREADY_STARTED    NotifyFunction is not NULL, and a handler is already\r
+                                        registered.\r
+  @retval        EFI_INVALID_PARAMETER  NotifyFunction is NULL, and a handler was not\r
+                                        previously registered.\r
+  @retval        EFI_DEVICE_ERROR       The timer handler could not be registered.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 TimerDriverRegisterHandler (\r
   IN EFI_TIMER_ARCH_PROTOCOL  *This,\r
   IN EFI_TIMER_NOTIFY         NotifyFunction\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function registers the handler NotifyFunction so it is called every time \r
-  the timer interrupt fires.  It also passes the amount of time since the last \r
-  handler call to the NotifyFunction.  If NotifyFunction is NULL, then the \r
-  handler is unregistered.  If the handler is registered, then EFI_SUCCESS is \r
-  returned.  If the CPU does not support registering a timer interrupt handler, \r
-  then EFI_UNSUPPORTED is returned.  If an attempt is made to register a handler \r
-  when a handler is already registered, then EFI_ALREADY_STARTED is returned.  \r
-  If an attempt is made to unregister a handler when a handler is not registered, \r
-  then EFI_INVALID_PARAMETER is returned.  If an error occurs attempting to \r
-  register the NotifyFunction with the timer interrupt, then EFI_DEVICE_ERROR \r
-  is returned.\r
-\r
-Arguments:\r
-\r
-  This           - The EFI_TIMER_ARCH_PROTOCOL instance.\r
-\r
-  NotifyFunction - The function to call when a timer interrupt fires.  This \r
-                   function executes at TPL_HIGH_LEVEL.  The DXE Core will \r
-                   register a handler for the timer interrupt, so it can know \r
-                   how much time has passed.  This information is used to \r
-                   signal timer based events.  NULL will unregister the handler.\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS           - The timer handler was registered.\r
-\r
-  EFI_UNSUPPORTED       - The platform does not support timer interrupts.\r
-\r
-  EFI_ALREADY_STARTED   - NotifyFunction is not NULL, and a handler is already \r
-                          registered.\r
-\r
-  EFI_INVALID_PARAMETER - NotifyFunction is NULL, and a handler was not \r
-                          previously registered.\r
-\r
-  EFI_DEVICE_ERROR      - The timer handler could not be registered.\r
-\r
---*/\r
 {\r
   //\r
   // Check for invalid parameters\r
@@ -190,48 +151,40 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+\r
+  This function adjusts the period of timer interrupts to the value specified\r
+  by TimerPeriod.  If the timer period is updated, then the selected timer\r
+  period is stored in EFI_TIMER.TimerPeriod, and EFI_SUCCESS is returned.  If\r
+  the timer hardware is not programmable, then EFI_UNSUPPORTED is returned.\r
+  If an error occurs while attempting to update the timer period, then the\r
+  timer hardware will be put back in its state prior to this call, and\r
+  EFI_DEVICE_ERROR is returned.  If TimerPeriod is 0, then the timer interrupt\r
+  is disabled.  This is not the same as disabling the CPU's interrupts.\r
+  Instead, it must either turn off the timer hardware, or it must adjust the\r
+  interrupt controller so that a CPU interrupt is not generated when the timer\r
+  interrupt fires.\r
+\r
+\r
+  @param This            The EFI_TIMER_ARCH_PROTOCOL instance.\r
+  @param TimerPeriod     The rate to program the timer interrupt in 100 nS units.  If\r
+                         the timer hardware is not programmable, then EFI_UNSUPPORTED is\r
+                         returned.  If the timer is programmable, then the timer period\r
+                         will be rounded up to the nearest timer period that is supported\r
+                         by the timer hardware.  If TimerPeriod is set to 0, then the\r
+                         timer interrupts will be disabled.\r
+\r
+  @retval        EFI_SUCCESS       The timer period was changed.\r
+  @retval        EFI_UNSUPPORTED   The platform cannot change the period of the timer interrupt.\r
+  @retval        EFI_DEVICE_ERROR  The timer period could not be changed due to a device error.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 TimerDriverSetTimerPeriod (\r
   IN EFI_TIMER_ARCH_PROTOCOL  *This,\r
   IN UINT64                   TimerPeriod\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function adjusts the period of timer interrupts to the value specified \r
-  by TimerPeriod.  If the timer period is updated, then the selected timer \r
-  period is stored in EFI_TIMER.TimerPeriod, and EFI_SUCCESS is returned.  If \r
-  the timer hardware is not programmable, then EFI_UNSUPPORTED is returned.  \r
-  If an error occurs while attempting to update the timer period, then the \r
-  timer hardware will be put back in its state prior to this call, and \r
-  EFI_DEVICE_ERROR is returned.  If TimerPeriod is 0, then the timer interrupt \r
-  is disabled.  This is not the same as disabling the CPU's interrupts.  \r
-  Instead, it must either turn off the timer hardware, or it must adjust the \r
-  interrupt controller so that a CPU interrupt is not generated when the timer \r
-  interrupt fires. \r
-\r
-Arguments:\r
-\r
-  This        - The EFI_TIMER_ARCH_PROTOCOL instance.\r
-\r
-  TimerPeriod - The rate to program the timer interrupt in 100 nS units.  If \r
-                the timer hardware is not programmable, then EFI_UNSUPPORTED is \r
-                returned.  If the timer is programmable, then the timer period \r
-                will be rounded up to the nearest timer period that is supported \r
-                by the timer hardware.  If TimerPeriod is set to 0, then the \r
-                timer interrupts will be disabled.\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS      - The timer period was changed.\r
-\r
-  EFI_UNSUPPORTED  - The platform cannot change the period of the timer interrupt.\r
-\r
-  EFI_DEVICE_ERROR - The timer period could not be changed due to a device error.\r
-\r
---*/\r
 {\r
   UINT64  TimerCount;\r
 \r
@@ -288,35 +241,28 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-TimerDriverGetTimerPeriod (\r
-  IN EFI_TIMER_ARCH_PROTOCOL   *This,\r
-  OUT UINT64                   *TimerPeriod\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
-  This function retrieves the period of timer interrupts in 100 ns units, \r
-  returns that value in TimerPeriod, and returns EFI_SUCCESS.  If TimerPeriod \r
-  is NULL, then EFI_INVALID_PARAMETER is returned.  If a TimerPeriod of 0 is \r
+  This function retrieves the period of timer interrupts in 100 ns units,\r
+  returns that value in TimerPeriod, and returns EFI_SUCCESS.  If TimerPeriod\r
+  is NULL, then EFI_INVALID_PARAMETER is returned.  If a TimerPeriod of 0 is\r
   returned, then the timer is currently disabled.\r
 \r
-Arguments:\r
-\r
-  This        - The EFI_TIMER_ARCH_PROTOCOL instance.\r
 \r
-  TimerPeriod - A pointer to the timer period to retrieve in 100 ns units.  If \r
-                0 is returned, then the timer is currently disabled.\r
+  @param This            The EFI_TIMER_ARCH_PROTOCOL instance.\r
+  @param TimerPeriod     A pointer to the timer period to retrieve in 100 ns units.  If\r
+                         0 is returned, then the timer is currently disabled.\r
 \r
-Returns: \r
+  @retval EFI_SUCCESS            The timer period was returned in TimerPeriod.\r
+  @retval EFI_INVALID_PARAMETER  TimerPeriod is NULL.\r
 \r
-  EFI_SUCCESS           - The timer period was returned in TimerPeriod.\r
-\r
-  EFI_INVALID_PARAMETER - TimerPeriod is NULL.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+TimerDriverGetTimerPeriod (\r
+  IN EFI_TIMER_ARCH_PROTOCOL   *This,\r
+  OUT UINT64                   *TimerPeriod\r
+  )\r
 {\r
   if (TimerPeriod == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -327,34 +273,28 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-TimerDriverGenerateSoftInterrupt (\r
-  IN EFI_TIMER_ARCH_PROTOCOL  *This\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
-  This function generates a soft timer interrupt. If the platform does not support soft \r
-  timer interrupts, then EFI_UNSUPPORTED is returned. Otherwise, EFI_SUCCESS is returned. \r
-  If a handler has been registered through the EFI_TIMER_ARCH_PROTOCOL.RegisterHandler() \r
-  service, then a soft timer interrupt will be generated. If the timer interrupt is \r
-  enabled when this service is called, then the registered handler will be invoked. The \r
-  registered handler should not be able to distinguish a hardware-generated timer \r
+  This function generates a soft timer interrupt. If the platform does not support soft\r
+  timer interrupts, then EFI_UNSUPPORTED is returned. Otherwise, EFI_SUCCESS is returned.\r
+  If a handler has been registered through the EFI_TIMER_ARCH_PROTOCOL.RegisterHandler()\r
+  service, then a soft timer interrupt will be generated. If the timer interrupt is\r
+  enabled when this service is called, then the registered handler will be invoked. The\r
+  registered handler should not be able to distinguish a hardware-generated timer\r
   interrupt from a software-generated timer interrupt.\r
 \r
-Arguments:\r
-\r
-  This  -  The EFI_TIMER_ARCH_PROTOCOL instance.\r
 \r
-Returns: \r
+  @param This              The EFI_TIMER_ARCH_PROTOCOL instance.\r
 \r
-  EFI_SUCCESS       - The soft timer interrupt was generated.\r
+  @retval EFI_SUCCESS       The soft timer interrupt was generated.\r
+  @retval EFI_UNSUPPORTEDT  The platform does not support the generation of soft timer interrupts.\r
 \r
-  EFI_UNSUPPORTEDT  - The platform does not support the generation of soft timer interrupts.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+TimerDriverGenerateSoftInterrupt (\r
+  IN EFI_TIMER_ARCH_PROTOCOL  *This\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   UINT16      IRQMask;\r
@@ -386,33 +326,23 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Initialize the Timer Architectural Protocol driver\r
+\r
+  @param ImageHandle     ImageHandle of the loaded driver\r
+  @param SystemTable     Pointer to the System Table\r
+\r
+  @retval EFI_SUCCESS            Timer Architectural Protocol created\r
+  @retval EFI_OUT_OF_RESOURCES   Not enough resources available to initialize driver.\r
+  @retval EFI_DEVICE_ERROR       A device error occured attempting to initialize the driver.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 TimerDriverInitialize (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize the Timer Architectural Protocol driver\r
-\r
-Arguments:\r
-\r
-  ImageHandle - ImageHandle of the loaded driver\r
-\r
-  SystemTable - Pointer to the System Table\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Timer Architectural Protocol created\r
-\r
-  EFI_OUT_OF_RESOURCES  - Not enough resources available to initialize driver.\r
-  \r
-  EFI_DEVICE_ERROR      - A device error occured attempting to initialize the driver.\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   UINT32      TimerVector;\r
index 71e0bd461e6a887ab28ec9bc93ef45dd04c6f9b6..fe4bf5b42bb504682cb2724ecc79422f1aece4b2 100644 (file)
@@ -1,24 +1,15 @@
-/*++\r
+/** @file\r
+  Private data structures\r
 \r
-Copyright (c) 2005 - 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2005 - 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
                                                                                           \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-\r
-Module Name:\r
-\r
- Timer.h\r
-\r
-Abstract:\r
-\r
-  Private data structures\r
-\r
---*/\r
+**/\r
 \r
 #ifndef _TIMER_H_\r
 #define _TIMER_H_\r
@@ -52,187 +43,143 @@ Abstract:
 //\r
 // Function Prototypes\r
 //\r
+/**\r
+  Initialize the Timer Architectural Protocol driver\r
+\r
+  @param ImageHandle     ImageHandle of the loaded driver\r
+  @param SystemTable     Pointer to the System Table\r
+\r
+  @retval EFI_SUCCESS            Timer Architectural Protocol created\r
+  @retval EFI_OUT_OF_RESOURCES   Not enough resources available to initialize driver.\r
+  @retval EFI_DEVICE_ERROR       A device error occured attempting to initialize the driver.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 TimerDriverInitialize (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize the Timer Architectural Protocol driver\r
-\r
-Arguments:\r
-\r
-  ImageHandle - ImageHandle of the loaded driver\r
-\r
-  SystemTable - Pointer to the System Table\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Timer Architectural Protocol created\r
-\r
-  EFI_OUT_OF_RESOURCES  - Not enough resources available to initialize driver.\r
-  \r
-  EFI_DEVICE_ERROR      - A device error occured attempting to initialize the driver.\r
-\r
---*/\r
 ;\r
 \r
+/**\r
+\r
+  This function adjusts the period of timer interrupts to the value specified\r
+  by TimerPeriod.  If the timer period is updated, then the selected timer\r
+  period is stored in EFI_TIMER.TimerPeriod, and EFI_SUCCESS is returned.  If\r
+  the timer hardware is not programmable, then EFI_UNSUPPORTED is returned.\r
+  If an error occurs while attempting to update the timer period, then the\r
+  timer hardware will be put back in its state prior to this call, and\r
+  EFI_DEVICE_ERROR is returned.  If TimerPeriod is 0, then the timer interrupt\r
+  is disabled.  This is not the same as disabling the CPU's interrupts.\r
+  Instead, it must either turn off the timer hardware, or it must adjust the\r
+  interrupt controller so that a CPU interrupt is not generated when the timer\r
+  interrupt fires.\r
+\r
+\r
+  @param This            The EFI_TIMER_ARCH_PROTOCOL instance.\r
+  @param TimerPeriod     The rate to program the timer interrupt in 100 nS units.  If\r
+                         the timer hardware is not programmable, then EFI_UNSUPPORTED is\r
+                         returned.  If the timer is programmable, then the timer period\r
+                         will be rounded up to the nearest timer period that is supported\r
+                         by the timer hardware.  If TimerPeriod is set to 0, then the\r
+                         timer interrupts will be disabled.\r
+\r
+  @retval        EFI_SUCCESS       The timer period was changed.\r
+  @retval        EFI_UNSUPPORTED   The platform cannot change the period of the timer interrupt.\r
+  @retval        EFI_DEVICE_ERROR  The timer period could not be changed due to a device error.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 TimerDriverRegisterHandler (\r
   IN EFI_TIMER_ARCH_PROTOCOL  *This,\r
   IN EFI_TIMER_NOTIFY         NotifyFunction\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function registers the handler NotifyFunction so it is called every time \r
-  the timer interrupt fires.  It also passes the amount of time since the last \r
-  handler call to the NotifyFunction.  If NotifyFunction is NULL, then the \r
-  handler is unregistered.  If the handler is registered, then EFI_SUCCESS is \r
-  returned.  If the CPU does not support registering a timer interrupt handler, \r
-  then EFI_UNSUPPORTED is returned.  If an attempt is made to register a handler \r
-  when a handler is already registered, then EFI_ALREADY_STARTED is returned.  \r
-  If an attempt is made to unregister a handler when a handler is not registered, \r
-  then EFI_INVALID_PARAMETER is returned.  If an error occurs attempting to \r
-  register the NotifyFunction with the timer interrupt, then EFI_DEVICE_ERROR \r
-  is returned.\r
-\r
-Arguments:\r
-\r
-  This           - The EFI_TIMER_ARCH_PROTOCOL instance.\r
-\r
-  NotifyFunction - The function to call when a timer interrupt fires.  This \r
-                   function executes at TPL_HIGH_LEVEL.  The DXE Core will \r
-                   register a handler for the timer interrupt, so it can know \r
-                   how much time has passed.  This information is used to \r
-                   signal timer based events.  NULL will unregister the handler.\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS           - The timer handler was registered.\r
-\r
-  EFI_UNSUPPORTED       - The platform does not support timer interrupts.\r
-\r
-  EFI_ALREADY_STARTED   - NotifyFunction is not NULL, and a handler is already \r
-                          registered.\r
-\r
-  EFI_INVALID_PARAMETER - NotifyFunction is NULL, and a handler was not \r
-                          previously registered.\r
-\r
-  EFI_DEVICE_ERROR      - The timer handler could not be registered.\r
-\r
---*/\r
 ;\r
 \r
+/**\r
+\r
+  This function adjusts the period of timer interrupts to the value specified\r
+  by TimerPeriod.  If the timer period is updated, then the selected timer\r
+  period is stored in EFI_TIMER.TimerPeriod, and EFI_SUCCESS is returned.  If\r
+  the timer hardware is not programmable, then EFI_UNSUPPORTED is returned.\r
+  If an error occurs while attempting to update the timer period, then the\r
+  timer hardware will be put back in its state prior to this call, and\r
+  EFI_DEVICE_ERROR is returned.  If TimerPeriod is 0, then the timer interrupt\r
+  is disabled.  This is not the same as disabling the CPU's interrupts.\r
+  Instead, it must either turn off the timer hardware, or it must adjust the\r
+  interrupt controller so that a CPU interrupt is not generated when the timer\r
+  interrupt fires.\r
+\r
+\r
+  @param This            The EFI_TIMER_ARCH_PROTOCOL instance.\r
+  @param TimerPeriod     The rate to program the timer interrupt in 100 nS units.  If\r
+                         the timer hardware is not programmable, then EFI_UNSUPPORTED is\r
+                         returned.  If the timer is programmable, then the timer period\r
+                         will be rounded up to the nearest timer period that is supported\r
+                         by the timer hardware.  If TimerPeriod is set to 0, then the\r
+                         timer interrupts will be disabled.\r
+\r
+  @retval        EFI_SUCCESS       The timer period was changed.\r
+  @retval        EFI_UNSUPPORTED   The platform cannot change the period of the timer interrupt.\r
+  @retval        EFI_DEVICE_ERROR  The timer period could not be changed due to a device error.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 TimerDriverSetTimerPeriod (\r
   IN EFI_TIMER_ARCH_PROTOCOL  *This,\r
   IN UINT64                   TimerPeriod\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function adjusts the period of timer interrupts to the value specified \r
-  by TimerPeriod.  If the timer period is updated, then the selected timer \r
-  period is stored in EFI_TIMER.TimerPeriod, and EFI_SUCCESS is returned.  If \r
-  the timer hardware is not programmable, then EFI_UNSUPPORTED is returned.  \r
-  If an error occurs while attempting to update the timer period, then the \r
-  timer hardware will be put back in its state prior to this call, and \r
-  EFI_DEVICE_ERROR is returned.  If TimerPeriod is 0, then the timer interrupt \r
-  is disabled.  This is not the same as disabling the CPU's interrupts.  \r
-  Instead, it must either turn off the timer hardware, or it must adjust the \r
-  interrupt controller so that a CPU interrupt is not generated when the timer \r
-  interrupt fires. \r
-\r
-Arguments:\r
-\r
-  This        - The EFI_TIMER_ARCH_PROTOCOL instance.\r
-\r
-  TimerPeriod - The rate to program the timer interrupt in 100 nS units.  If \r
-                the timer hardware is not programmable, then EFI_UNSUPPORTED is \r
-                returned.  If the timer is programmable, then the timer period \r
-                will be rounded up to the nearest timer period that is supported \r
-                by the timer hardware.  If TimerPeriod is set to 0, then the \r
-                timer interrupts will be disabled.\r
+;\r
 \r
-Returns: \r
+/**\r
 \r
-  EFI_SUCCESS      - The timer period was changed.\r
+  This function retrieves the period of timer interrupts in 100 ns units,\r
+  returns that value in TimerPeriod, and returns EFI_SUCCESS.  If TimerPeriod\r
+  is NULL, then EFI_INVALID_PARAMETER is returned.  If a TimerPeriod of 0 is\r
+  returned, then the timer is currently disabled.\r
 \r
-  EFI_UNSUPPORTED  - The platform cannot change the period of the timer interrupt.\r
 \r
-  EFI_DEVICE_ERROR - The timer period could not be changed due to a device error.\r
+  @param This            The EFI_TIMER_ARCH_PROTOCOL instance.\r
+  @param TimerPeriod     A pointer to the timer period to retrieve in 100 ns units.  If\r
+                         0 is returned, then the timer is currently disabled.\r
 \r
---*/\r
-;\r
+  @retval EFI_SUCCESS            The timer period was returned in TimerPeriod.\r
+  @retval EFI_INVALID_PARAMETER  TimerPeriod is NULL.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 TimerDriverGetTimerPeriod (\r
   IN EFI_TIMER_ARCH_PROTOCOL   *This,\r
   OUT UINT64                   *TimerPeriod\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function retrieves the period of timer interrupts in 100 ns units, \r
-  returns that value in TimerPeriod, and returns EFI_SUCCESS.  If TimerPeriod \r
-  is NULL, then EFI_INVALID_PARAMETER is returned.  If a TimerPeriod of 0 is \r
-  returned, then the timer is currently disabled.\r
-\r
-Arguments:\r
+;\r
 \r
-  This        - The EFI_TIMER_ARCH_PROTOCOL instance.\r
+/**\r
 \r
-  TimerPeriod - A pointer to the timer period to retrieve in 100 ns units.  If \r
-                0 is returned, then the timer is currently disabled.\r
+  This function generates a soft timer interrupt. If the platform does not support soft\r
+  timer interrupts, then EFI_UNSUPPORTED is returned. Otherwise, EFI_SUCCESS is returned.\r
+  If a handler has been registered through the EFI_TIMER_ARCH_PROTOCOL.RegisterHandler()\r
+  service, then a soft timer interrupt will be generated. If the timer interrupt is\r
+  enabled when this service is called, then the registered handler will be invoked. The\r
+  registered handler should not be able to distinguish a hardware-generated timer\r
+  interrupt from a software-generated timer interrupt.\r
 \r
-Returns: \r
 \r
-  EFI_SUCCESS           - The timer period was returned in TimerPeriod.\r
+  @param This              The EFI_TIMER_ARCH_PROTOCOL instance.\r
 \r
-  EFI_INVALID_PARAMETER - TimerPeriod is NULL.\r
-\r
---*/\r
-;\r
+  @retval EFI_SUCCESS       The soft timer interrupt was generated.\r
+  @retval EFI_UNSUPPORTEDT  The platform does not support the generation of soft timer interrupts.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 TimerDriverGenerateSoftInterrupt (\r
   IN EFI_TIMER_ARCH_PROTOCOL  *This\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function generates a soft timer interrupt. If the platform does not support soft \r
-  timer interrupts, then EFI_UNSUPPORTED is returned. Otherwise, EFI_SUCCESS is returned. \r
-  If a handler has been registered through the EFI_TIMER_ARCH_PROTOCOL.RegisterHandler() \r
-  service, then a soft timer interrupt will be generated. If the timer interrupt is \r
-  enabled when this service is called, then the registered handler will be invoked. The \r
-  registered handler should not be able to distinguish a hardware-generated timer \r
-  interrupt from a software-generated timer interrupt.\r
-\r
-Arguments:\r
-\r
-  This  -  The EFI_TIMER_ARCH_PROTOCOL instance.\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS       - The soft timer interrupt was generated.\r
-\r
-  EFI_UNSUPPORTEDT  - The platform does not support the generation of soft timer interrupts.\r
-\r
---*/\r
 ;\r
 \r
 #endif\r
index 9b88dcf86dbb8a3580fc72cd6c897e3c31bd4b8e..524048604b6eaa4d98ee32dcfd1d7efa0986ff65 100644 (file)
@@ -1,28 +1,60 @@
-/*++\r
+/** @file\r
+    UEFI Component Name(2) protocol implementation for IsaAcpi driver.\r
 \r
-Copyright (c) 2006 - 2007, 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
                                                                                           \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+**/\r
 \r
+#include "PcatIsaAcpi.h"\r
 \r
-Module Name:\r
+//\r
+// EFI Component Name Functions\r
+//\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the driver.\r
 \r
-  ComponentName.c\r
+  This function retrieves the user readable name of a driver in the form of a\r
+  Unicode string. If the driver specified by This has a user readable name in\r
+  the language specified by Language, then a pointer to the driver name is\r
+  returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
+  by This does not support the language specified by Language,\r
+  then EFI_UNSUPPORTED is returned.\r
 \r
-Abstract:\r
+  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
 \r
---*/\r
+  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+                                array indicating the language. This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified\r
+                                in RFC 4646 or ISO 639-2 language code format.\r
 \r
-#include "PcatIsaAcpi.h"\r
+  @param  DriverName[out]       A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                driver specified by This in the language\r
+                                specified by Language.\r
 \r
-//\r
-// EFI Component Name Functions\r
-//\r
+  @retval EFI_SUCCESS           The Unicode string for the Driver specified by\r
+                                This and the language specified by Language was\r
+                                returned in DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiComponentNameGetDriverName (\r
@@ -31,6 +63,74 @@ PcatIsaAcpiComponentNameGetDriverName (
   OUT CHAR16                       **DriverName\r
   );\r
 \r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the controller\r
+  that is being managed by a driver.\r
+\r
+  This function retrieves the user readable name of the controller specified by\r
+  ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
+  driver specified by This has a user readable name in the language specified by\r
+  Language, then a pointer to the controller name is returned in ControllerName,\r
+  and EFI_SUCCESS is returned.  If the driver specified by This is not currently\r
+  managing the controller specified by ControllerHandle and ChildHandle,\r
+  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
+  support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
+\r
+  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param  ControllerHandle[in]  The handle of a controller that the driver\r
+                                specified by This is managing.  This handle\r
+                                specifies the controller whose name is to be\r
+                                returned.\r
+\r
+  @param  ChildHandle[in]       The handle of the child controller to retrieve\r
+                                the name of.  This is an optional parameter that\r
+                                may be NULL.  It will be NULL for device\r
+                                drivers.  It will also be NULL for a bus drivers\r
+                                that wish to retrieve the name of the bus\r
+                                controller.  It will not be NULL for a bus\r
+                                driver that wishes to retrieve the name of a\r
+                                child controller.\r
+\r
+  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+                                array indicating the language.  This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified in\r
+                                RFC 4646 or ISO 639-2 language code format.\r
+\r
+  @param  ControllerName[out]   A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                controller specified by ControllerHandle and\r
+                                ChildHandle in the language specified by\r
+                                Language from the point of view of the driver\r
+                                specified by This.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the user readable name in\r
+                                the language specified by Language for the\r
+                                driver specified by This was returned in\r
+                                DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
+                                EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This is not currently\r
+                                managing the controller specified by\r
+                                ControllerHandle and ChildHandle.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiComponentNameGetControllerName (\r
@@ -69,6 +169,45 @@ EFI_UNICODE_STRING_TABLE mPcatIsaAcpiDriverNameTable[] = {
   }\r
 };\r
 \r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the driver.\r
+\r
+  This function retrieves the user readable name of a driver in the form of a\r
+  Unicode string. If the driver specified by This has a user readable name in\r
+  the language specified by Language, then a pointer to the driver name is\r
+  returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
+  by This does not support the language specified by Language,\r
+  then EFI_UNSUPPORTED is returned.\r
+\r
+  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+                                array indicating the language. This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified\r
+                                in RFC 4646 or ISO 639-2 language code format.\r
+\r
+  @param  DriverName[out]       A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                driver specified by This in the language\r
+                                specified by Language.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the Driver specified by\r
+                                This and the language specified by Language was\r
+                                returned in DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiComponentNameGetDriverName (\r
@@ -76,32 +215,6 @@ PcatIsaAcpiComponentNameGetDriverName (
   IN  CHAR8                        *Language,\r
   OUT CHAR16                       **DriverName\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves a Unicode string that is the user readable name of the EFI Driver.\r
-\r
-  Arguments:\r
-    This       - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
-    Language   - A pointer to a three character ISO 639-2 language identifier.\r
-                 This is the language of the driver name that that the caller \r
-                 is requesting, and it must match one of the languages specified\r
-                 in SupportedLanguages.  The number of languages supported by a \r
-                 driver is up to the driver writer.\r
-    DriverName - A pointer to the Unicode string to return.  This Unicode string\r
-                 is the name of the driver specified by This in the language \r
-                 specified by Language.\r
-\r
-  Returns:\r
-    EFI_SUCCES            - The Unicode string for the Driver specified by This\r
-                            and the language specified by Language was returned \r
-                            in DriverName.\r
-    EFI_INVALID_PARAMETER - Language is NULL.\r
-    EFI_INVALID_PARAMETER - DriverName is NULL.\r
-    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
-                            language specified by Language.\r
-\r
---*/\r
 {\r
   return LookupUnicodeString2 (\r
            Language,\r
@@ -112,6 +225,74 @@ PcatIsaAcpiComponentNameGetDriverName (
            );\r
 }\r
 \r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the controller\r
+  that is being managed by a driver.\r
+\r
+  This function retrieves the user readable name of the controller specified by\r
+  ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
+  driver specified by This has a user readable name in the language specified by\r
+  Language, then a pointer to the controller name is returned in ControllerName,\r
+  and EFI_SUCCESS is returned.  If the driver specified by This is not currently\r
+  managing the controller specified by ControllerHandle and ChildHandle,\r
+  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
+  support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
+\r
+  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param  ControllerHandle[in]  The handle of a controller that the driver\r
+                                specified by This is managing.  This handle\r
+                                specifies the controller whose name is to be\r
+                                returned.\r
+\r
+  @param  ChildHandle[in]       The handle of the child controller to retrieve\r
+                                the name of.  This is an optional parameter that\r
+                                may be NULL.  It will be NULL for device\r
+                                drivers.  It will also be NULL for a bus drivers\r
+                                that wish to retrieve the name of the bus\r
+                                controller.  It will not be NULL for a bus\r
+                                driver that wishes to retrieve the name of a\r
+                                child controller.\r
+\r
+  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
+                                array indicating the language.  This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified in\r
+                                RFC 4646 or ISO 639-2 language code format.\r
+\r
+  @param  ControllerName[out]   A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                controller specified by ControllerHandle and\r
+                                ChildHandle in the language specified by\r
+                                Language from the point of view of the driver\r
+                                specified by This.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the user readable name in\r
+                                the language specified by Language for the\r
+                                driver specified by This was returned in\r
+                                DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
+                                EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This is not currently\r
+                                managing the controller specified by\r
+                                ControllerHandle and ChildHandle.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiComponentNameGetControllerName (\r
@@ -121,50 +302,6 @@ PcatIsaAcpiComponentNameGetControllerName (
   IN  CHAR8                        *Language,\r
   OUT CHAR16                       **ControllerName\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-    Retrieves a Unicode string that is the user readable name of the controller\r
-    that is being managed by an EFI Driver.\r
-\r
-  Arguments:\r
-    This             - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.\r
-    ControllerHandle - The handle of a controller that the driver specified by \r
-                       This is managing.  This handle specifies the controller \r
-                       whose name is to be returned.\r
-    ChildHandle      - The handle of the child controller to retrieve the name \r
-                       of.  This is an optional parameter that may be NULL.  It \r
-                       will be NULL for device drivers.  It will also be NULL \r
-                       for a bus drivers that wish to retrieve the name of the \r
-                       bus controller.  It will not be NULL for a bus driver \r
-                       that wishes to retrieve the name of a child controller.\r
-    Language         - A pointer to a three character ISO 639-2 language \r
-                       identifier.  This is the language of the controller name \r
-                       that that the caller is requesting, and it must match one\r
-                       of the languages specified in SupportedLanguages.  The \r
-                       number of languages supported by a driver is up to the \r
-                       driver writer.\r
-    ControllerName   - A pointer to the Unicode string to return.  This Unicode\r
-                       string is the name of the controller specified by \r
-                       ControllerHandle and ChildHandle in the language specified\r
-                       by Language from the point of view of the driver specified\r
-                       by This. \r
-\r
-  Returns:\r
-    EFI_SUCCESS           - The Unicode string for the user readable name in the \r
-                            language specified by Language for the driver \r
-                            specified by This was returned in DriverName.\r
-    EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.\r
-    EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.\r
-    EFI_INVALID_PARAMETER - Language is NULL.\r
-    EFI_INVALID_PARAMETER - ControllerName is NULL.\r
-    EFI_UNSUPPORTED       - The driver specified by This is not currently managing \r
-                            the controller specified by ControllerHandle and \r
-                            ChildHandle.\r
-    EFI_UNSUPPORTED       - The driver specified by This does not support the \r
-                            language specified by Language.\r
-\r
---*/\r
 {\r
   return EFI_UNSUPPORTED;\r
 }\r
index 5eba8591b629fb86bc20b8aee264ae19257127a0..65b54d9134b13cb8a007ac86ce5e132f78d53963 100644 (file)
@@ -1,26 +1,15 @@
-/*++\r
+/** @file\r
+  ISA ACPI Protocol Implementation\r
 \r
-Copyright (c) 2006, 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
                                                                                           \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-\r
-Module Name:\r
-\r
-  IsaAcpi.c\r
-    \r
-Abstract: \r
-  \r
-    ISA ACPI Protocol Implementation\r
-\r
-Revision History\r
-\r
---*/\r
+**/\r
 \r
 #include "PcatIsaAcpi.h"\r
 \r
@@ -90,22 +79,19 @@ EFI_ISA_ACPI_RESOURCE_LIST gPcatIsaAcpiDeviceList[] = {
 //\r
 // ISA ACPI Protocol Functions\r
 //\r
+/**\r
+  Enumerate the ISA devices on the ISA bus.\r
+\r
+  @param Device             Point to device ID instance \r
+  @param IsaAcpiDevice      On return, point to resource data for Isa device\r
+  @param NextIsaAcpiDevice  On return, point to resource data for next Isa device\r
+**/\r
 VOID\r
 IsaDeviceLookup (\r
   IN  EFI_ISA_ACPI_DEVICE_ID      *Device,\r
   OUT EFI_ISA_ACPI_RESOURCE_LIST  **IsaAcpiDevice,\r
   OUT EFI_ISA_ACPI_RESOURCE_LIST  **NextIsaAcpiDevice\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Enumerate the ISA devices on the ISA bus\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   UINTN  Index;\r
 \r
@@ -133,22 +119,23 @@ Returns:
   }\r
 }\r
 \r
+/**\r
+  Enumerate the ISA devices on the ISA bus\r
+\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+\r
+  @retval EFI_NOT_FOUND Can not found the next Isa device.\r
+  @retval EFI_SUCESS    Success retrieve the next Isa device for enumration.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaDeviceEnumerate (\r
   IN  EFI_ISA_ACPI_PROTOCOL   *This,\r
   OUT EFI_ISA_ACPI_DEVICE_ID  **Device\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Enumerate the ISA devices on the ISA bus\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   EFI_ISA_ACPI_RESOURCE_LIST  *IsaAcpiDevice;\r
   EFI_ISA_ACPI_RESOURCE_LIST  *NextIsaAcpiDevice;\r
@@ -161,6 +148,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Set ISA device power\r
+\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+  @param OnOff           TRUE for setting isa device power on,\r
+                         FALSE for setting isa device power off\r
+\r
+  @return EFI_SUCCESS    Sucess to change power status for isa device.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaDeviceSetPower (\r
@@ -168,20 +166,20 @@ IsaDeviceSetPower (
   IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
   IN BOOLEAN                 OnOff\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Set ISA device power \r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   return EFI_SUCCESS;\r
 } \r
 \r
+/**\r
+  Get current resource for the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+  @param ResourceList    On return, point to resources instances for given isa device\r
+\r
+  @retval EFI_NOT_FOUND Can not found the resource instance for given isa device\r
+  @retval EFI_SUCCESS   Success to get resource instance for given isa device.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaGetCurrentResource (\r
@@ -189,16 +187,6 @@ IsaGetCurrentResource (
   IN  EFI_ISA_ACPI_DEVICE_ID      *Device,  \r
   OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Get current Resource of the specific ISA device\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   IsaDeviceLookup (Device, ResourceList, NULL);\r
   if (*ResourceList == NULL) {\r
@@ -207,6 +195,15 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Get possible resource for the specific ISA device.\r
+  \r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+  @param ResourceList    On return, point to resources instances for given isa device\r
+\r
+  @retval EFI_SUCCESS   Success to get resource instance for given isa device.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaGetPossibleResource (\r
@@ -214,19 +211,20 @@ IsaGetPossibleResource (
   IN  EFI_ISA_ACPI_DEVICE_ID      *Device,  \r
   OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/ \r
 {\r
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+  Set resource for the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+  @param ResourceList    Point to resources instances for given isa device\r
+\r
+  @return EFI_SUCESS  Success to set resource.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaSetResource (\r
@@ -234,19 +232,20 @@ IsaSetResource (
   IN EFI_ISA_ACPI_DEVICE_ID      *Device,  \r
   IN EFI_ISA_ACPI_RESOURCE_LIST  *ResourceList\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   return EFI_SUCCESS;\r
 }\r
         \r
+/**\r
+  Enable/Disable the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+  @param Enable          Enable/Disable\r
+\r
+  @return EFI_SUCESS  Success to enable/disable.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaEnableDevice (\r
@@ -254,53 +253,43 @@ IsaEnableDevice (
   IN EFI_ISA_ACPI_DEVICE_ID  *Device,\r
   IN BOOLEAN                 Enable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   return EFI_SUCCESS;  \r
 }\r
 \r
+/**\r
+  Initialize the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+\r
+  @return EFI_SUCESS  Success to initialize.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaInitDevice (\r
   IN EFI_ISA_ACPI_PROTOCOL   *This,\r
   IN EFI_ISA_ACPI_DEVICE_ID  *Device\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   return EFI_SUCCESS;\r
 }\r
 \r
 \r
+/**\r
+  Initialize the ISA interface.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+\r
+  @return EFI_SUCESS  Success to initialize ISA interface.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaInterfaceInit (\r
   IN EFI_ISA_ACPI_PROTOCOL  *This\r
 )  \r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   return EFI_SUCCESS;\r
 }  \r
index 144263c23e849165c7cc72130e9561cfa874ad19..d49458a65990e21a5567c0d8e140cfc4b0190d15 100644 (file)
@@ -1,7 +1,8 @@
 ## @file\r
-# \r
-# Copyright (c) 2005 - 2010, Intel Corporation                                                         \r
-# All rights reserved. This program and the accompanying materials                          \r
+#   Component description file for PCAT ISA ACPI driver\r
+#\r
+# Copyright (c) 2005 - 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
@@ -9,11 +10,6 @@
 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 #\r
-#  Module Name:\r
-#   IsaAcpi.inf\r
-#\r
-#  Abstract:\r
-#    Component description file for PCAT ISA ACPI driver\r
 #\r
 ##\r
 \r
index 9de878fb1c74ac4595b45f290cf0563f42e86125..39655479fb0ba66c5877d5daa837c2e8f38e7ad4 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   EFI PCAT ISA ACPI Driver for a Generic PC Platform\r
 \r
-  Copyright (c) 2006, 2009, Intel Corporation                                                         \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
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\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
 \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -26,22 +26,20 @@ EFI_DRIVER_BINDING_PROTOCOL gPcatIsaAcpiDriverBinding = {
   NULL\r
 };\r
 \r
+/**\r
+  the entry point of the PcatIsaAcpi driver.\r
+\r
+  @param ImageHandle     Handle for driver image\r
+  @param SystemTable     Point to EFI_SYSTEM_TABLE\r
+\r
+  @return Sucess or not for installing driver binding protocol\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiDriverEntryPoint (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
-/*++\r
-  \r
-  Routine Description:\r
-    the entry point of the PcatIsaAcpi driver\r
-  \r
-  Arguments:\r
-  \r
-  Returns:\r
-    \r
---*/                \r
 {\r
   return EfiLibInstallDriverBindingComponentName2 (\r
            ImageHandle, \r
@@ -53,6 +51,17 @@ PcatIsaAcpiDriverEntryPoint (
            );\r
 }\r
 \r
+/**\r
+  ControllerDriver Protocol Method\r
+\r
+  @param This                 Driver Binding protocol instance pointer.   \r
+  @param Controller           Handle of device to test.\r
+  @param RemainingDevicePath  Optional parameter use to pick a specific child\r
+                              device to start.\r
+  @retval EFI_SUCCESS         This driver supports this device.\r
+  @retval other               This driver does not support this device.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiDriverBindingSupported (\r
@@ -60,17 +69,6 @@ PcatIsaAcpiDriverBindingSupported (
   IN EFI_HANDLE                   Controller,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  ControllerDriver Protocol Method\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   EFI_STATUS           Status;\r
   EFI_PCI_IO_PROTOCOL  *PciIo;\r
@@ -131,6 +129,18 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+  Install EFI_ISA_ACPI_PROTOCOL.\r
+\r
+  @param  This                 Driver Binding protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to.\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
+\r
+  @retval EFI_SUCCESS          This driver is added to ControllerHandle\r
+  @retval EFI_ALREADY_STARTED  This driver is already running on ControllerHandle\r
+  @retval other                This driver does not support this device\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiDriverBindingStart (\r
@@ -138,16 +148,6 @@ PcatIsaAcpiDriverBindingStart (
   IN EFI_HANDLE                   Controller,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Install EFI_ISA_ACPI_PROTOCOL\r
-\r
-Arguments:\r
-\r
-Returns:\r
-\r
---*/\r
 {\r
   EFI_STATUS           Status;\r
   EFI_PCI_IO_PROTOCOL  *PciIo;\r
@@ -246,6 +246,21 @@ Done:
   return EFI_SUCCESS;\r
 }\r
 \r
+\r
+/**\r
+  Stop this driver on ControllerHandle. Support stopping any child handles\r
+  created by this driver.\r
+\r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
+  @retval other             This driver was not removed from this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiDriverBindingStop (\r
@@ -254,15 +269,6 @@ PcatIsaAcpiDriverBindingStop (
   IN UINTN                        NumberOfChildren,\r
   IN EFI_HANDLE                   *ChildHandleBuffer\r
   )\r
-/*++\r
-\r
-  Routine Description:\r
-\r
-  Arguments:\r
-\r
-  Returns:\r
-\r
---*/\r
 {\r
   EFI_STATUS             Status;\r
   EFI_ISA_ACPI_PROTOCOL  *IsaAcpi;\r
index 8608156b9b5f6653d66377f8a67101449ee90e28..955162c2d2bab3905810f5a0e2de3a5d997b2606 100644 (file)
@@ -1,7 +1,8 @@
-/*++\r
+/** @file\r
+  EFI PCAT ISA ACPI Driver for a Generic PC Platform\r
 \r
-Copyright (c) 2006 - 2007, 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
@@ -9,18 +10,7 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-\r
-Module Name:\r
-\r
-    PcatIsaAcpi.h\r
-    \r
-Abstract:\r
-\r
-    EFI PCAT ISA ACPI Driver for a Generic PC Platform\r
-\r
-Revision History\r
-\r
---*/\r
+**/\r
 \r
 #ifndef _PCAT_ISA_ACPI_H_\r
 #define _PCAT_ISA_ACPI_H_\r
@@ -68,6 +58,17 @@ extern EFI_COMPONENT_NAME_PROTOCOL  gPcatIsaAcpiComponentName;
 //\r
 // Prototypes for Driver model protocol interface\r
 //\r
+/**\r
+  ControllerDriver Protocol Method\r
+\r
+  @param This                 Driver Binding protocol instance pointer.   \r
+  @param Controller           Handle of device to test.\r
+  @param RemainingDevicePath  Optional parameter use to pick a specific child\r
+                              device to start.\r
+  @retval EFI_SUCCESS         This driver supports this device.\r
+  @retval other               This driver does not support this device.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiDriverBindingSupported (\r
@@ -76,6 +77,18 @@ PcatIsaAcpiDriverBindingSupported (
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   );\r
 \r
+/**\r
+  Install EFI_ISA_ACPI_PROTOCOL.\r
+\r
+  @param  This                 Driver Binding protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to.\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
+\r
+  @retval EFI_SUCCESS          This driver is added to ControllerHandle\r
+  @retval EFI_ALREADY_STARTED  This driver is already running on ControllerHandle\r
+  @retval other                This driver does not support this device\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiDriverBindingStart (\r
@@ -84,6 +97,20 @@ PcatIsaAcpiDriverBindingStart (
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   );\r
 \r
+/**\r
+  Stop this driver on ControllerHandle. Support stopping any child handles\r
+  created by this driver.\r
+\r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
+  @retval other             This driver was not removed from this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PcatIsaAcpiDriverBindingStop (\r
@@ -96,6 +123,17 @@ PcatIsaAcpiDriverBindingStop (
 //\r
 // Prototypes for the ISA ACPI protocol interface\r
 //\r
+/**\r
+  Enumerate the ISA devices on the ISA bus\r
+\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+\r
+  @retval EFI_NOT_FOUND Can not found the next Isa device.\r
+  @retval EFI_SUCESS    Success retrieve the next Isa device for enumration.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaDeviceEnumerate (\r
@@ -103,6 +141,17 @@ IsaDeviceEnumerate (
   OUT EFI_ISA_ACPI_DEVICE_ID  **Device\r
   );\r
 \r
+/**\r
+  Set ISA device power\r
+\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+  @param OnOff           TRUE for setting isa device power on,\r
+                         FALSE for setting isa device power off\r
+\r
+  @return EFI_SUCCESS    Sucess to change power status for isa device.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaDeviceSetPower (\r
@@ -111,6 +160,16 @@ IsaDeviceSetPower (
   IN BOOLEAN                 OnOff\r
   );\r
   \r
+/**\r
+  Get current resource for the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+  @param ResourceList    On return, point to resources instances for given isa device\r
+\r
+  @retval EFI_NOT_FOUND Can not found the resource instance for given isa device\r
+  @retval EFI_SUCCESS   Success to get resource instance for given isa device.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaGetCurrentResource (\r
@@ -119,6 +178,15 @@ IsaGetCurrentResource (
   OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
   );\r
   \r
+/**\r
+  Get possible resource for the specific ISA device.\r
+  \r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+  @param ResourceList    On return, point to resources instances for given isa device\r
+\r
+  @retval EFI_SUCCESS   Success to get resource instance for given isa device.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaGetPossibleResource (\r
@@ -127,6 +195,16 @@ IsaGetPossibleResource (
   OUT EFI_ISA_ACPI_RESOURCE_LIST  **ResourceList\r
   );\r
   \r
+/**\r
+  Set resource for the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+  @param ResourceList    Point to resources instances for given isa device\r
+\r
+  @return EFI_SUCESS  Success to set resource.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaSetResource (\r
@@ -135,6 +213,16 @@ IsaSetResource (
   IN EFI_ISA_ACPI_RESOURCE_LIST  *ResourceList\r
   );\r
   \r
+/**\r
+  Enable/Disable the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+  @param Enable          Enable/Disable\r
+\r
+  @return EFI_SUCESS  Success to enable/disable.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaEnableDevice (\r
@@ -143,6 +231,15 @@ IsaEnableDevice (
   IN BOOLEAN                 Enable\r
   );\r
 \r
+/**\r
+  Initialize the specific ISA device.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+  @param Device          Point to device ID instance \r
+\r
+  @return EFI_SUCESS  Success to initialize.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaInitDevice (\r
@@ -150,6 +247,14 @@ IsaInitDevice (
   IN EFI_ISA_ACPI_DEVICE_ID  *Device\r
   );\r
   \r
+/**\r
+  Initialize the ISA interface.\r
+\r
+  @param This            Point to instance of EFI_ISA_ACPI_PROTOCOL\r
+\r
+  @return EFI_SUCESS  Success to initialize ISA interface.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 IsaInterfaceInit (\r
index 45f4bc717015f25163c867c8717c43a06c295454..495c0d359439c82c7f2b61ab4d5405dc37ead51e 100644 (file)
@@ -1,7 +1,8 @@
-/*++\r
+/** @file\r
+  Reset Architectural Protocol implementation\r
 \r
-Copyright (c) 2006, 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
@@ -9,17 +10,19 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
-  Reset.c\r
-\r
-Abstract:\r
+**/\r
 \r
-  Reset Architectural Protocol implementation\r
+#include "Reset.h"\r
 \r
---*/\r
+/**\r
+  Reset the system.\r
 \r
-#include "Reset.h"\r
+  @param ResetType       warm or cold\r
+  @param ResetStatus     possible cause of reset\r
+  @param DataSize        Size of ResetData in bytes\r
+  @param ResetData       Optional Unicode string\r
 \r
+**/\r
 VOID\r
 EFIAPI\r
 KbcResetSystem (\r
@@ -28,25 +31,6 @@ KbcResetSystem (
   IN UINTN            DataSize,\r
   IN VOID             *ResetData OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Reset the system.\r
-\r
-Arguments:\r
-  \r
-    ResetType - warm or cold\r
-    ResetStatus - possible cause of reset\r
-    DataSize - Size of ResetData in bytes\r
-    ResetData - Optional Unicode string\r
-    For details, see efiapi.h\r
-\r
-Returns:\r
-  Does not return if the reset takes place.\r
-  EFI_INVALID_PARAMETER   If ResetType is invalid.\r
-\r
---*/\r
 {\r
   UINT8   Data;\r
 \r
index 3b70580a81ccfc806b4813ad490ea10b164d72c3..ad989b29010f939641c98b4edae5c4fc9b7dde49 100644 (file)
@@ -1,7 +1,9 @@
-/*++\r
+/** @file\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+  Definitions for reset\r
+\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
@@ -9,14 +11,7 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-Module Name:\r
-  Reset.h\r
-\r
-Abstract:\r
-\r
-  some definitions for reset\r
-\r
---*/\r
+**/\r
 \r
 #ifndef _KBC_RESET_H\r
 #define _KBC_RESET_H\r
@@ -30,30 +25,34 @@ Abstract:
 \r
 #include <Protocol/Reset.h>\r
 \r
+/**\r
+  Initialize the state information for the Reset Architectural Protocol\r
+\r
+  @param ImageHandle     Handle of the loaded driver \r
+  @param SystemTable     Pointer to the System Table\r
+\r
+  @retval EFI_SUCCESS           Thread can be successfully created\r
+  @retval EFI_OUT_OF_RESOURCES  Cannot allocate protocol data structure\r
+  @retval EFI_DEVICE_ERROR      Cannot create the timer service\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InitializeReset (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  ImageHandle - TODO: add argument description\r
-  SystemTable - TODO: add argument description\r
-\r
-Returns:\r
+;\r
 \r
-  TODO: add return values\r
+/**\r
+  Reset the system.\r
 \r
---*/\r
-;\r
+  @param ResetType       warm or cold\r
+  @param ResetStatus     possible cause of reset\r
+  @param DataSize        Size of ResetData in bytes\r
+  @param ResetData       Optional Unicode string\r
 \r
+**/\r
 VOID\r
 EFIAPI\r
 KbcResetSystem (\r
@@ -62,24 +61,6 @@ KbcResetSystem (
   IN UINTN            DataSize,\r
   IN VOID             *ResetData OPTIONAL\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  TODO: Add function description\r
-\r
-Arguments:\r
-\r
-  ResetType   - TODO: add argument description\r
-  ResetStatus - TODO: add argument description\r
-  DataSize    - TODO: add argument description\r
-  ResetData   - TODO: add argument description\r
-\r
-Returns:\r
-\r
-  TODO: add return values\r
-\r
---*/\r
 ;\r
 \r
 #endif\r
index bcef440fcf3ef083583f1d65d3e60522a9ffb7e7..6e9917cbebb21dc62be39645580b7087856af409 100644 (file)
@@ -1,17 +1,15 @@
-/*++\r
+/** @file\r
+  Driver entry for KbcReset driver.\r
 \r
-Copyright (c) 2009, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2009 - 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
                                                                                           \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
-\r
-\r
-\r
---*/\r
+**/\r
 \r
 #include "Reset.h"\r
 \r
@@ -21,33 +19,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 EFI_HANDLE  mResetHandle = NULL;\r
 \r
 \r
+/**\r
+  Initialize the state information for the Reset Architectural Protocol\r
+\r
+  @param ImageHandle     Handle of the loaded driver \r
+  @param SystemTable     Pointer to the System Table\r
+\r
+  @retval EFI_SUCCESS           Thread can be successfully created\r
+  @retval EFI_OUT_OF_RESOURCES  Cannot allocate protocol data structure\r
+  @retval EFI_DEVICE_ERROR      Cannot create the timer service\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InitializeReset (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Initialize the state information for the Reset Architectural Protocol\r
-\r
-Arguments:\r
-\r
-  ImageHandle of the loaded driver\r
-  Pointer to the System Table\r
-\r
-Returns:\r
-\r
-  Status\r
-\r
-  EFI_SUCCESS           - thread can be successfully created\r
-  EFI_OUT_OF_RESOURCES  - cannot allocate protocol data structure\r
-  EFI_DEVICE_ERROR      - cannot create the timer service\r
-\r
---*/\r
-// TODO:    SystemTable - add argument and description to function comment\r
 {\r
   EFI_STATUS  Status;\r
 \r
index 4ef8572b3f41cc23a8e5c740d634919b1104128c..33263e7496b25805d82864a4bbf48eb7959793da 100644 (file)
@@ -5,8 +5,8 @@
 #  This driver provides GetTime, SetTime, GetWakeupTime, SetWakeupTime services to Runtime Service Table.\r
 #  It will install a tagging protocol with gEfiRealTimeClockArchProtocolGuid.\r
 #\r
-#  Copyright (c) 2006 - 2010, Intel Corporation. <BR>\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
index c8790578468bb821f23a6bb457f13b14c31aea7d..c2f04ec8072ea6a4f765ec987b3b9e1222dcedd2 100644 (file)
@@ -1,15 +1,14 @@
 /** @file\r
-  Pci Host Bridge driver: \r
   Provides the basic interfaces to abstract a PCI Host Bridge Resource Allocation\r
 \r
-  Copyright (c) 2008 - 2009, Intel Corporation<BR> All rights\r
-  reserved. This program and the accompanying materials are\r
-  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
-  \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved. <BR>\r
+This program and the accompanying materials are\r
+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
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/ \r
 \r
@@ -79,26 +78,22 @@ PCI_HOST_BRIDGE_INSTANCE mPciHostBridgeInstanceTemplate = {
 //\r
 // Implementation\r
 //\r
+/**\r
+  Entry point of this driver\r
+\r
+  @param ImageHandle     Handle of driver image\r
+  @param SystemTable     Point to EFI_SYSTEM_TABLE\r
+\r
+  @retval EFI_OUT_OF_RESOURCES  Can not allocate memory resource\r
+  @retval EFI_DEVICE_ERROR      Can not install the protocol instance\r
+  @retval EFI_SUCCESS           Success to initialize the Pci host bridge.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 InitializePciHostBridge (\r
   IN EFI_HANDLE        ImageHandle,\r
   IN EFI_SYSTEM_TABLE  *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Entry point of this driver\r
-\r
-Arguments:\r
-\r
-    ImageHandle -\r
-\r
-    SystemTable -\r
-    \r
-Returns:\r
-\r
---*/\r
 {\r
   EFI_STATUS                  Status;\r
   UINTN                       Loop1;\r
@@ -194,24 +189,76 @@ Returns:
 }\r
 \r
 \r
+/**\r
+   These are the notifications from the PCI bus driver that it is about to enter a certain\r
+   phase of the PCI enumeration process.\r
+\r
+   This member function can be used to notify the host bridge driver to perform specific actions,\r
+   including any chipset-specific initialization, so that the chipset is ready to enter the next phase.\r
+   Eight notification points are defined at this time. See belows:\r
+   EfiPciHostBridgeBeginEnumeration       Resets the host bridge PCI apertures and internal data\r
+                                          structures. The PCI enumerator should issue this notification\r
+                                          before starting a fresh enumeration process. Enumeration cannot\r
+                                          be restarted after sending any other notification such as\r
+                                          EfiPciHostBridgeBeginBusAllocation.\r
+   EfiPciHostBridgeBeginBusAllocation     The bus allocation phase is about to begin. No specific action is\r
+                                          required here. This notification can be used to perform any\r
+                                          chipset-specific programming.\r
+   EfiPciHostBridgeEndBusAllocation       The bus allocation and bus programming phase is complete. No\r
+                                          specific action is required here. This notification can be used to\r
+                                          perform any chipset-specific programming.\r
+   EfiPciHostBridgeBeginResourceAllocation\r
+                                          The resource allocation phase is about to begin. No specific\r
+                                          action is required here. This notification can be used to perform\r
+                                          any chipset-specific programming.\r
+   EfiPciHostBridgeAllocateResources      Allocates resources per previously submitted requests for all the PCI\r
+                                          root bridges. These resource settings are returned on the next call to\r
+                                          GetProposedResources(). Before calling NotifyPhase() with a Phase of\r
+                                          EfiPciHostBridgeAllocateResource, the PCI bus enumerator is responsible\r
+                                          for gathering I/O and memory requests for\r
+                                          all the PCI root bridges and submitting these requests using\r
+                                          SubmitResources(). This function pads the resource amount\r
+                                          to suit the root bridge hardware, takes care of dependencies between\r
+                                          the PCI root bridges, and calls the Global Coherency Domain (GCD)\r
+                                          with the allocation request. In the case of padding, the allocated range\r
+                                          could be bigger than what was requested.\r
+   EfiPciHostBridgeSetResources           Programs the host bridge hardware to decode previously allocated\r
+                                          resources (proposed resources) for all the PCI root bridges. After the\r
+                                          hardware is programmed, reassigning resources will not be supported.\r
+                                          The bus settings are not affected.\r
+   EfiPciHostBridgeFreeResources          Deallocates resources that were previously allocated for all the PCI\r
+                                          root bridges and resets the I/O and memory apertures to their initial\r
+                                          state. The bus settings are not affected. If the request to allocate\r
+                                          resources fails, the PCI enumerator can use this notification to\r
+                                          deallocate previous resources, adjust the requests, and retry\r
+                                          allocation.\r
+   EfiPciHostBridgeEndResourceAllocation  The resource allocation phase is completed. No specific action is\r
+                                          required here. This notification can be used to perform any chipsetspecific\r
+                                          programming.\r
+\r
+   @param[in] PciResAlloc         The instance pointer of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
+   @param[in] Phase               The phase during enumeration\r
+\r
+   @retval EFI_NOT_READY          This phase cannot be entered at this time. For example, this error\r
+                                  is valid for a Phase of EfiPciHostBridgeAllocateResources if\r
+                                  SubmitResources() has not been called for one or more\r
+                                  PCI root bridges before this call\r
+   @retval EFI_DEVICE_ERROR       Programming failed due to a hardware error. This error is valid\r
+                                  for a Phase of EfiPciHostBridgeSetResources.\r
+   @retval EFI_INVALID_PARAMETER  Invalid phase parameter\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+                                  This error is valid for a Phase of EfiPciHostBridgeAllocateResources if the\r
+                                  previously submitted resource requests cannot be fulfilled or\r
+                                  were only partially fulfilled.\r
+   @retval EFI_SUCCESS            The notification was accepted without any errors.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 NotifyPhase(\r
   IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *This,\r
   IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE    Phase\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Enter a certain phase of the PCI enumeration process\r
-\r
-Arguments:\r
-  This  -- The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL instance\r
-  Phase -- The phase during enumeration\r
-    \r
-Returns:\r
-\r
---*/  \r
 {\r
   PCI_HOST_BRIDGE_INSTANCE              *HostBridgeInstance;\r
   PCI_ROOT_BRIDGE_INSTANCE              *RootBridgeInstance;\r
@@ -460,28 +507,34 @@ Returns:
   return EFI_SUCCESS;  \r
 }\r
 \r
+/**\r
+   Return the device handle of the next PCI root bridge that is associated with this Host Bridge.\r
+\r
+   This function is called multiple times to retrieve the device handles of all the PCI root bridges that\r
+   are associated with this PCI host bridge. Each PCI host bridge is associated with one or more PCI\r
+   root bridges. On each call, the handle that was returned by the previous call is passed into the\r
+   interface, and on output the interface returns the device handle of the next PCI root bridge. The\r
+   caller can use the handle to obtain the instance of the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
+   for that root bridge. When there are no more PCI root bridges to report, the interface returns\r
+   EFI_NOT_FOUND. A PCI enumerator must enumerate the PCI root bridges in the order that they\r
+   are returned by this function.\r
+   For D945 implementation, there is only one root bridge in PCI host bridge.\r
+\r
+   @param[in]       This              The instance pointer of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
+   @param[in][out]  RootBridgeHandle  Returns the device handle of the next PCI root bridge.\r
+   \r
+   @retval EFI_SUCCESS            If parameter RootBridgeHandle = NULL, then return the first Rootbridge handle of the\r
+                                  specific Host bridge and return EFI_SUCCESS. \r
+   @retval EFI_NOT_FOUND          Can not find the any more root bridge in specific host bridge.\r
+   @retval EFI_INVALID_PARAMETER  RootBridgeHandle is not an EFI_HANDLE that was\r
+                                  returned on a previous call to GetNextRootBridge().\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GetNextRootBridge(\r
   IN       EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL *This,\r
   IN OUT   EFI_HANDLE                                       *RootBridgeHandle\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Return the device handle of the next PCI root bridge that is associated with \r
-  this Host Bridge\r
-\r
-Arguments:\r
-  This -- The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance\r
-  RootBridgeHandle -- Returns the device handle of the next PCI Root Bridge. \r
-                      On input, it holds the RootBridgeHandle returned by the most \r
-                      recent call to GetNextRootBridge().The handle for the first \r
-                      PCI Root Bridge is returned if RootBridgeHandle is NULL on input\r
-    \r
-Returns:\r
-\r
---*/  \r
 {\r
   BOOLEAN                               NoRootBridge; \r
   LIST_ENTRY                            *List; \r
@@ -528,6 +581,44 @@ Returns:
   }\r
 }\r
 \r
+/**\r
+   Returns the allocation attributes of a PCI root bridge.\r
+\r
+   The function returns the allocation attributes of a specific PCI root bridge. The attributes can vary\r
+   from one PCI root bridge to another. These attributes are different from the decode-related\r
+   attributes that are returned by the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.GetAttributes() member function. The\r
+   RootBridgeHandle parameter is used to specify the instance of the PCI root bridge. The device\r
+   handles of all the root bridges that are associated with this host bridge must be obtained by calling\r
+   GetNextRootBridge(). The attributes are static in the sense that they do not change during or\r
+   after the enumeration process. The hardware may provide mechanisms to change the attributes on\r
+   the fly, but such changes must be completed before EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL is \r
+   installed. The permitted values of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ATTRIBUTES are defined in\r
+   "Related Definitions" below. The caller uses these attributes to combine multiple resource requests.\r
+   For example, if the flag EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM is set, the PCI bus enumerator needs to \r
+   include requests for the prefetchable memory in the nonprefetchable memory pool and not request any \r
+   prefetchable memory.\r
+      Attribute                                 Description\r
+   ------------------------------------         ----------------------------------------------------------------------\r
+   EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM         If this bit is set, then the PCI root bridge does not support separate\r
+                                                windows for nonprefetchable and prefetchable memory. A PCI bus\r
+                                                driver needs to include requests for prefetchable memory in the\r
+                                                nonprefetchable memory pool.\r
+\r
+   EFI_PCI_HOST_BRIDGE_MEM64_DECODE             If this bit is set, then the PCI root bridge supports 64-bit memory\r
+                                                windows. If this bit is not set, the PCI bus driver needs to include\r
+                                                requests for a 64-bit memory address in the corresponding 32-bit\r
+                                                memory pool.\r
+\r
+   @param[in]   This               The instance pointer of EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL\r
+   @param[in]   RootBridgeHandle   The device handle of the PCI root bridge in which the caller is interested. Type\r
+                                   EFI_HANDLE is defined in InstallProtocolInterface() in the UEFI 2.0 Specification.\r
+   @param[out]  Attributes         The pointer to attribte of root bridge, it is output parameter\r
+   \r
+   @retval EFI_INVALID_PARAMETER   Attribute pointer is NULL\r
+   @retval EFI_INVALID_PARAMETER   RootBridgehandle is invalid.\r
+   @retval EFI_SUCCESS             Success to get attribute of interested root bridge.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GetAttributes(\r
@@ -535,20 +626,6 @@ GetAttributes(
   IN  EFI_HANDLE                                       RootBridgeHandle,\r
   OUT UINT64                                           *Attributes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Returns the attributes of a PCI Root Bridge.\r
-\r
-Arguments:\r
-  This -- The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance\r
-  RootBridgeHandle -- The device handle of the PCI Root Bridge \r
-                      that the caller is interested in\r
-  Attribute -- The pointer to attributes of the PCI Root Bridge                    \r
-    \r
-Returns:\r
-\r
---*/    \r
 {\r
   LIST_ENTRY                            *List; \r
   PCI_HOST_BRIDGE_INSTANCE              *HostBridgeInstance;\r
@@ -577,6 +654,21 @@ Returns:
   return EFI_INVALID_PARAMETER;\r
 }\r
 \r
+/**\r
+   Sets up the specified PCI root bridge for the bus enumeration process.\r
+\r
+   This member function sets up the root bridge for bus enumeration and returns the PCI bus range\r
+   over which the search should be performed in ACPI 2.0 resource descriptor format.\r
+\r
+   @param[in]   This              The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance.\r
+   @param[in]   RootBridgeHandle  The PCI Root Bridge to be set up.\r
+   @param[out]  Configuration     Pointer to the pointer to the PCI bus resource descriptor.\r
+   \r
+   @retval EFI_INVALID_PARAMETER Invalid Root bridge's handle\r
+   @retval EFI_OUT_OF_RESOURCES  Fail to allocate ACPI resource descriptor tag.\r
+   @retval EFI_SUCCESS           Sucess to allocate ACPI resource descriptor.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 StartBusEnumeration(\r
@@ -584,20 +676,6 @@ StartBusEnumeration(
   IN  EFI_HANDLE                                       RootBridgeHandle,\r
   OUT VOID                                             **Configuration\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  This is the request from the PCI enumerator to set up \r
-  the specified PCI Root Bridge for bus enumeration process. \r
-\r
-Arguments:\r
-  This -- The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance\r
-  RootBridgeHandle -- The PCI Root Bridge to be set up\r
-  Configuration -- Pointer to the pointer to the PCI bus resource descriptor\r
-    \r
-Returns:\r
-\r
---*/\r
 {\r
   LIST_ENTRY                            *List; \r
   PCI_HOST_BRIDGE_INSTANCE              *HostBridgeInstance;\r
@@ -653,6 +731,30 @@ Returns:
   return EFI_INVALID_PARAMETER;\r
 }\r
 \r
+/**\r
+   Programs the PCI root bridge hardware so that it decodes the specified PCI bus range.\r
+\r
+   This member function programs the specified PCI root bridge to decode the bus range that is\r
+   specified by the input parameter Configuration.\r
+   The bus range information is specified in terms of the ACPI 2.0 resource descriptor format.\r
+\r
+   @param[in] This              The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance\r
+   @param[in] RootBridgeHandle  The PCI Root Bridge whose bus range is to be programmed\r
+   @param[in] Configuration     The pointer to the PCI bus resource descriptor\r
+   \r
+   @retval EFI_INVALID_PARAMETER  RootBridgeHandle is not a valid root bridge handle.\r
+   @retval EFI_INVALID_PARAMETER  Configuration is NULL.\r
+   @retval EFI_INVALID_PARAMETER  Configuration does not point to a valid ACPI 2.0 resource descriptor.\r
+   @retval EFI_INVALID_PARAMETER  Configuration does not include a valid ACPI 2.0 bus resource descriptor.\r
+   @retval EFI_INVALID_PARAMETER  Configuration includes valid ACPI 2.0 resource descriptors other than \r
+                                  bus descriptors.\r
+   @retval EFI_INVALID_PARAMETER  Configuration contains one or more invalid ACPI resource descriptors.\r
+   @retval EFI_INVALID_PARAMETER  "Address Range Minimum" is invalid for this root bridge.\r
+   @retval EFI_INVALID_PARAMETER  "Address Range Length" is invalid for this root bridge.\r
+   @retval EFI_DEVICE_ERROR       Programming failed due to a hardware error.\r
+   @retval EFI_SUCCESS            The bus range for the PCI root bridge was programmed.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 SetBusNumbers(\r
@@ -660,20 +762,6 @@ SetBusNumbers(
   IN EFI_HANDLE                                       RootBridgeHandle,\r
   IN VOID                                             *Configuration\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  This function programs the PCI Root Bridge hardware so that \r
-  it decodes the specified PCI bus range\r
-\r
-Arguments:\r
-  This -- The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance\r
-  RootBridgeHandle -- The PCI Root Bridge whose bus range is to be programmed\r
-  Configuration -- The pointer to the PCI bus resource descriptor\r
-    \r
-Returns:\r
-\r
---*/    \r
 {\r
   LIST_ENTRY                            *List; \r
   PCI_HOST_BRIDGE_INSTANCE              *HostBridgeInstance;\r
@@ -746,6 +834,31 @@ Returns:
 }\r
 \r
 \r
+/**\r
+   Submits the I/O and memory resource requirements for the specified PCI root bridge.\r
+\r
+   This function is used to submit all the I/O and memory resources that are required by the specified\r
+   PCI root bridge. The input parameter Configuration is used to specify the following:\r
+   - The various types of resources that are required\r
+   - The associated lengths in terms of ACPI 2.0 resource descriptor format\r
+\r
+   @param[in] This              Pointer to the EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL instance.\r
+   @param[in] RootBridgeHandle  The PCI root bridge whose I/O and memory resource requirements are being submitted.\r
+   @param[in] Configuration     The pointer to the PCI I/O and PCI memory resource descriptor.\r
+   \r
+   @retval EFI_SUCCESS            The I/O and memory resource requests for a PCI root bridge were accepted.\r
+   @retval EFI_INVALID_PARAMETER  RootBridgeHandle is not a valid root bridge handle.\r
+   @retval EFI_INVALID_PARAMETER  Configuration is NULL.\r
+   @retval EFI_INVALID_PARAMETER  Configuration does not point to a valid ACPI 2.0 resource descriptor.\r
+   @retval EFI_INVALID_PARAMETER  Configuration includes requests for one or more resource types that are \r
+                                  not supported by this PCI root bridge. This error will happen if the caller \r
+                                  did not combine resources according to Attributes that were returned by\r
+                                  GetAllocAttributes().\r
+   @retval EFI_INVALID_PARAMETER  Address Range Maximum" is invalid.\r
+   @retval EFI_INVALID_PARAMETER  "Address Range Length" is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  "Address Space Granularity" is invalid for this PCI root bridge.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 SubmitResources(\r
@@ -753,19 +866,6 @@ SubmitResources(
   IN EFI_HANDLE                                       RootBridgeHandle,\r
   IN VOID                                             *Configuration\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Submits the I/O and memory resource requirements for the specified PCI Root Bridge\r
-  \r
-Arguments:\r
-  This -- The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance\r
-  RootBridgeHandle -- The PCI Root Bridge whose I/O and memory resource requirements \r
-                      are being submitted\r
-  Configuration -- The pointer to the PCI I/O and PCI memory resource descriptor                    \r
-Returns:\r
-\r
---*/    \r
 {\r
   LIST_ENTRY                            *List; \r
   PCI_HOST_BRIDGE_INSTANCE              *HostBridgeInstance;\r
@@ -883,6 +983,26 @@ Returns:
   return EFI_INVALID_PARAMETER;\r
 }\r
 \r
+/**\r
+   Returns the proposed resource settings for the specified PCI root bridge.\r
+\r
+   This member function returns the proposed resource settings for the specified PCI root bridge. The\r
+   proposed resource settings are prepared when NotifyPhase() is called with a Phase of\r
+   EfiPciHostBridgeAllocateResources. The output parameter Configuration\r
+   specifies the following:\r
+   - The various types of resources, excluding bus resources, that are allocated\r
+   - The associated lengths in terms of ACPI 2.0 resource descriptor format\r
+\r
+   @param[in]  This              Pointer to the EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL instance.\r
+   @param[in]  RootBridgeHandle  The PCI root bridge handle. Type EFI_HANDLE is defined in InstallProtocolInterface() in the UEFI 2.0 Specification.\r
+   @param[out] Configuration     The pointer to the pointer to the PCI I/O and memory resource descriptor.\r
+   \r
+   @retval EFI_SUCCESS            The requested parameters were returned.\r
+   @retval EFI_INVALID_PARAMETER  RootBridgeHandle is not a valid root bridge handle.\r
+   @retval EFI_DEVICE_ERROR       Programming failed due to a hardware error.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 GetProposedResources(\r
@@ -890,21 +1010,6 @@ GetProposedResources(
   IN  EFI_HANDLE                                       RootBridgeHandle,\r
   OUT VOID                                             **Configuration\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  This function returns the proposed resource settings for the specified \r
-  PCI Root Bridge\r
-\r
-Arguments:\r
-  This -- The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance\r
-  RootBridgeHandle -- The PCI Root Bridge handle\r
-  Configuration -- The pointer to the pointer to the PCI I/O \r
-                   and memory resource descriptor\r
-    \r
-Returns:\r
-\r
---*/    \r
 {\r
   LIST_ENTRY                            *List; \r
   PCI_HOST_BRIDGE_INSTANCE              *HostBridgeInstance;\r
@@ -1053,6 +1158,12 @@ Returns:
   return EFI_INVALID_PARAMETER;\r
 }\r
 \r
+/**\r
+  Update attribute for PCI root bridge for specifc device.\r
+\r
+  @param RootBridge      Point to PCI root bridge.\r
+  @param PciAddress      The specific device PCI address\r
+**/\r
 STATIC\r
 VOID\r
 UpdateRootBridgeAttributes (\r
@@ -1151,6 +1262,33 @@ UpdateRootBridgeAttributes (
   RootBridge->Supports = Attributes;\r
 }\r
 \r
+/**\r
+   Provides the hooks from the PCI bus driver to every PCI controller (device/function) at various\r
+   stages of the PCI enumeration process that allow the host bridge driver to preinitialize individual\r
+   PCI controllers before enumeration.\r
+\r
+   This function is called during the PCI enumeration process. No specific action is expected from this\r
+   member function. It allows the host bridge driver to preinitialize individual PCI controllers before\r
+   enumeration.\r
+\r
+   @param This              Pointer to the EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL instance.\r
+   @param RootBridgeHandle  The associated PCI root bridge handle. Type EFI_HANDLE is defined in\r
+                            InstallProtocolInterface() in the UEFI 2.0 Specification.\r
+   @param PciAddress        The address of the PCI device on the PCI bus. This address can be passed to the\r
+                            EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL member functions to access the PCI\r
+                            configuration space of the device. See Table 12-1 in the UEFI 2.0 Specification for\r
+                            the definition of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS.\r
+   @param Phase             The phase of the PCI device enumeration. \r
+   \r
+   @retval EFI_SUCCESS              The requested parameters were returned.\r
+   @retval EFI_INVALID_PARAMETER    RootBridgeHandle is not a valid root bridge handle.\r
+   @retval EFI_INVALID_PARAMETER    Phase is not a valid phase that is defined in\r
+                                    EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE.\r
+   @retval EFI_DEVICE_ERROR         Programming failed due to a hardware error. The PCI enumerator should\r
+                                    not enumerate this device, including its child devices if it is a PCI-to-PCI\r
+                                    bridge.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 PreprocessController (\r
@@ -1159,21 +1297,6 @@ PreprocessController (
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_PCI_ADDRESS               PciAddress,\r
   IN  EFI_PCI_CONTROLLER_RESOURCE_ALLOCATION_PHASE              Phase\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  This function is called for all the PCI controllers that the PCI \r
-  bus driver finds. Can be used to Preprogram the controller.\r
-\r
-Arguments:\r
-  This -- The EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_ PROTOCOL instance\r
-  RootBridgeHandle -- The PCI Root Bridge handle\r
-  PciBusAddress -- Address of the controller on the PCI bus\r
-  Phase         -- The Phase during resource allocation\r
-    \r
-Returns:\r
-  EFI_SUCCESS\r
---*/    \r
 {\r
   PCI_HOST_BRIDGE_INSTANCE              *HostBridgeInstance;\r
   PCI_ROOT_BRIDGE_INSTANCE              *RootBridgeInstance;\r
index 2cd931448161c926a0dcb8cbe430afa28bbd8ff2..ea373b3c7318b1588ac8969e059ec21b32d7e45a 100644 (file)
@@ -2,8 +2,8 @@
 #\r
 #    Component description file a sinngle segment PCI Host Bridge driver.\r
 #\r
-#  Copyright (c) 2008 - 2010, Intel Corporation. <BR>\r
-#  All rights reserved. This program and the accompanying materials\r
+#  Copyright (c) 2008 - 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
index 36f83f62e00c926f7d916d7e06ee6ed5cd0944ba..9230434185048aeaa356068132ca69cdad1e7a15 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   PCI Root Bridge Io Protocol implementation\r
 \r
-  Copyright (c) 2008 - 2009, Intel Corporation<BR> All rights\r
-  reserved. This program and the accompanying materials are\r
-  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
-  \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved. <BR> \r
+This program and the accompanying materials are\r
+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
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/ \r
 \r
@@ -33,6 +33,35 @@ RESOURCE_CONFIGURATION Configuration = {
 // Protocol Member Function Prototypes\r
 //\r
 \r
+/**\r
+   Polls an address in memory mapped I/O space until an exit condition is met, or \r
+   a timeout occurs. \r
+\r
+   This function provides a standard way to poll a PCI memory location. A PCI memory read\r
+   operation is performed at the PCI memory address specified by Address for the width specified\r
+   by Width. The result of this PCI memory read operation is stored in Result. This PCI memory\r
+   read operation is repeated until either a timeout of Delay 100 ns units has expired, or (Result &\r
+   Mask) is equal to Value.\r
+\r
+   @param[in]   This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width     Signifies the width of the memory operations.\r
+   @param[in]   Address   The base address of the memory operations. The caller is\r
+                          responsible for aligning Address if required.\r
+   @param[in]   Mask      Mask used for the polling criteria. Bytes above Width in Mask\r
+                          are ignored. The bits in the bytes below Width which are zero in\r
+                          Mask are ignored when polling the memory address.\r
+   @param[in]   Value     The comparison value used for the polling exit criteria.\r
+   @param[in]   Delay     The number of 100 ns units to poll. Note that timer available may\r
+                          be of poorer granularity.\r
+   @param[out]  Result    Pointer to the last value read from the memory location.\r
+   \r
+   @retval EFI_SUCCESS            The last data returned from the access matched the poll exit criteria.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid.\r
+   @retval EFI_INVALID_PARAMETER  Result is NULL.\r
+   @retval EFI_TIMEOUT            Delay expired before a match occurred.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoPollMem ( \r
@@ -45,6 +74,35 @@ RootBridgeIoPollMem (
   OUT UINT64                                 *Result\r
   );\r
   \r
+/**\r
+   Reads from the I/O space of a PCI Root Bridge. Returns when either the polling exit criteria is\r
+   satisfied or after a defined duration.\r
+\r
+   This function provides a standard way to poll a PCI I/O location. A PCI I/O read operation is\r
+   performed at the PCI I/O address specified by Address for the width specified by Width.\r
+   The result of this PCI I/O read operation is stored in Result. This PCI I/O read operation is\r
+   repeated until either a timeout of Delay 100 ns units has expired, or (Result & Mask) is equal\r
+   to Value.\r
+\r
+   @param[in] This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in] Width     Signifies the width of the I/O operations.\r
+   @param[in] Address   The base address of the I/O operations. The caller is responsible\r
+                        for aligning Address if required.\r
+   @param[in] Mask      Mask used for the polling criteria. Bytes above Width in Mask\r
+                        are ignored. The bits in the bytes below Width which are zero in\r
+                        Mask are ignored when polling the I/O address.\r
+   @param[in] Value     The comparison value used for the polling exit criteria.\r
+   @param[in] Delay     The number of 100 ns units to poll. Note that timer available may\r
+                        be of poorer granularity.\r
+   @param[out] Result   Pointer to the last value read from the memory location.\r
+   \r
+   @retval EFI_SUCCESS            The last data returned from the access matched the poll exit criteria.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid.\r
+   @retval EFI_INVALID_PARAMETER  Result is NULL.\r
+   @retval EFI_TIMEOUT            Delay expired before a match occurred.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoPollIo ( \r
@@ -57,6 +115,29 @@ RootBridgeIoPollIo (
   OUT UINT64                                 *Result\r
   );\r
   \r
+/**\r
+   Enables a PCI driver to access PCI controller registers in the PCI root bridge memory space.\r
+\r
+   The Mem.Read(), and Mem.Write() functions enable a driver to access PCI controller\r
+   registers in the PCI root bridge memory space.\r
+   The memory operations are carried out exactly as requested. The caller is responsible for satisfying\r
+   any alignment and memory width restrictions that a PCI Root Bridge on a platform might require.\r
+\r
+   @param[in]   This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width     Signifies the width of the memory operation.\r
+   @param[in]   Address   The base address of the memory operation. The caller is\r
+                          responsible for aligning the Address if required.\r
+   @param[in]   Count     The number of memory operations to perform. Bytes moved is\r
+                          Width size * Count, starting at Address.\r
+   @param[out]  Buffer    For read operations, the destination buffer to store the results. For\r
+                          write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS            The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoMemRead (\r
@@ -67,6 +148,28 @@ RootBridgeIoMemRead (
   IN OUT VOID                                   *Buffer\r
   );\r
 \r
+/**\r
+   Enables a PCI driver to access PCI controller registers in the PCI root bridge memory space.\r
+\r
+   The Mem.Read(), and Mem.Write() functions enable a driver to access PCI controller\r
+   registers in the PCI root bridge memory space.\r
+   The memory operations are carried out exactly as requested. The caller is responsible for satisfying\r
+   any alignment and memory width restrictions that a PCI Root Bridge on a platform might require.\r
+\r
+   @param[in]   This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width     Signifies the width of the memory operation.\r
+   @param[in]   Address   The base address of the memory operation. The caller is\r
+                          responsible for aligning the Address if required.\r
+   @param[in]   Count     The number of memory operations to perform. Bytes moved is\r
+                          Width size * Count, starting at Address.\r
+   @param[out]  Buffer    For read operations, the destination buffer to store the results. For\r
+                          write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS            The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoMemWrite (\r
@@ -77,6 +180,24 @@ RootBridgeIoMemWrite (
   IN OUT VOID                                   *Buffer\r
   );\r
 \r
+/**\r
+   Enables a PCI driver to access PCI controller registers in the PCI root bridge I/O space.\r
+\r
+   @param[in]   This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width       Signifies the width of the memory operations.\r
+   @param[in]   Address     The base address of the I/O operation. The caller is responsible for\r
+                            aligning the Address if required.\r
+   @param[in]   Count       The number of I/O operations to perform. Bytes moved is Width\r
+                            size * Count, starting at Address.\r
+   @param[out]  Buffer      For read operations, the destination buffer to store the results. For\r
+                            write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS              The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER    Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER    Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES     The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoIoRead (\r
@@ -87,6 +208,24 @@ RootBridgeIoIoRead (
   IN OUT VOID                                   *UserBuffer\r
   );\r
 \r
+/**\r
+   Enables a PCI driver to access PCI controller registers in the PCI root bridge I/O space.\r
+\r
+   @param[in]   This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width       Signifies the width of the memory operations.\r
+   @param[in]   Address     The base address of the I/O operation. The caller is responsible for\r
+                            aligning the Address if required.\r
+   @param[in]   Count       The number of I/O operations to perform. Bytes moved is Width\r
+                            size * Count, starting at Address.\r
+   @param[out]  Buffer      For read operations, the destination buffer to store the results. For\r
+                            write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS              The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER    Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER    Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES     The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoIoWrite (\r
@@ -97,6 +236,30 @@ RootBridgeIoIoWrite (
   IN OUT VOID                                   *UserBuffer\r
   );\r
 \r
+/**\r
+   Enables a PCI driver to copy one region of PCI root bridge memory space to another region of PCI\r
+   root bridge memory space.\r
+\r
+   The CopyMem() function enables a PCI driver to copy one region of PCI root bridge memory\r
+   space to another region of PCI root bridge memory space. This is especially useful for video scroll\r
+   operation on a memory mapped video buffer.\r
+   The memory operations are carried out exactly as requested. The caller is responsible for satisfying\r
+   any alignment and memory width restrictions that a PCI root bridge on a platform might require.\r
+\r
+   @param[in] This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
+   @param[in] Width       Signifies the width of the memory operations.\r
+   @param[in] DestAddress The destination address of the memory operation. The caller is\r
+                          responsible for aligning the DestAddress if required.\r
+   @param[in] SrcAddress  The source address of the memory operation. The caller is\r
+                          responsible for aligning the SrcAddress if required.\r
+   @param[in] Count       The number of memory operations to perform. Bytes moved is\r
+                          Width size * Count, starting at DestAddress and SrcAddress.\r
+   \r
+   @retval  EFI_SUCCESS             The data was copied from one memory region to another memory region.\r
+   @retval  EFI_INVALID_PARAMETER   Width is invalid for this PCI root bridge.\r
+   @retval  EFI_OUT_OF_RESOURCES    The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoCopyMem (\r
@@ -107,6 +270,29 @@ RootBridgeIoCopyMem (
   IN     UINTN                                  Count\r
   );\r
 \r
+/**\r
+   Enables a PCI driver to access PCI controller registers in a PCI root bridge's configuration space.\r
+\r
+   The Pci.Read() and Pci.Write() functions enable a driver to access PCI configuration\r
+   registers for a PCI controller.\r
+   The PCI Configuration operations are carried out exactly as requested. The caller is responsible for\r
+   any alignment and PCI configuration width issues that a PCI Root Bridge on a platform might\r
+   require.\r
+\r
+   @param[in]   This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width     Signifies the width of the memory operations.\r
+   @param[in]   Address   The address within the PCI configuration space for the PCI controller.\r
+   @param[in]   Count     The number of PCI configuration operations to perform. Bytes\r
+                          moved is Width size * Count, starting at Address.\r
+   @param[out]  Buffer    For read operations, the destination buffer to store the results. For\r
+                          write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS            The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoPciRead (\r
@@ -117,6 +303,29 @@ RootBridgeIoPciRead (
   IN OUT VOID                                   *Buffer\r
   );\r
 \r
+/**\r
+   Enables a PCI driver to access PCI controller registers in a PCI root bridge's configuration space.\r
+\r
+   The Pci.Read() and Pci.Write() functions enable a driver to access PCI configuration\r
+   registers for a PCI controller.\r
+   The PCI Configuration operations are carried out exactly as requested. The caller is responsible for\r
+   any alignment and PCI configuration width issues that a PCI Root Bridge on a platform might\r
+   require.\r
+\r
+   @param[in]   This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width     Signifies the width of the memory operations.\r
+   @param[in]   Address   The address within the PCI configuration space for the PCI controller.\r
+   @param[in]   Count     The number of PCI configuration operations to perform. Bytes\r
+                          moved is Width size * Count, starting at Address.\r
+   @param[out]  Buffer    For read operations, the destination buffer to store the results. For\r
+                          write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS            The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoPciWrite (\r
@@ -127,6 +336,32 @@ RootBridgeIoPciWrite (
   IN OUT VOID                                   *Buffer\r
   );\r
 \r
+/**\r
+   Provides the PCI controller-specific addresses required to access system memory from a\r
+   DMA bus master.\r
+\r
+   The Map() function provides the PCI controller specific addresses needed to access system\r
+   memory. This function is used to map system memory for PCI bus master DMA accesses.\r
+\r
+   @param[in]       This            A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]       Operation       Indicates if the bus master is going to read or write to system memory.\r
+   @param[in]       HostAddress     The system memory address to map to the PCI controller.\r
+   @param[in][out]  NumberOfBytes   On input the number of bytes to map. On output the number of bytes that were mapped.\r
+   @param[out]      DeviceAddress   The resulting map address for the bus master PCI controller to use\r
+                                    to access the system memory's HostAddress.\r
+   @param[out]      Mapping         The value to pass to Unmap() when the bus master DMA operation is complete.\r
+   \r
+   @retval EFI_SUCCESS            The range was mapped for the returned NumberOfBytes.\r
+   @retval EFI_INVALID_PARAMETER  Operation is invalid.\r
+   @retval EFI_INVALID_PARAMETER  HostAddress is NULL.\r
+   @retval EFI_INVALID_PARAMETER  NumberOfBytes is NULL.\r
+   @retval EFI_INVALID_PARAMETER  DeviceAddress is NULL.\r
+   @retval EFI_INVALID_PARAMETER  Mapping is NULL.\r
+   @retval EFI_UNSUPPORTED        The HostAddress cannot be mapped as a common buffer.\r
+   @retval EFI_DEVICE_ERROR       The system hardware could not map the requested address.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoMap (\r
@@ -138,6 +373,22 @@ RootBridgeIoMap (
   OUT    VOID                                       **Mapping\r
   );\r
 \r
+/**\r
+   Completes the Map() operation and releases any corresponding resources.\r
+\r
+   The Unmap() function completes the Map() operation and releases any corresponding resources.\r
+   If the operation was an EfiPciOperationBusMasterWrite or\r
+   EfiPciOperationBusMasterWrite64, the data is committed to the target system memory.\r
+   Any resources used for the mapping are freed.  \r
+\r
+   @param[in] This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in] Mapping   The mapping value returned from Map().\r
+   \r
+   @retval EFI_SUCCESS            The range was unmapped.\r
+   @retval EFI_INVALID_PARAMETER  Mapping is not a value that was returned by Map().\r
+   @retval EFI_DEVICE_ERROR       The data was not committed to the target system memory.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoUnmap (\r
@@ -145,6 +396,27 @@ RootBridgeIoUnmap (
   IN  VOID                             *Mapping\r
   );\r
 \r
+/**\r
+   Allocates pages that are suitable for an EfiPciOperationBusMasterCommonBuffer or\r
+   EfiPciOperationBusMasterCommonBuffer64 mapping.\r
+  \r
+   @param This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param Type        This parameter is not used and must be ignored.\r
+   @param MemoryType  The type of memory to allocate, EfiBootServicesData or EfiRuntimeServicesData.\r
+   @param Pages       The number of pages to allocate.\r
+   @param HostAddress A pointer to store the base system memory address of the allocated range.\r
+   @param Attributes  The requested bit mask of attributes for the allocated range. Only\r
+                      the attributes EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE, EFI_PCI_ATTRIBUTE_MEMORY_CACHED, \r
+                      and EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE may be used with this function.\r
+   \r
+   @retval EFI_SUCCESS            The requested memory pages were allocated.\r
+   @retval EFI_INVALID_PARAMETER  MemoryType is invalid.\r
+   @retval EFI_INVALID_PARAMETER  HostAddress is NULL.\r
+   @retval EFI_UNSUPPORTED        Attributes is unsupported. The only legal attribute bits are\r
+                                  MEMORY_WRITE_COMBINE, MEMORY_CACHED, and DUAL_ADDRESS_CYCLE.\r
+   @retval EFI_OUT_OF_RESOURCES   The memory pages could not be allocated.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoAllocateBuffer (\r
@@ -156,6 +428,20 @@ RootBridgeIoAllocateBuffer (
   IN  UINT64                           Attributes\r
   );\r
 \r
+/**\r
+   Frees memory that was allocated with AllocateBuffer().\r
+\r
+   The FreeBuffer() function frees memory that was allocated with AllocateBuffer().\r
+\r
+   @param This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param Pages       The number of pages to free.\r
+   @param HostAddress The base system memory address of the allocated range.\r
+   \r
+   @retval EFI_SUCCESS            The requested memory pages were freed.\r
+   @retval EFI_INVALID_PARAMETER  The memory range specified by HostAddress and Pages\r
+                                  was not allocated with AllocateBuffer().\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoFreeBuffer (\r
@@ -164,12 +450,51 @@ RootBridgeIoFreeBuffer (
   OUT VOID                             *HostAddress\r
   );\r
 \r
+/**\r
+   Flushes all PCI posted write transactions from a PCI host bridge to system memory.\r
+\r
+   The Flush() function flushes any PCI posted write transactions from a PCI host bridge to system\r
+   memory. Posted write transactions are generated by PCI bus masters when they perform write\r
+   transactions to target addresses in system memory.\r
+   This function does not flush posted write transactions from any PCI bridges. A PCI controller\r
+   specific action must be taken to guarantee that the posted write transactions have been flushed from\r
+   the PCI controller and from all the PCI bridges into the PCI host bridge. This is typically done with\r
+   a PCI read transaction from the PCI controller prior to calling Flush().\r
+\r
+   @param This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   \r
+   @retval EFI_SUCCESS        The PCI posted write transactions were flushed from the PCI host\r
+                              bridge to system memory.\r
+   @retval EFI_DEVICE_ERROR   The PCI posted write transactions were not flushed from the PCI\r
+                              host bridge due to a hardware error.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoFlush (\r
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL  *This\r
   );\r
 \r
+/**\r
+   Gets the attributes that a PCI root bridge supports setting with SetAttributes(), and the\r
+   attributes that a PCI root bridge is currently using.  \r
+\r
+   The GetAttributes() function returns the mask of attributes that this PCI root bridge supports\r
+   and the mask of attributes that the PCI root bridge is currently using.\r
+\r
+   @param This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param Supported   A pointer to the mask of attributes that this PCI root bridge\r
+                      supports setting with SetAttributes().\r
+   @param Attributes  A pointer to the mask of attributes that this PCI root bridge is\r
+                      currently using.\r
+   \r
+   @retval  EFI_SUCCESS           If Supports is not NULL, then the attributes that the PCI root\r
+                                  bridge supports is returned in Supports. If Attributes is\r
+                                  not NULL, then the attributes that the PCI root bridge is currently\r
+                                  using is returned in Attributes.\r
+   @retval  EFI_INVALID_PARAMETER Both Supports and Attributes are NULL.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoGetAttributes (\r
@@ -178,6 +503,36 @@ RootBridgeIoGetAttributes (
   OUT UINT64                           *Attributes\r
   );\r
 \r
+/**\r
+   Sets attributes for a resource range on a PCI root bridge.\r
+\r
+   The SetAttributes() function sets the attributes specified in Attributes for the PCI root\r
+   bridge on the resource range specified by ResourceBase and ResourceLength. Since the\r
+   granularity of setting these attributes may vary from resource type to resource type, and from\r
+   platform to platform, the actual resource range and the one passed in by the caller may differ. As a\r
+   result, this function may set the attributes specified by Attributes on a larger resource range\r
+   than the caller requested. The actual range is returned in ResourceBase and\r
+   ResourceLength. The caller is responsible for verifying that the actual range for which the\r
+   attributes were set is acceptable.\r
+\r
+   @param[in]       This            A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]       Attributes      The mask of attributes to set. If the attribute bit\r
+                                    MEMORY_WRITE_COMBINE, MEMORY_CACHED, or\r
+                                    MEMORY_DISABLE is set, then the resource range is specified by\r
+                                    ResourceBase and ResourceLength. If\r
+                                    MEMORY_WRITE_COMBINE, MEMORY_CACHED, and\r
+                                    MEMORY_DISABLE are not set, then ResourceBase and\r
+                                    ResourceLength are ignored, and may be NULL.\r
+   @param[in][out]  ResourceBase    A pointer to the base address of the resource range to be modified\r
+                                    by the attributes specified by Attributes.\r
+   @param[in][out]  ResourceLength  A pointer to the length of the resource range to be modified by the\r
+                                    attributes specified by Attributes.\r
+   \r
+   @retval  EFI_SUCCESS     The current configuration of this PCI root bridge was returned in Resources.\r
+   @retval  EFI_UNSUPPORTED The current configuration of this PCI root bridge could not be retrieved.\r
+   @retval  EFI_INVALID_PARAMETER Invalid pointer of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoSetAttributes (\r
@@ -187,6 +542,29 @@ RootBridgeIoSetAttributes (
   IN OUT UINT64                           *ResourceLength \r
   ); \r
 \r
+/**\r
+   Retrieves the current resource settings of this PCI root bridge in the form of a set of ACPI 2.0\r
+   resource descriptors.\r
+\r
+   There are only two resource descriptor types from the ACPI Specification that may be used to\r
+   describe the current resources allocated to a PCI root bridge. These are the QWORD Address\r
+   Space Descriptor (ACPI 2.0 Section 6.4.3.5.1), and the End Tag (ACPI 2.0 Section 6.4.2.8). The\r
+   QWORD Address Space Descriptor can describe memory, I/O, and bus number ranges for dynamic\r
+   or fixed resources. The configuration of a PCI root bridge is described with one or more QWORD\r
+   Address Space Descriptors followed by an End Tag.\r
+\r
+   @param[in]   This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[out]  Resources   A pointer to the ACPI 2.0 resource descriptors that describe the\r
+                            current configuration of this PCI root bridge. The storage for the\r
+                            ACPI 2.0 resource descriptors is allocated by this function. The\r
+                            caller must treat the return buffer as read-only data, and the buffer\r
+                            must not be freed by the caller.\r
+   \r
+   @retval  EFI_SUCCESS     The current configuration of this PCI root bridge was returned in Resources.\r
+   @retval  EFI_UNSUPPORTED The current configuration of this PCI root bridge could not be retrieved.\r
+   @retval  EFI_INVALID_PARAMETER Invalid pointer of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoConfiguration (\r
@@ -197,6 +575,24 @@ RootBridgeIoConfiguration (
 //\r
 // Sub Function Prototypes\r
 //\r
+/**\r
+   Internal help function for read and write PCI configuration space.\r
+\r
+   @param[in]   This          A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Write         Switch value for Read or Write.\r
+   @param[in]   Width         Signifies the width of the memory operations.\r
+   @param[in]   UserAddress   The address within the PCI configuration space for the PCI controller.\r
+   @param[in]   Count         The number of PCI configuration operations to perform. Bytes\r
+                              moved is Width size * Count, starting at Address.\r
+   @param[out]  UserBuffer    For read operations, the destination buffer to store the results. For\r
+                              write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS            The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 RootBridgeIoPciRW (\r
   IN     EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *This,\r
@@ -213,6 +609,18 @@ RootBridgeIoPciRW (
 EFI_METRONOME_ARCH_PROTOCOL *mMetronome;\r
 EFI_CPU_IO2_PROTOCOL *mCpuIo;\r
 \r
+/**\r
+\r
+  Construct the Pci Root Bridge Io protocol\r
+\r
+  @param Protocol         Point to protocol instance\r
+  @param HostBridgeHandle Handle of host bridge\r
+  @param Attri            Attribute of host bridge\r
+  @param ResAppeture      ResourceAppeture for host bridge\r
+\r
+  @retval EFI_SUCCESS Success to initialize the Pci Root Bridge.\r
+\r
+**/\r
 EFI_STATUS\r
 RootBridgeConstructor (\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL    *Protocol,\r
@@ -220,21 +628,6 @@ RootBridgeConstructor (
   IN UINT64                             Attri,\r
   IN PCI_ROOT_BRIDGE_RESOURCE_APPETURE  *ResAppeture\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-    Construct the Pci Root Bridge Io protocol\r
-\r
-Arguments:\r
-\r
-    Protocol - protocol to initialize\r
-    \r
-Returns:\r
-\r
-    None\r
-\r
---*/\r
 {\r
   EFI_STATUS                        Status;\r
   PCI_ROOT_BRIDGE_INSTANCE          *PrivateData;\r
@@ -322,6 +715,35 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+   Polls an address in memory mapped I/O space until an exit condition is met, or \r
+   a timeout occurs. \r
+\r
+   This function provides a standard way to poll a PCI memory location. A PCI memory read\r
+   operation is performed at the PCI memory address specified by Address for the width specified\r
+   by Width. The result of this PCI memory read operation is stored in Result. This PCI memory\r
+   read operation is repeated until either a timeout of Delay 100 ns units has expired, or (Result &\r
+   Mask) is equal to Value.\r
+\r
+   @param[in]   This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width     Signifies the width of the memory operations.\r
+   @param[in]   Address   The base address of the memory operations. The caller is\r
+                          responsible for aligning Address if required.\r
+   @param[in]   Mask      Mask used for the polling criteria. Bytes above Width in Mask\r
+                          are ignored. The bits in the bytes below Width which are zero in\r
+                          Mask are ignored when polling the memory address.\r
+   @param[in]   Value     The comparison value used for the polling exit criteria.\r
+   @param[in]   Delay     The number of 100 ns units to poll. Note that timer available may\r
+                          be of poorer granularity.\r
+   @param[out]  Result    Pointer to the last value read from the memory location.\r
+   \r
+   @retval EFI_SUCCESS            The last data returned from the access matched the poll exit criteria.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid.\r
+   @retval EFI_INVALID_PARAMETER  Result is NULL.\r
+   @retval EFI_TIMEOUT            Delay expired before a match occurred.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoPollMem ( \r
@@ -333,16 +755,6 @@ RootBridgeIoPollMem (
   IN  UINT64                                 Delay,\r
   OUT UINT64                                 *Result\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Memory Poll\r
-  \r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/  \r
 {\r
   EFI_STATUS  Status;\r
   UINT64      NumberOfTicks;\r
@@ -406,6 +818,35 @@ Returns:
   return EFI_TIMEOUT;\r
 }\r
   \r
+/**\r
+   Reads from the I/O space of a PCI Root Bridge. Returns when either the polling exit criteria is\r
+   satisfied or after a defined duration.\r
+\r
+   This function provides a standard way to poll a PCI I/O location. A PCI I/O read operation is\r
+   performed at the PCI I/O address specified by Address for the width specified by Width.\r
+   The result of this PCI I/O read operation is stored in Result. This PCI I/O read operation is\r
+   repeated until either a timeout of Delay 100 ns units has expired, or (Result & Mask) is equal\r
+   to Value.\r
+\r
+   @param[in] This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in] Width     Signifies the width of the I/O operations.\r
+   @param[in] Address   The base address of the I/O operations. The caller is responsible\r
+                        for aligning Address if required.\r
+   @param[in] Mask      Mask used for the polling criteria. Bytes above Width in Mask\r
+                        are ignored. The bits in the bytes below Width which are zero in\r
+                        Mask are ignored when polling the I/O address.\r
+   @param[in] Value     The comparison value used for the polling exit criteria.\r
+   @param[in] Delay     The number of 100 ns units to poll. Note that timer available may\r
+                        be of poorer granularity.\r
+   @param[out] Result   Pointer to the last value read from the memory location.\r
+   \r
+   @retval EFI_SUCCESS            The last data returned from the access matched the poll exit criteria.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid.\r
+   @retval EFI_INVALID_PARAMETER  Result is NULL.\r
+   @retval EFI_TIMEOUT            Delay expired before a match occurred.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoPollIo ( \r
@@ -417,16 +858,6 @@ RootBridgeIoPollIo (
   IN  UINT64                                 Delay,\r
   OUT UINT64                                 *Result\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Io Poll\r
-  \r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/  \r
 {\r
   EFI_STATUS  Status;\r
   UINT64      NumberOfTicks;\r
@@ -488,6 +919,29 @@ Returns:
   return EFI_TIMEOUT;\r
 }\r
 \r
+/**\r
+   Enables a PCI driver to access PCI controller registers in the PCI root bridge memory space.\r
+\r
+   The Mem.Read(), and Mem.Write() functions enable a driver to access PCI controller\r
+   registers in the PCI root bridge memory space.\r
+   The memory operations are carried out exactly as requested. The caller is responsible for satisfying\r
+   any alignment and memory width restrictions that a PCI Root Bridge on a platform might require.\r
+\r
+   @param[in]   This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width     Signifies the width of the memory operation.\r
+   @param[in]   Address   The base address of the memory operation. The caller is\r
+                          responsible for aligning the Address if required.\r
+   @param[in]   Count     The number of memory operations to perform. Bytes moved is\r
+                          Width size * Count, starting at Address.\r
+   @param[out]  Buffer    For read operations, the destination buffer to store the results. For\r
+                          write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS            The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoMemRead (\r
@@ -497,16 +951,6 @@ RootBridgeIoMemRead (
   IN     UINTN                                  Count,\r
   IN OUT VOID                                   *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Memory read\r
-  \r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/  \r
 {\r
   PCI_ROOT_BRIDGE_INSTANCE                 *PrivateData;\r
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH    OldWidth;\r
@@ -546,6 +990,28 @@ Returns:
                        Address, OldCount, Buffer);\r
 }\r
 \r
+/**\r
+   Enables a PCI driver to access PCI controller registers in the PCI root bridge memory space.\r
+\r
+   The Mem.Read(), and Mem.Write() functions enable a driver to access PCI controller\r
+   registers in the PCI root bridge memory space.\r
+   The memory operations are carried out exactly as requested. The caller is responsible for satisfying\r
+   any alignment and memory width restrictions that a PCI Root Bridge on a platform might require.\r
+\r
+   @param[in]   This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width     Signifies the width of the memory operation.\r
+   @param[in]   Address   The base address of the memory operation. The caller is\r
+                          responsible for aligning the Address if required.\r
+   @param[in]   Count     The number of memory operations to perform. Bytes moved is\r
+                          Width size * Count, starting at Address.\r
+   @param[out]  Buffer    For read operations, the destination buffer to store the results. For\r
+                          write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS            The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoMemWrite (\r
@@ -555,16 +1021,6 @@ RootBridgeIoMemWrite (
   IN     UINTN                                  Count,\r
   IN OUT VOID                                   *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Memory write\r
-  \r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/  \r
 {\r
   PCI_ROOT_BRIDGE_INSTANCE                    *PrivateData;\r
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH       OldWidth;\r
@@ -603,6 +1059,24 @@ Returns:
                        Address, OldCount, Buffer);\r
 }\r
 \r
+/**\r
+   Enables a PCI driver to access PCI controller registers in the PCI root bridge I/O space.\r
+\r
+   @param[in]   This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width       Signifies the width of the memory operations.\r
+   @param[in]   Address     The base address of the I/O operation. The caller is responsible for\r
+                            aligning the Address if required.\r
+   @param[in]   Count       The number of I/O operations to perform. Bytes moved is Width\r
+                            size * Count, starting at Address.\r
+   @param[out]  Buffer      For read operations, the destination buffer to store the results. For\r
+                            write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS              The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER    Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER    Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES     The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoIoRead (\r
@@ -612,16 +1086,6 @@ RootBridgeIoIoRead (
   IN     UINTN                                  Count,\r
   IN OUT VOID                                   *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Io read\r
-  \r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/  \r
 {\r
   \r
   \r
@@ -671,6 +1135,24 @@ Returns:
 \r
 }\r
 \r
+/**\r
+   Enables a PCI driver to access PCI controller registers in the PCI root bridge I/O space.\r
+\r
+   @param[in]   This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width       Signifies the width of the memory operations.\r
+   @param[in]   Address     The base address of the I/O operation. The caller is responsible for\r
+                            aligning the Address if required.\r
+   @param[in]   Count       The number of I/O operations to perform. Bytes moved is Width\r
+                            size * Count, starting at Address.\r
+   @param[out]  Buffer      For read operations, the destination buffer to store the results. For\r
+                            write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS              The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER    Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER    Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES     The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoIoWrite (\r
@@ -680,16 +1162,6 @@ RootBridgeIoIoWrite (
   IN       UINTN                                   Count,\r
   IN OUT   VOID                                    *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Io write\r
-  \r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/  \r
 {\r
   UINTN                                         AlignMask;\r
   PCI_ROOT_BRIDGE_INSTANCE                      *PrivateData;\r
@@ -737,6 +1209,30 @@ Returns:
 \r
 }\r
 \r
+/**\r
+   Enables a PCI driver to copy one region of PCI root bridge memory space to another region of PCI\r
+   root bridge memory space.\r
+\r
+   The CopyMem() function enables a PCI driver to copy one region of PCI root bridge memory\r
+   space to another region of PCI root bridge memory space. This is especially useful for video scroll\r
+   operation on a memory mapped video buffer.\r
+   The memory operations are carried out exactly as requested. The caller is responsible for satisfying\r
+   any alignment and memory width restrictions that a PCI root bridge on a platform might require.\r
+\r
+   @param[in] This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL instance.\r
+   @param[in] Width       Signifies the width of the memory operations.\r
+   @param[in] DestAddress The destination address of the memory operation. The caller is\r
+                          responsible for aligning the DestAddress if required.\r
+   @param[in] SrcAddress  The source address of the memory operation. The caller is\r
+                          responsible for aligning the SrcAddress if required.\r
+   @param[in] Count       The number of memory operations to perform. Bytes moved is\r
+                          Width size * Count, starting at DestAddress and SrcAddress.\r
+   \r
+   @retval  EFI_SUCCESS             The data was copied from one memory region to another memory region.\r
+   @retval  EFI_INVALID_PARAMETER   Width is invalid for this PCI root bridge.\r
+   @retval  EFI_OUT_OF_RESOURCES    The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoCopyMem (\r
@@ -746,16 +1242,6 @@ RootBridgeIoCopyMem (
   IN UINT64                                       SrcAddress,\r
   IN UINTN                                        Count\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Memory copy\r
-  \r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   BOOLEAN     Direction;\r
@@ -812,6 +1298,29 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+   Enables a PCI driver to access PCI controller registers in a PCI root bridge's configuration space.\r
+\r
+   The Pci.Read() and Pci.Write() functions enable a driver to access PCI configuration\r
+   registers for a PCI controller.\r
+   The PCI Configuration operations are carried out exactly as requested. The caller is responsible for\r
+   any alignment and PCI configuration width issues that a PCI Root Bridge on a platform might\r
+   require.\r
+\r
+   @param[in]   This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width     Signifies the width of the memory operations.\r
+   @param[in]   Address   The address within the PCI configuration space for the PCI controller.\r
+   @param[in]   Count     The number of PCI configuration operations to perform. Bytes\r
+                          moved is Width size * Count, starting at Address.\r
+   @param[out]  Buffer    For read operations, the destination buffer to store the results. For\r
+                          write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS            The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoPciRead (\r
@@ -821,16 +1330,6 @@ RootBridgeIoPciRead (
   IN       UINTN                                  Count,\r
   IN OUT   VOID                                   *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Pci read\r
-  \r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/  \r
 {\r
   \r
   if (Buffer == NULL) {\r
@@ -846,6 +1345,29 @@ Returns:
   return RootBridgeIoPciRW (This, FALSE, Width, Address, Count, Buffer);\r
 }\r
 \r
+/**\r
+   Enables a PCI driver to access PCI controller registers in a PCI root bridge's configuration space.\r
+\r
+   The Pci.Read() and Pci.Write() functions enable a driver to access PCI configuration\r
+   registers for a PCI controller.\r
+   The PCI Configuration operations are carried out exactly as requested. The caller is responsible for\r
+   any alignment and PCI configuration width issues that a PCI Root Bridge on a platform might\r
+   require.\r
+\r
+   @param[in]   This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Width     Signifies the width of the memory operations.\r
+   @param[in]   Address   The address within the PCI configuration space for the PCI controller.\r
+   @param[in]   Count     The number of PCI configuration operations to perform. Bytes\r
+                          moved is Width size * Count, starting at Address.\r
+   @param[out]  Buffer    For read operations, the destination buffer to store the results. For\r
+                          write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS            The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoPciWrite (\r
@@ -855,16 +1377,6 @@ RootBridgeIoPciWrite (
   IN       UINTN                                  Count,\r
   IN OUT   VOID                                   *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Pci write\r
-  \r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/  \r
 {\r
   \r
   if (Buffer == NULL) {\r
@@ -880,6 +1392,32 @@ Returns:
   return RootBridgeIoPciRW (This, TRUE, Width, Address, Count, Buffer);\r
 }\r
 \r
+/**\r
+   Provides the PCI controller-specific addresses required to access system memory from a\r
+   DMA bus master.\r
+\r
+   The Map() function provides the PCI controller specific addresses needed to access system\r
+   memory. This function is used to map system memory for PCI bus master DMA accesses.\r
+\r
+   @param[in]       This            A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]       Operation       Indicates if the bus master is going to read or write to system memory.\r
+   @param[in]       HostAddress     The system memory address to map to the PCI controller.\r
+   @param[in][out]  NumberOfBytes   On input the number of bytes to map. On output the number of bytes that were mapped.\r
+   @param[out]      DeviceAddress   The resulting map address for the bus master PCI controller to use\r
+                                    to access the system memory's HostAddress.\r
+   @param[out]      Mapping         The value to pass to Unmap() when the bus master DMA operation is complete.\r
+   \r
+   @retval EFI_SUCCESS            The range was mapped for the returned NumberOfBytes.\r
+   @retval EFI_INVALID_PARAMETER  Operation is invalid.\r
+   @retval EFI_INVALID_PARAMETER  HostAddress is NULL.\r
+   @retval EFI_INVALID_PARAMETER  NumberOfBytes is NULL.\r
+   @retval EFI_INVALID_PARAMETER  DeviceAddress is NULL.\r
+   @retval EFI_INVALID_PARAMETER  Mapping is NULL.\r
+   @retval EFI_UNSUPPORTED        The HostAddress cannot be mapped as a common buffer.\r
+   @retval EFI_DEVICE_ERROR       The system hardware could not map the requested address.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoMap (\r
@@ -890,7 +1428,6 @@ RootBridgeIoMap (
   OUT    EFI_PHYSICAL_ADDRESS                       *DeviceAddress,\r
   OUT    VOID                                       **Mapping\r
   )\r
-\r
 {\r
   EFI_STATUS            Status;\r
   EFI_PHYSICAL_ADDRESS  PhysicalAddress;\r
@@ -999,13 +1536,28 @@ RootBridgeIoMap (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+   Completes the Map() operation and releases any corresponding resources.\r
+\r
+   The Unmap() function completes the Map() operation and releases any corresponding resources.\r
+   If the operation was an EfiPciOperationBusMasterWrite or\r
+   EfiPciOperationBusMasterWrite64, the data is committed to the target system memory.\r
+   Any resources used for the mapping are freed.  \r
+\r
+   @param[in] This      A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in] Mapping   The mapping value returned from Map().\r
+   \r
+   @retval EFI_SUCCESS            The range was unmapped.\r
+   @retval EFI_INVALID_PARAMETER  Mapping is not a value that was returned by Map().\r
+   @retval EFI_DEVICE_ERROR       The data was not committed to the target system memory.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoUnmap (\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL  *This,\r
   IN VOID                             *Mapping\r
   )\r
-\r
 {\r
   MAP_INFO    *MapInfo;\r
 \r
@@ -1041,6 +1593,27 @@ RootBridgeIoUnmap (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+   Allocates pages that are suitable for an EfiPciOperationBusMasterCommonBuffer or\r
+   EfiPciOperationBusMasterCommonBuffer64 mapping.\r
+  \r
+   @param This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param Type        This parameter is not used and must be ignored.\r
+   @param MemoryType  The type of memory to allocate, EfiBootServicesData or EfiRuntimeServicesData.\r
+   @param Pages       The number of pages to allocate.\r
+   @param HostAddress A pointer to store the base system memory address of the allocated range.\r
+   @param Attributes  The requested bit mask of attributes for the allocated range. Only\r
+                      the attributes EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE, EFI_PCI_ATTRIBUTE_MEMORY_CACHED, \r
+                      and EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE may be used with this function.\r
+   \r
+   @retval EFI_SUCCESS            The requested memory pages were allocated.\r
+   @retval EFI_INVALID_PARAMETER  MemoryType is invalid.\r
+   @retval EFI_INVALID_PARAMETER  HostAddress is NULL.\r
+   @retval EFI_UNSUPPORTED        Attributes is unsupported. The only legal attribute bits are\r
+                                  MEMORY_WRITE_COMBINE, MEMORY_CACHED, and DUAL_ADDRESS_CYCLE.\r
+   @retval EFI_OUT_OF_RESOURCES   The memory pages could not be allocated.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoAllocateBuffer (\r
@@ -1051,7 +1624,6 @@ RootBridgeIoAllocateBuffer (
   OUT VOID                             **HostAddress,\r
   IN  UINT64                           Attributes\r
   )\r
-\r
 {\r
   EFI_STATUS            Status;\r
   EFI_PHYSICAL_ADDRESS  PhysicalAddress;\r
@@ -1092,6 +1664,20 @@ RootBridgeIoAllocateBuffer (
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+   Frees memory that was allocated with AllocateBuffer().\r
+\r
+   The FreeBuffer() function frees memory that was allocated with AllocateBuffer().\r
+\r
+   @param This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param Pages       The number of pages to free.\r
+   @param HostAddress The base system memory address of the allocated range.\r
+   \r
+   @retval EFI_SUCCESS            The requested memory pages were freed.\r
+   @retval EFI_INVALID_PARAMETER  The memory range specified by HostAddress and Pages\r
+                                  was not allocated with AllocateBuffer().\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoFreeBuffer (\r
@@ -1099,25 +1685,34 @@ RootBridgeIoFreeBuffer (
   IN  UINTN                            Pages,\r
   OUT VOID                             *HostAddress\r
   )\r
-\r
 {\r
   return gBS->FreePages ((EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress, Pages);\r
 }\r
 \r
+/**\r
+   Flushes all PCI posted write transactions from a PCI host bridge to system memory.\r
+\r
+   The Flush() function flushes any PCI posted write transactions from a PCI host bridge to system\r
+   memory. Posted write transactions are generated by PCI bus masters when they perform write\r
+   transactions to target addresses in system memory.\r
+   This function does not flush posted write transactions from any PCI bridges. A PCI controller\r
+   specific action must be taken to guarantee that the posted write transactions have been flushed from\r
+   the PCI controller and from all the PCI bridges into the PCI host bridge. This is typically done with\r
+   a PCI read transaction from the PCI controller prior to calling Flush().\r
+\r
+   @param This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   \r
+   @retval EFI_SUCCESS        The PCI posted write transactions were flushed from the PCI host\r
+                              bridge to system memory.\r
+   @retval EFI_DEVICE_ERROR   The PCI posted write transactions were not flushed from the PCI\r
+                              host bridge due to a hardware error.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoFlush (\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL           *This\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/\r
 {\r
   //\r
   // not supported yet\r
@@ -1125,6 +1720,26 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+   Gets the attributes that a PCI root bridge supports setting with SetAttributes(), and the\r
+   attributes that a PCI root bridge is currently using.  \r
+\r
+   The GetAttributes() function returns the mask of attributes that this PCI root bridge supports\r
+   and the mask of attributes that the PCI root bridge is currently using.\r
+\r
+   @param This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param Supported   A pointer to the mask of attributes that this PCI root bridge\r
+                      supports setting with SetAttributes().\r
+   @param Attributes  A pointer to the mask of attributes that this PCI root bridge is\r
+                      currently using.\r
+   \r
+   @retval  EFI_SUCCESS           If Supports is not NULL, then the attributes that the PCI root\r
+                                  bridge supports is returned in Supports. If Attributes is\r
+                                  not NULL, then the attributes that the PCI root bridge is currently\r
+                                  using is returned in Attributes.\r
+   @retval  EFI_INVALID_PARAMETER Both Supports and Attributes are NULL.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoGetAttributes (\r
@@ -1132,15 +1747,6 @@ RootBridgeIoGetAttributes (
   OUT UINT64                           *Supported,\r
   OUT UINT64                           *Attributes\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/\r
 {\r
   PCI_ROOT_BRIDGE_INSTANCE *PrivateData;\r
 \r
@@ -1164,6 +1770,36 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+   Sets attributes for a resource range on a PCI root bridge.\r
+\r
+   The SetAttributes() function sets the attributes specified in Attributes for the PCI root\r
+   bridge on the resource range specified by ResourceBase and ResourceLength. Since the\r
+   granularity of setting these attributes may vary from resource type to resource type, and from\r
+   platform to platform, the actual resource range and the one passed in by the caller may differ. As a\r
+   result, this function may set the attributes specified by Attributes on a larger resource range\r
+   than the caller requested. The actual range is returned in ResourceBase and\r
+   ResourceLength. The caller is responsible for verifying that the actual range for which the\r
+   attributes were set is acceptable.\r
+\r
+   @param[in]       This            A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]       Attributes      The mask of attributes to set. If the attribute bit\r
+                                    MEMORY_WRITE_COMBINE, MEMORY_CACHED, or\r
+                                    MEMORY_DISABLE is set, then the resource range is specified by\r
+                                    ResourceBase and ResourceLength. If\r
+                                    MEMORY_WRITE_COMBINE, MEMORY_CACHED, and\r
+                                    MEMORY_DISABLE are not set, then ResourceBase and\r
+                                    ResourceLength are ignored, and may be NULL.\r
+   @param[in][out]  ResourceBase    A pointer to the base address of the resource range to be modified\r
+                                    by the attributes specified by Attributes.\r
+   @param[in][out]  ResourceLength  A pointer to the length of the resource range to be modified by the\r
+                                    attributes specified by Attributes.\r
+   \r
+   @retval  EFI_SUCCESS     The current configuration of this PCI root bridge was returned in Resources.\r
+   @retval  EFI_UNSUPPORTED The current configuration of this PCI root bridge could not be retrieved.\r
+   @retval  EFI_INVALID_PARAMETER Invalid pointer of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoSetAttributes (\r
@@ -1172,15 +1808,6 @@ RootBridgeIoSetAttributes (
   IN OUT UINT64                           *ResourceBase,\r
   IN OUT UINT64                           *ResourceLength \r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/\r
 {\r
   PCI_ROOT_BRIDGE_INSTANCE            *PrivateData;\r
   \r
@@ -1205,21 +1832,35 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+   Retrieves the current resource settings of this PCI root bridge in the form of a set of ACPI 2.0\r
+   resource descriptors.\r
+\r
+   There are only two resource descriptor types from the ACPI Specification that may be used to\r
+   describe the current resources allocated to a PCI root bridge. These are the QWORD Address\r
+   Space Descriptor (ACPI 2.0 Section 6.4.3.5.1), and the End Tag (ACPI 2.0 Section 6.4.2.8). The\r
+   QWORD Address Space Descriptor can describe memory, I/O, and bus number ranges for dynamic\r
+   or fixed resources. The configuration of a PCI root bridge is described with one or more QWORD\r
+   Address Space Descriptors followed by an End Tag.\r
+\r
+   @param[in]   This        A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[out]  Resources   A pointer to the ACPI 2.0 resource descriptors that describe the\r
+                            current configuration of this PCI root bridge. The storage for the\r
+                            ACPI 2.0 resource descriptors is allocated by this function. The\r
+                            caller must treat the return buffer as read-only data, and the buffer\r
+                            must not be freed by the caller.\r
+   \r
+   @retval  EFI_SUCCESS     The current configuration of this PCI root bridge was returned in Resources.\r
+   @retval  EFI_UNSUPPORTED The current configuration of this PCI root bridge could not be retrieved.\r
+   @retval  EFI_INVALID_PARAMETER Invalid pointer of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 RootBridgeIoConfiguration (\r
   IN  EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL     *This,\r
   OUT VOID                                **Resources\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
-    \r
-Returns:\r
-\r
---*/\r
 {\r
   PCI_ROOT_BRIDGE_INSTANCE              *PrivateData;\r
   UINTN                                 Index;\r
@@ -1241,6 +1882,24 @@ Returns:
 //\r
 // Internal function\r
 //\r
+/**\r
+   Internal help function for read and write PCI configuration space.\r
+\r
+   @param[in]   This          A pointer to the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.\r
+   @param[in]   Write         Switch value for Read or Write.\r
+   @param[in]   Width         Signifies the width of the memory operations.\r
+   @param[in]   UserAddress   The address within the PCI configuration space for the PCI controller.\r
+   @param[in]   Count         The number of PCI configuration operations to perform. Bytes\r
+                              moved is Width size * Count, starting at Address.\r
+   @param[out]  UserBuffer    For read operations, the destination buffer to store the results. For\r
+                              write operations, the source buffer to write data from.\r
+   \r
+   @retval EFI_SUCCESS            The data was read from or written to the PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Width is invalid for this PCI root bridge.\r
+   @retval EFI_INVALID_PARAMETER  Buffer is NULL.\r
+   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack of resources.\r
+\r
+**/\r
 EFI_STATUS\r
 RootBridgeIoPciRW (\r
   IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL        *This,\r