| Age | Commit message (Collapse) | Author | Files | Lines |
|
This change adds the support of reading CNTPCT_EL0 and ID_AA64ISAR0_EL1
through current BaseLib definition.
This paves way to allow the linkage of these functions needed on other
host based unit tests.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
|
|
The existing UnitTestHostBaseLib has some source entries that are either
redundant or for unsupported architectures.
This change consolidated the redundant entries and removed the entries
for unsupported architectures.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
|
|
This change adds a few preprocessors to build AArch64 host based unit
tests properly.
An AArch64 specific instance of `gUnitTestHostBaseLib` is created to
abstract the reference of arch specific special instructions.
Signed-off-by: Kun Qin <kuqin12@gmail.com>
|
|
Always access PcdControlFlowEnforcementPropertyMask using
FixedPcdGet() in NASM source files and update INFs to correctly
declare that PcdControlFlowEnforcementPropertyMask is always
accessed as a Fixed PCD.
PcdControlFlowEnforcementPropertyMask is declared in MdePkg.dec
in the [PcdsFixedAtBuild] section, so this PCD does not support
any other PCD access types.
This change resolves ld warnings from GCC and CLANGDWARF builds
for relocations in read-only text sections because use of PcdGet()
in NASM source files reads the value into eax from the memory
location of a const global variable that requires a relocation
fixup.
By changing PcdGet() to FixedPcdGet(), eax is loaded with an
immediate value known at build time and no relocation fixups for
PcdControlFlowEnforcementPropertyMask are required.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
Similar to Intel's Tdx, we need a mechanism to detect running as
an AMD SEV guest that will work in all phases everywhere. This
will be immediately used to prevent usage of MTRRs with SEV guests.
Signed-off-by: Richard Relph <richard.relph@amd.com>
|
|
edk2 is dropping support for the ARM32 architecture. This
commit removes ARM32 code from BaseLib.
Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
|
|
Remove workaround for GCC compilers that is no longer
required. Keeping this implementation of __chkstk() generates
duplicate symbol build failures with Windows/CLANGPDB builds
host-based unit test builds.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
|
|
Update BaseLib host-based unit test INF file to only list
VALID_ARCHITECTURES of IA32 and X64 to align with all other
host-based unit test INF files. The UnitTestFrameworkPkg only
provides build support of host-based unit tests to OS applications
for IA32 and X64.
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Oliver Smith-Denny <osde@linux.microsoft.com>
|
|
Remove HOST_APPLICATION limitation for UnitTestHostBaseLib, so that
this library can be used as BaseLib by Emulator.
Also, add some missing files
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
|
|
RVCT is obsolete and no longer used.
Remove support for it.
Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
|
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3675
Add QuickSort function into BaseLib
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: IanX Kuo <ianx.kuo@intel.com>
|
|
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2862
Add ReadMmx()/WriteMmx() services
Add MemoryFence() service
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
|
|
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2800
Add a new version of BaseLib that is safe for use from host based
unit test applications. Host based unit test applications may need
to provide implementations of some BaseLib functions that provide
simple emulation to exercise the code under test. The structure
UNIT_TEST_HOST_BASE_LIB is filled in with services that provide
default emulation for BaseLib APIs that would normally generate
exceptions in a host based unit test application. This structure
allows an individual unit test to replace the default emulation of
a BaseLib service with an alternate version that is required by a
specific unit test. A global variable of type UNIT_TEST_HOST_BASE_LIB
is provided through the new UnitTestHostBaseLib library class.
Normally cmocka would be used to mock services the code under
test calls. However, the BaseLib is used by the Unit Test
Framework itself, so using a mocked interface is not possible.
The use of a structure to provide hooks for unit test is not
expected to be a common feature. It should only be required
for libraries that are used by both the Unit Test Framework and
the code under test where the code under test requires a
different behavior than the Unit Test Framework.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
|