VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.h@ 99396

最後變更 在這個檔案從99396是 89983,由 vboxsync 提交於 3 年 前

Devices/EFI: Merge edk-stable202105 and openssl 1.1.1j and make it build, bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.4 KB
 
1/** @file
2 OVMF support for QEMU system firmware flash device
3
4 Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8**/
9
10#ifndef __QEMU_FLASH_H__
11#define __QEMU_FLASH_H__
12
13#include <Protocol/FirmwareVolumeBlock.h>
14
15extern UINT8 *mFlashBase;
16
17/**
18 Read from QEMU Flash
19
20 @param[in] Lba The starting logical block index to read from.
21 @param[in] Offset Offset into the block at which to begin reading.
22 @param[in] NumBytes On input, indicates the requested read size. On
23 output, indicates the actual number of bytes read
24 @param[in] Buffer Pointer to the buffer to read into.
25
26**/
27EFI_STATUS
28QemuFlashRead (
29 IN EFI_LBA Lba,
30 IN UINTN Offset,
31 IN UINTN *NumBytes,
32 IN UINT8 *Buffer
33 );
34
35
36/**
37 Write to QEMU Flash
38
39 @param[in] Lba The starting logical block index to write to.
40 @param[in] Offset Offset into the block at which to begin writing.
41 @param[in] NumBytes On input, indicates the requested write size. On
42 output, indicates the actual number of bytes written
43 @param[in] Buffer Pointer to the data to write.
44
45**/
46EFI_STATUS
47QemuFlashWrite (
48 IN EFI_LBA Lba,
49 IN UINTN Offset,
50 IN UINTN *NumBytes,
51 IN UINT8 *Buffer
52 );
53
54
55/**
56 Erase a QEMU Flash block
57
58 @param Lba The logical block index to erase.
59
60**/
61EFI_STATUS
62QemuFlashEraseBlock (
63 IN EFI_LBA Lba
64 );
65
66
67/**
68 Initializes QEMU flash memory support
69
70 @retval EFI_WRITE_PROTECTED The QEMU flash device is not present.
71 @retval EFI_SUCCESS The QEMU flash device is supported.
72
73**/
74EFI_STATUS
75QemuFlashInitialize (
76 VOID
77 );
78
79
80VOID
81QemuFlashConvertPointers (
82 VOID
83 );
84
85VOID
86QemuFlashBeforeProbe (
87 IN EFI_PHYSICAL_ADDRESS BaseAddress,
88 IN UINTN FdBlockSize,
89 IN UINTN FdBlockCount
90 );
91
92/**
93 Write to QEMU Flash
94
95 @param[in] Ptr Pointer to the location to write.
96 @param[in] Value The value to write.
97
98**/
99VOID
100QemuFlashPtrWrite (
101 IN volatile UINT8 *Ptr,
102 IN UINT8 Value
103 );
104
105#endif
106
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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