From 8350b26d434952e06f1ad54021161d73f63159ef Mon Sep 17 00:00:00 2001 From: yshang1 Date: Wed, 18 Apr 2007 09:27:05 +0000 Subject: [PATCH] To fix the GP convert issue, which results in the GP of registered EsalServices is not correctly. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2576 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/EdkDxeRuntimeSalLib/Ipf/EsalServiceLib.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/EdkModulePkg/Library/EdkDxeRuntimeSalLib/Ipf/EsalServiceLib.c b/EdkModulePkg/Library/EdkDxeRuntimeSalLib/Ipf/EsalServiceLib.c index 55a25b46ca..4532155406 100644 --- a/EdkModulePkg/Library/EdkDxeRuntimeSalLib/Ipf/EsalServiceLib.c +++ b/EdkModulePkg/Library/EdkDxeRuntimeSalLib/Ipf/EsalServiceLib.c @@ -83,8 +83,12 @@ Returns: --*/ { - EfiConvertPointer (0x0, (VOID **) &mPlabel.EntryPoint); - EfiConvertPointer (EFI_IPF_GP_POINTER, (VOID **) &mPlabel.GP); + UINT64 PhysicalEntryPoint; + + PhysicalEntryPoint = mPlabel.EntryPoint; + + EfiConvertPointer (0x0, (VOID **) &mPlabel.EntryPoint); + mPlabel.GP += mPlabel.EntryPoint - PhysicalEntryPoint; SetEsalVirtualEntryPoint (mPlabel.EntryPoint, mPlabel.GP); } -- 2.39.2