mips malta: ensure that the serial ports are associated with a device
The serial ports should be present even if associated with a null device as some firmware wants to initialize them. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
387f4a5a71
commit
ffabf03718
|
@ -781,6 +781,15 @@ void mips_malta_init (ram_addr_t ram_size,
|
||||||
int fl_idx = 0;
|
int fl_idx = 0;
|
||||||
int fl_sectors = 0;
|
int fl_sectors = 0;
|
||||||
|
|
||||||
|
/* Make sure the first 3 serial ports are associated with a device. */
|
||||||
|
for(i = 0; i < 3; i++) {
|
||||||
|
if (!serial_hds[i]) {
|
||||||
|
char label[32];
|
||||||
|
snprintf(label, sizeof(label), "serial%d", i);
|
||||||
|
serial_hds[i] = qemu_chr_open(label, "null", NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* init CPUs */
|
/* init CPUs */
|
||||||
if (cpu_model == NULL) {
|
if (cpu_model == NULL) {
|
||||||
#ifdef TARGET_MIPS64
|
#ifdef TARGET_MIPS64
|
||||||
|
|
Loading…
Reference in New Issue