[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 1/5] pseries: Correct RAM size check for SLOF
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PATCH 1/5] pseries: Correct RAM size check for SLOF |
Date: |
Mon, 14 Nov 2011 14:18:57 +1100 |
The SLOF firmware used on the pseries machine needs a reasonable amount of
(guest) RAM in order to run, so we have a check in the machine init
function to check that this is available. However, SLOF runs in real mode
(MMU off) which means it can only actually access the RMA (Real Mode Area),
not all of RAM. In many cases the RMA is the same as all RAM, but when
running with Book3S HV KVM on PowerPC 970, the RMA must be especially
allocated to be (host) physically contiguous. In this case, the RMA size
is determined by what the host admin allocated at boot time, and will
usually be less than the whole guest RAM size.
This patch corrects the test to see if SLOF has enough memory for this
case.
In addition, more recent versions of SLOF that were committed earlier don't
need quite as much memory as earlier versions. Therefore, this patch also
reduces the amount of RAM we require to run SLOF.
Signed-off-by: David Gibson <address@hidden>
---
hw/spapr.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/spapr.c b/hw/spapr.c
index 40cfc9b..2b901f1 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -57,7 +57,7 @@
#define FW_MAX_SIZE 0x400000
#define FW_FILE_NAME "slof.bin"
-#define MIN_RAM_SLOF 512UL
+#define MIN_RMA_SLOF 128UL
#define TIMEBASE_FREQ 512000000ULL
@@ -562,9 +562,9 @@ static void ppc_spapr_init(ram_addr_t ram_size,
spapr->entry_point = KERNEL_LOAD_ADDR;
} else {
- if (ram_size < (MIN_RAM_SLOF << 20)) {
+ if (rma_size < (MIN_RMA_SLOF << 20)) {
fprintf(stderr, "qemu: pSeries SLOF firmware requires >= "
- "%ldM guest RAM\n", MIN_RAM_SLOF);
+ "%ldM guest RMA (Real Mode Area memory)\n", MIN_RMA_SLOF);
exit(1);
}
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, FW_FILE_NAME);
--
1.7.7.1
- [Qemu-ppc] [0/5] Assorted small pseries bug fixes, David Gibson, 2011/11/13
- [Qemu-ppc] [PATCH 1/5] pseries: Correct RAM size check for SLOF,
David Gibson <=
- [Qemu-ppc] [PATCH 4/5] pseries: Default reg for vty should be SPAPR_VTY_BASE_ADDRESS, David Gibson, 2011/11/13
- [Qemu-ppc] [PATCH 5/5] pseries: Allow kernel's early debug output to work, David Gibson, 2011/11/13
- [Qemu-ppc] [PATCH 2/5] pseries: Fix buggy spapr_vio_find_by_reg(), David Gibson, 2011/11/13
- [Qemu-ppc] [PATCH 3/5] pseries: Check we have a chardev in spapr_vty_init(), David Gibson, 2011/11/13
- Re: [Qemu-ppc] [0/5] Assorted small pseries bug fixes, Alexander Graf, 2011/11/15
- Re: [Qemu-ppc] [0/5] Assorted small pseries bug fixes, Alexander Graf, 2011/11/18