oreboot on VisionFive 2 002: Logging and DRAM

3 min read 6 months ago
Published on Apr 22, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

How to Set Up Logging and DRAM Configuration in oreboot on VisionFive 2

  1. Introduction to VisionFive 2 Development Board:

    • Start by familiarizing yourself with the VisionFive 2 development board featuring The Star 5 jh7110 SOC (System on a Chip).
  2. Stacking Vision51 and Vision52 Boards:

    • Stack the Vision51 and Vision52 boards together using screws for easy connection and transport.
  3. Exploring Documentation and Updates:

    • Access the technical reference manual for the jh7110 SOC and download any available PDFs for easier reference.
    • Check for any new releases, SDK updates, firmware versions, and changes in the documentation.
  4. Identifying and Fixing Serial Output Issues:

    • Analyze and debug issues related to serial output, such as incorrect addresses and pointers causing crashes.
    • Utilize simpler printing functions for debugging purposes.
  5. Utilizing Linker Scripts:

    • Understand and modify the linker scripts to ensure the code runs in the expected memory regions defined in the script.
  6. Implementing Logging Functions:

    • Create a function in the liblog crate to print and track memory references using the print pointer function.
    • Include the liblog crate with the debug feature in the mainboard's Cargo.toml file for logging capabilities.
  7. Debugging and Testing:

    • Compile the code using make and use tools like minicom to communicate with the board and display the output.
    • Verify the correct functioning of the rich formatting macros for improved debugging.
  8. Configuring DRAM Settings:

    • Define memory configurations using macros and structures to set up DRAM configurations for the VisionFive 2 board.
    • Implement functions to read and write memory configurations based on the defined settings.
  9. Exploring Device Tree and Device Drivers:

    • Investigate device tree entries and device drivers to understand memory mappings, control registers, and clock configurations.
    • Analyze driver functions such as probe, get info, and control register settings for DRAM setup.
  10. Logging Platform Information:

    • Retrieve and print platform information such as vendor IDs and implementation IDs from the device tree or configuration files.
    • Verify the platform details by cross-referencing with the relevant tables in the documentation.
  11. Conclusion and Next Steps:

    • Summarize the key learnings from setting up logging and DRAM configurations on the VisionFive 2 board.
    • Document any unresolved issues for further investigation and plan for future development tasks.

By following these steps, you can effectively set up logging functionalities and configure DRAM settings for the VisionFive 2 development board using oreboot.