UefiCpuPkg: Update SmmCpuFeatureLib pass XCODE5 tool chain
https://bugzilla.tianocore.org/show_bug.cgi?id=849
In V2, use "mov rax, strict qword 0" to replace the hard code db.
1. Use lea instruction to get the address instead of mov instruction.
2. Use the dummy address as jmp destination, and add the logic to fix up
the address to the absolute address at boot time.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
(cherry picked from commit 1c7a65eba7
)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
SMM STM support functions
|
||||
|
||||
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
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
|
||||
@@ -116,7 +116,6 @@ UINTN mMsegSize = 0;
|
||||
|
||||
BOOLEAN mStmConfigurationTableInitialized = FALSE;
|
||||
|
||||
|
||||
/**
|
||||
The constructor function
|
||||
|
||||
@@ -138,6 +137,11 @@ SmmCpuFeaturesLibStmConstructor (
|
||||
EFI_HOB_GUID_TYPE *GuidHob;
|
||||
EFI_SMRAM_DESCRIPTOR *SmramDescriptor;
|
||||
|
||||
//
|
||||
// Initialize address fixup
|
||||
//
|
||||
SmmCpuFeaturesLibStmSmiEntryFixupAddress ();
|
||||
|
||||
//
|
||||
// Call the common constructor function
|
||||
//
|
||||
|
Reference in New Issue
Block a user