From 4e50241273b7e01cf2d7eb22ebf9f6a9d045b00b Mon Sep 17 00:00:00 2001 From: Cinnamon Shia Date: Mon, 25 Jan 2016 04:45:55 +0000 Subject: Nt32Pkg: Fix asserts from running Nt32 64-bit on Win8 On Windows 8, 64-bit NT32 images are loaded above 4GB. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Cinnamon Shia Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19736 6f19259b-4bc3-4df7-8a09-765794883524 --- Nt32Pkg/Sec/SecMain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Nt32Pkg/Sec/SecMain.c') diff --git a/Nt32Pkg/Sec/SecMain.c b/Nt32Pkg/Sec/SecMain.c index e6eb3cf45e..e9f72dfba1 100644 --- a/Nt32Pkg/Sec/SecMain.c +++ b/Nt32Pkg/Sec/SecMain.c @@ -1,6 +1,7 @@ /**@file Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -809,7 +810,7 @@ Returns: // Align buffer on section boundry // ImageContext.ImageAddress += ImageContext.SectionAlignment - 1; - ImageContext.ImageAddress &= ~(ImageContext.SectionAlignment - 1); + ImageContext.ImageAddress &= ~((EFI_PHYSICAL_ADDRESS)ImageContext.SectionAlignment - 1); Status = PeCoffLoaderLoadImage (&ImageContext); if (EFI_ERROR (Status)) { -- cgit v1.2.3