qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] c29cd4: escc: always set STATUS_TXEMPTY in R_


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] c29cd4: escc: always set STATUS_TXEMPTY in R_STATUS on dev...
Date: Sun, 21 Nov 2021 05:13:04 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: c29cd47e82df0bc7385cdd49a158d838314daa9e
      
https://github.com/qemu/qemu/commit/c29cd47e82df0bc7385cdd49a158d838314daa9e
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2021-11-21 (Sun, 21 Nov 2021)

  Changed paths:
    M hw/char/escc.c

  Log Message:
  -----------
  escc: always set STATUS_TXEMPTY in R_STATUS on device reset

The "Transmit Interrupts and Transmit Buffer Empty Bit" section of the ESCC
datasheet states the following about the STATUS_TXEMPTY bit: "After a hardware
reset (including a hardware reset by software), or a channel reset, this bit
is set to 1".

Update escc_reset() to set the STATUS_TXEMPTY bit in the R_STATUS register
on device reset as described which fixes a regression whereby the Sun PROM
checks this bit early on startup and gets stuck in an infinite loop if it is
not set.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20211118181835.18497-2-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 319e89cdc32096432b578152a47d0d156033b711
      
https://github.com/qemu/qemu/commit/319e89cdc32096432b578152a47d0d156033b711
  Author: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  Date:   2021-11-21 (Sun, 21 Nov 2021)

  Changed paths:
    M hw/char/escc.c

  Log Message:
  -----------
  escc: update the R_SPEC register SPEC_ALLSENT bit when writing to W_TXCTRL1

The ESCC datasheet states that SPEC_ALLSENT is always set in sync mode and set
in async mode once all characters have cleared the transmitter. Since writes to
SERIAL_DATA use a synchronous chardev API, the guest can never see the state 
when
transmission is in progress so it is possible to set SPEC_ALLSENT in the
R_SPEC register unconditionally.

This fixes a hang when using the Sun PROM as it attempts to enumerate the
onboard serial devices, and a similar hang in OpenBSD SPARC32 where in both 
cases
the boot process will not proceed until SPEC_ALLSENT has been set after writing
to W_TXCTRL1.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20211118181835.18497-3-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


  Commit: c5fbdd60cf1fb52f01bdfe342b6fa65d5343e1b1
      
https://github.com/qemu/qemu/commit/c5fbdd60cf1fb52f01bdfe342b6fa65d5343e1b1
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2021-11-21 (Sun, 21 Nov 2021)

  Changed paths:
    M hw/char/escc.c

  Log Message:
  -----------
  Merge tag 'qemu-sparc-20211121' of git://github.com/mcayland/qemu into staging

qemu-sparc queue

# gpg: Signature made Sun 21 Nov 2021 10:57:01 AM CET
# gpg:                using RSA key CC621AB98E82200D915CC9C45BC2C56FAE0F321F
# gpg:                issuer "mark.cave-ayland@ilande.co.uk"
# gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>" 
[full]

* tag 'qemu-sparc-20211121' of git://github.com/mcayland/qemu:
  escc: update the R_SPEC register SPEC_ALLSENT bit when writing to W_TXCTRL1
  escc: always set STATUS_TXEMPTY in R_STATUS on device reset

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/8627edfb3f1f...c5fbdd60cf1f



reply via email to

[Prev in Thread] Current Thread [Next in Thread]