aboutsummaryrefslogtreecommitdiff
path: root/test/test_dt.c
Commit message (Collapse)AuthorAgeFilesLines
* test: Add a DT test for a VisionFive2 boardMiquel Sabaté Solà2024-11-261-6/+35
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* dt: Fetch the CPU frequency as wellMiquel Sabaté Solà2024-11-261-3/+9
| | | | | | | | | | | If the 'timebase-frequency' property is available under the 'cpus' node from the DTB blob, it makes sense to try to fetch this value from there instead of hardcoding it. For other use-cases, where this information is not available through DT (e.g. ACPI on the VisionFive2 board), we will have to hardcode it with a default value even if it's not the proper one. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Fetch the initrd address from the DTB blobMiquel Sabaté Solà2024-11-201-0/+29
The kernel entry has a pointer to the DTB blob as a parameter. From this pointer we can parse the the DTB blob to find the properties "chosen->linux,initrd-start" and "chosen->linux,initrd-start". These properties are guaranteed to have 64-bit addresses which point where the initrd is in memory, which we need to fetch the binaries to be loaded. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>