diff options
author | Artyom Tarasenko <atar4qemu@gmail.com> | 2017-01-23 22:08:59 +0100 |
---|---|---|
committer | Artyom Tarasenko <atar4qemu@gmail.com> | 2017-02-26 22:46:08 +0100 |
commit | a5a08302d44a8b1a8c5819b1411002f85bb5f847 (patch) | |
tree | 167194774b341a867f43b86a39e2f14216e93cf2 /hw/sparc64 | |
parent | 5e3a549498ab6c55465419f003be74cb33836267 (diff) |
niagara: check if a serial port is available
Reported-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Diffstat (limited to 'hw/sparc64')
-rw-r--r-- | hw/sparc64/niagara.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c index edde86ea2f..9a8d6109d4 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); } |