TianoCore EDK2 master
Loading...
Searching...
No Matches
BdsPlatform.h File Reference

Go to the source code of this file.

Data Structures

struct  PLATFORM_CONSOLE_CONNECT_ENTRY
 

Macros

#define PCI_DEVICE_PATH_NODE(Func, Dev)
 
#define PNPID_DEVICE_PATH_NODE(PnpId)
 
#define gPciIsaBridge    PCI_DEVICE_PATH_NODE(0, 0x1f)
 
#define gP2PBridge    PCI_DEVICE_PATH_NODE(0, 0x1e)
 
#define gPnpPs2Keyboard    PNPID_DEVICE_PATH_NODE(0x0303)
 
#define gPnp16550ComPort    PNPID_DEVICE_PATH_NODE(0x0501)
 
#define gUart
 
#define gVtUtf8Terminal
 
#define gEndEntire
 
#define PCI_CLASS_SCC   0x07
 
#define PCI_SUBCLASS_SERIAL   0x00
 
#define PCI_IF_16550   0x02
 
#define IS_PCI_16550SERIAL(_p)   IS_CLASS3 (_p, PCI_CLASS_SCC, PCI_SUBCLASS_SERIAL, PCI_IF_16550)
 
#define IS_PCI_ISA_PDECODE(_p)   IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_ISA_PDECODE, 0)
 
#define CONSOLE_OUT   BIT0
 
#define CONSOLE_IN   BIT1
 
#define STD_ERROR   BIT2
 

Functions

VOID PlatformInitializeConsole (IN PLATFORM_CONSOLE_CONNECT_ENTRY *PlatformConsole)
 
EFI_STATUS TryRunningQemuKernel (VOID)
 

Variables

EFI_DEVICE_PATH_PROTOCOLgPlatformConnectSequence []
 
ACPI_HID_DEVICE_PATH gPnpPs2KeyboardDeviceNode
 
ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode
 
UART_DEVICE_PATH gUartDeviceNode
 
VENDOR_DEVICE_PATH gTerminalTypeDeviceNode
 
PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole []
 
PLATFORM_CONSOLE_CONNECT_ENTRY gXenPlatformConsole []
 

Detailed Description

Platform BDS customizations include file.

Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Module Name:

BdsPlatform.h

Abstract:

Head file for BDS Platform specific code

Definition in file BdsPlatform.h.

Macro Definition Documentation

◆ CONSOLE_IN

#define CONSOLE_IN   BIT1

Definition at line 164 of file BdsPlatform.h.

◆ CONSOLE_OUT

#define CONSOLE_OUT   BIT0

Definition at line 163 of file BdsPlatform.h.

◆ gEndEntire

#define gEndEntire
Value:
{ \
END_DEVICE_PATH_TYPE, \
END_ENTIRE_DEVICE_PATH_SUBTYPE, \
{ \
END_DEVICE_PATH_LENGTH, \
0 \
} \
}

Definition at line 142 of file BdsPlatform.h.

◆ gP2PBridge

#define gP2PBridge    PCI_DEVICE_PATH_NODE(0, 0x1e)

Definition at line 103 of file BdsPlatform.h.

◆ gPciIsaBridge

#define gPciIsaBridge    PCI_DEVICE_PATH_NODE(0, 0x1f)

Definition at line 100 of file BdsPlatform.h.

◆ gPnp16550ComPort

#define gPnp16550ComPort    PNPID_DEVICE_PATH_NODE(0x0501)

Definition at line 109 of file BdsPlatform.h.

◆ gPnpPs2Keyboard

#define gPnpPs2Keyboard    PNPID_DEVICE_PATH_NODE(0x0303)

Definition at line 106 of file BdsPlatform.h.

◆ gUart

#define gUart
Value:
{ \
{ \
{ \
(UINT8) (sizeof (UART_DEVICE_PATH)), \
(UINT8) ((sizeof (UART_DEVICE_PATH)) >> 8) \
} \
}, \
0, \
115200, \
8, \
1, \
1 \
}
#define MSG_UART_DP
Definition: DevicePath.h:692
#define MESSAGING_DEVICE_PATH
Definition: DevicePath.h:321

Definition at line 112 of file BdsPlatform.h.

◆ gVtUtf8Terminal

#define gVtUtf8Terminal
Value:
{ \
{ \
MSG_VENDOR_DP, \
{ \
(UINT8) (sizeof (VENDOR_DEVICE_PATH)), \
(UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8) \
} \
}, \
DEVICE_PATH_MESSAGING_VT_UTF8 \
}

Definition at line 129 of file BdsPlatform.h.

◆ IS_PCI_16550SERIAL

