MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / IsHDMIAudio

Function IsHDMIAudio

rEFIt_UEFI/Platform/hda.cpp:120–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118
119
120BOOLEAN EFIAPI IsHDMIAudio(EFI_HANDLE PciDevHandle)
121{
122 EFI_STATUS Status;
123 EFI_PCI_IO_PROTOCOL *PciIo;
124 UINTN Segment;
125 UINTN Bus;
126 UINTN Device;
127 UINTN Function;
128 UINTN Index;
129
130 // get device PciIo protocol
131 Status = gBS->OpenProtocol(PciDevHandle, &gEfiPciIoProtocolGuid, (VOID **)&PciIo, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
132 if (EFI_ERROR(Status)) {
133 return FALSE;
134 }
135
136 // get device location
137 Status = PciIo->GetLocation (PciIo, &Segment, &Bus, &Device, &Function);
138 if (EFI_ERROR(Status)) {
139 return FALSE;
140 }
141
142 // iterate over all GFX devices and check for sibling
143 for (Index = 0; Index < NGFX; Index++) {
144 if (gGraphics[Index].Segment == Segment
145 && gGraphics[Index].Bus == Bus
146 && gGraphics[Index].Device == Device) {
147 return TRUE;
148 }
149 }
150
151 return FALSE;
152}
153
154BOOLEAN setup_hda_devprop(EFI_PCI_IO_PROTOCOL *PciIo, pci_dt_t *hda_dev, const XString8& OSVersion)
155{

Callers 3

setup_hda_devpropFunction · 0.85
CheckHardwareFunction · 0.85
GetDevicesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected