]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MemImage.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / HexEdit / MemImage.h
1 /** @file
2 Defines MemImage - the view of the file that is visible at any point,
3 as well as the event handlers for editing the file
4
5 Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef _LIB_MEM_IMAGE_H_
11 #define _LIB_MEM_IMAGE_H_
12
13 #include "HexEditor.h"
14
15 /**
16 Initialization function for HDiskImage.
17
18 @retval EFI_SUCCESS The operation was successful.
19 @retval EFI_LOAD_ERROR A load error occurred.
20 **/
21 EFI_STATUS
22 HMemImageInit (
23 VOID
24 );
25
26 /**
27 Backup function for HDiskImage. Only a few fields need to be backup.
28 This is for making the Disk buffer refresh as few as possible.
29
30 @retval EFI_SUCCESS The operation was successful.
31 **/
32 EFI_STATUS
33 HMemImageBackup (
34 VOID
35 );
36
37 /**
38 Set FileName field in HFileImage.
39
40 @param[in] Offset The offset.
41 @param[in] Size The size.
42
43 @retval EFI_SUCCESS The operation was successful.
44 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
45 **/
46 EFI_STATUS
47 HMemImageSetMemOffsetSize (
48 IN UINTN Offset,
49 IN UINTN Size
50 );
51
52 /**
53 Read a disk from disk into HBufferImage.
54
55 @param[in] Offset The offset.
56 @param[in] Size The size.
57 @param[in] Recover if is for recover, no information print.
58
59 @retval EFI_LOAD_ERROR A load error occurred.
60 @retval EFI_SUCCESS The operation was successful.
61 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
62 **/
63 EFI_STATUS
64 HMemImageRead (
65 IN UINTN Offset,
66 IN UINTN Size,
67 IN BOOLEAN Recover
68 );
69
70 /**
71 Save lines in HBufferImage to disk.
72
73 @param[in] Offset The offset.
74 @param[in] Size The size.
75
76 @retval EFI_LOAD_ERROR A load error occurred.
77 @retval EFI_SUCCESS The operation was successful.
78 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
79 **/
80 EFI_STATUS
81 HMemImageSave (
82 IN UINTN Offset,
83 IN UINTN Size
84 );
85
86 #endif