]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Protocol/NonDiscoverableDevice.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / NonDiscoverableDevice.h
CommitLineData
9598cdc2
AB
1/** @file\r
2 Protocol to describe devices that are not on a discoverable bus\r
3\r
4 Copyright (c) 2016, Linaro, Ltd. All rights reserved.<BR>\r
5\r
9d510e61 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
9598cdc2
AB
7\r
8**/\r
9\r
10#ifndef __NON_DISCOVERABLE_DEVICE_H__\r
11#define __NON_DISCOVERABLE_DEVICE_H__\r
12\r
13#include <IndustryStandard/Acpi.h>\r
14\r
15#define EDKII_NON_DISCOVERABLE_DEVICE_PROTOCOL_GUID \\r
16 { 0x0d51905b, 0xb77e, 0x452a, {0xa2, 0xc0, 0xec, 0xa0, 0xcc, 0x8d, 0x51, 0x4a } }\r
17\r
18//\r
19// Protocol interface structure\r
20//\r
21typedef struct _NON_DISCOVERABLE_DEVICE NON_DISCOVERABLE_DEVICE;\r
22\r
23//\r
24// Data Types\r
25//\r
26typedef enum {\r
27 NonDiscoverableDeviceDmaTypeCoherent,\r
28 NonDiscoverableDeviceDmaTypeNonCoherent,\r
29 NonDiscoverableDeviceDmaTypeMax,\r
30} NON_DISCOVERABLE_DEVICE_DMA_TYPE;\r
31\r
32//\r
33// Function Prototypes\r
34//\r
35\r
36/**\r
37 Perform device specific initialization before the device is started\r
38\r
39 @param This The non-discoverable device protocol pointer\r
40\r
41 @retval EFI_SUCCESS Initialization successful, the device may be used\r
42 @retval Other Initialization failed, device should not be started\r
43**/\r
44typedef\r
45EFI_STATUS\r
46(EFIAPI *NON_DISCOVERABLE_DEVICE_INIT) (\r
47 IN NON_DISCOVERABLE_DEVICE *This\r
48 );\r
49\r
50struct _NON_DISCOVERABLE_DEVICE {\r
51 //\r
52 // The type of device\r
53 //\r
54 CONST EFI_GUID *Type;\r
55 //\r
56 // Whether this device is DMA coherent\r
57 //\r
58 NON_DISCOVERABLE_DEVICE_DMA_TYPE DmaType;\r
59 //\r
60 // Initialization function for the device\r
61 //\r
62 NON_DISCOVERABLE_DEVICE_INIT Initialize;\r
63 //\r
64 // The MMIO and I/O regions owned by the device\r
65 //\r
66 EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Resources;\r
67};\r
68\r
69extern EFI_GUID gEdkiiNonDiscoverableDeviceProtocolGuid;\r
70\r
71#endif\r