TianoCore EDK2 master
|
#include "BdsPlatform.h"
#include <Guid/RootBridgesConnectedEventGroup.h>
#include <Guid/SerialPortLibVendor.h>
#include <Protocol/FirmwareVolume2.h>
#include <Protocol/VirtioDevice.h>
#include <Library/PlatformBmPrintScLib.h>
#include <Library/Tcg2PhysicalPresenceLib.h>
#include <Library/XenPlatformLib.h>
Go to the source code of this file.
Data Structures | |
struct | SERIAL_DEVICE_PATH |
Typedefs | |
typedef EFI_STATUS(EFIAPI * | PROTOCOL_INSTANCE_CALLBACK) (IN EFI_HANDLE Handle, IN VOID *Instance, IN VOID *Context) |
typedef EFI_STATUS(EFIAPI * | VISIT_PCI_INSTANCE_CALLBACK) (IN EFI_HANDLE Handle, IN EFI_PCI_IO_PROTOCOL *PciIo, IN PCI_TYPE00 *Pci) |
Variables | |
VOID * | mEfiDevPathNotifyReg |
EFI_EVENT | mEfiDevPathEvent |
VOID * | mEmuVariableEventReg |
EFI_EVENT | mEmuVariableEvent |
UINT16 | mHostBridgeDevId |
CONST UINT8 | PciHostIrqs [] |
SERIAL_DEVICE_PATH | serialDevicePath |
Platform BDS customizations.
Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file BdsPlatform.c.
typedef EFI_STATUS(EFIAPI * PROTOCOL_INSTANCE_CALLBACK) (IN EFI_HANDLE Handle, IN VOID *Instance, IN VOID *Context) |
Definition at line 44 of file BdsPlatform.c.
typedef EFI_STATUS(EFIAPI * VISIT_PCI_INSTANCE_CALLBACK) (IN EFI_HANDLE Handle, IN EFI_PCI_IO_PROTOCOL *PciIo, IN PCI_TYPE00 *Pci) |
[in] | Handle | - Handle of PCI device instance |
[in] | PciIo | - PCI IO protocol instance |
[in] | Pci | - PCI Header register block |
Definition at line 57 of file BdsPlatform.c.
EFI_STATUS EFIAPI ConnectRecursivelyIfPciMassStorage | ( | IN EFI_HANDLE | Handle, |
IN EFI_PCI_IO_PROTOCOL * | Instance, | ||
IN PCI_TYPE00 * | PciHeader | ||
) |
Definition at line 1559 of file BdsPlatform.c.
EFI_STATUS EFIAPI ConnectRootBridge | ( | IN EFI_HANDLE | RootBridgeHandle, |
IN VOID * | Instance, | ||
IN VOID * | Context | ||
) |
Definition at line 546 of file BdsPlatform.c.
STATIC EFI_STATUS EFIAPI ConnectVirtioPciRng | ( | IN EFI_HANDLE | Handle, |
IN VOID * | Instance, | ||
IN VOID * | Context | ||
) |
Definition at line 571 of file BdsPlatform.c.
EFI_STATUS EFIAPI DetectAndPreparePlatformPciDevicePath | ( | IN EFI_HANDLE | Handle, |
IN EFI_PCI_IO_PROTOCOL * | PciIo, | ||
IN PCI_TYPE00 * | Pci | ||
) |
Do platform specific PCI Device check and add them to ConOut, ConIn, ErrOut.
[in] | Handle | - Handle of PCI device instance |
[in] | PciIo | - PCI IO protocol instance |
[in] | Pci | - PCI Header register block |
EFI_SUCCESS | - PCI Device check and Console variable update successfully. |
EFI_STATUS | - PCI Device check or Console variable update fail. |
Definition at line 1170 of file BdsPlatform.c.
EFI_STATUS EFIAPI DetectAndPreparePlatformVirtioDevicePath | ( | IN EFI_HANDLE | Handle, |
IN VOID * | Instance, | ||
IN VOID * | Context | ||
) |
Definition at line 1242 of file BdsPlatform.c.
This notification function is invoked when the EMU Variable FVB has been changed.
Event | The event that occurred |
Context | For EFI compatibility. Not used. |
Definition at line 1621 of file BdsPlatform.c.
EFI_STATUS GetGopDevicePath | ( | IN EFI_DEVICE_PATH_PROTOCOL * | PciDevicePath, |
OUT EFI_DEVICE_PATH_PROTOCOL ** | GopDevicePath | ||
) |
Definition at line 848 of file BdsPlatform.c.
VOID InstallDevicePathCallback | ( | VOID | ) |
Definition at line 1951 of file BdsPlatform.c.
This notification function is invoked when an instance of the EFI_DEVICE_PATH_PROTOCOL is produced.
Event | The event that occurred |
Context | For EFI compatibility. Not used. |
Definition at line 1871 of file BdsPlatform.c.
VOID PciAcpiInitialization | ( | ) |
Definition at line 1491 of file BdsPlatform.c.
VOID PlatformBdsConnectSequence | ( | VOID | ) |
Connect with predefined platform connect sequence.
The OEM/IBV can customize with their own connect sequence.
Definition at line 1687 of file BdsPlatform.c.
VOID PlatformBdsRestoreNvVarsFromHardDisk | ( | ) |
Definition at line 1670 of file BdsPlatform.c.
VOID EFIAPI PlatformBootManagerAfterConsole | ( | VOID | ) |
Do the platform specific action after the console is ready
Possible things that can be done in PlatformBootManagerAfterConsole:
Console post action: Dynamically switch output mode from 100x31 to 80x25 for certain senarino Signal console ready platform customized event Run diagnostics like memory testing Connect certain devices Dispatch aditional option roms Special boot: e.g.: USB boot, enter UI
Definition at line 1773 of file BdsPlatform.c.
VOID EFIAPI PlatformBootManagerBeforeConsole | ( | VOID | ) |
Do the platform init, can be customized by OEM/IBV
Possible things that can be done in PlatformBootManagerBeforeConsole:
Update console variable: 1. include hot-plug devices;
- Clear ConIn and add SOL for AMT Register new Driver#### or Boot#### Register new Key####: e.g.: F12 Signal ReadyToLock event Authentication action: 1. connect Auth devices;
Identify auto logon user.
Definition at line 422 of file BdsPlatform.c.
VOID EFIAPI PlatformBootManagerUnableToBoot | ( | VOID | ) |
The function is called when no boot option could be launched, including platform recovery options and options pointing to applications built into firmware volumes.
If this function returns, BDS attempts to enter an infinite loop.
Definition at line 2014 of file BdsPlatform.c.
VOID EFIAPI PlatformBootManagerWaitCallback | ( | UINT16 | TimeoutRemain | ) |
This function is called each second during the boot manager waits the timeout.
TimeoutRemain | The remaining timeout. |
Definition at line 1973 of file BdsPlatform.c.
VOID PlatformInitializeConsole | ( | IN PLATFORM_CONSOLE_CONNECT_ENTRY * | PlatformConsole | ) |
Connect the predefined platform default console device.
Always try to find and enable PCI display devices.
[in] | PlatformConsole | Predefined platform default console device array. |
Definition at line 1272 of file BdsPlatform.c.
VOID PlatformRegisterFvBootOption | ( | EFI_GUID * | FileGuid, |
CHAR16 * | Description, | ||
UINT32 | Attributes | ||
) |
Definition at line 86 of file BdsPlatform.c.
VOID PlatformRegisterOptionsAndKeys | ( | VOID | ) |
Definition at line 335 of file BdsPlatform.c.
EFI_STATUS PrepareLpcBridgeDevicePath | ( | IN EFI_HANDLE | DeviceHandle | ) |
Add IsaKeyboard to ConIn; add IsaSerial to ConOut, ConIn, ErrOut.
[in] | DeviceHandle | Handle of the LPC Bridge device. |
EFI_SUCCESS | Console devices on the LPC bridge have been added to ConOut, ConIn, and ErrOut. |
Definition at line 694 of file BdsPlatform.c.
VOID PrepareMicrovmDevicePath | ( | VOID | ) |
Definition at line 820 of file BdsPlatform.c.
EFI_STATUS PreparePciDisplayDevicePath | ( | IN EFI_HANDLE | DeviceHandle | ) |
Add PCI display to ConOut.
[in] | DeviceHandle | Handle of the PCI display device. |
EFI_SUCCESS | The PCI display device has been added to ConOut. |
Definition at line 950 of file BdsPlatform.c.
EFI_STATUS PreparePciSerialDevicePath | ( | IN EFI_HANDLE | DeviceHandle | ) |
Add PCI Serial to ConOut, ConIn, ErrOut.
[in] | DeviceHandle | Handle of the PCI serial device. |
EFI_SUCCESS | The PCI serial device has been added to ConOut, ConIn, ErrOut. |
Definition at line 989 of file BdsPlatform.c.
EFI_STATUS PrepareVirtioSerialDevicePath | ( | IN EFI_HANDLE | DeviceHandle | ) |
Definition at line 1023 of file BdsPlatform.c.
VOID RemoveStaleFvFileOptions | ( | VOID | ) |
Remove all MemoryMapped(...)/FvFile(...) and Fv(...)/FvFile(...) boot options whose device paths do not resolve exactly to an FvFile in the system.
This removes any boot options that point to binaries built into the firmware and have become stale due to any of the following:
EfiBootManagerFindLoadOption() used in PlatformRegisterFvBootOption() only avoids exact duplicates.
Definition at line 165 of file BdsPlatform.c.
VOID RestrictBootOptionsToFirmware | ( | VOID | ) |
Definition at line 295 of file BdsPlatform.c.
STATIC VOID SaveS3BootScript | ( | VOID | ) |
Save the S3 boot script.
Note that DxeSmmReadyToLock must be signaled after this function returns; otherwise the script wouldn't be saved actually.
Definition at line 1729 of file BdsPlatform.c.
EFI_STATUS EFIAPI SetPciIntLine | ( | IN EFI_HANDLE | Handle, |
IN EFI_PCI_IO_PROTOCOL * | PciIo, | ||
IN PCI_TYPE00 * | PciHdr | ||
) |
Configure PCI Interrupt Line register for applicable devices Ported from SeaBIOS, src/fw/pciinit.c, *_pci_slot_get_irq()
[in] | Handle | - Handle of PCI device instance |
[in] | PciIo | - PCI IO protocol instance |
[in] | PciHdr | - PCI Header register block |
EFI_SUCCESS | - PCI Interrupt Line register configured successfully. |
Definition at line 1340 of file BdsPlatform.c.
EFI_STATUS VisitAllInstancesOfProtocol | ( | IN EFI_GUID * | Id, |
IN PROTOCOL_INSTANCE_CALLBACK | CallBackFunction, | ||
IN VOID * | Context | ||
) |
Definition at line 1062 of file BdsPlatform.c.
EFI_STATUS VisitAllPciInstances | ( | IN VISIT_PCI_INSTANCE_CALLBACK | CallBackFunction | ) |
Definition at line 1144 of file BdsPlatform.c.
EFI_STATUS EFIAPI VisitingAPciInstance | ( | IN EFI_HANDLE | Handle, |
IN VOID * | Instance, | ||
IN VOID * | Context | ||
) |
Definition at line 1110 of file BdsPlatform.c.
EFI_STATUS EFIAPI VisitingFileSystemInstance | ( | IN EFI_HANDLE | Handle, |
IN VOID * | Instance, | ||
IN VOID * | Context | ||
) |
Definition at line 1632 of file BdsPlatform.c.
EFI_EVENT mEfiDevPathEvent |
Definition at line 23 of file BdsPlatform.c.
VOID* mEfiDevPathNotifyReg |
Definition at line 22 of file BdsPlatform.c.
EFI_EVENT mEmuVariableEvent |
Definition at line 25 of file BdsPlatform.c.
VOID* mEmuVariableEventReg |
Definition at line 24 of file BdsPlatform.c.
UINT16 mHostBridgeDevId |
Definition at line 26 of file BdsPlatform.c.
CONST UINT8 PciHostIrqs[] |
Definition at line 32 of file BdsPlatform.c.
SERIAL_DEVICE_PATH serialDevicePath |
Definition at line 809 of file BdsPlatform.c.