]> git.proxmox.com Git - mirror_edk2.git/blob - CorebootPayloadPkg/Library/PlatformBootManagerLib/PlatformConsole.h
68bdf5e555d701950a10692931ad9f33ba7e3437
[mirror_edk2.git] / CorebootPayloadPkg / Library / PlatformBootManagerLib / PlatformConsole.h
1 /** @file
2 Head file for BDS Platform specific code
3
4 Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6 **/
7
8 #ifndef _PLATFORM_CONSOLE_H
9 #define _PLATFORM_CONSOLE_H
10
11 #include <PiDxe.h>
12 #include <IndustryStandard/Pci.h>
13 #include <Library/DebugLib.h>
14 #include <Library/BaseMemoryLib.h>
15 #include <Library/UefiBootServicesTableLib.h>
16 #include <Library/MemoryAllocationLib.h>
17 #include <Library/BaseLib.h>
18 #include <Library/PcdLib.h>
19 #include <Library/UefiLib.h>
20 #include <Library/DevicePathLib.h>
21 #include <Protocol/PciIo.h>
22
23 #define IS_PCI_ISA_PDECODE(_p) IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_ISA_PDECODE, 0)
24 #define IS_PCI_16550SERIAL(_p) IS_CLASS3 (_p, PCI_CLASS_SCC, PCI_SUBCLASS_SERIAL, PCI_IF_16550)
25
26 //
27 // Type definitions
28 //
29
30 //
31 // Platform Root Bridge
32 //
33 typedef struct {
34 ACPI_HID_DEVICE_PATH PciRootBridge;
35 EFI_DEVICE_PATH_PROTOCOL End;
36 } PLATFORM_ROOT_BRIDGE_DEVICE_PATH;
37
38 typedef
39 EFI_STATUS
40 (EFIAPI *PROTOCOL_INSTANCE_CALLBACK)(
41 IN EFI_HANDLE Handle,
42 IN VOID *Instance,
43 IN VOID *Context
44 );
45
46 /**
47 @param[in] Handle - Handle of PCI device instance
48 @param[in] PciIo - PCI IO protocol instance
49 @param[in] Pci - PCI Header register block
50 **/
51 typedef
52 EFI_STATUS
53 (EFIAPI *VISIT_PCI_INSTANCE_CALLBACK)(
54 IN EFI_HANDLE Handle,
55 IN EFI_PCI_IO_PROTOCOL *PciIo,
56 IN PCI_TYPE00 *Pci
57 );
58
59 /**
60 Platform console init. Include the platform firmware vendor, revision
61 and so crc check.
62
63 **/
64 VOID
65 EFIAPI
66 PlatformConsoleInit (
67 VOID
68 );
69
70 #endif