On 2/21/20 7:25 PM, Paolo Bonzini wrote:
On 21/02/20 05:49, Gavin Shan wrote:
@@ -306,6 +362,7 @@ static const VMStateDescription vmstate_pl011 = {
VMSTATE_UINT32(int_enabled, PL011State),
VMSTATE_UINT32(int_level, PL011State),
VMSTATE_UINT32_ARRAY(read_fifo, PL011State, 16),
+ VMSTATE_UINT8_ARRAY(write_fifo, PL011State, 16),
VMSTATE_UINT32(ilpr, PL011State),
VMSTATE_UINT32(ibrd, PL011State),
VMSTATE_UINT32(fbrd, PL011State),
@@ -313,6 +370,7 @@ static const VMStateDescription vmstate_pl011 = {
VMSTATE_INT32(read_pos, PL011State),
VMSTATE_INT32(read_count, PL011State),
VMSTATE_INT32(read_trigger, PL011State),
+ VMSTATE_INT32(write_count, PL011State),
Hi Gavin, please add these two fields to a subsection, so that they are
emitted only if write_count > 0.
Hi Paolo, sure, will do in next respin :)
Thanks,
Gavin
VMSTATE_END_OF_LIST()
}
};
diff --git a/include/hw/char/pl011.h b/include/hw/char/pl011.h
index 14187165c6..aeaf332eca 100644
--- a/include/hw/char/pl011.h
+++ b/include/hw/char/pl011.h
@@ -38,6 +38,7 @@ typedef struct PL011State {
uint32_t int_enabled;
uint32_t int_level;
uint32_t read_fifo[16];
+ uint8_t write_fifo[16];
uint32_t ilpr;
uint32_t ibrd;
uint32_t fbrd;
@@ -45,6 +46,7 @@ typedef struct PL011State {
int read_pos;
int read_count;
int read_trigger;
+ int write_count;
CharBackend chr;
qemu_irq irq[6];
const unsigned char *id;