summaryrefslogtreecommitdiff
path: root/ReferenceCode/Haswell/Protocol/SmmThunk/SmmThunk.h
blob: 0c85718d493be5447af7fb4191b950c8af7e3eb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/** @file
  This file defines SMM Thunk abstraction protocol.

@copyright
  Copyright (c) 1999 - 2012 Intel Corporation. All rights reserved
  This software and associated documentation (if any) is furnished
  under a license and may only be used or copied in accordance
  with the terms of the license. Except as permitted by such
  license, no part of this software or documentation may be
  reproduced, stored in a retrieval system, or transmitted in any
  form or by any means without the express written consent of
  Intel Corporation.

  This file contains an 'Intel Peripheral Driver' and is
  licensed for Intel CPUs and chipsets under the terms of your
  license agreement with Intel or your vendor.  This file may
  be modified by the user, subject to additional terms of the
  license agreement
**/
#ifndef _SMM_THUNK_H_
#define _SMM_THUNK_H_

EFI_FORWARD_DECLARATION (EFI_SMM_THUNK_PROTOCOL);

///
/// include LegacyBios Protocol for IA32_REGISTER_SET
///
#include EFI_PROTOCOL_DEFINITION (LegacyBios)

#define EFI_SMM_THUNK_PROTOCOL_GUID \
  { \
    0x2a82fce6, 0x8bb6, 0x413e, 0xb9, 0xeb, 0x45, 0xdf, 0xc0, 0x52, 0x2d, 0xf3 \
  }

typedef
BOOLEAN
(EFIAPI *EFI_SMM_FARCALL86)(
  IN EFI_SMM_THUNK_PROTOCOL          *This,
  IN UINT16                          Segment,
  IN UINT16                          Offset,
  IN OUT EFI_IA32_REGISTER_SET *Regs OPTIONAL,
  IN VOID *Stack                     OPTIONAL,
  IN UINTN                           StackSize
  );

typedef
BOOLEAN
(EFIAPI *EFI_SMM_INTCALL86)(
  IN EFI_SMM_THUNK_PROTOCOL          *This,
  IN UINT16                          Segment,
  IN UINT16                          Offset,
  IN OUT EFI_IA32_REGISTER_SET *Regs OPTIONAL,
  IN VOID *Stack                     OPTIONAL,
  IN UINTN                           StackSize
  );

struct _EFI_SMM_THUNK_PROTOCOL {
  EFI_SMM_FARCALL86 FarCall86;
  EFI_SMM_INTCALL86 IntCall86;
};

extern EFI_GUID gEfiSmmThunkProtocolGuid;

#endif