From: Jian J Wang <jian.j.wang@intel.com>
To: edk2-devel@lists.01.org
Cc: Star Zeng <star.zeng@intel.com>, Eric Dong <eric.dong@intel.com>,
Jiewen Yao <jiewen.yao@intel.com>
Subject: [PATCH v4 10/11] MdeModulePkg/Core/Dxe: Call new API InitializeCpuExceptionHandlersEx instead
Date: Wed, 6 Dec 2017 16:50:04 +0800 [thread overview]
Message-ID: <20171206085005.14552-11-jian.j.wang@intel.com> (raw)
In-Reply-To: <20171206085005.14552-1-jian.j.wang@intel.com>
> v4:
> <no change>
> v3:
> Newly added
Original API InitializeCpuExceptionHandlers is used in DxeMain to initialize
exception handlers but it does not support setting up stack switch required
by Stack Guard feature. Using the new API instead to make sure Stack Guard
feature is applicable to most part of code.
Since this API is called before memory service initialization, there's no
way to call AllocateXxx API to reserve memory. Global variables are used
for this special case. GDT table is reserved at least 2KB which should be
big enough for all current use cases.
Cc: Star Zeng <star.zeng@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Suggested-by: Ayellet Wolman <ayellet.wolman@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
---
MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
index 433cca3a80..62a597edaf 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
+++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
@@ -258,7 +258,7 @@ DxeMain (
if (GuidHob != NULL) {
VectorInfoList = (EFI_VECTOR_HANDOFF_INFO *) (GET_GUID_HOB_DATA(GuidHob));
}
- Status = InitializeCpuExceptionHandlers (VectorInfoList);
+ Status = InitializeCpuExceptionHandlersEx (VectorInfoList, NULL);
ASSERT_EFI_ERROR (Status);
//
--
2.15.1.windows.2
next prev parent reply other threads:[~2017-12-06 8:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 8:49 [PATCH v4 00/11] Implement stack guard feature Jian J Wang
2017-12-06 8:49 ` [PATCH v4 01/11] MdeModulePkg/metafile: Add PCD PcdCpuStackGuard Jian J Wang
2017-12-06 8:49 ` [PATCH v4 02/11] UefiCpuPkg/UefiCpuPkg.dec: Add two new PCDs for stack switch Jian J Wang
2017-12-06 8:49 ` [PATCH v4 03/11] MdeModulePkg/CpuExceptionHandlerLib.h: Add a new API InitializeCpuExceptionHandlersEx Jian J Wang
2017-12-06 8:49 ` [PATCH v4 04/11] MdePkg/BaseLib: Add stack switch related definitions for IA32 Jian J Wang
2017-12-06 8:49 ` [PATCH v4 05/11] UefiCpuPkg/CpuExceptionHandlerLib: Add stack switch support Jian J Wang
2017-12-06 8:50 ` [PATCH v4 06/11] MdeModulePkg/CpuExceptionHandlerLibNull: Add new API implementation Jian J Wang
2017-12-06 8:50 ` [PATCH v4 07/11] ArmPkg/ArmExceptionLib: Add implementation of new API Jian J Wang
2017-12-06 8:50 ` [PATCH v4 08/11] UefiCpuPkg/MpLib: Add GDTR, IDTR and TR in saved AP data Jian J Wang
2017-12-06 8:50 ` [PATCH v4 09/11] UefiCpuPkg/CpuDxe: Initialize stack switch for MP Jian J Wang
2017-12-06 8:50 ` Jian J Wang [this message]
2017-12-06 8:50 ` [PATCH v4 11/11] MdeModulePkg/DxeIpl: Enable paging for Stack Guard Jian J Wang
2017-12-07 8:17 ` [PATCH v4 00/11] Implement stack guard feature Yao, Jiewen
2017-12-07 8:24 ` Wang, Jian J
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171206085005.14552-11-jian.j.wang@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox