On 4 March 2016 at 01:24, Andrew Baumann <andrew.baum...@microsoft.com> wrote: > At present only the core UART functions (data path for tx/rx) are > implemented, which is enough for UEFI to boot. The following > features/registers are unimplemented: > * Line/modem control > * Scratch register > * Extra control > * Baudrate > * SPI interfaces
> @@ -131,6 +139,27 @@ static void bcm2835_peripherals_realize(DeviceState > *dev, Error **errp) > qdev_get_gpio_in_named(DEVICE(&s->ic), BCM2835_IC_GPU_IRQ, > INTERRUPT_UART)); > > + /* AUX / UART1 */ > + /* XXX: pl011 (uart0) uses qemu_char_get_next_serial(), so at this point > it > + * should have claimed the first serial device (if one exists) */ > + chr = serial_hds[1]; > + if (chr == NULL) { > + chr = qemu_chr_new("bcm2835.uart1", "null", NULL); > + } > + qdev_prop_set_chr(DEVICE(&s->aux), "chardev", chr); You should use qemu_char_get_next_serial() rather than directly looking in serial_hds[]. Otherwise Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> (Eventually what should happen is that we fix pl011 to take a chardev property, and then we can create aliases of those properties on the bcm2835 SoC object, and wire them up in the board level code. But that's a cleanup for another day.) thanks -- PMM