qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] sun4v queue
@ 2017-02-26 22:29 Artyom Tarasenko
  2017-02-26 22:29 ` [Qemu-devel] [PULL 1/2] niagara: fail if a firmware file is missing Artyom Tarasenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Artyom Tarasenko @ 2017-02-26 22:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: mark.cave-ayland, peter.maydell, Artyom Tarasenko

The following changes since commit a951316b8a5c3c63254f20a826afeed940dd4cba:

  Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2017-02-03 14:41:49 +0000)

are available in the git repository at:

  https://github.com/artyom-tarasenko/qemu tags/pull-sun4v-20170226

for you to fetch changes up to a5a08302d44a8b1a8c5819b1411002f85bb5f847:

  niagara: check if a serial port is available (2017-02-26 22:46:08 +0100)

----------------------------------------------------------------
Pull request for Niagara patches 2017 02 26

----------------------------------------------------------------
Artyom Tarasenko (2):
      niagara: fail if a firmware file is missing
      niagara: check if a serial port is available

 hw/sparc64/niagara.c | 33 +++++++++++++++++++++++----------
 1 file changed, 23 insertions(+), 10 deletions(-)

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

* [Qemu-devel] [PULL 1/2] niagara: fail if a firmware file is missing
  2017-02-26 22:29 [Qemu-devel] [PULL 0/2] sun4v queue Artyom Tarasenko
@ 2017-02-26 22:29 ` Artyom Tarasenko
  2017-02-26 22:29 ` [Qemu-devel] [PULL 2/2] niagara: check if a serial port is available Artyom Tarasenko
  2017-02-27 10:00 ` [Qemu-devel] [PULL 0/2] sun4v queue Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Artyom Tarasenko @ 2017-02-26 22:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: mark.cave-ayland, peter.maydell, Artyom Tarasenko

fail if a firmware file is missing and not qtest_enabled(),
the later is necessary to allow some basic tests if
firmware is not available

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
---
 hw/sparc64/niagara.c | 26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
index b55d4bb..edde86e 100644
--- a/hw/sparc64/niagara.c
+++ b/hw/sparc64/niagara.c
@@ -35,6 +35,8 @@
 #include "hw/timer/sun4v-rtc.h"
 #include "exec/address-spaces.h"
 #include "sysemu/block-backend.h"
+#include "qemu/error-report.h"
+#include "sysemu/qtest.h"
 
 
 typedef struct NiagaraBoardState {
@@ -85,6 +87,17 @@ typedef struct NiagaraBoardState {
 #define NIAGARA_OBP_OFFSET  0x80000ULL
 #define PROM_SIZE_MAX       (4 * 1024 * 1024)
 
+static void add_rom_or_fail(const char *file, const hwaddr addr)
+{
+    /* XXX remove qtest_enabled() check once firmware files are
+     * in the qemu tree
+     */
+    if (!qtest_enabled() && rom_add_file_fixed(file, addr, -1)) {
+        error_report("Unable to load a firmware for -M niagara");
+        exit(1);
+    }
+
+}
 /* Niagara hardware initialisation */
 static void niagara_init(MachineState *machine)
 {
@@ -119,14 +132,13 @@ static void niagara_init(MachineState *machine)
                                          "sun4v.prom", PROM_SIZE_MAX);
     memory_region_add_subregion(sysmem, NIAGARA_PROM_BASE, &s->prom);
 
-    rom_add_file_fixed("nvram1", NIAGARA_NVRAM_BASE, -1);
-    rom_add_file_fixed("1up-md.bin", NIAGARA_MD_ROM_BASE, -1);
-    rom_add_file_fixed("1up-hv.bin", NIAGARA_HV_ROM_BASE, -1);
+    add_rom_or_fail("nvram1", NIAGARA_NVRAM_BASE);
+    add_rom_or_fail("1up-md.bin", NIAGARA_MD_ROM_BASE);
+    add_rom_or_fail("1up-hv.bin", NIAGARA_HV_ROM_BASE);
 
-    rom_add_file_fixed("reset.bin", NIAGARA_PROM_BASE, -1);
-    rom_add_file_fixed("q.bin", NIAGARA_PROM_BASE + NIAGARA_Q_OFFSET, -1);
-    rom_add_file_fixed("openboot.bin", NIAGARA_PROM_BASE + NIAGARA_OBP_OFFSET,
-                       -1);
+    add_rom_or_fail("reset.bin", NIAGARA_PROM_BASE);
+    add_rom_or_fail("q.bin", NIAGARA_PROM_BASE + NIAGARA_Q_OFFSET);
+    add_rom_or_fail("openboot.bin", NIAGARA_PROM_BASE + NIAGARA_OBP_OFFSET);
 
     /* the virtual ramdisk is kind of initrd, but it resides
        outside of the partition RAM */
-- 
2.7.2

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

* [Qemu-devel] [PULL 2/2] niagara: check if a serial port is available
  2017-02-26 22:29 [Qemu-devel] [PULL 0/2] sun4v queue Artyom Tarasenko
  2017-02-26 22:29 ` [Qemu-devel] [PULL 1/2] niagara: fail if a firmware file is missing Artyom Tarasenko
@ 2017-02-26 22:29 ` Artyom Tarasenko
  2017-02-27 10:00 ` [Qemu-devel] [PULL 0/2] sun4v queue Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Artyom Tarasenko @ 2017-02-26 22:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: mark.cave-ayland, peter.maydell, Artyom Tarasenko

Reported-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
---
 hw/sparc64/niagara.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
index edde86e..9a8d610 100644
--- a/hw/sparc64/niagara.c
+++ b/hw/sparc64/niagara.c
@@ -158,9 +158,10 @@ static void niagara_init(MachineState *machine)
             exit(1);
         }
     }
-    serial_mm_init(sysmem, NIAGARA_UART_BASE, 0, NULL, 115200,
-                   serial_hds[0], DEVICE_BIG_ENDIAN);
-
+    if (serial_hds[0]) {
+        serial_mm_init(sysmem, NIAGARA_UART_BASE, 0, NULL, 115200,
+                       serial_hds[0], DEVICE_BIG_ENDIAN);
+    }
     empty_slot_init(NIAGARA_IOBBASE, NIAGARA_IOBSIZE);
     sun4v_rtc_init(NIAGARA_RTC_BASE);
 }
-- 
2.7.2

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

* Re: [Qemu-devel] [PULL 0/2] sun4v queue
  2017-02-26 22:29 [Qemu-devel] [PULL 0/2] sun4v queue Artyom Tarasenko
  2017-02-26 22:29 ` [Qemu-devel] [PULL 1/2] niagara: fail if a firmware file is missing Artyom Tarasenko
  2017-02-26 22:29 ` [Qemu-devel] [PULL 2/2] niagara: check if a serial port is available Artyom Tarasenko
@ 2017-02-27 10:00 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2017-02-27 10:00 UTC (permalink / raw)
  To: Artyom Tarasenko; +Cc: QEMU Developers, Mark Cave-Ayland

On 26 February 2017 at 22:29, Artyom Tarasenko <atar4qemu@gmail.com> wrote:
> The following changes since commit a951316b8a5c3c63254f20a826afeed940dd4cba:
>
>   Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2017-02-03 14:41:49 +0000)
>
> are available in the git repository at:
>
>   https://github.com/artyom-tarasenko/qemu tags/pull-sun4v-20170226
>
> for you to fetch changes up to a5a08302d44a8b1a8c5819b1411002f85bb5f847:
>
>   niagara: check if a serial port is available (2017-02-26 22:46:08 +0100)
>
> ----------------------------------------------------------------
> Pull request for Niagara patches 2017 02 26
>
> ----------------------------------------------------------------
> Artyom Tarasenko (2):
>       niagara: fail if a firmware file is missing
>       niagara: check if a serial port is available
>
>  hw/sparc64/niagara.c | 33 +++++++++++++++++++++++----------
>  1 file changed, 23 insertions(+), 10 deletions(-)

Applied, thanks.

-- PMM

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

end of thread, other threads:[~2017-02-27 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-26 22:29 [Qemu-devel] [PULL 0/2] sun4v queue Artyom Tarasenko
2017-02-26 22:29 ` [Qemu-devel] [PULL 1/2] niagara: fail if a firmware file is missing Artyom Tarasenko
2017-02-26 22:29 ` [Qemu-devel] [PULL 2/2] niagara: check if a serial port is available Artyom Tarasenko
2017-02-27 10:00 ` [Qemu-devel] [PULL 0/2] sun4v queue Peter Maydell

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).