VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h@ 67912

Last change on this file since 67912 was 58466, checked in by vboxsync, 9 years ago

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1/** @file
2
3 The common header file for SMM FTW module and SMM FTW DXE Module.
4
5Copyright (c) 2011, Intel Corporation. All rights reserved. <BR>
6This program and the accompanying materials
7are licensed and made available under the terms and conditions of the BSD License
8which accompanies this distribution. The full text of the license may be found at
9http://opensource.org/licenses/bsd-license.php
10
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14**/
15
16#ifndef __SMM_FTW_COMMON_H__
17#define __SMM_FTW_COMMON_H__
18
19#include <Protocol/SmmFirmwareVolumeBlock.h>
20#include <Protocol/SmmFaultTolerantWrite.h>
21
22#define FTW_FUNCTION_GET_MAX_BLOCK_SIZE 1
23#define FTW_FUNCTION_ALLOCATE 2
24#define FTW_FUNCTION_WRITE 3
25#define FTW_FUNCTION_RESTART 4
26#define FTW_FUNCTION_ABORT 5
27#define FTW_FUNCTION_GET_LAST_WRITE 6
28
29typedef struct {
30 UINTN Function;
31 EFI_STATUS ReturnStatus;
32 UINT8 Data[1];
33} SMM_FTW_COMMUNICATE_FUNCTION_HEADER;
34
35///
36/// Size of SMM communicate header, without including the payload.
37///
38#define SMM_COMMUNICATE_HEADER_SIZE (OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data))
39
40///
41/// Size of SMM FTW communicate function header, without including the payload.
42///
43#define SMM_FTW_COMMUNICATE_HEADER_SIZE (OFFSET_OF (SMM_FTW_COMMUNICATE_FUNCTION_HEADER, Data))
44
45typedef struct {
46 UINTN BlockSize;
47} SMM_FTW_GET_MAX_BLOCK_SIZE_HEADER;
48
49typedef struct {
50 EFI_GUID CallerId;
51 UINTN PrivateDataSize;
52 UINTN NumberOfWrites;
53} SMM_FTW_ALLOCATE_HEADER;
54
55typedef struct {
56 EFI_LBA Lba;
57 UINTN Offset;
58 UINTN PrivateDataSize;
59 EFI_PHYSICAL_ADDRESS FvbBaseAddress;
60 EFI_FVB_ATTRIBUTES_2 FvbAttributes;
61 UINTN Length;
62 UINT8 Data[1];
63} SMM_FTW_WRITE_HEADER;
64
65typedef struct {
66 EFI_PHYSICAL_ADDRESS FvbBaseAddress;
67 EFI_FVB_ATTRIBUTES_2 FvbAttributes;
68} SMM_FTW_RESTART_HEADER;
69
70typedef struct {
71 EFI_GUID CallerId;
72 EFI_LBA Lba;
73 UINTN Offset;
74 UINTN Length;
75 UINTN PrivateDataSize;
76 BOOLEAN Complete;
77 UINT8 Data[1];
78} SMM_FTW_GET_LAST_WRITE_HEADER;
79
80#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette