summaryrefslogtreecommitdiff
path: root/Platform/Intel/BoardModulePkg
AgeCommit message (Collapse)AuthorFilesLines
2025-07-08Platform/Intel: Remove UGA supportGuoMinJ1-1/+0
The Universal Graphics Adapter (UGA) is a graphic abstraction. The UGA I/O and Draw protocols are deprecated since UEFI 2.0 was introduced. Cf. the UEFI spec v2.9: "Appendix L - EFI 1.10 Protocol Changes and Deprecation List" section L.2 "Deprecated Protocols" Remove the UGA support. Signed-off-by: GuoMinJ <newexplorerj@gmail.com> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
2024-10-02BoardModulePkg: Added Mock library for BiosIdLibBhavani Subramanian5-0/+118
Added a gmock for GoogleTests that pull in BiosIdLib. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Vivian Nowka-Keane <vnowkakeane@linux.microsoft.com>
2024-09-16Update code to be more C11 compliant by using __func__Rebecca Cran1-1/+1
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout edk2-platforms. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2024-09-16Replace deprecated EFI_D_* with DEBUG_*Rebecca Cran1-1/+1
Replaced the deprecated EFI_D_{INFO,WARN,ERROR,VERBOSE} usage with DEBUG_{INFO,WARN,ERROR,VERBOSE}. Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
2024-01-05BoardModulePkg\Library\BiosIdLib: Support Standalone MMLixia Huang8-201/+243
Add Standalone Mm BiosIdLib and format code with Uncrustify. Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Lixia Huang <lisa.huang@intel.com>
2023-05-16Platform/Intel: Fix type mismatches from prototypes in BoardBdsHookLib.cRebecca Cran1-0/+3
Add EFIAPI to the implementations of: BdsBeforeConsoleAfterTrustedConsoleCallback BdsBeforeConsoleBeforeEndOfDxeGuidCallback BdsAfterConsoleReadyBeforeBootOptionCallback This makes them match the prototypes, and avoids an -Wlto-type-mismatch warning. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
2023-01-19BoardModulePkg: Adds PCD to load UEFI Shell imageAbdul Lateef Attar2-15/+17
defines two PCDs, PcdShellFile and PcdShellFileDesc, which holds the GUID and description of the UEFI shell file to be loaded. A PCDs based solution gives flexibility to the user to load different images, by just overriding the DSC file. The user can load a diagnostic image or test image during PCDBootToShellOnly or later stages. Cc: Isaac Oram <isaac.w.oram@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com> Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
2023-01-19BoardModulePkg: Copy device path before processingAbdul Lateef Attar1-5/+19
GCC compiler puts the DevicePath PCDs to the read-only section. During boot if try to process the device path after PtrGetPtr it throws a page fault exception. Hence making a local copy using DuplicateDevicePath() to avoid the page fault exception. Cc: Isaac Oram <isaac.w.oram@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Abdul Lateef Attar <abdattar@amd.com> Reviewed-by: : Isaac Oram <isaac.w.oram@intel.com>
2022-09-16BoardModulePkg/BoardBdsHookLib: Fix F7 overwrites Boot0000James Wang1-9/+12
Check if mBootMenuOptionNumber is valid or not before calling RegisterBootOptionHotkey to avoid overwriting Boot0000 Cc: Eric Dong <eric.dong@intel.com> Cc: Isaac Oram <isaac.w.oram@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: James Wang <jameswang@ami.com> Reviewed-by: Isaac Oram <isaac.w.oram@intel.com>
2022-09-01BoardModulePkg/Include: Add include for stage behavior logicIsaac Oram1-0/+37
This is a commonly used set of settings modifications based on the boot stage targeted. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Isaac Oram <isaac.w.oram@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2021-08-29BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber checkBenjamin Doron1-1/+1
If CreateFvBootOption() fails, RegisterFvBootOption() will return LoadOptionNumberUnassigned, which is non-zero. Therefore, correct the check when attempting to register hotkeys, to be able to detect if UiApp is not present. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2021-08-27BoardModulePkg/BoardBdsHookLib: Register UiApp as boot optionBenjamin Doron2-22/+11
BootManagerMenuApp is the default PcdBootManagerMenuFile. It allows choosing a boot device, but system configuration is performed in UiApp. Therefore, un-comment and fix UiApp boot option registration. The F2 hotkey can be used to enter UiApp. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2021-03-31Platform/BoardModulePkg: Consume MdeLibs.dsc.inc for RegisterFilterLibDandan Bi1-1/+3
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246 MdeLibs.dsc.inc was added for some basic/default library instances provided by MdePkg and RegisterFilterLibNull Library was also added into it as the first version of MdeLibs.dsc.inc. So update platform dsc to consume MdeLibs.dsc.inc for RegisterFilterLibNull which will be consumed by IoLib and BaseLib. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
2021-03-11Intel/BoardModulePkg: sort load option in the first bootLiu, Zhiguang1-35/+37
Currently, load option is only sorted when setup is the first priority in boot option. However, Below change in UefiBootManagerLib puts setup in the end, which causes the sort function won't be called. MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder SHA-1: 7f34681c488aee2563eaa2afcc6a2c8aa7c5b912 This patch will set a NV variable in the first boot, and sort the boot option in first boot. Reviewed-by: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Zhichao Gao <zhichao.gao@intel.com> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2020-11-02BoardModulePkg: Early connect PCI Root Bridge in BoardBdsHookLibHeng Luo1-39/+38
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3016 Trigger PCI Bus scanning at BdsBeforeConsoleAfterTrustedConsoleCallback(). Move the call to EnumUsbKeyboard() to after PciEnumComplete. Cc: Eric Dong <eric.dong@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Heng Luo <heng.luo@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2020-04-21BoardModulePkg: Add Generic BoardBootManagerLibPrince Agyeman2-0/+142
This library implements a generic PlatformBootManagerWaitCallback and PlatformBootManagerUnableToBoot which will be linked Minplatform's PlatformBootManager library instance. Cc: Michael Kubacki <michael.a.kubacki@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
2020-04-21BoardModulePkg: Add BDS Hook DXE DriverPrince Agyeman2-0/+167
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 This is a sample/generic DXE driver that registers all the BDS hook points or callbacks as defined in BoardBdsHookLib. Cc: Michael Kubacki <michael.a.kubacki@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
2020-04-21BoardModulePkg: Add BDS Hook LibraryPrince Agyeman6-0/+2477
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2336 Added a generic board BDS hook library that implements BDS hook points as defined in the Minimum platform specification. This library implements callbacks for the three MinPlatformPkg BDS event groups, namely gBdsEventBeforeConsoleAfterTrustedConsoleGuid, gBdsEventBeforeConsoleBeforeEndOfDxeGuid and gBdsEventAfterConsoleReadyBeforeBootOptionGuid. This Library also implements callbacks for pre-existing event groups: gEfiEndOfDxeEventGroupGuid, gEfiPciEnumerationCompleteProtocolGuid, gEfiDxeSmmReadyToLockProtocolGuid. These callbacks can be registered to their respective event groups, through other libraries or DXE drivers Cc: Michael Kubacki <michael.a.kubacki@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Co-authored-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
2020-01-30BoardModulePkg: Fix ECC Coding Style IssuesPrince Agyeman6-20/+29
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2453 Fixed coding style issues as reported by the ECC tool Cc: Shenglei Zhang <shenglei.zhang@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Michael Kubacki <michael.a.kubacki@intel.com> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
2019-11-11BoardModulePkg: Remove unused variableAgyeman, Prince1-2/+0
Removed unused variable 'RegEmptied' in BdsPs2KbcLib.c to avoid gcc 5 build error unused-but-set-variable. Cc: Michael Kubacki <michael.a.kubacki@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
2019-11-07BoardModulePkg: Add Ps2 Keyboard LibraryAgyeman, Prince4-0/+306
Added a generic Ps2 keyboard library that adds ps2 device path to ConIn and ConInDev Uefi variables. Cc: Michael Kubacki <michael.a.kubacki@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
2019-11-07BoardModulePkg: Added Pcds to Super I/O driverAgyeman, Prince4-7/+124
Included PCDs to the Super I/O DXE driver, to allow the enable/disable of Ps2 keyboard/mouse, UART1 and UART2 ports. Cc: Michael Kubacki <michael.a.kubacki@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
2019-11-07BoardModulePkg: Add fixed at build PcdsAgyeman, Prince1-0/+22
* Added ps2 keyboard and Uart enable PCDs * Added PCDs to define IO ports for Uart1 and Uart2 Cc: Michael Kubacki <michael.a.kubacki@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
2019-11-07BoardModulePkg: Add Super I/O driverAgyeman, Prince11-0/+1909
Added a generic Super I/O driver that produces the Sio protocol. This driver was moved from the SimicsOpenBoardPkg. Cc: Michael Kubacki <michael.a.kubacki@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
2019-11-07BoardModulePkg: Add gBoardModulePkgTokenSpaceGuidAgyeman, Prince1-0/+3
Added gBoardModulePkgTokenSpaceGuid to BoardModulePkg Cc: Michael Kubacki <michael.a.kubacki@intel.com> Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
2019-10-18BoardModulePkg: Add BIOS Info HOBAgyeman, Prince2-0/+64
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2210 REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2211 Added gBiosInfoGuid to be used in publishing the BIOS information HOB which is needed in FIT generation. Also added the BIOS Info header file BiosInfo.h that defines the BIOS info struct and GUID. Cc: Ankit Sinha <ankit.sinha@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Kubacki Michael A <michael.a.kubacki@intel.com> Signed-off-by: Prince Agyeman <prince.agyeman@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> Reviewed-by: Michael Kubacki <michael.a.kubacki@intel.com>
2019-10-08BoardModulePkg/FirmwareBootMediaInfoPei: Add moduleMichael Kubacki3-0/+125
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2229 Adds a new module that is responsible for publishing the boot media device information that will be used in the boot flow for system initialization decisions dependent upon firmware boot media. The module depends on a library class to implement the board- specific details to get the firmware boot media device. This allows the module to remain consistent in its responsibility across implementations and the details to be easily substituted. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2019-10-08BoardModulePkg/FirmwareBootMediaInfoLib: Add libraryMichael Kubacki5-0/+91
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2229 Introduces a new library class FirmwareBootMediaInfoLib that is used to report the firmware boot media device. A default library instance is provided that always returns the firmware boot media is SPI flash. For platforms with other firmware boot media options, a board-specific instance of this library should be used instead to provide the correct firmware boot media device information. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com> Reviewed-by: Eric Dong <eric .dong@intel.com>
2019-09-24BoardModulePkg/CmosAccessLib: Update the end of last lineShenglei Zhang1-1/+1
The original end of last line is '/r'. Now update it to '/r/n'. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
2019-05-29Platform/Intel/BoardModulePkg: Add BiosId ModuleEric Dong8-0/+571
https://bugzilla.tianocore.org/show_bug.cgi?id=1851 Add Bios ID library used to read BIOS ID related info. This library exports APIs like below: GetBiosId GetBiosVersionDateTime Cc: Michael Kubacki <michael.a.kubacki@intel.com> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com> Cc: Oram Isaac W <isaac.w.oram@intel.com> Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
2019-05-29Platform/Intel: Add Cmos related modules to BoardModulePkgEric Dong9-2/+794
https://bugzilla.tianocore.org/show_bug.cgi?id=1552 Add Cmos related libraries to BoardModulePkg. Totally two library have been added, one is CmosAccessLib and the other is PlatformCmosAccessLib. PlatformCmosAccessLib will be used by CmosAccessLib. These two libraries provide the generic operations for CMOS access. APIs exports by PlatformCmosAccessLib include: PlatformCmosGetEntry PlatformCmosGetNmiState APIs exports by CmosAccessLib include: CmosRead8 CmosWrite8 CmosRead16 CmosWrite16 CmosRead32 CmosWrite32 CmosInit Cc: Michael Kubacki <michael.a.kubacki@intel.com> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com> Cc: Oram Isaac W <isaac.w.oram@intel.com> Sign-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Signed-off-by: Eric Dong <eric.dong@intel.com>
2019-05-29Maintainers.txt: Add BoardModulePkg in Platform/Intel/ folder.Eric Dong2-0/+100
Add new package BoardModulePkg which used to keep the modules which is generic for all board. Cc: Michael Kubacki <michael.a.kubacki@intel.com> Cc: Sai Chaganty <rangasai.v.chaganty@intel.com> Cc: Oram Isaac W <isaac.w.oram@intel.com> Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>