public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Rebecca Cran" <quic_rcran@quicinc.com>
To: <devel@edk2.groups.io>, Leif Lindholm <quic_llindhol@quicinc.com>,
	"Sami Mujawar" <sami.mujawar@arm.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Rebecca Cran <rebecca@quicinc.com>
Subject: [PATCH 2/2] ArmPkg: Improve formatting of docs in ArmExceptionLib/ArmExceptionLib.c
Date: Thu, 1 Dec 2022 17:34:57 -0700	[thread overview]
Message-ID: <20221202003457.81701-3-rebecca@quicinc.com> (raw)
In-Reply-To: <20221202003457.81701-1-rebecca@quicinc.com>

Improve the formatting of the documentation for functions in
ArmExceptionLib/ArmExceptionLib.c.

Signed-off-by: Rebecca Cran <rebecca@quicinc.com>
---
 ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c | 115 +++++++++++---------
 1 file changed, 64 insertions(+), 51 deletions(-)

diff --git a/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c b/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c
index b20472008b3f..057ab3a9f201 100644
--- a/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c
+++ b/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c
@@ -69,19 +69,24 @@ STATIC CONST BOOLEAN  gArmRelocateVectorTable = FALSE;
 #endif
 
 /**
-Initializes all CPU exceptions entries and provides the default exception handlers.
+  Initializes all CPU exceptions entries and provides the default exception
+  handlers.
 
-Caller should try to get an array of interrupt and/or exception vectors that are in use and need to
-persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification.
-If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL.
-If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly.
+  Caller should try to get an array of interrupt and/or exception vectors that
+  are in use and need to persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3
+  specification.
+  If caller cannot get reserved vector list or it does not exists, set
+  VectorInfo to NULL.
+  If VectorInfo is not NULL, the exception vectors will be initialized per
+  vector attribute accordingly.
 
-@param[in]  VectorInfo    Pointer to reserved vector list.
+  @param[in]  VectorInfo        Pointer to reserved vector list.
 
-@retval EFI_SUCCESS           CPU Exception Entries have been successfully initialized
-with default exception handlers.
-@retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL.
-@retval EFI_UNSUPPORTED       This function is not supported.
+  @retval EFI_SUCCESS           CPU Exception Entries have been successfully
+                                initialized with default exception handlers.
+  @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if
+                                VectorInfo is not NULL.
+  @retval EFI_UNSUPPORTED       This function is not supported.
 
 **/
 EFI_STATUS
@@ -130,19 +135,23 @@ InitializeCpuExceptionHandlers (
 }
 
 /**
-Copies exception handlers to the specified address.
+  Copies exception handlers to the specified address.
 
-Caller should try to get an array of interrupt and/or exception vectors that are in use and need to
-persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification.
-If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL.
-If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly.
+  Caller should try to get an array of interrupt and/or exception vectors that
+  are in use and need to persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3
+  specification.
+  If caller cannot get reserved vector list or it does not exists, set
+  VectorInfo to NULL.
+  If VectorInfo is not NULL, the exception vectors will be initialized per
+  vector attribute accordingly.
 
-@param[in]  BaseAddress    Address to copy exception handlers to.
+  @param[in]  BaseAddress       Address to copy exception handlers to.
 
-@retval EFI_SUCCESS           CPU Exception Entries have been successfully initialized
-with default exception handlers.
-@retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL.
-@retval EFI_UNSUPPORTED       This function is not supported.
+  @retval EFI_SUCCESS           CPU Exception Entries have been successfully
+                                initialized with default exception handlers.
+  @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if
+                                VectorInfo is not NULL.
+  @retval EFI_UNSUPPORTED       This function is not supported.
 
 **/
 STATIC
