mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-09 04:39:34 +00:00
DM: ovmf NV storage writeback support
To support modification of OVMF NV storage, add an option "w" for --ovmf to write the changed OVMF NV data section back to the OVMF image from guest memory before deinit operations. This will enable persistent EFI variables. Only option "w" is supported, dm will exit if passing invalid option. It expects OVMF NV storage writeback with option "w" when power off or reboot the UOS, poweroff, cold and warm reboot in EFI shell and when dm recieves SIGINT and SIGHUP. Tracked-On: #3413 Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com> Reviewed-by:Eddie Dong <eddie.dong@intel.com> Acked-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
@@ -55,6 +55,7 @@ struct e820_entry {
|
||||
|
||||
extern const struct e820_entry e820_default_entries[NUM_E820_ENTRIES];
|
||||
extern int with_bootargs;
|
||||
extern bool writeback_nv_storage;
|
||||
|
||||
size_t ovmf_image_size(void);
|
||||
|
||||
@@ -78,6 +79,7 @@ int acrn_sw_load_bzimage(struct vmctx *ctx);
|
||||
int acrn_sw_load_elf(struct vmctx *ctx);
|
||||
int acrn_sw_load_vsbl(struct vmctx *ctx);
|
||||
int acrn_sw_load_ovmf(struct vmctx *ctx);
|
||||
int acrn_writeback_ovmf_nvstorage(struct vmctx *ctx);
|
||||
int acrn_sw_load(struct vmctx *ctx);
|
||||
#endif
|
||||
|
||||
|
@@ -33,15 +33,13 @@
|
||||
#include <uuid/uuid.h>
|
||||
#include "types.h"
|
||||
#include "vmm.h"
|
||||
#include "macros.h"
|
||||
|
||||
/*
|
||||
* API version for out-of-tree consumers for making compile time decisions.
|
||||
*/
|
||||
#define VMMAPI_VERSION 0103 /* 2 digit major followed by 2 digit minor */
|
||||
|
||||
#define MB (1024 * 1024UL)
|
||||
#define GB (1024 * 1024 * 1024UL)
|
||||
|
||||
#define ALIGN_UP(x, align) (((x) + ((align)-1)) & ~((align)-1))
|
||||
#define ALIGN_DOWN(x, align) ((x) & ~((align)-1))
|
||||
|
||||
|
Reference in New Issue
Block a user