[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 63/73] spapr_nvram: Pre-initialize the NVRAM to support
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 63/73] spapr_nvram: Pre-initialize the NVRAM to support the -prom-env parameter |
Date: |
Fri, 28 Oct 2016 12:38:04 +1100 |
From: Thomas Huth <address@hidden>
In case we do not load the NVRAM contents from a file and the user
specified the "-prom-env" parameter, use the new CHRP NVRAM helper
functions to pre-initialize the NVRAM partitions, so that the SLOF
firmware now can pick up the environment variables from the -prom-env
parameter, too.
Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/nvram/spapr_nvram.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c
index 4de5f70..eb42ea3 100644
--- a/hw/nvram/spapr_nvram.c
+++ b/hw/nvram/spapr_nvram.c
@@ -31,6 +31,7 @@
#include "sysemu/block-backend.h"
#include "sysemu/device_tree.h"
#include "hw/sysbus.h"
+#include "hw/nvram/chrp_nvram.h"
#include "hw/ppc/spapr.h"
#include "hw/ppc/spapr_vio.h"
@@ -162,6 +163,11 @@ static void spapr_nvram_realize(VIOsPAPRDevice *dev, Error
**errp)
error_setg(errp, "can't read spapr-nvram contents");
return;
}
+ } else if (nb_prom_envs > 0) {
+ /* Create a system partition to pass the -prom-env variables */
+ chrp_nvram_create_system_partition(nvram->buf, MIN_NVRAM_SIZE / 4);
+ chrp_nvram_create_free_partition(&nvram->buf[MIN_NVRAM_SIZE / 4],
+ nvram->size - MIN_NVRAM_SIZE / 4);
}
spapr_rtas_register(RTAS_NVRAM_FETCH, "nvram-fetch", rtas_nvram_fetch);
--
2.7.4
- [Qemu-ppc] [PULL 70/73] spapr: Add DRC count indexed hotplug identifier type, (continued)
- [Qemu-ppc] [PULL 70/73] spapr: Add DRC count indexed hotplug identifier type, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 53/73] libqos: Move BAR assignment to common code, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 54/73] libqos: Better handling of PCI legacy IO, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 51/73] libqos: Give qvirtio_config_read*() consistent semantics, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 62/73] libqos: Change PCI accessors to take opaque BAR handle, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 59/73] libqos: Add 64-bit PCI IO accessors, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 61/73] tests: Don't assume structure of PCI IO base in ahci-test, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 67/73] spapr: update spapr hotplug documentation, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 60/73] tests: Use qpci_mem{read, write} in ivshmem-test, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 57/73] libqos: Implement mmio accessors in terms of mem{read, write}, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 63/73] spapr_nvram: Pre-initialize the NVRAM to support the -prom-env parameter,
David Gibson <=
- [Qemu-ppc] [PULL 50/73] adb: change handler only when recognized, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 68/73] spapr_events: add support for dedicated hotplug event source, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 72/73] spapr: Memory hot-unplug support, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 73/73] ppc: allow certain HV interrupts to be delivered to guests, David Gibson, 2016/10/27
- [Qemu-ppc] [PULL 22/73] ppc: add skiboot firmware for the pnv platform, David Gibson, 2016/10/28
- [Qemu-ppc] [PULL 01/73] pseries: Update SLOF firmware image to 20161019, David Gibson, 2016/10/28
- Re: [Qemu-ppc] [PULL 00/73] ppc-for-2.8 queue 20161028, Peter Maydell, 2016/10/28