Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 30 additions & 11 deletions Application/ModernSetupApp/ModernSetupAppActions.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,26 +376,45 @@ ModernSetupGetPageSelectableCount (
}

/**
Open the native Boot Manager for a visible Boot page row.
Launch the selected visible Boot#### option.

ModernSetupApp is the setup/front-page UI. It lists Boot#### summaries, but
hands Boot#### launch responsibility to edk2's native BootManagerMenuApp (or
UiApp on platforms where the native setup app remains the fallback). Selection
is accepted for the UI contract and is not dereferenced here.
The Boot page presents the same filtered Boot#### rows shown on screen. Enter
resolves the selected visible row back to its Boot#### option number, then
lets UefiBootManagerLib perform the actual boot attempt. The Exit page still
provides a separate native Boot Manager fallback for platforms where users
want edk2's original boot picker.

@param[in] Selection Zero-based visible Boot page row index. Ignored.
@param[in] Selection Zero-based visible Boot page row index.

@retval EFI_SUCCESS Native boot manager returned successfully.
@retval EFI_NOT_FOUND Native fallback app could not be resolved.
@retval others Status returned by the native fallback handoff.
@retval EFI_SUCCESS Boot option launched and returned successfully.
@retval EFI_NOT_FOUND Selection is out of range or the Boot#### option vanished.
@retval others Status recorded by UefiBootManagerLib.
**/
EFI_STATUS
ModernSetupLaunchSelectedBootOption (
IN UINTN Selection
)
{
(VOID)Selection;
return ModernSetupLaunchUiAppFallback (mModernSetupImageHandle);
EFI_STATUS Status;
MODERN_UI_BOOT_OPTION *Options;
UINTN OptionCount;
UINT16 OptionNumber;

Options = NULL;
Status = ModernUiBootDataGetOptions (mModernSetupImageHandle, &Options, &OptionCount);
if (EFI_ERROR (Status)) {
return Status;
}

if ((Options == NULL) || (Selection >= OptionCount)) {
ModernUiBootDataFreeOptions (Options, OptionCount);
return EFI_NOT_FOUND;
}

OptionNumber = Options[Selection].OptionNumber;
ModernUiBootDataFreeOptions (Options, OptionCount);

return ModernUiBootDataBootOption (OptionNumber);
}

/**
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ this file as both a release log and a lightweight development progress record.

### Fixed

- Changed ModernSetupApp Boot page Enter behavior to launch the selected
visible Boot#### entry through UefiBootManagerLib; native Boot Manager remains
available as the Exit-page fallback.
- Fixed rectangle fill rendering by using GOP `EfiBltVideoFill` instead of
passing a one-line buffer as a multi-line BLT source.
- Fixed text rendering setup by providing the HII Font output dimensions and
Expand Down
4 changes: 2 additions & 2 deletions Docs/IbvAndPlatformSetupSurvey.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ firmware stack.
| Surface | Display directly in App | App entry point only | Native FormBrowser owner |
| --- | --- | --- | --- |
| System / Dashboard | Firmware vendor/revision, architecture, form factor, boot mode, memory, display mode, Secure Boot, provider availability. | Detailed platform inventory. | Platform inventory HII or SMBIOS/ACPI-specific pages. |
| Boot | Boot#### number, active/hidden state, category, description, device path summary, launch selected option. | Boot order editing and boot policy. | Boot Maintenance Manager and platform boot HII. |
| Boot | Boot#### number, active/hidden state, category, description, and device path summary. Entries are launchable in ModernSetupApp; Enter attempts the selected Boot#### through UefiBootManagerLib. | Direct Boot#### launch, boot order editing, and boot policy. | Native Boot Manager, Boot Maintenance Manager, and platform boot HII. |
| Devices | HII formsets, device path inventory, capability providers. | Driver/device setup pages. | Device Manager, Driver Health, and each driver formset. |
| Security | Secure Boot, Setup Mode, PK/KEK/db/dbx presence, TPM/TCG/TCM protocol presence. | Key management, TPM physical presence, measured boot policy. | SecurityPkg/platform security HII. |
| Firmware Update | Capsule runtime support, capsule protocol, capsule report presence, firmware revision. | Capsule/update/recovery application. | Capsule/update HII or platform update application. |
Expand Down Expand Up @@ -74,7 +74,7 @@ productization coverage, and `P2` means more platform-specific follow-up scope.
| Domain / subsystem | Example options | Product fit | Architecture notes | ModernSetup handling | Priority |
| --- | --- | --- | --- | --- | --- |
| System overview / Main | Firmware vendor/version, build date, board SKU, serial, UUID, language, date/time, administrator/user password status. | Server, workstation, desktop, notebook, embedded. | Architecture-neutral; SMBIOS is common on x86/Arm servers and optional on RISC-V/LoongArch; RTC and language are standard UEFI surfaces. | Show read-only identity/status; provide native date/time, language, or password entry points when present. | P0 |
| Boot manager / boot policy | Boot order, one-time boot, UEFI/legacy mode when supported, PXE, HTTP boot, USB boot, network stack, boot timeout, fast boot. | All product classes; network boot is especially common on servers, workstations, and embedded products. | UEFI Boot#### is architecture-neutral; CSM/legacy is mainly an x86 client legacy item; HTTP/PXE depends on the NIC stack. | Show the Boot#### list and launch the selected option; editing and policy remain Boot Maintenance/platform HII-owned. | P0 |
| Boot manager / boot policy | Boot order, one-time boot, UEFI/legacy mode when supported, PXE, HTTP boot, USB boot, network stack, boot timeout, fast boot. | All product classes; network boot is especially common on servers, workstations, and embedded products. | UEFI Boot#### is architecture-neutral; CSM/legacy is mainly an x86 client legacy item; HTTP/PXE depends on the NIC stack. | Show the Boot#### list and launch the selected entry through UefiBootManagerLib; editing and policy remain Boot Maintenance/platform HII-owned. | P0 |
| Security / identity | Secure Boot, Setup Mode, key databases, TPM/PTT/fTPM/TCM, measured boot, physical presence, chassis intrusion, passwords. | All product classes; most common on servers, workstations, and notebooks. | Secure Boot variables are UEFI-standard; TPM/TCG is common on x86/Arm and optional on RISC-V/LoongArch; China-market platforms may expose TCM. | Show security posture and protocol/key presence; key management, passwords, physical-presence flows, and measured-boot policy stay native. | P0 |
| Firmware update / recovery | Capsule support, BIOS flash utility, recovery capsule, rollback prevention, dual-bank image, update log. | All product classes; embedded and server products emphasize recovery and lifecycle. | UEFI capsule interfaces are architecture-neutral; recovery media and flash layout are board-specific. | Show capability/status and open native update/recovery app or HII; the App does not perform flash writes. | P0 |
| Device / HII formset inventory | Device Manager, Driver Health, storage controller pages, NIC pages, USB controller pages, option ROM pages. | All product classes. | HII database and device paths keep this architecture-neutral; bus availability depends on platform. | Enumerate entries and open owning formsets through FormBrowser2; the App does not parse IFR or implement ConfigAccess. | P0 |
Expand Down
4 changes: 2 additions & 2 deletions Docs/IbvAndPlatformSetupSurvey.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ASUS、Gigabyte、MSI、ASRock、Dell、HP、Lenovo、HPE、Supermicro、Intel N
| 表面 | App 直接显示 | App 仅提供入口 | 原生 FormBrowser 归属 |
| --- | --- | --- | --- |
| System / Dashboard | Firmware vendor/revision、architecture、form factor、boot mode、memory、display mode、Secure Boot、provider availability。 | 详细平台 inventory。 | Platform inventory HII 或 SMBIOS/ACPI-specific pages。 |
| Boot | Boot#### number、active/hidden state、category、description、device path summary、launch selected option。 | Boot order editing 和 boot policy。 | Boot Maintenance Manager 和 platform boot HII。 |
| Boot | Boot#### number、active/hidden state、category、description、device path summary。ModernSetupApp 中条目可启动;回车通过 UefiBootManagerLib 尝试启动所选 Boot####。 | 直接启动 Boot####、Boot order editing 和 boot policy。 | 原生 Boot Manager、Boot Maintenance Manager 和 platform boot HII。 |
| Devices | HII formsets、device path inventory、capability providers。 | Driver/device setup pages。 | Device Manager、Driver Health 和各 driver formset。 |
| Security | Secure Boot、Setup Mode、PK/KEK/db/dbx presence、TPM/TCG/TCM protocol presence。 | Key management、TPM physical presence、measured boot policy。 | SecurityPkg/platform security HII。 |
| Firmware Update | Capsule runtime support、capsule protocol、capsule report presence、firmware revision。 | Capsule/update/recovery application。 | Capsule/update HII 或 platform update application。 |
Expand All @@ -58,7 +58,7 @@ ASUS、Gigabyte、MSI、ASRock、Dell、HP、Lenovo、HPE、Supermicro、Intel N
| 领域 / 子系统 | 示例选项 | 适用产品 | 架构说明 | ModernSetup 处理方式 | 优先级 |
| --- | --- | --- | --- | --- | --- |
| System overview / Main | Firmware vendor/version、build date、board SKU、serial、UUID、language、date/time、administrator/user password 状态。 | 服务器、工作站、桌面、笔记本、嵌入式。 | 架构中立;SMBIOS 在 x86/Arm 服务器常见,在 RISC-V/LoongArch 上可选;RTC 和 language 是 UEFI 标准界面。 | 展示只读身份/状态;存在原生 date/time、language、password 页面时只提供入口。 | P0 |
| Boot manager / boot policy | Boot order、one-time boot、支持时的 UEFI/legacy mode、PXE、HTTP boot、USB boot、network stack、boot timeout、fast boot。 | 所有产品类型;网络启动在服务器、工作站、嵌入式上尤其常见。 | UEFI Boot#### 架构中立;CSM/legacy 主要是 x86 客户端遗留项;HTTP/PXE 取决于 NIC 栈。 | 展示 Boot#### 清单并启动所选项;编辑和策略仍归 Boot Maintenance/平台 HII。 | P0 |
| Boot manager / boot policy | Boot order、one-time boot、支持时的 UEFI/legacy mode、PXE、HTTP boot、USB boot、network stack、boot timeout、fast boot。 | 所有产品类型;网络启动在服务器、工作站、嵌入式上尤其常见。 | UEFI Boot#### 架构中立;CSM/legacy 主要是 x86 客户端遗留项;HTTP/PXE 取决于 NIC 栈。 | 展示 Boot#### 清单,并通过 UefiBootManagerLib 启动所选条目;编辑和策略仍归 Boot Maintenance/平台 HII。 | P0 |
| Security / identity | Secure Boot、Setup Mode、key databases、TPM/PTT/fTPM/TCM、measured boot、physical presence、chassis intrusion、passwords。 | 所有产品类型;服务器、工作站、笔记本最常见。 | Secure Boot 变量是 UEFI 标准;TPM/TCG 在 x86/Arm 常见,在 RISC-V/LoongArch 可选;面向中国市场的平台可能出现 TCM。 | 展示安全态势和协议/key 存在性;key 管理、password、physical-presence 流程和 measured-boot 策略保持原生。 | P0 |
| Firmware update / recovery | Capsule support、BIOS flash utility、recovery capsule、rollback prevention、dual-bank image、update log。 | 所有产品类型;嵌入式和服务器更强调恢复与生命周期。 | UEFI capsule 接口架构中立;恢复介质和 flash layout 与主板相关。 | 展示能力/状态,并打开原生 update/recovery app 或 HII;App 不执行 flash 写入。 | P0 |
| Device / HII formset inventory | Device Manager、Driver Health、storage controller pages、NIC pages、USB controller pages、option ROM pages。 | 所有产品类型。 | 通过 HII database 和 device path 保持架构中立;总线可用性取决于平台。 | 枚举入口,并通过 FormBrowser2 打开归属 formset;App 不解析 IFR、不实现 ConfigAccess。 | P0 |
Expand Down
6 changes: 3 additions & 3 deletions Docs/ProductizationFeatureMatrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ show a summary or entry point, then open the owning HII form through
| Page | Common purpose | App should show | Complex settings owner | Current status |
| --- | --- | --- | --- | --- |
| Dashboard | First-glance platform state. | Firmware vendor/revision, architecture, form factor, boot mode, platform name, memory, display mode, boot count, Secure Boot state, HII/device count, provider availability. | App data providers. | Basic implemented. |
| Boot | Boot inventory and launch entry. | `BootOrder`, `Boot####`, active/hidden state, category, device-path summary, launch selected option. | Boot Maintenance HII pages for editing and advanced policy. | Basic implemented. |
| Boot | Boot inventory, selected-entry launch, and native Boot Manager fallback. | `BootOrder` / `Boot####` active/hidden state, category, and device-path summaries. Enter launches the selected visible Boot#### entry. | Boot Maintenance HII pages for editing and advanced policy. | Basic implemented. |
| Devices / HII | Entry point to platform setup pages and device inventory. | HII formsets, driver/device path rows, Driver Health entry, inventory rows. | Each driver formset via FormBrowser2. | Basic implemented. |
| Security | Read-only security posture. | Secure Boot, Setup Mode, PK/KEK/db/dbx state, TPM/TCG/TCM presence when available. | Security HII pages and platform policy drivers. | Basic implemented. |
| Firmware Update | Firmware lifecycle entry point. | Capsule support, firmware version, recovery/update entry, last update state when available. | Capsule/update HII or platform update app. | Basic read-only implemented. |
Expand All @@ -70,7 +70,7 @@ App-owned control.
| Domain / subsystem | Standard App IA | Provider / data source direction | App display / entry behavior | Native owner / non-goal |
| --- | --- | --- | --- | --- |
| System overview / Main | Dashboard; Exit for language/session affordances. | `ModernUiPlatformDataLib`, UEFI system table, SMBIOS when available. | Show firmware, architecture, form factor, platform name, memory/display summary, language/session hints. | Date/time, password, defaults, and save/discard workflows remain native. |
| Boot manager / boot policy | Boot; Dashboard quick category. | `ModernUiBootDataLib`, Boot#### variables, Boot Manager services. | List boot entries, active/hidden/category/path summary, and launch selected option. | Boot order editing, one-time boot policy, fast boot, PXE/HTTP policy stay Boot Maintenance/platform HII. |
| Boot manager / boot policy | Boot; Dashboard quick category. | `ModernUiBootDataLib`, Boot#### variables, Boot Manager services. | List boot entries and active/hidden/category/path summaries; Enter launches the selected entry via UefiBootManagerLib. | Boot order editing, one-time boot policy, fast boot, PXE/HTTP policy stay Boot Maintenance/platform HII. |
| Device / HII formset inventory | Devices / HII; Dashboard quick category. | `ModernUiDeviceDataLib`, HII database, device paths, Driver Health. | List native setup/device entries and open them via `EFI_FORM_BROWSER2_PROTOCOL.SendForm()`. | No IFR parsing, ConfigAccess implementation, form mutation, or varstore writes in App. |
| Security / identity | Security summary and Dashboard status. | `ModernUiSecurityDataLib`, Secure Boot variables, TCG/TCM/TPM protocol probes. | Show Secure Boot, Setup Mode, key presence, and TPM/TCM availability as posture. | Key enrollment, password, physical presence, measured boot policy, chassis policy remain native. |
| Firmware update / recovery | Firmware Update category; Dashboard lifecycle card. | `ModernUiFirmwareDataLib`, capsule runtime/protocol/report probes, platform update entry hints. | Show capsule/update/recovery availability and route to native updater when exposed. | No capsule construction, flash programming, rollback policy, or recovery writes in App. |
Expand Down Expand Up @@ -147,7 +147,7 @@ view of common App/provider behavior, not a request to hide `ARCH=X64`,
| Provider | Responsibility | Minimum v1 behavior | Failure behavior |
| --- | --- | --- | --- |
| `ModernUiPlatformDataLib` | Firmware, architecture, memory, display, platform name. | Fill dashboard strings and memory summary. | Show `Unknown` or `N/A`; never ASSERT. |
| `ModernUiBootDataLib` | Boot option enumeration and launch. | Show `Boot####` active/hidden/category/path summary; launch selected option. | Show empty state or returned `EFI_STATUS`. |
| `ModernUiBootDataLib` | Boot option enumeration and selected-entry launch. | Show `Boot####` active/hidden/category/path summary; launch the selected visible entry through UefiBootManagerLib while native Boot Manager remains available as fallback. | Show empty state or returned `EFI_STATUS`. |
| `ModernUiDeviceDataLib` | HII formset/device entry discovery. | List HII entries and open forms through FormBrowser2. | Keep row read-only and show `EFI_STATUS`. |
| `ModernUiSecurityDataLib` | Secure Boot, key database, and TCG protocol state. | Read standard variables and protocol presence as read-only. | Show `Unknown`; no writes. |
| `ModernUiFirmwareDataLib` | Capsule/update/recovery status. | Detect capsule runtime services, capsule architectural protocol, and capsule report presence. | Show `N/A`; open native update path when present. |
Expand Down
Loading
Loading