@@ -196,29 +205,33 @@ CopyExceptionHandlers (
 }
 
 /**
-Registers a function to be called from the processor exception handler. (On ARM/AArch64 this only
-provides exception handlers, not interrupt handling which is provided through the Hardware Interrupt
-Protocol.)
+  Registers a function to be called from the processor exception handler.
+  (On ARM/AArch64 this only provides exception handlers, not interrupt handling
+  which is provided through the Hardware Interrupt Protocol.)
 
-This function registers and enables the handler specified by ExceptionHandler for a processor
-interrupt or exception type specified by ExceptionType. If ExceptionHandler is NULL, then the
-handler for the processor interrupt or exception type specified by ExceptionType is uninstalled.
-The installed handler is called once for each processor interrupt or exception.
-NOTE: This function should be invoked after InitializeCpuExceptionHandlers() is invoked,
-otherwise EFI_UNSUPPORTED returned.
+  This function registers and enables the handler specified by ExceptionHandler
+  for a processor interrupt or exception type specified by ExceptionType. If
+  ExceptionHandler is NULL, then the handler for the processor interrupt or
+  exception type specified by ExceptionType is uninstalled.
+  The installed handler is called once for each processor interrupt or
+  exception.
+  NOTE: This function should be invoked after InitializeCpuExceptionHandlers()
+  is invoked, otherwise EFI_UNSUPPORTED returned.
 
-@param[in]  ExceptionType     Defines which interrupt or exception to hook.
-@param[in]  ExceptionHandler  A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called
-when a processor interrupt occurs. If this parameter is NULL, then the handler
-will be uninstalled.
+  @param[in]  ExceptionType     Defines which interrupt or exception to hook.
+  @param[in]  ExceptionHandler  A pointer to a function of type
+                                EFI_CPU_INTERRUPT_HANDLER that is called when a
+                                processor interrupt occurs. If this parameter is
+                                NULL, then the handler will be uninstalled.
 
-@retval EFI_SUCCESS           The handler for the processor interrupt was successfully installed or uninstalled.
-@retval EFI_ALREADY_STARTED   ExceptionHandler is not NULL, and a handler for ExceptionType was
-previously installed.
-@retval EFI_INVALID_PARAMETER ExceptionHandler is NULL, and a handler for ExceptionType was not
-previously installed.
-@retval EFI_UNSUPPORTED       The interrupt specified by ExceptionType is not supported,
-or this function is not supported.
+  @retval EFI_SUCCESS           The handler for the processor interrupt was
+                                successfully installed or uninstalled.
+  @retval EFI_ALREADY_STARTED   ExceptionHandler is not NULL, and a handler
+                                for ExceptionType was previously installed.
+  @retval EFI_INVALID_PARAMETER ExceptionHandler is NULL, and a handler for
+                                ExceptionType was not previously installed.
+  @retval EFI_UNSUPPORTED       The interrupt specified by ExceptionType is not
+                                supported, or this function is not supported.
 **/
 RETURN_STATUS
 RegisterCpuInterruptHandler (
@@ -240,19 +253,19 @@ RegisterCpuInterruptHandler (
 }
 
 /**
-Register exception handler.
+  Register exception handler.
 
-@param  ExceptionType         Defines which interrupt or exception to hook. Type EFI_EXCEPTION_TYPE and
-the valid values for this parameter are defined in EFI_DEBUG_SUPPORT_PROTOCOL
-of the UEFI 2.0 specification.
-@param  InterruptHandler      A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER
-that is called when a processor interrupt occurs.
-If this parameter is NULL, then the handler will be uninstalled.
+  @param  ExceptionType         Defines which interrupt or exception to hook. Type EFI_EXCEPTION_TYPE and
+                                the valid values for this parameter are defined in EFI_DEBUG_SUPPORT_PROTOCOL
+                                of the UEFI 2.0 specification.
+  @param  InterruptHandler      A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER
+                                that is called when a processor interrupt occurs.
+                                If this parameter is NULL, then the handler will be uninstalled.
 
-@retval EFI_SUCCESS           The handler for the processor interrupt was successfully installed or uninstalled.
-@retval EFI_ALREADY_STARTED   InterruptHandler is not NULL, and a handler for InterruptType was previously installed.
-@retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not previously installed.
-@retval EFI_UNSUPPORTED       The interrupt specified by InterruptType is not supported.
+  @retval EFI_SUCCESS           The handler for the processor interrupt was successfully installed or uninstalled.
+  @retval EFI_ALREADY_STARTED   InterruptHandler is not NULL, and a handler for InterruptType was previously installed.
+  @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not previously installed.
+  @retval EFI_UNSUPPORTED       The interrupt specified by InterruptType is not supported.
 
 **/
 EFI_STATUS
-- 
2.30.2


      parent reply	other threads:[~2022-12-02  0:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02  0:34 [PATCH 0/2] ArmPkg: Improve doxygen comments in ArmExceptionLib Rebecca Cran
2022-12-02  0:34 ` [PATCH 1/2] ArmPkg: Fix incorrect parameter list in doxygen comments Rebecca Cran
2022-12-02  0:34 ` Rebecca Cran [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221202003457.81701-3-rebecca@quicinc.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox