qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] hw/hppa: Use qemu_log_mask instead of fprintf to stderr
@ 2018-02-04  6:49 Richard Henderson
  2018-02-04  6:49 ` [Qemu-devel] [PATCH 2/2] tests: Enable boot-serial-test for hppa Richard Henderson
  2018-02-04 13:38 ` [Qemu-devel] [PATCH 1/2] hw/hppa: Use qemu_log_mask instead of fprintf to stderr Alex Bennée
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Henderson @ 2018-02-04  6:49 UTC (permalink / raw)
  To: qemu-devel

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 hw/hppa/machine.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index afd3867313..19033e268d 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -19,6 +19,7 @@
 #include "hw/hppa/hppa_sys.h"
 #include "qemu/cutils.h"
 #include "qapi/error.h"
+#include "qemu/log.h"
 
 #define MAX_IDE_BUS 2
 
@@ -111,7 +112,6 @@ static void machine_hppa_init(MachineState *machine)
         uint32_t addr = DINO_UART_HPA + 0x800;
         serial_mm_init(addr_space, addr, 0, serial_irq,
                        115200, serial_hds[0], DEVICE_BIG_ENDIAN);
-        fprintf(stderr, "Serial port created at 0x%x\n", addr);
     }
 
     /* SCSI disk setup. */
@@ -146,9 +146,9 @@ static void machine_hppa_init(MachineState *machine)
         error_report("could not load firmware '%s'", firmware_filename);
         exit(1);
     }
-    fprintf(stderr, "Firmware loaded at 0x%08" PRIx64 "-0x%08" PRIx64
-            ", entry at 0x%08" PRIx64 ".\n",
-            firmware_low, firmware_high, firmware_entry);
+    qemu_log_mask(CPU_LOG_PAGE, "Firmware loaded at 0x%08" PRIx64
+                  "-0x%08" PRIx64 ", entry at 0x%08" PRIx64 ".\n",
+                  firmware_low, firmware_high, firmware_entry);
     if (firmware_low < ram_size || firmware_high >= FIRMWARE_END) {
         error_report("Firmware overlaps with memory or IO space");
         exit(1);
@@ -163,7 +163,6 @@ static void machine_hppa_init(MachineState *machine)
 
     /* Load kernel */
     if (kernel_filename) {
-        fprintf(stderr, "LOADING kernel '%s'\n", kernel_filename);
         size = load_elf(kernel_filename, &cpu_hppa_to_phys,
                         NULL, &kernel_entry, &kernel_low, &kernel_high,
                         true, EM_PARISC, 0, 0);
@@ -177,10 +176,10 @@ static void machine_hppa_init(MachineState *machine)
             error_report("could not load kernel '%s'", kernel_filename);
             exit(1);
         }
-
-        fprintf(stderr, "Kernel loaded at 0x%08" PRIx64 "-0x%08" PRIx64
-                ", entry at 0x%08" PRIx64 ", size %ld kB.\n",
-                kernel_low, kernel_high, kernel_entry, size / 1024);
+        qemu_log_mask(CPU_LOG_PAGE, "Kernel loaded at 0x%08" PRIx64
+                      "-0x%08" PRIx64 ", entry at 0x%08" PRIx64
+                      ", size %ld kB.\n",
+                      kernel_low, kernel_high, kernel_entry, size / 1024);
 
         if (kernel_cmdline) {
             cpu[0]->env.gr[24] = 0x4000;
-- 
2.14.3

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

* [Qemu-devel] [PATCH 2/2] tests: Enable boot-serial-test for hppa
  2018-02-04  6:49 [Qemu-devel] [PATCH 1/2] hw/hppa: Use qemu_log_mask instead of fprintf to stderr Richard Henderson
@ 2018-02-04  6:49 ` Richard Henderson
  2018-02-04  8:04   ` Thomas Huth
  2018-02-04 13:38 ` [Qemu-devel] [PATCH 1/2] hw/hppa: Use qemu_log_mask instead of fprintf to stderr Alex Bennée
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2018-02-04  6:49 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tests/boot-serial-test.c | 1 +
 tests/Makefile.include   | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
index 418c5b92dc..ea87a80be7 100644
--- a/tests/boot-serial-test.c
+++ b/tests/boot-serial-test.c
@@ -87,6 +87,7 @@ static testdef_t tests[] = {
       sizeof(kernel_plml605), kernel_plml605 },
     { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim },
     { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 },
+    { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" },
 
     { NULL }
 };
diff --git a/tests/Makefile.include b/tests/Makefile.include
index ca82e0c0cc..83def6994c 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -299,6 +299,8 @@ gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y)
 
 check-qtest-alpha-y = tests/boot-serial-test$(EXESUF)
 
+check-qtest-hppa-y = tests/boot-serial-test$(EXESUF)
+
 check-qtest-m68k-y = tests/boot-serial-test$(EXESUF)
 
 check-qtest-microblaze-y = tests/boot-serial-test$(EXESUF)
-- 
2.14.3

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

* Re: [Qemu-devel] [PATCH 2/2] tests: Enable boot-serial-test for hppa
  2018-02-04  6:49 ` [Qemu-devel] [PATCH 2/2] tests: Enable boot-serial-test for hppa Richard Henderson
@ 2018-02-04  8:04   ` Thomas Huth
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2018-02-04  8:04 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel

On 04.02.2018 07:49, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  tests/boot-serial-test.c | 1 +
>  tests/Makefile.include   | 2 ++
>  2 files changed, 3 insertions(+)
> 
> diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c
> index 418c5b92dc..ea87a80be7 100644
> --- a/tests/boot-serial-test.c
> +++ b/tests/boot-serial-test.c
> @@ -87,6 +87,7 @@ static testdef_t tests[] = {
>        sizeof(kernel_plml605), kernel_plml605 },
>      { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim },
>      { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 },
> +    { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" },

Fine for me, too.

Reviewed-by: Thomas Huth <thuth@redhat.com>

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

* Re: [Qemu-devel] [PATCH 1/2] hw/hppa: Use qemu_log_mask instead of fprintf to stderr
  2018-02-04  6:49 [Qemu-devel] [PATCH 1/2] hw/hppa: Use qemu_log_mask instead of fprintf to stderr Richard Henderson
  2018-02-04  6:49 ` [Qemu-devel] [PATCH 2/2] tests: Enable boot-serial-test for hppa Richard Henderson
@ 2018-02-04 13:38 ` Alex Bennée
  1 sibling, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2018-02-04 13:38 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel


Richard Henderson <richard.henderson@linaro.org> writes:

> Reported-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  hw/hppa/machine.c | 17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
> index afd3867313..19033e268d 100644
> --- a/hw/hppa/machine.c
> +++ b/hw/hppa/machine.c
> @@ -19,6 +19,7 @@
>  #include "hw/hppa/hppa_sys.h"
>  #include "qemu/cutils.h"
>  #include "qapi/error.h"
> +#include "qemu/log.h"
>
>  #define MAX_IDE_BUS 2
>
> @@ -111,7 +112,6 @@ static void machine_hppa_init(MachineState *machine)
>          uint32_t addr = DINO_UART_HPA + 0x800;
>          serial_mm_init(addr_space, addr, 0, serial_irq,
>                         115200, serial_hds[0], DEVICE_BIG_ENDIAN);
> -        fprintf(stderr, "Serial port created at 0x%x\n", addr);
>      }
>
>      /* SCSI disk setup. */
> @@ -146,9 +146,9 @@ static void machine_hppa_init(MachineState *machine)
>          error_report("could not load firmware '%s'", firmware_filename);
>          exit(1);
>      }
> -    fprintf(stderr, "Firmware loaded at 0x%08" PRIx64 "-0x%08" PRIx64
> -            ", entry at 0x%08" PRIx64 ".\n",
> -            firmware_low, firmware_high, firmware_entry);
> +    qemu_log_mask(CPU_LOG_PAGE, "Firmware loaded at 0x%08" PRIx64
> +                  "-0x%08" PRIx64 ", entry at 0x%08" PRIx64 ".\n",
> +                  firmware_low, firmware_high, firmware_entry);
>      if (firmware_low < ram_size || firmware_high >= FIRMWARE_END) {
>          error_report("Firmware overlaps with memory or IO space");
>          exit(1);
> @@ -163,7 +163,6 @@ static void machine_hppa_init(MachineState *machine)
>
>      /* Load kernel */
>      if (kernel_filename) {
> -        fprintf(stderr, "LOADING kernel '%s'\n", kernel_filename);
>          size = load_elf(kernel_filename, &cpu_hppa_to_phys,
>                          NULL, &kernel_entry, &kernel_low, &kernel_high,
>                          true, EM_PARISC, 0, 0);
> @@ -177,10 +176,10 @@ static void machine_hppa_init(MachineState *machine)
>              error_report("could not load kernel '%s'", kernel_filename);
>              exit(1);
>          }
> -
> -        fprintf(stderr, "Kernel loaded at 0x%08" PRIx64 "-0x%08" PRIx64
> -                ", entry at 0x%08" PRIx64 ", size %ld kB.\n",
> -                kernel_low, kernel_high, kernel_entry, size / 1024);
> +        qemu_log_mask(CPU_LOG_PAGE, "Kernel loaded at 0x%08" PRIx64
> +                      "-0x%08" PRIx64 ", entry at 0x%08" PRIx64
> +                      ", size %ld kB.\n",
> +                      kernel_low, kernel_high, kernel_entry, size / 1024);
>
>          if (kernel_cmdline) {
>              cpu[0]->env.gr[24] = 0x4000;


--
Alex Bennée

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

end of thread, other threads:[~2018-02-04 13:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-04  6:49 [Qemu-devel] [PATCH 1/2] hw/hppa: Use qemu_log_mask instead of fprintf to stderr Richard Henderson
2018-02-04  6:49 ` [Qemu-devel] [PATCH 2/2] tests: Enable boot-serial-test for hppa Richard Henderson
2018-02-04  8:04   ` Thomas Huth
2018-02-04 13:38 ` [Qemu-devel] [PATCH 1/2] hw/hppa: Use qemu_log_mask instead of fprintf to stderr Alex Bennée

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