CcExitVcHandler.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /** @file
  2. X64 #VC Exception Handler functon header file.
  3. Copyright (C) 2020, Advanced Micro Devices, Inc. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef CC_EXIT_VC_HANDLER_H_
  7. #define CC_EXIT_VC_HANDLER_H_
  8. #include <Base.h>
  9. #include <Uefi.h>
  10. #include <Library/CcExitLib.h>
  11. /**
  12. Handle a #VC exception.
  13. Performs the necessary processing to handle a #VC exception.
  14. @param[in, out] Ghcb Pointer to the GHCB
  15. @param[in, out] ExceptionType Pointer to an EFI_EXCEPTION_TYPE to be set
  16. as value to use on error.
  17. @param[in, out] SystemContext Pointer to EFI_SYSTEM_CONTEXT
  18. @retval EFI_SUCCESS Exception handled
  19. @retval EFI_UNSUPPORTED #VC not supported, (new) exception value to
  20. propagate provided
  21. @retval EFI_PROTOCOL_ERROR #VC handling failed, (new) exception value to
  22. propagate provided
  23. **/
  24. EFI_STATUS
  25. EFIAPI
  26. InternalVmgExitHandleVc (
  27. IN OUT GHCB *Ghcb,
  28. IN OUT EFI_EXCEPTION_TYPE *ExceptionType,
  29. IN OUT EFI_SYSTEM_CONTEXT SystemContext
  30. );
  31. /**
  32. Routine to allow ASSERT from within #VC.
  33. @param[in, out] SevEsData Pointer to the per-CPU data
  34. **/
  35. VOID
  36. EFIAPI
  37. VmgExitIssueAssert (
  38. IN OUT SEV_ES_PER_CPU_DATA *SevEsData
  39. );
  40. #endif