mac_nvram: Add block backend to persist NVRAM contents

Add a way to set a backing store for the mac_nvram similar to what
spapr_nvram or mac_via PRAM already does to allow to save its contents
between runs.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <4b1605a9e484cc95f6e141f297487a070fd418ac.1675297286.git.balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
This commit is contained in:
BALATON Zoltan 2023-02-02 01:24:05 +01:00 committed by Mark Cave-Ayland
parent 1d0c537985
commit 1f7888e225
2 changed files with 29 additions and 0 deletions

View file

@ -44,6 +44,7 @@ struct MacIONVRAMState {
MemoryRegion mem;
uint8_t *data;
BlockBackend *blk;
};
void pmac_format_nvram_partition(MacIONVRAMState *nvr, int len);