Skip to content

Commit

Permalink
The profile name variable should be a string array (microsoft#210)
Browse files Browse the repository at this point in the history
# Preface

Please ensure you have read the [contribution
docs](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md) prior
to submitting the pull request. In particular,
[pull request
guidelines](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md#pull-request-best-practices).

## Description

This change fixes a bug from previous autogen contract data library,
where the profile name field should actually be an array of `CHAR8*`.

For each item, place an "x" in between `[` and `]` if true. Example:
`[x]`.
_(you can also check items in the GitHub UI)_

- [ ] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [ ] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [ ] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

## How This Was Tested

This was tested with consumer build pipeline on proprietary platforms.

## Integration Instructions

N/A
  • Loading branch information
kuqin12 authored Jun 22, 2023
1 parent 9c59d2e commit 8ec2959
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion SetupDataPkg/Include/Library/PlatformConfigDataLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ extern PROFILE gProfileData[];
// this does not count the generic profile, which is not
// in gProfileData, but rather in gKnobData's defaults
extern UINTN gNumProfiles;
extern CHAR8 *gProfileFlavorName;
extern CHAR8 *gProfileFlavorNames[];

#endif // PLATFORM_CONFIG_DATA_LIB_H_
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
#include <Uefi.h>
#include <ConfigStdStructDefs.h>

KNOB_DATA gKnobData = { 0 };
KNOB_DATA gKnobData[1] = { 0 };

UINTN gNumKnobs = 0;

PROFILE gProfileData = { 0 };

CHAR8 *gProfileFlavorName = { 0 };
PROFILE gProfileData[1] = { 0 };

UINTN gNumProfiles = 0;

CHAR8 *gProfileFlavorNames[1] = { NULL };
2 changes: 1 addition & 1 deletion SetupDataPkg/Tools/KnobService.py
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ def generate_profiles(schema, profile_header_path, profile_paths, efi_type, prof

out.write(get_line_ending(efi_type))
out.write(get_type_string("char*", efi_type) + " g{}[PROFILE_COUNT]".format(
naming_convention_filter("_profile_flavor_name", False, efi_type)) + " = {"
naming_convention_filter("_profile_flavor_names", False, efi_type)) + " = {"
)
out.write(get_line_ending(efi_type))
for profile_name in names_list:
Expand Down

0 comments on commit 8ec2959

Please sign in to comment.