hc
2024-03-25 edb30157bad0c0001c32b854271ace01d3b9a16a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/** @file
 
  @copyright
  Copyright 2015 - 2021 Intel Corporation. <BR>
 
  SPDX-License-Identifier: BSD-2-Clause-Patent
**/
 
#include <Base.h>
#include <Protocol/PciIo.h>
#include <Library/PlatformOpromPolicyLib.h>
 
/**
  Decide if BIOS embdded option roms should be loaded for a certain PCI device.
 
  @param  PciIo      PCI device to return the ROM image for.
 
  @retval TRUE       BIOS embedded option roms should not be run for the PCI device.
  @retval FALSE      BIOS embedded option roms could be run for the PCI device.
**/
 
BOOLEAN
PlatformOpromLoadDevicePolicy (
  IN EFI_PCI_IO_PROTOCOL *PciIo
  )
{
  return TRUE;
}
 
/**
  For devices that support multiple option roms like FCoE, PXE, iSCSI etc., this function decides if one of these BIOS embdded option roms should be loaded for a certain PCI device based on platform choices.
 
  @param  PciHandle      PCI device to return the ROM image for.
  @param  TableIndex     The index pointing to the option rom in the platform option rom table for the PCI device.
 
  @retval FALSE          The specific BIOS embedded option rom should not be run for the PCI device.
  @retval TRUE           The specific BIOS embedded option rom could be run for a certain PCI device.
**/
 
OPROM_LOAD_POLICY
PlatformOpromLoadTypePolicy (
  IN EFI_HANDLE PciHandle,
  IN UINTN      TableIndex
  )
{
  return INCLUSIVE_LOAD;
}
 
/**
  Decide if a PCIe device option rom should be dispacthed.
 
  @param  PciHandle      PCI device handle.
 
  @retval FALSE          The specific PCIe option rom should not be dispatched for the PCI device.
  @retval TRUE           The specific PCIe option rom could be dispatched for a certain PCI device.
 
**/
 
BOOLEAN
PlatformOpromDispatchPolicy (
  IN  EFI_HANDLE                        DeviceHandle
)
{
  return TRUE;
}
 
 
/**
  Enable the legacy console redirection before dispatch the legacy ORPOM or disable the legacy console redirection after dispatch
  the legacy ORPOM based on setup option and SOL status.
 
  @param  Mode             Subfunction.
  @param  CheckIsAhciRom   If the device is legacy Ahci device.
 
  @retval
 
**/
 
VOID
PlatformOpromLegacyCRPolicy (
  IN     UINTN                           Mode,
  IN     BOOLEAN                         CheckIsAhciRom
)
{
 
  return;
}