/* This function is a wrapper of InitializeSeparateExceptionStacks. It's mainly for the sake of AP's init because of EFI_AP_PROCEDURE API requirement. */
VOID EFIAPI InitializeExceptionStackSwitchHandlers(IN OUT VOID *Buffer)
/* This function is a wrapper of InitializeSeparateExceptionStacks. It's mainly for the sake of AP's init because of EFI_AP_PROCEDURE API requirement. */
VOID EFIAPI InitializeExceptionStackSwitchHandlers(IN OUT VOID *Buffer)
{
  EXCEPTION_STACK_SWITCH_CONTEXT  *SwitchStackData;
  UINTN                           Index;
  MpInitLibWhoAmI (&Index);
  SwitchStackData = (EXCEPTION_STACK_SWITCH_CONTEXT *)Buffer;
  if ((SwitchStackData[Index].Status == EFI_NOT_STARTED) || (SwitchStackData[Index].Status == EFI_BUFFER_TOO_SMALL)) {
    SwitchStackData[Index].Status = InitializeSeparateExceptionStacks (SwitchStackData[Index].Buffer, &SwitchStackData[Index].BufferSize);
  }
}