Skip to content

Commit 2c140ee

Browse files
crawfxrdjackpot51
andcommitted
System76PayloadPkg: Customize UiApp
Co-authored-by: Jeremy Soller <jeremy@system76.com> Signed-off-by: Tim Crawford <tcrawford@system76.com>
1 parent f6ad557 commit 2c140ee

11 files changed

Lines changed: 582 additions & 835 deletions

System76PayloadPkg/Application/UiApp/FrontPage.c

Lines changed: 504 additions & 211 deletions
Large diffs are not rendered by default.

System76PayloadPkg/Application/UiApp/FrontPage.h

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
/** @file
2-
Head file for front page.
3-
4-
Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
5-
SPDX-License-Identifier: BSD-2-Clause-Patent
6-
7-
**/
1+
// SPDX-License-Identifier: BSD-2-Clause-Patent
2+
// SPDX-FileCopyrightText: Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
3+
// SPDX-FileCopyrightText: 2025 System76, Inc.
84

95
#ifndef _FRONT_PAGE_H_
106
#define _FRONT_PAGE_H_
@@ -22,26 +18,16 @@ extern EFI_FORM_BROWSER2_PROTOCOL *gFormBrowser2;
2218

2319
#define SMBIOS_TYPE4_CPU_SOCKET_POPULATED BIT6
2420

25-
//
26-
// This is the VFR compiler generated header file which defines the
27-
// string identifiers.
28-
//
29-
#define PRINTABLE_LANGUAGE_NAME_STRING_ID 0x0001
30-
31-
//
32-
// These are defined as the same with vfr file
33-
//
34-
#define FRONT_PAGE_FORM_ID 0x1000
21+
// XXX: Must match VFR
3522

36-
#define LABEL_FRONTPAGE_INFORMATION 0x1000
37-
#define LABEL_END 0xffff
23+
#define FRONT_PAGE_FORM_ID 0x7600
3824

39-
#define FRONT_PAGE_FORMSET_GUID \
40-
{ \
41-
0x9e0c30bc, 0x3f06, 0x4ba6, {0x82, 0x88, 0x9, 0x17, 0x9b, 0x85, 0x5d, 0xbe} \
42-
}
25+
#define LABEL_FRONTPAGE_INFORMATION 0x1000
26+
#define LABEL_DEVICES_LIST 0x2000
27+
#define LABEL_END 0xffff
4328

44-
#define FRONT_PAGE_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('F', 'P', 'C', 'B')
29+
#define FRONT_PAGE_FORMSET_GUID { 0x8940cf32, 0x4f58, 0x40b1, { 0x97, 0x0a, 0xe8, 0xc5, 0x1f, 0x3a, 0x03, 0x50 }}
30+
#define FRONT_PAGE_CALLBACK_DATA_SIGNATURE SIGNATURE_32('F', 'P', 'C', 'B')
4531

4632
typedef struct {
4733
UINTN Signature;
@@ -51,7 +37,6 @@ typedef struct {
5137
//
5238
EFI_HII_HANDLE HiiHandle;
5339
EFI_HANDLE DriverHandle;
54-
EFI_STRING_ID *LanguageToken;
5540

5641
//
5742
// Produced protocols

System76PayloadPkg/Application/UiApp/FrontPageCustomizedUi.c

Lines changed: 1 addition & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -29,35 +29,8 @@ UiCustomizeFrontPage (
2929
IN VOID *StartOpCodeHandle
3030
)
3131
{
32-
//
33-
// Create "Select Language" menu with Oneof opcode.
34-
//
35-
UiCreateLanguageMenu (HiiHandle, StartOpCodeHandle);
36-
37-
//
38-
// Create empty line.
39-
//
40-
UiCreateEmptyLine (HiiHandle, StartOpCodeHandle);
41-
42-
//
43-
// Find third party drivers which need to be shown in the front page.
44-
//
45-
UiListThirdPartyDrivers (HiiHandle, &gEfiIfrFrontPageGuid, NULL, StartOpCodeHandle);
46-
47-
//
48-
// Create empty line.
49-
//
50-
UiCreateEmptyLine (HiiHandle, StartOpCodeHandle);
51-
52-
//
53-
// Create "Continue" menu.
54-
//
5532
UiCreateContinueMenu (HiiHandle, StartOpCodeHandle);
56-
57-
//
58-
// Create reset menu.
59-
//
60-
UiCreateResetMenu (HiiHandle, StartOpCodeHandle);
33+
UiListThirdPartyDrivers (HiiHandle, &gEfiIfrFrontPageGuid, NULL, StartOpCodeHandle);
6134
}
6235

6336
/**
@@ -96,46 +69,3 @@ UiFrontPageCallbackHandler (
9669

9770
return EFI_UNSUPPORTED;
9871
}
99-
100-
/**
101-
Update the banner string in the front page.
102-
103-
Current layout for the banner string like below:
104-
PS: Totally only 5 lines of banner supported.
105-
106-
Line 1: Left BannerStr RightBannerStr
107-
Line 2: Left BannerStr RightBannerStr
108-
Line 3: Left BannerStr RightBannerStr
109-
Line 4: Left BannerStr RightBannerStr
110-
Line 5: Left BannerStr RightBannerStr
111-
<EmptyLine>
112-
First menu in front page.
113-
...
114-
115-
@param LineIndex The line index of the banner need to check.
116-
@param LeftOrRight The left or right banner need to check.
117-
@param BannerStr Banner string need to update.
118-
Input the current string and user can update
119-
it and return the new string.
120-
121-
**/
122-
VOID
123-
UiCustomizeFrontPageBanner (
124-
IN UINTN LineIndex,
125-
IN BOOLEAN LeftOrRight,
126-
IN OUT EFI_STRING *BannerStr
127-
)
128-
{
129-
if ((LineIndex == 5) && LeftOrRight) {
130-
// Update STR_CUSTOMIZE_BANNER_LINE5_LEFT
131-
if (PcdGetBool (PcdTestKeyUsed)) {
132-
if (BannerStr != NULL) {
133-
FreePool (*BannerStr);
134-
}
135-
136-
*BannerStr = HiiGetString (gFrontPagePrivate.HiiHandle, STRING_TOKEN (STR_TEST_KEY_USED), NULL);
137-
}
138-
}
139-
140-
return;
141-
}

System76PayloadPkg/Application/UiApp/FrontPageCustomizedUi.h

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
99
#ifndef __FRONTPAGE_CUSTOMIZED_UI_H__
1010
#define __FRONTPAGE_CUSTOMIZED_UI_H__
1111

12-
/**
13-
Update the banner string in the front page.
14-
15-
Current layout for the banner string like below:
16-
PS: Totally only 5 lines of banner supported.
17-
18-
Line 1: Left BannerStr RightBannerStr
19-
Line 2: Left BannerStr RightBannerStr
20-
Line 3: Left BannerStr RightBannerStr
21-
Line 4: Left BannerStr RightBannerStr
22-
Line 5: Left BannerStr RightBannerStr
23-
<EmptyLine>
24-
First menu in front page.
25-
...
26-
27-
@param LineIndex The line index of the banner need to check.
28-
@param LeftOrRight The left or right banner need to check.
29-
@param BannerStr Banner string need to update.
30-
Input the current string and user can update
31-
it and return the new string.
32-
33-
**/
34-
VOID
35-
UiCustomizeFrontPageBanner (
36-
IN UINTN LineIndex,
37-
IN BOOLEAN LeftOrRight,
38-
IN OUT EFI_STRING *BannerStr
39-
);
40-
4112
/**
4213
Customize menus in the page.
4314

0 commit comments

Comments
 (0)