#define IS_PCI_16550SERIAL (   _p)    IS_CLASS3 (_p, PCI_CLASS_SCC, PCI_SUBCLASS_SERIAL, PCI_IF_16550)

Definition at line 155 of file BdsPlatform.h.

◆ IS_PCI_ISA_PDECODE

#define IS_PCI_ISA_PDECODE (   _p)    IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_ISA_PDECODE, 0)

Definition at line 156 of file BdsPlatform.h.

◆ PCI_CLASS_SCC

#define PCI_CLASS_SCC   0x07

Definition at line 152 of file BdsPlatform.h.

◆ PCI_DEVICE_PATH_NODE

#define PCI_DEVICE_PATH_NODE (   Func,
  Dev 
)
Value:
{ \
{ \
{ \
(UINT8) (sizeof (PCI_DEVICE_PATH)), \
(UINT8) ((sizeof (PCI_DEVICE_PATH)) >> 8) \
} \
}, \
(Func), \
(Dev) \
}
#define HARDWARE_DEVICE_PATH
Definition: DevicePath.h:68
#define HW_PCI_DP
Definition: DevicePath.h:73

Definition at line 72 of file BdsPlatform.h.

◆ PCI_IF_16550

#define PCI_IF_16550   0x02

Definition at line 154 of file BdsPlatform.h.

◆ PCI_SUBCLASS_SERIAL

#define PCI_SUBCLASS_SERIAL   0x00

Definition at line 153 of file BdsPlatform.h.

◆ PNPID_DEVICE_PATH_NODE

#define PNPID_DEVICE_PATH_NODE (   PnpId)
Value:
{ \
{ \
{ \
(UINT8) (sizeof (ACPI_HID_DEVICE_PATH)), \
(UINT8) ((sizeof (ACPI_HID_DEVICE_PATH)) >> 8) \
}, \
}, \
EISA_PNP_ID((PnpId)), \
0 \
}
#define ACPI_DEVICE_PATH
Definition: DevicePath.h:190
#define ACPI_DP
Definition: DevicePath.h:195

Definition at line 86 of file BdsPlatform.h.

◆ STD_ERROR

#define STD_ERROR   BIT2

Definition at line 165 of file BdsPlatform.h.

Function Documentation

◆ PlatformInitializeConsole()

VOID PlatformInitializeConsole ( IN PLATFORM_CONSOLE_CONNECT_ENTRY PlatformConsole)

Connect the predefined platform default console device.

Always try to find and enable PCI display devices.

Parameters
[in]PlatformConsolePredefined platform default console device array.

Definition at line 1272 of file BdsPlatform.c.

◆ TryRunningQemuKernel()

EFI_STATUS TryRunningQemuKernel ( VOID  )

Loads and boots UEFI Linux via the FwCfg interface.

Return values
EFI_NOT_FOUND- The Linux kernel was not found

Download the kernel, the initial ramdisk, and the kernel command line from QEMU's fw_cfg. Construct a minimal SimpleFileSystem that contains the two image files, and load and start the kernel from it.

The kernel will be instructed via its command line to load the initrd from the same Simple FileSystem.

Return values
EFI_NOT_FOUNDKernel image was not found.
EFI_OUT_OF_RESOURCESMemory allocation failed.
EFI_PROTOCOL_ERRORUnterminated kernel command line.
Returns
Error codes from any of the underlying functions. On success, the function doesn't return.

Definition at line 17 of file QemuKernel.c.

Variable Documentation

◆ gPlatformConnectSequence

EFI_DEVICE_PATH_PROTOCOL* gPlatformConnectSequence[]
extern

Definition at line 211 of file PlatformData.c.

◆ gPlatformConsole

PLATFORM_CONSOLE_CONNECT_ENTRY gPlatformConsole[]
extern

Predefined platform default console device path

Definition at line 78 of file PlatformBmData.c.

◆ gPnp16550ComPortDeviceNode

ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode
extern

Definition at line 48 of file PlatformData.c.

◆ gPnpPs2KeyboardDeviceNode

ACPI_HID_DEVICE_PATH gPnpPs2KeyboardDeviceNode
extern

Definition at line 47 of file PlatformData.c.

◆ gTerminalTypeDeviceNode

VENDOR_DEVICE_PATH gTerminalTypeDeviceNode
extern

Definition at line 50 of file PlatformData.c.

◆ gUartDeviceNode

UART_DEVICE_PATH gUartDeviceNode
extern

Definition at line 49 of file PlatformData.c.

◆ gXenPlatformConsole

PLATFORM_CONSOLE_CONNECT_ENTRY gXenPlatformConsole[]
extern

Definition at line 197 of file PlatformData.c.