2011-03-25 22:15:07 +01:00
|
|
|
/** @file
|
2018-06-27 15:13:38 +02:00
|
|
|
Defines MemImage - the view of the file that is visible at any point,
|
2011-03-25 22:15:07 +01:00
|
|
|
as well as the event handlers for editing the file
|
2018-06-27 15:13:38 +02:00
|
|
|
|
|
|
|
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>
|
2019-04-04 01:07:06 +02:00
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
2011-03-25 22:15:07 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef _LIB_MEM_IMAGE_H_
|
|
|
|
#define _LIB_MEM_IMAGE_H_
|
|
|
|
|
|
|
|
#include "HexEditor.h"
|
|
|
|
|
2011-04-05 22:55:45 +02:00
|
|
|
/**
|
|
|
|
Initialization function for HDiskImage.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The operation was successful.
|
2020-08-01 02:52:32 +02:00
|
|
|
@retval EFI_LOAD_ERROR A load error occurred.
|
2011-04-05 22:55:45 +02:00
|
|
|
**/
|
2011-03-25 22:15:07 +01:00
|
|
|
EFI_STATUS
|
|
|
|
HMemImageInit (
|
|
|
|
VOID
|
|
|
|
);
|
2011-04-05 22:55:45 +02:00
|
|
|
|
|
|
|
/**
|
2018-06-27 15:13:38 +02:00
|
|
|
Backup function for HDiskImage. Only a few fields need to be backup.
|
2011-04-05 22:55:45 +02:00
|
|
|
This is for making the Disk buffer refresh as few as possible.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The operation was successful.
|
|
|
|
**/
|
2011-03-25 22:15:07 +01:00
|
|
|
EFI_STATUS
|
|
|
|
HMemImageBackup (
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
2011-04-05 22:55:45 +02:00
|
|
|
/**
|
|
|
|
Set FileName field in HFileImage.
|
|
|
|
|
|
|
|
@param[in] Offset The offset.
|
|
|
|
@param[in] Size The size.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The operation was successful.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
|
|
|
**/
|
2011-03-25 22:15:07 +01:00
|
|
|
EFI_STATUS
|
|
|
|
HMemImageSetMemOffsetSize (
|
2011-04-05 22:55:45 +02:00
|
|
|
IN UINTN Offset,
|
|
|
|
IN UINTN Size
|
2011-03-25 22:15:07 +01:00
|
|
|
);
|
|
|
|
|
2011-04-05 22:55:45 +02:00
|
|
|
/**
|
|
|
|
Read a disk from disk into HBufferImage.
|
|
|
|
|
|
|
|
@param[in] Offset The offset.
|
|
|
|
@param[in] Size The size.
|
|
|
|
@param[in] Recover if is for recover, no information print.
|
|
|
|
|
2020-08-01 02:52:32 +02:00
|
|
|
@retval EFI_LOAD_ERROR A load error occurred.
|
2011-04-05 22:55:45 +02:00
|
|
|
@retval EFI_SUCCESS The operation was successful.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
|
|
|
**/
|
2011-03-25 22:15:07 +01:00
|
|
|
EFI_STATUS
|
|
|
|
HMemImageRead (
|
2011-04-05 22:55:45 +02:00
|
|
|
IN UINTN Offset,
|
|
|
|
IN UINTN Size,
|
|
|
|
IN BOOLEAN Recover
|
2011-03-25 22:15:07 +01:00
|
|
|
);
|
2011-04-05 22:55:45 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Save lines in HBufferImage to disk.
|
|
|
|
|
|
|
|
@param[in] Offset The offset.
|
|
|
|
@param[in] Size The size.
|
|
|
|
|
2020-08-01 02:52:32 +02:00
|
|
|
@retval EFI_LOAD_ERROR A load error occurred.
|
2011-04-05 22:55:45 +02:00
|
|
|
@retval EFI_SUCCESS The operation was successful.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
|
|
|
**/
|
2011-03-25 22:15:07 +01:00
|
|
|
EFI_STATUS
|
|
|
|
HMemImageSave (
|
2011-04-05 22:55:45 +02:00
|
|
|
IN UINTN Offset,
|
|
|
|
IN UINTN Size
|
2011-03-25 22:15:07 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
#endif
|