hw/hppa: Use qemu_log_mask instead of fprintf to stderr
PATCH 1/2 hw/hppa: Use qemu_log_mask instead of fprintf to stderr
Reported-by Thomas Huth <[email protected]>
Signed-off-by Richard Henderson <[email protected]>
--- hw/hppa/machine.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
hw/hppa/machine.c +8 -9
@@ -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 ;
Signature · 1 line
2.14.3
PATCH 2/2 tests: Enable boot-serial-test for hppa
Signed-off-by Richard Henderson <[email protected]>
--- tests/boot-serial-test.c | 1 + tests/Makefile.include | 2 ++ 2 files changed, 3 insertions(+)
tests/boot-serial-test.c +1 -0
@@ -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 } };
tests/Makefile.include +2 -0
@@ -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)
Signature · 1 line
2.14.3
Re: [Qemu-devel] [PATCH 2/2] tests: Enable boot-serial-test for hppa
Quoted 11 lines · Richard Henderson
Signed-off-by Richard Henderson <[email protected]>--- tests/boot-serial-test.c | 1 + tests/Makefile.include | 2 ++ 2 files changed, 3 insertions(+)tests/boot-serial-test.c +0
-0
tests/boot-serial-test.c static testdef_t tests[] = { · line 90
Quoted 4 lines
tests/boot-serial-test.c +1
-0@@ -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 <[email protected]>
Quoted 2 lines · Richard Henderson
Reported-by Thomas Huth <[email protected]>Signed-off-by Richard Henderson <[email protected]>
Reviewed-by Alex Bennée <[email protected]>
Quoted 50 lines
--- hw/hppa/machine.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)hw/hppa/machine.c +4
-6@@ -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 ); } -
hw/hppa/machine.c static void machine_hppa_init(MachineState *machine) · line 185
Quoted 10 lines
hw/hppa/machine.c +4
-3-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