14 Commits

Author SHA1 Message Date
James Wang
801d003703 BoardModulePkg/BoardBdsHookLib: Fix F7 overwrites Boot0000
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-15 17:04:37 -07:00
Benjamin Doron
4060974356 BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check
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-28 18:31:20 -07:00
Benjamin Doron
b401dfd3a1 BoardModulePkg/BoardBdsHookLib: Register UiApp as boot option
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-08-26 17:14:28 -07:00
Liu, Zhiguang
abf4c54b21 Intel/BoardModulePkg: sort load option in the first boot
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>
2021-03-11 16:26:24 +08:00
Heng Luo
27ba1e1ab4 BoardModulePkg: Early connect PCI Root Bridge in BoardBdsHookLib
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-11-02 16:00:17 +08:00
Prince Agyeman
1a0c76896a BoardModulePkg: Add Generic BoardBootManagerLib
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-21 13:17:46 -07:00
Prince Agyeman
fc83398f00 BoardModulePkg: Add BDS Hook Library
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-04-21 13:17:45 -07:00
Prince Agyeman
093e97308c BoardModulePkg: Fix ECC Coding Style Issues
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>
2020-01-29 18:08:17 -08:00
Agyeman, Prince
919d0852a9 BoardModulePkg: Remove unused variable
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-11 10:26:56 -08:00
Agyeman, Prince
0984a02a66 BoardModulePkg: Add Ps2 Keyboard Library
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-06 18:16:20 -08:00
Michael Kubacki
30960fb56e BoardModulePkg/FirmwareBootMediaInfoLib: Add library
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-10-08 09:20:10 -07:00
Shenglei Zhang
04d49ec908 BoardModulePkg/CmosAccessLib: Update the end of last line
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-09-24 08:17:45 +08:00
Eric Dong
22d5f49913 Platform/Intel/BoardModulePkg: Add BiosId Module
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-29 14:51:52 +08:00
Eric Dong
ffaa0b2bcd Platform/Intel: Add Cmos related modules to BoardModulePkg
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-29 14:50:08 +08:00