]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/Cpu.h
Formalize comments for Protocols and PPIs.
[mirror_edk2.git] / MdePkg / Include / Protocol / Cpu.h
index 042f22068180e9d53af790502d52f686f697136b..53ad24d6d5b985e88cba5a8fcdea0f39db2a3f57 100644 (file)
@@ -1,9 +1,9 @@
 /** @file\r
-  CPU Architectural Protocol as defined in DXE CIS\r
+  CPU Architectural Protocol as defined in PI spec Volume 2 DXE\r
 \r
   This code abstracts the DXE core from processor implementation details.\r
 \r
-  Copyright (c) 2006, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2008, 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
@@ -12,9 +12,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
-  @par Revision Reference:\r
-  Version 0.91B.\r
-\r
 **/\r
 \r
 #ifndef __ARCH_PROTOCOL_CPU_H__\r
@@ -52,7 +49,7 @@ typedef enum {
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *EFI_CPU_INTERRUPT_HANDLER) (\r
+(EFIAPI *EFI_CPU_INTERRUPT_HANDLER)(\r
   IN CONST  EFI_EXCEPTION_TYPE  InterruptType,\r
   IN CONST  EFI_SYSTEM_CONTEXT  SystemContext\r
   );\r
@@ -86,7 +83,7 @@ VOID
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CPU_FLUSH_DATA_CACHE) (\r
+(EFIAPI *EFI_CPU_FLUSH_DATA_CACHE)(\r
   IN EFI_CPU_ARCH_PROTOCOL              *This,\r
   IN EFI_PHYSICAL_ADDRESS               Start,\r
   IN UINT64                             Length,\r
@@ -105,7 +102,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CPU_ENABLE_INTERRUPT) (\r
+(EFIAPI *EFI_CPU_ENABLE_INTERRUPT)(\r
   IN EFI_CPU_ARCH_PROTOCOL              *This\r
   );\r
 \r
@@ -121,7 +118,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CPU_DISABLE_INTERRUPT) (\r
+(EFIAPI *EFI_CPU_DISABLE_INTERRUPT)(\r
   IN EFI_CPU_ARCH_PROTOCOL              *This\r
   );\r
 \r
@@ -141,7 +138,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CPU_GET_INTERRUPT_STATE) (\r
+(EFIAPI *EFI_CPU_GET_INTERRUPT_STATE)(\r
   IN EFI_CPU_ARCH_PROTOCOL              *This,\r
   OUT BOOLEAN                           *State\r
   );\r
@@ -165,7 +162,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CPU_INIT) (\r
+(EFIAPI *EFI_CPU_INIT)(\r
   IN EFI_CPU_ARCH_PROTOCOL              *This,\r
   IN EFI_CPU_INIT_TYPE                  InitType\r
   );\r
@@ -194,7 +191,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CPU_REGISTER_INTERRUPT_HANDLER) (\r
+(EFIAPI *EFI_CPU_REGISTER_INTERRUPT_HANDLER)(\r
   IN EFI_CPU_ARCH_PROTOCOL              *This,\r
   IN EFI_EXCEPTION_TYPE                 InterruptType,\r
   IN EFI_CPU_INTERRUPT_HANDLER          InterruptHandler\r
@@ -219,7 +216,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CPU_GET_TIMER_VALUE) (\r
+(EFIAPI *EFI_CPU_GET_TIMER_VALUE)(\r
   IN EFI_CPU_ARCH_PROTOCOL              *This,\r
   IN UINT32                             TimerIndex,\r
   OUT UINT64                            *TimerValue,\r
@@ -250,7 +247,7 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_CPU_SET_MEMORY_ATTRIBUTES) (\r
+(EFIAPI *EFI_CPU_SET_MEMORY_ATTRIBUTES)(\r
   IN EFI_CPU_ARCH_PROTOCOL              *This,\r
   IN  EFI_PHYSICAL_ADDRESS              BaseAddress,\r
   IN  UINT64                            Length,\r
@@ -258,59 +255,12 @@ EFI_STATUS
   );\r
 \r
 \r
-/**\r
-  @par Protocol Description:\r
-  The EFI_CPU_ARCH_PROTOCOL is used to abstract processor-specific functions from the DXE\r
-  Foundation. This includes flushing caches, enabling and disabling interrupts, hooking interrupt\r
-  vectors and exception vectors, reading internal processor timers, resetting the processor, and\r
-  determining the processor frequency.\r
-\r
-  @param FlushDataCache\r
-  Flushes a range of the processor's data cache. If the processor does \r
-  not contain a data cache, or the data cache is fully coherent, then this \r
-  function can just return EFI_SUCCESS. If the processor does not support \r
-  flushing a range of addresses from the data cache, then the entire data \r
-  cache must be flushed. \r
-\r
-  @param EnableInterrupt   \r
-  Enables interrupt processing by the processor.\r
-\r
-  @param DisableInterrupt  \r
-  Disables interrupt processing by the processor.\r
-\r
-  @param GetInterruptState \r
-  Retrieves the processor's current interrupt state.\r
-\r
-  @param Init\r
-  Generates an INIT on the processor. If a processor cannot programmatically \r
-  generate an INIT without help from external hardware, then this function \r
-  returns EFI_UNSUPPORTED.\r
-\r
-  @param RegisterInterruptHandler\r
-  Associates an interrupt service routine with one of the processor's interrupt \r
-  vectors. This function is typically used by the EFI_TIMER_ARCH_PROTOCOL to \r
-  hook the timer interrupt in a system. It can also be used by the debugger to \r
-  hook exception vectors.\r
-\r
-  @param GetTimerValue       \r
-  Returns the value of one of the processor's internal timers.\r
-\r
-  @param SetMemoryAttributes \r
-  Attempts to set the attributes of a memory region.\r
-\r
-  @param NumberOfTimers\r
-  The number of timers that are available in a processor. The value in this \r
-  field is a constant that must not be modified after the CPU Architectural \r
-  Protocol is installed. All consumers must treat this as a read-only field.\r
-\r
-  @param DmaBufferAlignment\r
-  The size, in bytes, of the alignment required for DMA buffer allocations. \r
-  This is typically the size of the largest data cache line in the platform. \r
-  The value in this field is a constant that must not be modified after the \r
-  CPU Architectural Protocol is installed. All consumers must treat this as \r
-  a read-only field.\r
-\r
-**/\r
+///\r
+/// The EFI_CPU_ARCH_PROTOCOL is used to abstract processor-specific functions from the DXE\r
+/// Foundation. This includes flushing caches, enabling and disabling interrupts, hooking interrupt\r
+/// vectors and exception vectors, reading internal processor timers, resetting the processor, and\r
+/// determining the processor frequency.\r
+///\r
 struct _EFI_CPU_ARCH_PROTOCOL {\r
   EFI_CPU_FLUSH_DATA_CACHE            FlushDataCache;\r
   EFI_CPU_ENABLE_INTERRUPT            EnableInterrupt;\r
@@ -320,7 +270,19 @@ struct _EFI_CPU_ARCH_PROTOCOL {
   EFI_CPU_REGISTER_INTERRUPT_HANDLER  RegisterInterruptHandler;\r
   EFI_CPU_GET_TIMER_VALUE             GetTimerValue;\r
   EFI_CPU_SET_MEMORY_ATTRIBUTES       SetMemoryAttributes;\r
+  ///\r
+  /// The number of timers that are available in a processor. The value in this \r
+  /// field is a constant that must not be modified after the CPU Architectural \r
+  /// Protocol is installed. All consumers must treat this as a read-only field.\r
+  ///\r
   UINT32                              NumberOfTimers;\r
+  ///\r
+  /// The size, in bytes, of the alignment required for DMA buffer allocations. \r
+  /// This is typically the size of the largest data cache line in the platform. \r
+  /// The value in this field is a constant that must not be modified after the \r
+  /// CPU Architectural Protocol is installed. All consumers must treat this as \r
+  /// a read-only field.  \r
+  ///\r
   UINT32                              DmaBufferAlignment;\r
 };\r
 \r