Fix the issue that S3BootScriptLabel() does not work to insert label when the specified position is not at the end of table.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13979 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lzeng14
2012-11-29 05:41:51 +00:00
parent bcb7667258
commit 93b21ade88
4 changed files with 24 additions and 192 deletions

View File

@ -1201,14 +1201,16 @@ BootScriptExecuteInformation (
{
UINT32 Index;
EFI_BOOT_SCRIPT_INFORMATION Information;
UINT8 *InformationData;
CopyMem ((VOID*)&Information, (VOID*)Script, sizeof(Information));
CopyMem ((VOID*)&Information, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_INFORMATION));
DEBUG ((EFI_D_INFO, "BootScriptExecuteInformation - 0x%08x\n", (UINTN)Information.Information));
InformationData = Script + sizeof (EFI_BOOT_SCRIPT_INFORMATION);
DEBUG ((EFI_D_INFO, "BootScriptExecuteInformation - 0x%08x\n", (UINTN) InformationData));
DEBUG ((EFI_D_INFO, "BootScriptInformation: "));
for (Index = 0; Index < Information.InformationLength; Index++) {
DEBUG ((EFI_D_INFO, "%02x ", *(UINT8 *)(UINTN)(Information.Information + Index)));
DEBUG ((EFI_D_INFO, "%02x ", InformationData[Index]));
}
DEBUG ((EFI_D_INFO, "\n"));
}
@ -1227,14 +1229,16 @@ BootScriptExecuteLabel (
{
UINT32 Index;
EFI_BOOT_SCRIPT_INFORMATION Information;
UINT8 *InformationData;
CopyMem ((VOID*)&Information, (VOID*)Script, sizeof(Information));
CopyMem ((VOID*)&Information, (VOID*)Script, sizeof(EFI_BOOT_SCRIPT_INFORMATION));
DEBUG ((EFI_D_INFO, "BootScriptExecuteLabel - 0x%08x\n", (UINTN)Information.Information));
InformationData = Script + sizeof (EFI_BOOT_SCRIPT_INFORMATION);
DEBUG ((EFI_D_INFO, "BootScriptExecuteLabel - 0x%08x\n", (UINTN) InformationData));
DEBUG ((EFI_D_INFO, "BootScriptLabel: "));
for (Index = 0; Index < Information.InformationLength; Index++) {
DEBUG ((EFI_D_INFO, "%02x ", *(UINT8 *)(UINTN)(Information.Information + Index)));
DEBUG ((EFI_D_INFO, "%02x ", InformationData[Index]));
}
DEBUG ((EFI_D_INFO, "\n"));
}