• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*++
2 
3 Copyright (c) 1999 - 2006, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution.  The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8 
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 
12 
13 Module Name:
14 
15   Smbus.h
16 
17 Abstract:
18 
19   Smbus PPI as defined in EFI 2.0
20 
21 --*/
22 
23 #ifndef _PEI_SMBUS_PPI_H
24 #define _PEI_SMBUS_PPI_H
25 
26 #include "EfiSmbus.h"
27 
28 #define PEI_SMBUS_PPI_GUID \
29   { \
30     0xabd42895, 0x78cf, 0x4872, {0x84, 0x44, 0x1b, 0x5c, 0x18, 0xb, 0xfb, 0xda} \
31   }
32 
33 EFI_FORWARD_DECLARATION (PEI_SMBUS_PPI);
34 
35 typedef
36 EFI_STATUS
37 (EFIAPI *PEI_SMBUS_PPI_EXECUTE_OPERATION) (
38   IN      EFI_PEI_SERVICES          **PeiServices,
39   IN PEI_SMBUS_PPI                  * This,
40   IN      EFI_SMBUS_DEVICE_ADDRESS  SlaveAddress,
41   IN      EFI_SMBUS_DEVICE_COMMAND  Command,
42   IN      EFI_SMBUS_OPERATION       Operation,
43   IN      BOOLEAN                   PecCheck,
44   IN OUT  UINTN                     *Length,
45   IN OUT  VOID                      *Buffer
46   );
47 
48 
49 typedef
50 EFI_STATUS
51 (EFIAPI *PEI_SMBUS_NOTIFY_FUNCTION) (
52   IN      EFI_PEI_SERVICES              **PeiServices,
53   IN PEI_SMBUS_PPI                      * SmbusPpi,
54   IN      EFI_SMBUS_DEVICE_ADDRESS      SlaveAddress,
55   IN      UINTN                         Data
56   );
57 
58 //
59 // If ArpAll is TRUE, SmbusUdid/SlaveAddress is Optional.
60 // If FALSE, ArpDevice will enum SmbusUdid and the address will be at SlaveAddress
61 //
62 typedef
63 EFI_STATUS
64 (EFIAPI *PEI_SMBUS_PPI_ARP_DEVICE) (
65   IN      EFI_PEI_SERVICES          **PeiServices,
66   IN PEI_SMBUS_PPI                  * This,
67   IN      BOOLEAN                   ArpAll,
68   IN      EFI_SMBUS_UDID            * SmbusUdid, OPTIONAL
69   IN OUT  EFI_SMBUS_DEVICE_ADDRESS  * SlaveAddress OPTIONAL
70   );
71 
72 
73 typedef
74 EFI_STATUS
75 (EFIAPI *PEI_SMBUS_PPI_GET_ARP_MAP) (
76   IN      EFI_PEI_SERVICES          **PeiServices,
77   IN PEI_SMBUS_PPI                  * This,
78   IN OUT  UINTN                     *Length,
79   IN OUT  EFI_SMBUS_DEVICE_MAP      **SmbusDeviceMap
80   );
81 
82 typedef
83 EFI_STATUS
84 (EFIAPI *PEI_SMBUS_PPI_NOTIFY) (
85   IN      EFI_PEI_SERVICES          **PeiServices,
86   IN PEI_SMBUS_PPI                  * This,
87   IN      EFI_SMBUS_DEVICE_ADDRESS  SlaveAddress,
88   IN      UINTN                     Data,
89   IN      PEI_SMBUS_NOTIFY_FUNCTION NotifyFunction
90   );
91 
92 struct _PEI_SMBUS_PPI {
93   PEI_SMBUS_PPI_EXECUTE_OPERATION Execute;
94   PEI_SMBUS_PPI_ARP_DEVICE        ArpDevice;
95   PEI_SMBUS_PPI_GET_ARP_MAP       GetArpMap;
96   PEI_SMBUS_PPI_NOTIFY            Notify;
97 };
98 
99 extern EFI_GUID gPeiSmbusPpiGuid;
100 
101 #endif
102