qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] ppc/spapr: Change printf format to %HWADDR_PRId for MIN_RMA_SLOF
@ 2024-09-12  6:52 Aditya Gupta
  2024-09-12  7:04 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 3+ messages in thread
From: Aditya Gupta @ 2024-09-12  6:52 UTC (permalink / raw)
  To: qemu-devel, qemu-ppc; +Cc: Nicholas Piggin, Madhavan Srinivasan

Currently starting a pSeries machine, with lesser than 128MiB shows
below error:

    qemu-system-ppc64: pSeries SLOF firmware requires >= 80ldMiB guest RMA (Real Mode Area memory)

Above '80ldMib' is in hex, and it means 0x80 MiB = 128 MiB.

Change format specifier for this value to use 'HWADDR_PRId', instead of
'HWADDR_PRIx' thus showing decimal value instead of hex.

Thus, change the message to below error:

    qemu-system-ppc64: pSeries SLOF firmware requires >= 128MiB guest RMA (Real Mode Area memory)

Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>

---
This is an RFC, as it confused me why does QEMU print that error even with '-m' >80 MB.

This patch can also be considered a personal preference to see it as a decimal value instead of hex.

Or maybe we can have '0x80 MiB' instead ?

Does the 'ldMiB' actually mean that the value is in hexadecimal ? I did not find a reason in git history.
---
---
 hw/ppc/spapr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 8aa3ce7449be..b2ddacc6dd01 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2819,8 +2819,8 @@ static hwaddr spapr_rma_size(SpaprMachineState *spapr, Error **errp)
 
     if (rma_size < MIN_RMA_SLOF) {
         error_setg(errp,
-                   "pSeries SLOF firmware requires >= %" HWADDR_PRIx
-                   "ldMiB guest RMA (Real Mode Area memory)",
+                   "pSeries SLOF firmware requires >= %" HWADDR_PRId
+                   "MiB guest RMA (Real Mode Area memory)",
                    MIN_RMA_SLOF / MiB);
         return 0;
     }
-- 
2.46.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-23  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-12  6:52 [RFC PATCH] ppc/spapr: Change printf format to %HWADDR_PRId for MIN_RMA_SLOF Aditya Gupta
2024-09-12  7:04 ` Philippe Mathieu-Daudé
2024-09-23  6:59   ` Aditya Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).