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