-
Notifications
You must be signed in to change notification settings - Fork 153
2406 smbios dispatcher v3 #513
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
2406 smbios dispatcher v3 #513
Conversation
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]>
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]>
|
@gmahadevan I have generated this PR to get the initial SMBIOS dispatcher patches merged into staging. |
Hi @samimujawar Thanks ! Do we want to merge the last patch 3cf8e06
|
pierregondois
left a comment
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.
The patches look good to me
@gmahadevan Is there any concern ? |
|
Agree . Thanks @pierregondois @samimujawar |
ba97acd
into
tianocore:dynamictables-reorg
Some SMBIOS tables have dependencies on other SMBIOS tables. These
dependencies are established using handles pointing to the dependent
SMBIOS tables.
This requires the dependent SMBIOS table to be installed before the
parent SMBIOS table can be installed.
To facilitate dynamic SMBIOS table generation, a SMBIOS table
dispatcher has been introduced. The SMBIOS table dispatcher
schedules the installation of dependent SMBIOS tables before
the parent SMBIOS table is installed.
This v3 series addresses the feedback received for the v2 series.
The feedback for the v2 series was posted in #510
The SMBIOS dispatcher categorises the SMBIOS tables as:
The default ordered SMBIOS tables have a fixed defined dependency
i.e. their dependency list can be traversed by the dispatcher to
schedule their dispatch.
Ordered SMBIOS tables do not have a well defined dependency and
could depend on any SMBIOS table, for e.g. the SMBIOS table Group
Associations (Type 14) does not have a well defined dependency as
it can be used to associate any two SMBIOS tables.
Therefore, ordered SMBIOS tables are scheduled for dispatch after
the default ordered SMBIOS tables are dispatched. The ordered SMBIOS
tables can also have a level that allows the dispatcher to sequence
their dispatch.
Note: The PR #510 needs to catchup with this PR.