• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   The Super I/O Control Protocol is installed by the Super I/O driver. It provides
3   the low-level services for SIO devices that enable them to be used in the UEFI
4   driver model.
5 
6   Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
7   This program and the accompanying materials
8   are licensed and made available under the terms and conditions of the BSD License
9   which accompanies this distribution.  The full text of the license may be found at
10   http://opensource.org/licenses/bsd-license.php
11 
12   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 
15   @par Revision Reference:
16   This protocol is from PI Version 1.2.1.
17 
18 **/
19 
20 #ifndef __EFI_SUPER_IO_CONTROL_PROTOCOL_H__
21 #define __EFI_SUPER_IO_CONTROL_PROTOCOL_H__
22 
23 #define EFI_SIO_CONTROL_PROTOCOL_GUID \
24   { \
25     0xb91978df, 0x9fc1, 0x427d, { 0xbb, 0x5, 0x4c, 0x82, 0x84, 0x55, 0xca, 0x27 } \
26   }
27 
28 typedef struct _EFI_SIO_CONTROL_PROTOCOL EFI_SIO_CONTROL_PROTOCOL;
29 typedef struct _EFI_SIO_CONTROL_PROTOCOL *PEFI_SIO_CONTROL_PROTOCOL;
30 
31 /**
32   Enable an ISA-style device.
33 
34   This function enables a logical ISA device and, if necessary, configures it
35   to default settings, including memory, I/O, DMA and IRQ resources.
36 
37   @param This A pointer to this instance of the EFI_SIO_CONTROL_PROTOCOL.
38 
39   @retval EFI_SUCCESS          The device is enabled successfully.
40   @retval EFI_OUT_OF_RESOURCES The device could not be enabled because there
41                                were insufficient resources either for the device
42                                itself or for the records needed to track the device.
43   @retval EFI_ALREADY_STARTED  The device is already enabled.
44   @retval EFI_UNSUPPORTED      The device cannot be enabled.
45 **/
46 typedef
47 EFI_STATUS
48 (EFIAPI *EFI_SIO_CONTROL_ENABLE)(
49   IN CONST EFI_SIO_CONTROL_PROTOCOL *This
50   );
51 
52 /**
53   Disable a logical ISA device.
54 
55   This function disables a logical ISA device so that it no longer consumes
56   system resources, such as memory, I/O, DMA and IRQ resources. Enough information
57   must be available so that subsequent Enable() calls would properly reconfigure
58   the device.
59 
60   @param This A pointer to this instance of the EFI_SIO_CONTROL_PROTOCOL.
61 
62   @retval EFI_SUCCESS          The device is disabled successfully.
63   @retval EFI_OUT_OF_RESOURCES The device could not be disabled because there
64                                were insufficient resources either for the device
65                                itself or for the records needed to track the device.
66   @retval EFI_ALREADY_STARTED  The device is already disabled.
67   @retval EFI_UNSUPPORTED      The device cannot be disabled.
68 **/
69 typedef
70 EFI_STATUS
71 (EFIAPI *EFI_SIO_CONTROL_DISABLE)(
72   IN CONST EFI_SIO_CONTROL_PROTOCOL *This
73   );
74 
75 struct _EFI_SIO_CONTROL_PROTOCOL {
76   ///
77   /// The version of this protocol.
78   ///
79   UINT32                  Version;
80   ///
81   /// Enable a device.
82   ///
83   EFI_SIO_CONTROL_ENABLE  EnableDevice;
84   ///
85   /// Disable a device.
86   ///
87   EFI_SIO_CONTROL_DISABLE DisableDevice;
88 };
89 
90 extern EFI_GUID gEfiSioControlProtocolGuid;
91 
92 #endif // __EFI_SUPER_IO_CONTROL_PROTOCOL_H__
93