diff options
author | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-21 00:33:59 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-21 00:33:59 +0000 |
commit | a28ef9b7baeb2cdfcec6edb4e89165f5afe55b99 (patch) | |
tree | 15ba7e99b19a4af7de6d7ad9c79d5abb36be0013 | |
parent | a85f86de7845f7e42c85f47a2975baba0d4a40cd (diff) | |
download | edk2-a28ef9b7baeb2cdfcec6edb4e89165f5afe55b99.zip edk2-a28ef9b7baeb2cdfcec6edb4e89165f5afe55b99.tar.gz edk2-a28ef9b7baeb2cdfcec6edb4e89165f5afe55b99.tar.bz2 |
OVMF: Add Block MMIO protocol definition
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@10295 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | edk2/OvmfPkg/Include/Protocol/BlockMmio.h | 50 | ||||
-rw-r--r-- | edk2/OvmfPkg/OvmfPkg.dec | 3 |
2 files changed, 53 insertions, 0 deletions
diff --git a/edk2/OvmfPkg/Include/Protocol/BlockMmio.h b/edk2/OvmfPkg/Include/Protocol/BlockMmio.h new file mode 100644 index 0000000..3616464 --- /dev/null +++ b/edk2/OvmfPkg/Include/Protocol/BlockMmio.h @@ -0,0 +1,50 @@ +/** @file
+ Block IO (memory mapped)
+
+ Copyright (c) 2006 - 2010, Intel Corporation
+ All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef __BLOCK_MMIO_H__
+#define __BLOCK_MMIO_H__
+
+#include <Protocol/BlockIo.h>
+
+#define BLOCK_MMIO_PROTOCOL_GUID \
+ { \
+ 0x6b558ce3, 0x69e5, 0x4c67, {0xa6, 0x34, 0xf7, 0xfe, 0x72, 0xad, 0xbe, 0x84 } \
+ }
+
+typedef struct _BLOCK_MMIO_PROTOCOL BLOCK_MMIO_PROTOCOL;
+
+
+///
+/// This protocol provides control over block devices.
+///
+struct _BLOCK_MMIO_PROTOCOL {
+ ///
+ /// The revision to which the block IO interface adheres. All future
+ /// revisions must be backwards compatible. If a future version is not
+ /// back wards compatible, it is not the same GUID.
+ ///
+ UINT64 Revision;
+ ///
+ /// Pointer to the EFI_BLOCK_IO_MEDIA data for this device.
+ ///
+ EFI_BLOCK_IO_MEDIA *Media;
+
+ EFI_PHYSICAL_ADDRESS BaseAddress;
+
+};
+
+extern EFI_GUID gBlockMmioProtocolGuid;
+
+#endif
+
diff --git a/edk2/OvmfPkg/OvmfPkg.dec b/edk2/OvmfPkg/OvmfPkg.dec index ef142fe..c9d3ef7 100644 --- a/edk2/OvmfPkg/OvmfPkg.dec +++ b/edk2/OvmfPkg/OvmfPkg.dec @@ -25,6 +25,9 @@ [Guids]
gUefiOvmfPkgTokenSpaceGuid = {0x93bb96af, 0xb9f2, 0x4eb8, {0x94, 0x62, 0xe0, 0xba, 0x74, 0x56, 0x42, 0x36}}
+[Protocols]
+ gBlockMmioProtocolGuid = {0x6b558ce3, 0x69e5, 0x4c67, {0xa6, 0x34, 0xf7, 0xfe, 0x72, 0xad, 0xbe, 0x84}}
+
[PcdsFixedAtBuild]
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfMemFvBase|0x0|UINT32|0
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfMemFvSize|0x0|UINT32|0
|