summaryrefslogtreecommitdiff
path: root/Include/Protocol/FlashProtocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/Protocol/FlashProtocol.h')
-rw-r--r--Include/Protocol/FlashProtocol.h93
1 files changed, 93 insertions, 0 deletions
diff --git a/Include/Protocol/FlashProtocol.h b/Include/Protocol/FlashProtocol.h
new file mode 100644
index 0000000..b6643fd
--- /dev/null
+++ b/Include/Protocol/FlashProtocol.h
@@ -0,0 +1,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 **
+//** **
+//**********************************************************************
+//**********************************************************************