summaryrefslogtreecommitdiff
path: root/Include/Protocol/FlashProtocol.h
blob: b6643fd28a120c95ea8e187e87989bb5b4a9433c (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2009, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

//**********************************************************************
// $Header: /Alaska/BIN/Core/Include/Protocol/FlashProtocol.h 2     5/21/09 4:34p Felixp $
//
// $Revision: 2 $
//
// $Date: 5/21/09 4:34p $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/BIN/Core/Include/Protocol/FlashProtocol.h $
// 
// 2     5/21/09 4:34p Felixp
// 
// 1     5/21/09 4:33p Felixp
// 
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:	FlashProtocol.h
//
// Description:	Flash Protocol
//
//<AMI_FHDR_END>
//**********************************************************************
#ifndef __FLASH_PROTOCOL__H__
#define __FLASH_PROTOCOL__H__
#ifdef __cplusplus
extern "C" {
#endif
#include <EFI.h>

// {755B6596-6896-4ba3-B3DD-1C629FD1EA88}
#define FLASH_PROTOCOL_GUID \
    { 0x755b6596, 0x6896, 0x4ba3, 0xb3, 0xdd, 0x1c, 0x62, 0x9f, 0xd1, 0xea, 0x88 }

// {ECB867AB-8DF4-492d-8150-A7FD1B9B5A75}
#define FLASH_SMM_PROTOCOL_GUID \
    { 0xecb867ab, 0x8df4, 0x492d, 0x81, 0x50, 0xa7, 0xfd, 0x1b, 0x9b, 0x5a, 0x75 }

GUID_VARIABLE_DECLARATION(gFlashProtocolGuid,FLASH_PROTOCOL_GUID);
GUID_VARIABLE_DECLARATION(gFlashSmmProtocolGuid,FLASH_SMM_PROTOCOL_GUID);

typedef struct _FLASH_PROTOCOL FLASH_PROTOCOL;

typedef EFI_STATUS (EFIAPI *FLASH_READ_WRITE)(
    VOID* FlashAddress, UINTN Size, VOID* DataBuffer
);
typedef EFI_STATUS (EFIAPI *FLASH_ERASE)(
    VOID* FlashAddress, UINTN Size
);
typedef EFI_STATUS (EFIAPI *FLASH_WRITE_ENABLE_DISABLE)();

struct _FLASH_PROTOCOL {
    FLASH_READ_WRITE Read;
    FLASH_ERASE Erase;
    FLASH_READ_WRITE Write; //Write only
    FLASH_READ_WRITE Update; //Erase if necessary
    FLASH_WRITE_ENABLE_DISABLE DeviceWriteEnable;
    FLASH_WRITE_ENABLE_DISABLE DeviceWriteDisable; 
};

/****** DO NOT WRITE BELOW THIS LINE *******/
#ifdef __cplusplus
}
#endif
#endif
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2009, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************