-
Notifications
You must be signed in to change notification settings - Fork 64
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
Esp32: fix ~100% host CPU load when running unicore OS (QEMU-82) #56
Closed
andreyeltsov
wants to merge
28
commits into
espressif:esp-develop
from
andreyeltsov:fix/esp32-appcpu-halt
Closed
Esp32: fix ~100% host CPU load when running unicore OS (QEMU-82) #56
andreyeltsov
wants to merge
28
commits into
espressif:esp-develop
from
andreyeltsov:fix/esp32-appcpu-halt
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 666cc79.
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 <[email protected]>
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.
…TEM_SINGLE_CORE_MODE=y) under QEMU. APP_CPU is not properly halted on ~CLK_GATE_EN, so QEMU xt thread for that APP_CPUis spinning on ROM code putting high load on a host system.
github-actions
bot
changed the title
Esp32: fix ~100% host CPU load when running unicore OS
Esp32: fix ~100% host CPU load when running unicore OS (QEMU-82)
Nov 4, 2022
Cherry-picked into https://github.com/espressif/qemu/releases/tag/esp-develop-7.2.0-20230223 as well, thanks! |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Esp32: fix ~100% host CPU load when running unicore OS (CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y) under QEMU.
Root-cause:
APP_CPU is not properly halted on ~CLK_GATE_EN, so qemu_xt thread emulating APP_CPU is spinning on ROM code putting high load on a host system.
Fix:
Halt APP_CPU on ~CLK_GATE_EN.