Skip to content

build: add ACS_LEVEL CMake flag for baremetal compliance level#405

Merged
chetan-rathore merged 1 commit into
ARM-software:mainfrom
chetan-rathore:bm_level_cmake
May 19, 2026
Merged

build: add ACS_LEVEL CMake flag for baremetal compliance level#405
chetan-rathore merged 1 commit into
ARM-software:mainfrom
chetan-rathore:bm_level_cmake

Conversation

@chetan-rathore
Copy link
Copy Markdown
Contributor

Introduce a CMake build-time option, -DACS_LEVEL=, that overrides the per-platform PLATFORM_OVERRIDE__LEVEL compliance level for baremetal ACS runs.

Accepted values:

  • Positive integer : sets ctx->level_value = and selects LVL_FILTER_MAX (run all rules with level <= n). Per-ACS valid ranges are validated at configure time: bsa=1, sbsa=3..7, pc_bsa=1; out-of-range values produce a warning and are clamped at runtime.
  • 'fr' (case-insensitive): selects LVL_FILTER_FR (future-requirements mode); ctx->level_value is left at the platform default.

When ACS_LEVEL is not set, the existing platform header default is used.

Changes:

  • CMakeLists.txt: validate ACS_LEVEL, define ACS_LEVEL= or ACS_LEVEL_FR for the C sources, and forward the value to nested wrapper builds via DEFAULT_OVERRIDE_ARGS.
  • apps/baremetal/{bsa,sbsa,pc_bsa}_main.c: honor ACS_LEVEL / ACS_LEVEL_FR when applying user config defaults; existing runtime range clamping is preserved.
  • pal/baremetal/module_config.rst: document the new flag and accepted values.

Change-Id: I01221549662678a61b3ecf57439a79fb29c9b64d

Introduce a CMake build-time option, -DACS_LEVEL=<value>, that overrides the per-platform PLATFORM_OVERRIDE_<ACS>_LEVEL compliance level for baremetal ACS runs.

Accepted values:

  * Positive integer <n>: sets ctx->level_value = <n> and selects LVL_FILTER_MAX (run all rules with level <= n). Per-ACS valid ranges are validated at configure time: bsa=1, sbsa=3..7, pc_bsa=1; out-of-range values produce a warning and are clamped at runtime.

  * 'fr' (case-insensitive): selects LVL_FILTER_FR (future-requirements mode); ctx->level_value is left at the platform default.

When ACS_LEVEL is not set, the existing platform header default is used.

Changes:

  * CMakeLists.txt: validate ACS_LEVEL, define ACS_LEVEL=<n> or ACS_LEVEL_FR for the C sources, and forward the value to nested wrapper builds via DEFAULT_OVERRIDE_ARGS.

  * apps/baremetal/{bsa,sbsa,pc_bsa}_main.c: honor ACS_LEVEL / ACS_LEVEL_FR when applying user config defaults; existing runtime range clamping is preserved.

  * pal/baremetal/module_config.rst: document the new flag and accepted values.

Signed-off-by: Chetan Singh <chetan.singh2@arm.com>
Change-Id: I01221549662678a61b3ecf57439a79fb29c9b64d
@chetan-rathore
Copy link
Copy Markdown
Contributor Author

The SBSA NIST failure is not due to PR changes, but due to recent changes in edk2-libc which resulting in patch apply failures.

SBSA NIST needs to be regenerated, will be taken in separate ticket.

edk2-libc change reference: tianocore/edk2-libc@e9fed83

@chetan-rathore chetan-rathore merged commit 3e8a0a8 into ARM-software:main May 19, 2026
54 of 58 checks passed
@chetan-rathore chetan-rathore deleted the bm_level_cmake branch May 19, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant