|
@@ -44,31 +44,6 @@ InitializeCpuExceptionHandlers (
|
|
|
return EFI_SUCCESS;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- Initializes all CPU interrupt/exceptions entries and provides the default interrupt/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.
|
|
|
-
|
|
|
- @param[in] VectorInfo Pointer to reserved vector list.
|
|
|
-
|
|
|
- @retval EFI_SUCCESS All CPU interrupt/exception entries have been successfully initialized
|
|
|
- with default interrupt/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
|
|
|
-EFIAPI
|
|
|
-InitializeCpuInterruptHandlers (
|
|
|
- IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL
|
|
|
- )
|
|
|
-{
|
|
|
- return EFI_SUCCESS;
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
Registers a function to be called from the processor interrupt handler.
|
|
|
|
|
@@ -134,39 +109,6 @@ RiscVSupervisorModeTrapHandler (
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- Initializes all CPU exceptions entries with optional extra initializations.
|
|
|
-
|
|
|
- By default, this method should include all functionalities implemented by
|
|
|
- InitializeCpuExceptionHandlers(), plus extra initialization works, if any.
|
|
|
- This could be done by calling InitializeCpuExceptionHandlers() directly
|
|
|
- in this method besides the extra works.
|
|
|
-
|
|
|
- InitData is optional and its use and content are processor arch dependent.
|
|
|
- The typical usage of it is to convey resources which have to be reserved
|
|
|
- elsewhere and are necessary for the extra initializations of exception.
|
|
|
-
|
|
|
- @param[in] VectorInfo Pointer to reserved vector list.
|
|
|
- @param[in] InitData Pointer to data optional for extra initializations
|
|
|
- of exception.
|
|
|
-
|
|
|
- @retval EFI_SUCCESS The exceptions have been successfully
|
|
|
- initialized.
|
|
|
- @retval EFI_INVALID_PARAMETER VectorInfo or InitData contains invalid
|
|
|
- content.
|
|
|
- @retval EFI_UNSUPPORTED This function is not supported.
|
|
|
-
|
|
|
-**/
|
|
|
-EFI_STATUS
|
|
|
-EFIAPI
|
|
|
-InitializeCpuExceptionHandlersEx (
|
|
|
- IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL,
|
|
|
- IN CPU_EXCEPTION_INIT_DATA *InitData OPTIONAL
|
|
|
- )
|
|
|
-{
|
|
|
- return InitializeCpuExceptionHandlers (VectorInfo);
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
The constructor function to initial interrupt handlers in
|
|
|
RISCV_MACHINE_MODE_CONTEXT.
|
|
@@ -192,3 +134,27 @@ CpuExceptionHandlerLibConstructor (
|
|
|
|
|
|
return EFI_SUCCESS;
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ Setup separate stacks for certain exception handlers.
|
|
|
+ If the input Buffer and BufferSize are both NULL, use global variable if possible.
|
|
|
+
|
|
|
+ @param[in] Buffer Point to buffer used to separate exception stack.
|
|
|
+ @param[in, out] BufferSize On input, it indicates the byte size of Buffer.
|
|
|
+ If the size is not enough, the return status will
|
|
|
+ be EFI_BUFFER_TOO_SMALL, and output BufferSize
|
|
|
+ will be the size it needs.
|
|
|
+
|
|
|
+ @retval EFI_SUCCESS The stacks are assigned successfully.
|
|
|
+ @retval EFI_UNSUPPORTED This function is not supported.
|
|
|
+ @retval EFI_BUFFER_TOO_SMALL This BufferSize is too small.
|
|
|
+**/
|
|
|
+EFI_STATUS
|
|
|
+EFIAPI
|
|
|
+InitializeSeparateExceptionStacks (
|
|
|
+ IN VOID *Buffer,
|
|
|
+ IN OUT UINTN *BufferSize
|
|
|
+ )
|
|
|
+{
|
|
|
+ return EFI_SUCCESS;
|
|
|
+}
|