This module will excute the boot script saved during last boot and after that,\r
control is passed to OS waking up handler.\r
\r
- Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions\r
// Make sure the newly allcated IDT align with 16-bytes\r
// \r
IdtBuffer = AllocatePages (EFI_SIZE_TO_PAGES((IdtDescriptor->Limit + 1) + 16));\r
- ASSERT (IdtBuffer != NULL);\r
+ if (IdtBuffer == NULL) {\r
+ REPORT_STATUS_CODE (\r
+ EFI_ERROR_CODE | EFI_ERROR_MAJOR,\r
+ (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_RESUME_FAILED)\r
+ );\r
+ ASSERT (FALSE);\r
+ }\r
//\r
// Additional 16 bytes allocated to save IA32 IDT descriptor and Pei Service Table Pointer\r
// IA32 IDT descriptor will be used to setup IA32 IDT table for 32-bit Framework Boot Script code\r
// Prepare data for return back\r
//\r
PeiS3ResumeState = AllocatePool (sizeof(*PeiS3ResumeState));\r
- ASSERT (PeiS3ResumeState != NULL);\r
+ if (PeiS3ResumeState == NULL) {\r
+ REPORT_STATUS_CODE (\r
+ EFI_ERROR_CODE | EFI_ERROR_MAJOR,\r
+ (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_EC_S3_RESUME_FAILED)\r
+ );\r
+ ASSERT (FALSE);\r
+ }\r
DEBUG (( EFI_D_ERROR, "PeiS3ResumeState - %x\r\n", PeiS3ResumeState));\r
PeiS3ResumeState->ReturnCs = 0x10;\r
PeiS3ResumeState->ReturnEntryPoint = (EFI_PHYSICAL_ADDRESS)(UINTN)S3ResumeBootOs;\r