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

WIP: Implement undocument wifi registers, get AP mode working (QEMU-155) #80

Open
wants to merge 56 commits into
base: esp-develop
Choose a base branch
from

Commits on May 22, 2023

  1. LOCAL: add Gitlab CI jobs

    Co-authored-by: Anton Maklakov <[email protected]>
    Co-authored-by: Omar Chebib <[email protected]>
    3 people committed May 22, 2023
    Configuration menu
    Copy the full SHA
    42a0627 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4f972e5 View commit details
    Browse the repository at this point in the history
  3. LOCAL: Revert "tcg: Optimize inline dup_const for MO_64"

    This reverts commit 666cc79.
    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    a9821ff View commit details
    Browse the repository at this point in the history
  4. xtensa: don't send window registers to GDB

    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.
    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    19dd0fd View commit details
    Browse the repository at this point in the history
  5. LOCAL: target/xtensa: allow tweaking the list of registers sent to GDB

    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.
    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    fe84285 View commit details
    Browse the repository at this point in the history
  6. hw/block: correct DIO mode for Gigadevice SPI NOR flash

    Martin Johnson authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    c960a17 View commit details
    Browse the repository at this point in the history
  7. hw/net: opencores_eth: fix handling of DP83848C PHYSTS register

    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.
    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    1c1c4e9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f5dfe00 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    82063f9 View commit details
    Browse the repository at this point in the history
  10. hw/char: add ESP32 UART

    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    b1d87e7 View commit details
    Browse the repository at this point in the history
  11. hw/gpio: add ESP32 GPIO

    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    aad3a7b View commit details
    Browse the repository at this point in the history
  12. hw/nvram: add ESP32 eFuse

    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    cc04899 View commit details
    Browse the repository at this point in the history
  13. hw/ssi: add ESP32 SPI

    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    72d3396 View commit details
    Browse the repository at this point in the history
  14. hw/i2c: add ESP32 I2C

    peterus authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    f379725 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    9377b12 View commit details
    Browse the repository at this point in the history
  16. hw/misc: ESP32 RNG

    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    a5a01e6 View commit details
    Browse the repository at this point in the history
  17. hw/misc: add ESP32 RSA

    Sachin Billore authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    2fd9ccd View commit details
    Browse the repository at this point in the history
  18. hw/misc: ESP32 RTC controller

    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    8c2b319 View commit details
    Browse the repository at this point in the history
  19. hw/misc: add ESP32 SHA

    Co-authored-by: Maksim Naumenko <[email protected]>
    igrr and Maksim Naumenko committed May 22, 2023
    Configuration menu
    Copy the full SHA
    03638c2 View commit details
    Browse the repository at this point in the history
  20. hw/misc: add ESP32 AES

    Maksim Naumenko authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    3f70bd1 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    e5ef5b2 View commit details
    Browse the repository at this point in the history
  22. hw/misc: Add ESP32 LEDC

    Maksim Naumenko authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    84a8596 View commit details
    Browse the repository at this point in the history
  23. hw/misc: add simple PSRAM emulation

    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.
    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    995725f View commit details
    Browse the repository at this point in the history
  24. hw/timer: add ESP32 timers

    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    3371729 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    3fb8cbf View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    04439d5 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    66fa088 View commit details
    Browse the repository at this point in the history
  28. hw/xtensa: add ESP32 machine

    igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    3fddc2e View commit details
    Browse the repository at this point in the history
  29. target/riscv: implement Espressif RISC-V CPU type

    Espressif RISC-V CPU has a different has way of treating interrupts, which is
    not standard. Thus, this class will override the default RISC-V CPU behavior
    to have 31 interrupt lines.
    o-marshmallow authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    c584eef View commit details
    Browse the repository at this point in the history
  30. hw/char: implement ESP32-C3 UART

    C3 UART overrides ESP32's UART
    o-marshmallow authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    167401b View commit details
    Browse the repository at this point in the history
  31. hw/gpio: implement ESP32-C3 GPIO

    C3 GPIO overrides ESP32 GPIO driver and modifies the boot strap pin
    o-marshmallow authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    3324f82 View commit details
    Browse the repository at this point in the history
  32. hw/timer: implement ESP32-C3 Timer Groups

    All the features are supported
    o-marshmallow authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    036ba9b View commit details
    Browse the repository at this point in the history
  33. hw/timer: implement ESP32-C3 System Timer

    Systimer Timer is fully implemented
    o-marshmallow authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    96a20cc View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    127b8e4 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    89dea91 View commit details
    Browse the repository at this point in the history
  36. hw/riscv: implement ESP32-C3 Interrupt Matrix

    All features are implemented, except level/edge trigger option.
    o-marshmallow authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    791feae View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    f334898 View commit details
    Browse the repository at this point in the history
  38. hw/misc: Implement ESP32-C3 SHA

    o-marshmallow authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    14f8919 View commit details
    Browse the repository at this point in the history
  39. hw/misc: implement ESP32-C3 USB Serial JTAG as a stub

    The module doesn't do much at the moment, it is used as a stub
    o-marshmallow authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    5949e87 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    edad3a1 View commit details
    Browse the repository at this point in the history
  41. hw/nvram: implement ESP32-C3 eFuses

    o-marshmallow authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    a8a86ed View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    3eb4caf View commit details
    Browse the repository at this point in the history
  43. hw/riscv: implement ESP32-C3 machine

    This also includes the C3 BIOS (ROM bootloader)
    o-marshmallow authored and igrr committed May 22, 2023
    Configuration menu
    Copy the full SHA
    273c5c2 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2023

  1. Configuration menu
    Copy the full SHA
    8245148 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aed84c7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8bae2a3 View commit details
    Browse the repository at this point in the history
  4. hw/ssi: implement SPI flash special commands for ESP32-C3 SPI controller

    * Closes espressif#75
    
    These commands are used by when bootstraping the chip. This lets
    the `esptool` flash any image to the emulated SPI flash.
    o-marshmallow committed Jun 2, 2023
    Configuration menu
    Copy the full SHA
    90c8591 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2023

  1. pc-bios/keymaps: Use the official xkb name for Arabic layout, not the…

    … legacy synonym
    
    The xkb official name for the Arabic keyboard layout is 'ara'.
    However xkb has for at least the past 15 years also permitted it to
    be named via the legacy synonym 'ar'.  In xkeyboard-config 2.39 this
    synoynm was removed, which breaks compilation of QEMU:
    
    FAILED: pc-bios/keymaps/ar
    /home/fred/qemu-git/src/qemu/build-full/qemu-keymap -f pc-bios/keymaps/ar -l ar
    xkbcommon: ERROR: Couldn't find file "symbols/ar" in include paths
    xkbcommon: ERROR: 1 include paths searched:
    xkbcommon: ERROR: 	/usr/share/X11/xkb
    xkbcommon: ERROR: 3 include paths could not be added:
    xkbcommon: ERROR: 	/home/fred/.config/xkb
    xkbcommon: ERROR: 	/home/fred/.xkb
    xkbcommon: ERROR: 	/etc/xkb
    xkbcommon: ERROR: Abandoning symbols file "(unnamed)"
    xkbcommon: ERROR: Failed to compile xkb_symbols
    xkbcommon: ERROR: Failed to compile keymap
    
    The upstream xkeyboard-config change removing the compat
    mapping is:
    https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/470ad2cd8fea84d7210377161d86b31999bb5ea6
    
    Make QEMU always ask for the 'ara' xkb layout, which should work on
    both older and newer xkeyboard-config.  We leave the QEMU name for
    this keyboard layout as 'ar'; it is not the only one where our name
    for it deviates from the xkb standard name.
    
    Cc: [email protected]
    Signed-off-by: Peter Maydell <[email protected]>
    Reviewed-by: Richard Henderson <[email protected]>
    Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
    Reviewed-by: Daniel P. Berrangé <[email protected]>
    Message-id: [email protected]
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1709
    pm215 authored and lucasssvaz committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    efe39d9 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2023

  1. Configuration menu
    Copy the full SHA
    24a669b View commit details
    Browse the repository at this point in the history
  2. hw/dma: implement GDMA Peripheral-to-Memory interface for ESP32-C3

    Implement a first interface for Peripheral-to-Memory and Memory-to-Peripheral
    transfers.
    o-marshmallow committed Jun 27, 2023
    Configuration menu
    Copy the full SHA
    9b36b5d View commit details
    Browse the repository at this point in the history
  3. 2 Configuration menu
    Copy the full SHA
    a00a687 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6a8b06c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    96ab065 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2023

  1. Configuration menu
    Copy the full SHA
    5eda8b6 View commit details
    Browse the repository at this point in the history
  2. hw/misc: fix a bug in ESP32-C3 cache entries fields

    Cache entries where incorrectly described, which resulted in wrong values
    being returned to the guest programs.
    o-marshmallow committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    d96ca95 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2023

  1. Implement undocument wifi registers, get AP mode working

    ESP32 as client, QEMU as AP works with the following command:
    
    build/qemu-system-xtensa -nic user,model=misc.esp32_wifi,id=u1 -no-reboot -S -s -nographic -machine esp32 -drive file=../http_request/meshtest_http_10.0.0.8.bin,if=mtd,format=raw -object filter-dump,id=f1,file=dump.pcap,netdev=u1 -drive file=../efuse.bin,if=none,format=raw,id=efuse -global driver=nvram.esp32.efuse,property=drive,value=efuse
    
    The efuse file was dumped from a real ESP32 with espefuse.py dump
    
    The meshtest_http_... file was built from
    esp-idf/examples/protocols/http_request, configured to connect to
    one of the APs hardcoded in hw/misc/esp32_wifi_ap.c
    
    Co-authored-by: Martin Johnson <[email protected]>
    redfast00 and dzo committed Jul 4, 2023
    Configuration menu
    Copy the full SHA
    47ff913 View commit details
    Browse the repository at this point in the history