VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.h

最後變更 在這個檔案是 99404,由 vboxsync 提交於 20 月 前

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.1 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 Write to QEMU Flash
37
38 @param[in] Lba The starting logical block index to write to.
39 @param[in] Offset Offset into the block at which to begin writing.
40 @param[in] NumBytes On input, indicates the requested write size. On
41 output, indicates the actual number of bytes written
42 @param[in] Buffer Pointer to the data to write.
43
44**/
45EFI_STATUS
46QemuFlashWrite (
47 IN EFI_LBA Lba,
48 IN UINTN Offset,
49 IN UINTN *NumBytes,
50 IN UINT8 *Buffer
51 );
52
53/**
54 Erase a QEMU Flash block
55
56 @param Lba The logical block index to erase.
57
58**/
59EFI_STATUS
60QemuFlashEraseBlock (
61 IN EFI_LBA Lba
62 );
63
64/**
65 Initializes QEMU flash memory support
66
67 @retval EFI_WRITE_PROTECTED The QEMU flash device is not present.
68 @retval EFI_SUCCESS The QEMU flash device is supported.
69
70**/
71EFI_STATUS
72QemuFlashInitialize (
73 VOID
74 );
75
76VOID
77QemuFlashConvertPointers (
78 VOID
79 );
80
81VOID
82QemuFlashBeforeProbe (
83 IN EFI_PHYSICAL_ADDRESS BaseAddress,
84 IN UINTN FdBlockSize,
85 IN UINTN FdBlockCount
86 );
87
88/**
89 Write to QEMU Flash
90
91 @param[in] Ptr Pointer to the location to write.
92 @param[in] Value The value to write.
93
94**/
95VOID
96QemuFlashPtrWrite (
97 IN volatile UINT8 *Ptr,
98 IN UINT8 Value
99 );
100
101#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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