Skip to content

feat(main): Add qemu environment and read file from specified image with ArceOS modules #2

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

Merged
merged 1 commit into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .axconfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Architecture identifier.
arch = "riscv64" # str
# Platform identifier.
platform = "riscv64-qemu-virt" # str
# Number of CPUs
smp = 1 # uint
# Stack size of each task.
task-stack-size = 0x40000 # uint
# Number of timer ticks per second (Hz). A timer tick may contain several timer
# interrupts.
ticks-per-sec = 100 # uint

#
# Device specifications
#
[devices]
# MMIO regions with format (`base_paddr`, `size`).
mmio-regions = [
[0x0010_1000, 0x1000],
[0x0c00_0000, 0x21_0000],
[0x1000_0000, 0x1000],
[0x1000_1000, 0x8000],
[0x3000_0000, 0x1000_0000],
[0x4000_0000, 0x4000_0000]
] # [(uint, uint)]
# End PCI bus number (`bus-range` property in device tree).
pci-bus-end = 0xff # uint
# Base physical address of the PCIe ECAM space.
pci-ecam-base = 0x3000_0000 # uint
# PCI device memory ranges (`ranges` property in device tree).
pci-ranges = [
[0x0300_0000, 0x1_0000],
[0x4000_0000, 0x4000_0000],
[0x4_0000_0000, 0x4_0000_0000]
] # [(uint, uint)]
# rtc@101000 {
# interrupts = <0x0b>;
# interrupt-parent = <0x03>;
# reg = <0x00 0x101000 0x00 0x1000>;
# compatible = "google,goldfish-rtc";
# };
# RTC (goldfish) Address
rtc-paddr = 0x10_1000 # uint
# Timer interrupt frequency in Hz.
timer-frequency = 10_000_000 # uint
# VirtIO MMIO regions with format (`base_paddr`, `size`).
virtio-mmio-regions = [
[0x1000_1000, 0x1000],
[0x1000_2000, 0x1000],
[0x1000_3000, 0x1000],
[0x1000_4000, 0x1000],
[0x1000_5000, 0x1000],
[0x1000_6000, 0x1000],
[0x1000_7000, 0x1000],
[0x1000_8000, 0x1000]
] # [(uint, uint)]

#
# Platform configs
#
[plat]
# Platform family.
family = "riscv64-qemu-virt" # str
# Kernel address space base.
kernel-aspace-base = "0xffff_ffc0_0000_0000" # uint
# Kernel address space size.
kernel-aspace-size = "0x0000_003f_ffff_f000" # uint
# Base physical address of the kernel image.
kernel-base-paddr = 0x8020_0000 # uint
# Base virtual address of the kernel image.
kernel-base-vaddr = "0xffff_ffc0_8020_0000" # uint
# Offset of bus address and phys address. some boards, the bus address is
# different from the physical address.
phys-bus-offset = 0 # uint
# Base address of the whole physical memory.
phys-memory-base = 0x8000_0000 # uint
# Size of the whole physical memory. (128M)
phys-memory-size = 0x800_0000 # uint
# Linear mapping offset, for quick conversions between physical and virtual
# addresses.
phys-virt-offset = "0xffff_ffc0_0000_0000" # uint
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ target/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

mnt/

arceboot.bin

*.img
Loading