Mike,
I resent V2 patch and reduced most of the global variable references.
Furtherly, I added more CONST modifier to avoid test case accidently modifies
the system parameter structure.
I submitted a Bugzilla https://bugzilla.tianocore.org/show_bug.cgi?id=2863 to
capture what you suggested
Hi Ray,
In the following Unit Test Functions, I recommend passing in
mDefaultSystemParameter as the Context parameter to reduce the
use of a global variables.
* UnitTestIsMtrrSupported()
* UnitTestGetVariableMtrrCount()
* UnitTestGetFirmwareVariableMtrrCount()
* UnitTestMtrrGetFixedMtrr()
*
On 07/17/20 09:33, Ray Ni wrote:
> Add host based unit tests for the MtrrLib services.
> The BaseLib services AsmCpuid(), AsmReadMsr64(), and
> AsmWriteMsr64() are hooked and provide simple emulation
> of the CPUID leafs and MSRs required by the MtrrLib to
> run as a host based unit test.
>
>
Add host based unit tests for the MtrrLib services.
The BaseLib services AsmCpuid(), AsmReadMsr64(), and
AsmWriteMsr64() are hooked and provide simple emulation
of the CPUID leafs and MSRs required by the MtrrLib to
run as a host based unit test.
Test cases are developed for each of the API.
For