mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
hw/char: disable ibex uart receive if the buffer is full
Not disabling the UART leads to QEMU overwriting the UART receive buffer with the newest received byte. The rx_level variable is added to allow the use of the existing OpenTitan driver libraries. Signed-off-by: Alexander Wagner <alexander.wagner@ulal.de> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-id: 20210309152130.13038-1-alexander.wagner@ulal.de Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
5e437d3ccd
commit
82a4ed8e50
2 changed files with 22 additions and 5 deletions
|
@ -62,6 +62,8 @@ REG32(FIFO_CTRL, 0x1c)
|
|||
FIELD(FIFO_CTRL, RXILVL, 2, 3)
|
||||
FIELD(FIFO_CTRL, TXILVL, 5, 2)
|
||||
REG32(FIFO_STATUS, 0x20)
|
||||
FIELD(FIFO_STATUS, TXLVL, 0, 5)
|
||||
FIELD(FIFO_STATUS, RXLVL, 16, 5)
|
||||
REG32(OVRD, 0x24)
|
||||
REG32(VAL, 0x28)
|
||||
REG32(TIMEOUT_CTRL, 0x2c)
|
||||
|
@ -82,6 +84,8 @@ struct IbexUartState {
|
|||
uint8_t tx_fifo[IBEX_UART_TX_FIFO_SIZE];
|
||||
uint32_t tx_level;
|
||||
|
||||
uint32_t rx_level;
|
||||
|
||||
QEMUTimer *fifo_trigger_handle;
|
||||
uint64_t char_tx_time;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue