From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.697.1667803696186224269 for ; Sun, 06 Nov 2022 22:48:16 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=BNOr3wEQ; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: chinni.b.duggapu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667803696; x=1699339696; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cBJt9gJWeXgW0fkTqT1eCFemiRlNynImX6jN4KdRxzY=; b=BNOr3wEQukvK2PMdvMr0XgGuVvvMg9z/Dxx0hx2mzoh29e9ZBOQOxxt9 jogR6XcfYudB/y6gG9Xhb2Y+MAHXplrJnwgIcZkYiqVjS3S/RbpG2+SMj M/Zhm7b3TI88NNv+SZXK8XmOnjvKclXA+bKx1gtLFbNWzjozQasiPIJ5X fBzNBgSNf/lyUD12HB/HoWZSafE9ShrnNgORydryzykkLsYBYDbo3sXM4 hTf5TNEyfOpnPcPX02gpjuTqt97ogUl3zph6bt3l9uJy6HunzQ5eUgKGQ mhOp2/nOdONOE2D4Fl+UQ56o75UTRjV7/Wu2EYUy+Bu6l+aEUDzTmXxZr Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10523"; a="310340041" X-IronPort-AV: E=Sophos;i="5.96,143,1665471600"; d="scan'208";a="310340041" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2022 22:47:58 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10523"; a="880954341" X-IronPort-AV: E=Sophos;i="5.96,143,1665471600"; d="scan'208";a="880954341" Received: from bacfd007.gar.corp.intel.com ([10.66.244.233]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2022 22:47:57 -0800 From: "cbduggap" To: devel@edk2.groups.io Cc: "Duggapu, Chinni B" , Ray Ni Subject: [PATCH] UefiCpuPkg/ResetVector:Add Option to reserve 4K region at 4GB Date: Mon, 7 Nov 2022 12:17:31 +0530 Message-Id: X-Mailer: git-send-email 2.30.2.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: "Duggapu, Chinni B" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4140 Some implementations may need to keep the initial Reset code to be separated out from rest of the code.This request is to add padding at lower 4K region below 4 GB which will result having only few jmp instructions and data at that region. Cc: Ray Ni Signed-off-by: Duggapu Chinni B --- UefiCpuPkg/ResetVector/Vtf0/Ia16/ResetVectorVtf0.asm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/ResetVector/Vtf0/Ia16/ResetVectorVtf0.asm b/UefiCpu= Pkg/ResetVector/Vtf0/Ia16/ResetVectorVtf0.asm index 7538192876..fe5bbea803 100644 --- a/UefiCpuPkg/ResetVector/Vtf0/Ia16/ResetVectorVtf0.asm +++ b/UefiCpuPkg/ResetVector/Vtf0/Ia16/ResetVectorVtf0.asm @@ -21,7 +21,15 @@ ALIGN 16 ; located just below 0x100000000 (4GB) in the firmware device.=0D ;=0D %ifdef ALIGN_TOP_TO_4K_FOR_PAGING=0D - TIMES (0x1000 - ($ - EndOfPageTables) - 0x20) DB 0=0D + TIMES (0x1000 - ($ - EndOfPageTables)) DB 0=0D +;=0D +; Pad the VTF0 Reset code for Bsp & Ap to 4k aligned block.=0D +; Some implementations may need to keep the initial Reset code=0D +; to be separated out from rest of the code.=0D +; This padding will make sure lower 4K region below 4 GB may=0D +; only contains few jmp instructions and data.=0D +;=0D + TIMES (0x1000 - 0x20) DB 0=0D %endif=0D =0D applicationProcessorEntryPoint:=0D --=20 2.30.2.windows.1