Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ESP UART FIFO IRQs: (QEMU-63) #55

Closed
wants to merge 31 commits into from

Conversation

andreyeltsov
Copy link

  • generate TX_FIFO_EMPTY if used bytes is below the threshold
  • do not allow INT_ST have bits that are masked
  • report FIFO buffer sizes in MEM_CONF register

igrr and others added 28 commits September 8, 2022 05:37
GDB considers window registers as pseudo registers, meaning that they
are calculated by GDB using the values of AR registers and windowbase.
This patch removes the window registers from the total number of
registers that QEMU will send to GDB, making the number of registers
match the one that GDB expects to see.
This commit introduces two environment variables which can be used
to adjust the list of registers sent from QEMU to GDB:
* If QEMU_XTENSA_CORE_REGS_ONLY is set, only non-privileged registers
  will be sent to GDB. This behavior is compatible with Espressif
  builds of GDB up to esp-2021r1.
* If QEMU_XTENSA_COUNT_WINDOW_REGS is set, QEMU will send window
  registers (a0-a15) to GDB. Enable this if you don't have a build of
  GDB which considers a0-a15 to be "raw" registers.
DP83848C PHY emulated by opencores_eth has several vendor-specific
MII registers at 0x10-0x1d. Reading these registers resulted in an
out-of-bounds access to the regs array.
Part of this commit adds bounds checking.
Since the PHYSTS vendor-specific register is accessed by some of the
embedded DP83848C drivers, the rest of the commit adds simple
emulation of this register, setting the bits depending on the link
status.
Co-authored-by: Maksim Naumenko <maksim.naumenko@espressif.com>
This is an SSIPeripheral instance that knows how to respond to read_id
command. It doesn't store any data. It is sufficient for the IDF
driver to decide to turn on the PSRAM cache. Actual data storage in
PSRAM is emulated in DPORT.
- generate TX_FIFO_EMPTY if used bytes is below the threshold
- do not allow INT_ST have bits that are masked
- report FIFO buffer sizes in MEM_CONF register
@github-actions github-actions bot changed the title Fix ESP UART FIFO IRQs: Fix ESP UART FIFO IRQs: (QEMU-63) Sep 30, 2022
Copy link
Member

@igrr igrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @andreyeltsov!

hw/char/esp32_uart.c Outdated Show resolved Hide resolved
hw/char/esp32_uart.c Outdated Show resolved Hide resolved
include/hw/char/esp32_uart.h Show resolved Hide resolved
Copy link
Member

@igrr igrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again, the fixes look good to me. I'll squash the change into the original commit when rebasing the esp-develop branch next time.

@igrr
Copy link
Member

igrr commented Feb 23, 2023

Cherry-picked into https://github.com/espressif/qemu/releases/tag/esp-develop-7.2.0-20230223, thanks for the fixes!

@igrr igrr closed this Feb 23, 2023
@espressif-bot espressif-bot added Status: Done Issue is done internally and removed Status: To Do labels Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Done Issue is done internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants