]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OVMF: Add Block MMIO protocol definition
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 21 Mar 2010 00:33:59 +0000 (00:33 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 21 Mar 2010 00:33:59 +0000 (00:33 +0000)
This protocol is similar to the standard UEFI BlockIo protocol,
except it has no function calls and simply defines a base address
in memory where reads & writes for the block device should occur.

One planned usage is to fill a memory region with a small disk
image, and allow it to be used as a normal disk by the
standard drivers.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10295 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/Include/Protocol/BlockMmio.h [new file with mode: 0644]
OvmfPkg/OvmfPkg.dec

diff --git a/OvmfPkg/Include/Protocol/BlockMmio.h b/OvmfPkg/Include/Protocol/BlockMmio.h
new file mode 100644 (file)
index 0000000..3616464
--- /dev/null
@@ -0,0 +1,50 @@
+/** @file\r
+  Block IO (memory mapped)\r
+\r
+  Copyright (c) 2006 - 2010, Intel Corporation                                                         \r
+  All rights reserved. This program and the accompanying materials                          \r
+  are licensed and made available under the terms and conditions of the BSD License         \r
+  which accompanies this distribution.  The full text of the license may be found at        \r
+  http://opensource.org/licenses/bsd-license.php                                            \r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+**/\r
+\r
+#ifndef __BLOCK_MMIO_H__\r
+#define __BLOCK_MMIO_H__\r
+\r
+#include <Protocol/BlockIo.h>\r
+\r
+#define BLOCK_MMIO_PROTOCOL_GUID \\r
+  { \\r
+    0x6b558ce3, 0x69e5, 0x4c67, {0xa6, 0x34, 0xf7, 0xfe, 0x72, 0xad, 0xbe, 0x84 } \\r
+  }\r
+\r
+typedef struct _BLOCK_MMIO_PROTOCOL  BLOCK_MMIO_PROTOCOL;\r
+\r
+\r
+///\r
+///  This protocol provides control over block devices.\r
+///\r
+struct _BLOCK_MMIO_PROTOCOL {\r
+  ///\r
+  /// The revision to which the block IO interface adheres. All future\r
+  /// revisions must be backwards compatible. If a future version is not\r
+  /// back wards compatible, it is not the same GUID.\r
+  ///\r
+  UINT64                Revision;\r
+  ///\r
+  /// Pointer to the EFI_BLOCK_IO_MEDIA data for this device.\r
+  ///\r
+  EFI_BLOCK_IO_MEDIA    *Media;\r
+\r
+  EFI_PHYSICAL_ADDRESS  BaseAddress;\r
+\r
+};\r
+\r
+extern EFI_GUID gBlockMmioProtocolGuid;\r
+\r
+#endif\r
+\r
index ef142fe2ad7dcf7924a4ab4b162f5f6be00b8216..c9d3ef7779b1fed42a6a84da5ac0be250d9ec9e1 100644 (file)
@@ -25,6 +25,9 @@
 [Guids]\r
   gUefiOvmfPkgTokenSpaceGuid      = {0x93bb96af, 0xb9f2, 0x4eb8, {0x94, 0x62, 0xe0, 0xba, 0x74, 0x56, 0x42, 0x36}}\r
 \r
+[Protocols]\r
+  gBlockMmioProtocolGuid          = {0x6b558ce3, 0x69e5, 0x4c67, {0xa6, 0x34, 0xf7, 0xfe, 0x72, 0xad, 0xbe, 0x84}}\r
+\r
 [PcdsFixedAtBuild]\r
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfMemFvBase|0x0|UINT32|0\r
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfMemFvSize|0x0|UINT32|0\r