-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new MTRR Test Point test #314
base: dev/202405
Are you sure you want to change the base?
Conversation
UINTN | ||
GetPlatformMtrrCacheData ( | ||
OUT VARIABLE_MTRR_INFO **CheckedMtrrs | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UINTN | |
GetPlatformMtrrCacheData ( | |
OUT VARIABLE_MTRR_INFO **CheckedMtrrs | |
); | |
UINTN | |
EFIAPI | |
GetPlatformMtrrCacheData ( | |
OUT VARIABLE_MTRR_INFO **CheckedMtrrs | |
); |
#ifndef _TEST_POINT_MTRR_INFO_LIB_H_ | ||
#define _TEST_POINT_MTRR_INFO_LIB_H_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#ifndef _TEST_POINT_MTRR_INFO_LIB_H_ | |
#define _TEST_POINT_MTRR_INFO_LIB_H_ | |
#ifndef TEST_POINT_MTRR_INFO_LIB_H_ | |
#define TEST_POINT_MTRR_INFO_LIB_H_ |
An interface for platforms to define the expected MTRR cache types for specific | ||
regions by Ready To Boot. Create an array of VARIABLE_MTRR_INFO structures for every | ||
MTRR range that you want to validate. If any of the checked regions don't have the | ||
matching caching type the test will report an error for the failing range and return. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the library interface should be tied to "Ready to Boot" as a whole.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend leaving this generic and let individual functions handle the boot point details.
|
||
**/ | ||
UINTN | ||
GetPlatformMtrrCacheData ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that this interface should be scoped to the point the MTRR settings are valid. Either a boot point parameter or separate function for each boot point.
# Null implementation of TestPointMtrrInfoLib.h that doesn't return any MTRRs that we want to check. | ||
# This is for compatibility purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Null implementation of TestPointMtrrInfoLib.h that doesn't return any MTRRs that we want to check. | |
# This is for compatibility purposes. | |
# Null implementation of the TestPointMtrrInfoLib class that doesn't return any MTRRs that we want to check. | |
# This is for compatibility purposes. |
@@ -0,0 +1,411 @@ | |||
/** @file | |||
|
|||
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is authored by Intel as BSD-2-Clause-Patent but not in edk2-platforms yet?
**/ | ||
|
||
#include <Uefi.h> | ||
#include <PiPei.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PiPei.h
should not be included in a file targeting DXE.
Description
Add a new MTRR Test Point test that runs at Ready to Boot. This test checks the systems MTRRs at Ready to Boot versus the expected MTRR settings the platform publishes.
For details on how to complete these options and their meaning refer to CONTRIBUTING.md.
How This Was Tested
Tested on Intel physical platforms. MTRRs were correctly read and validated at Ready to Boot.
Integration Instructions
Enable bit 6 in byte 4 of the
gMinPlatformPkgTokenSpaceGuid.PcdTestPointIbvPlatformFeature
PCD to actually run the test. Additionally, a platform will need to create their version of the functionGetPlatformMtrrCacheData
. This returns the expected MTRR cache settings will be at ready to boot which will be used for verification.