Skip to content
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

Upstream/cm object parser #53

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

jeshuasmith
Copy link
Contributor

@jeshuasmith jeshuasmith commented Oct 6, 2023

While using the ConfigurationManagerObjectParser to dump objects and debug adding new objects, I noticed some bugs and deficiencies. This series is intended to address those.

This fixes two bugs and adds some enhancements to the handling of
characters and strings in objects being printed by the CM ObjectParser.

Bug fixes:
1. PrintOemID() currently attempts to print characters with "%C",
   but the correct syntax is (lowercase) "%c". This bug results in
   "CCCCCC" being printed instead of the actual ASCII characters.
2. PrintString() is being passed a pointer to data in objects, but in
   some cases this data is the actual string to print and other cases
   it is a pointer to the string to print. This adds a PrintStringPtr
   function and uses the correct functions depending on the situation.

Enhancements:
1. Some objects contain ASCII characters, which are currently printed
   as their hex values. This adds functions to print out ASCII
   character fields as text rather than hex, and uses those functions in
   several cases where the object data is defined to be ASCII.
2. The PrintOemID() function is replaced with the new identical but more
   generecically-named PrintChar6() function.

JIRA TEGRAUEFI-3019

Signed-off-by: Jeshua Smith <jeshuas@nvidia.com>
Change-Id: I4c63f6901dbc2b00650c9ccd66cf826ada6e3e25
This patch enhances error handling and reporting in the CM ObjectParser.
Specifically:
1. ObjectIDs used as array indexes are checked for being out of bounds,
   and if so an error message is printed before the assert.
2. An error message is printed for unsupported NameSpaceIDs.
3. Adds support for unimplemented parsers by allowing IDs to list a
   NULL parser, resulting in an unimplemented message being printed.

JIRA TEGRAUEFI-3020

Signed-off-by: Jeshua Smith <jeshuas@nvidia.com>
Change-Id: I91590ede0f36e18dace24f8760d3f346650fe40f
@jeshuasmith jeshuasmith added Pending EDK2 Review EDK2 maintainer review needed Pending EDK2 merge Change is not in tianocore/master Pending EDK2 stable release Change is not in most recent edk2-stable tag labels Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending EDK2 merge Change is not in tianocore/master Pending EDK2 Review EDK2 maintainer review needed Pending EDK2 stable release Change is not in most recent edk2-stable tag
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant