OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
HdaControllerInfo.c
Go to the documentation of this file.
1/*
2 * File: HdaControllerInfo.c
3 *
4 * Copyright (c) 2018 John Davis
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24
25#include "HdaController.h"
26
27EFI_STATUS
28EFIAPI
31 OUT CONST CHAR16 **Name
32 )
33{
35
36 if ((This == NULL) || (Name == NULL)) {
37 return EFI_INVALID_PARAMETER;
38 }
39
40 HdaPrivateData = HDA_CONTROLLER_INFO_PRIVATE_DATA_FROM_THIS (This);
41 *Name = HdaPrivateData->HdaControllerDev->Name;
42
43 return EFI_SUCCESS;
44}
45
46EFI_STATUS
47EFIAPI
50 OUT UINT32 *VendorId
51 )
52{
54
55 if ((This == NULL) || (VendorId == NULL)) {
56 return EFI_INVALID_PARAMETER;
57 }
58
59 HdaPrivateData = HDA_CONTROLLER_INFO_PRIVATE_DATA_FROM_THIS (This);
60 *VendorId = HdaPrivateData->HdaControllerDev->VendorId;
61
62 return EFI_SUCCESS;
63}
#define HDA_CONTROLLER_INFO_PRIVATE_DATA_FROM_THIS(This)
EFI_STATUS EFIAPI HdaControllerInfoGetVendorId(IN EFI_HDA_CONTROLLER_INFO_PROTOCOL *This, OUT UINT32 *VendorId)
EFI_STATUS EFIAPI HdaControllerInfoGetName(IN EFI_HDA_CONTROLLER_INFO_PROTOCOL *This, OUT CONST CHAR16 **Name)
HDA_CONTROLLER_DEV * HdaControllerDev