-
Notifications
You must be signed in to change notification settings - Fork 144
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
Dynamictables: Add SMBIOS dispatcher and generators #510
Open
gmahadevan
wants to merge
12
commits into
tianocore:dynamictables-reorg
Choose a base branch
from
gmahadevan:dynamictables-reorg-upto19
base: dynamictables-reorg
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Dynamictables: Add SMBIOS dispatcher and generators #510
gmahadevan
wants to merge
12
commits into
tianocore:dynamictables-reorg
from
gmahadevan:dynamictables-reorg-upto19
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a new helper macro which is a wrapper over StringTableAddString(). It adds a string to the string table, and if the string is NULL or empty, add "" string instead. Signed-off-by: Dat Mach <[email protected]> Signed-off-by: Nick Ramirez <[email protected]> Signed-off-by: Girish Mahadevan <[email protected]>
SMBIOS Structure Types 0 through 127 (7Fh) are reserved for and defined by the SMBIOS specification. Types 128 through 256 (80h to FFh) are available for system and OEM-specific information. Therefore, define a new type 'SMBIOS_TABLE_TYPE' that represents a SMBIOS structure type and include it in the definition of CM_STD_OBJ_SMBIOS_TABLE_INFO. Acked-by: Abner Chang <[email protected]> Signed-off-by: Sami Mujawar <[email protected]> Cc: Alexei Fedorov <[email protected]> Cc: Pierre Gondois <[email protected]> Cc: Girish Mahadevan <[email protected]> Cc: Jeff Brasen <[email protected]> Cc: Ashish Singhal <[email protected]> Cc: Nick Ramirez <[email protected]> Cc: William Watson <[email protected]> Cc: Abner Chang <[email protected]> Cc: Samer El-Haj-Mahmoud <[email protected]> Cc: Jose Marinho <[email protected]>
Some SMBIOS structure/table fields have dependency on other SMBIOS structures/tables. These dependencies are established using handles pointing to the dependent tables. A SMBIOS table handle can be obtained by either installing a SMBIOS table or by allocating a handle, which requires complex management to avoid any clashes. Obtaining a SMBIOS handle by installation requires that the dependent table is installed before the parent SMBIOS table can be installed. Therefore, introduce a SMBIOS table dispatcher that walks the SMBIOS dependency list and schedules the dependent tables to be installed before the parent table is installed. Signed-off-by: Sami Mujawar <[email protected]> Cc: Alexei Fedorov <[email protected]> Cc: Pierre Gondois <[email protected]> Cc: Girish Mahadevan <[email protected]> Cc: Jeff Brasen <[email protected]> Cc: Ashish Singhal <[email protected]> Cc: Nick Ramirez <[email protected]> Cc: William Watson <[email protected]> Cc: Abner Chang <[email protected]> Cc: Samer El-Haj-Mahmoud <[email protected]> Cc: Jose Marinho <[email protected]>
Add an extern call to build SMBIOS table as this seemed to have been removed during v2. Signed-off-by: Girish Mahadevan <[email protected]>
Update the SMBIOS table dispatcher dependency table to add the table dependencies for SMBIOS table Type 19, Type 20, Type 27, Type 35 and Type 37. The SMBIOS table Type 35 can have dependency on 6 other SMBIOS tables. Therefore, increase the MAX_SMBIOS_DEPENDENCY to 6, and also update the SMBIOS table dispatcher table accordingly. Signed-off-by: Sami Mujawar <[email protected]> Cc: Alexei Fedorov <[email protected]> Cc: Pierre Gondois <[email protected]> Cc: Girish Mahadevan <[email protected]> Cc: Jeff Brasen <[email protected]> Cc: Ashish Singhal <[email protected]> Cc: Nick Ramirez <[email protected]> Cc: William Watson <[email protected]> Cc: Abner Chang <[email protected]> Cc: Samer El-Haj-Mahmoud <[email protected]> Cc: Jose Marinho <[email protected]>
Some SMBIOS tables do not have a fixed dependency and can depend on any other SMBIOS tables. Therefore, the SMBIOS dispatcher cannot define a fixed sequence for dispatching these tables. A possible solution is to defer the dispatch of such SMBIOS tables towards the end, assuming that the dependent SMBIOS tables would have been dispatched by then. Therefore, introduce a dispatch order attribute such that SMBIOS tables that have a fixed dependency sequence are configured as Default Ordered, and the SMBIOS tables that do not have a fixed dependency have an Order attribute specifying an Order Level. An Order Level is used to sequence the dispatch of Ordered SMBIOS tables. The Default Ordered SMBIOS tables are dispatched first and a dependency walk is performed to dispatch the dependent tables by iterating through the SMBIOS_TABLE_DISPATCHER.Dependency[]. Once all Default ordered SMBIOS tables have been dispatched, the Ordered SMBIOS tables would be scheduled for dispatch in increasing order as of the Order Level, e.g. OrderL1, OrderL2, ... Note: The dispatcher does not perform a dependency walk for the Ordered SMBIOS tables as the expectation is that the dependent SMBIOS tables would be already dispatched. A top level dispatch function DispatchSmbiosTables() has been introduced to schedule the dispatch of Default Ordered and Ordered SMBIOS tables. Signed-off-by: Sami Mujawar <[email protected]> Cc: Alexei Fedorov <[email protected]> Cc: Pierre Gondois <[email protected]> Cc: Girish Mahadevan <[email protected]> Cc: Jeff Brasen <[email protected]> Cc: Ashish Singhal <[email protected]> Cc: Nick Ramirez <[email protected]> Cc: William Watson <[email protected]> Cc: Abner Chang <[email protected]> Cc: Samer El-Haj-Mahmoud <[email protected]> Cc: Jose Marinho <[email protected]>
Add the SMBIOS Table generator code to the DynamicTablesPkg. This change includes adding new logic to the DynamicTableManager to process and add SMBIOS tables and augmenting the existing SMBIOS Factory generator to include installing multiple SMBIOS tables . Also included is running the SMBIOS and ACPI table generation as part of the SMBIOS and ACPI protocol GUID callback notifications respectively. Change-Id: Icc090108c16e87657260af6daf856f3d69b602e3 Signed-off-by: Girish Mahadevan <[email protected]> Reviewed-by: Jeff Brasen <[email protected]>
Split the SMBIOS and ACPI table generators into their own files. Signed-off-by: Girish Mahadevan <[email protected]> Reviewed-by: Jeff Brasen <[email protected]>
Introduce a new namespace for SMBIOS related CM Objects. Signed-off-by: Girish Mahadevan <[email protected]> Reviewed-by: Nick Ramirez <[email protected]> Reviewed-by: Jeff Brasen <[email protected]>
Add the Generator library for SMBIOS Table Type 17 - Memory Device. Signed-off-by: Girish Mahadevan <[email protected]> Reviewed-by: Jeff Brasen <[email protected]>
Add the Generator library for SMBIOS Table Type 16 - Physical Memory Array. Signed-off-by: Girish Mahadevan <[email protected]> Reviewed-by: Jeff Brasen <[email protected]> Reviewed-by: Nick Ramirez <[email protected]>
Add the Generator library for SMBIOS Table Type 19 - Memory Array Mapped Address. Signed-off-by: Girish Mahadevan <[email protected]> Reviewed-by: Jeff Brasen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial set of changes to add support for SMBIOS table generation that has the mods to the DynamicTablesPkg framework to install SMBIOS tables and 3 SMBIOS table generators for Type 16/17/19
DynamicTablesPkg: Smbios Memory Array Mapped Address (Type 19)
DynamicTablesPkg: Smbios Physical Memory Array (Type 16)
DynamicTablesPkg: Smbios Memory Device (Type 17)
DynamicTablesPkg: Introduce new namespace for SMBIOS Objects
DynamicTablesPkg: Split the ACPI and SMBIOS table generators
DynamicTablesPkg: Add SMBIOS table generation
DynamicTablesPkg: Add Ordered dispatch support for SMBIOS tables
DynamicTablesPkg: Update SMBIOS dispatcher dependency table
DynamicTablesPkg: Add extern call to build SMBIOS table
DynamicTablesPkg: Add SMBIOS table dispatcher
DynamicTablesPkg: Define a SMBIOS Structure/Table type
DynamicTablesPkg: SmbiosStringLib: Add new helper macro