mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
Current code follow some rules to check if the PCI device connected to a serial port device, but some platform or hardware doesn't follow such rule. By locating gEfiSerialIoProtocolGuid protocol, we can find the related device path. Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
69 lines
1.5 KiB
C
69 lines
1.5 KiB
C
/** @file
|
|
Head file for BDS Platform specific code
|
|
|
|
Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
**/
|
|
|
|
#ifndef PLATFORM_CONSOLE_H_
|
|
#define PLATFORM_CONSOLE_H_
|
|
|
|
#include <PiDxe.h>
|
|
#include <IndustryStandard/Pci.h>
|
|
#include <Library/DebugLib.h>
|
|
#include <Library/BaseMemoryLib.h>
|
|
#include <Library/UefiBootServicesTableLib.h>
|
|
#include <Library/MemoryAllocationLib.h>
|
|
#include <Library/BaseLib.h>
|
|
#include <Library/PcdLib.h>
|
|
#include <Library/UefiLib.h>
|
|
#include <Library/DevicePathLib.h>
|
|
#include <Protocol/PciIo.h>
|
|
|
|
#define IS_PCI_ISA_PDECODE(_p) IS_CLASS3 (_p, PCI_CLASS_BRIDGE, PCI_CLASS_BRIDGE_ISA_PDECODE, 0)
|
|
|
|
//
|
|
// Type definitions
|
|
//
|
|
|
|
//
|
|
// Platform Root Bridge
|
|
//
|
|
typedef struct {
|
|
ACPI_HID_DEVICE_PATH PciRootBridge;
|
|
EFI_DEVICE_PATH_PROTOCOL End;
|
|
} PLATFORM_ROOT_BRIDGE_DEVICE_PATH;
|
|
|
|
typedef
|
|
EFI_STATUS
|
|
(EFIAPI *SIMPLE_PROTOCOL_INSTANCE_CALLBACK)(
|
|
IN EFI_HANDLE Handle,
|
|
IN VOID *Instance
|
|
);
|
|
|
|
/**
|
|
@param[in] Handle - Handle of PCI device instance
|
|
@param[in] PciIo - PCI IO protocol instance
|
|
@param[in] Pci - PCI Header register block
|
|
**/
|
|
typedef
|
|
EFI_STATUS
|
|
(EFIAPI *VISIT_PCI_INSTANCE_CALLBACK)(
|
|
IN EFI_HANDLE Handle,
|
|
IN EFI_PCI_IO_PROTOCOL *PciIo,
|
|
IN PCI_TYPE00 *Pci
|
|
);
|
|
|
|
/**
|
|
Platform console init. Include the platform firmware vendor, revision
|
|
and so crc check.
|
|
|
|
**/
|
|
VOID
|
|
EFIAPI
|
|
PlatformConsoleInit (
|
|
VOID
|
|
);
|
|
|
|
#endif
|