Skip to content

Commit ba6cfea

Browse files
YanLienYanLien
authored andcommitted
update configs for loongarch64 and axstd version
1 parent 665fcb3 commit ba6cfea

7 files changed

Lines changed: 256 additions & 162 deletions

File tree

.axconfig.toml

Lines changed: 78 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Architecture identifier.
2-
arch = "riscv64" # str
2+
arch = "loongarch64" # str
33
# Platform package.
4-
package = "axplat-riscv64-qemu-virt" # str
4+
package = "axplat-loongarch64-qemu-virt" # str
55
# Platform identifier.
6-
platform = "riscv64-qemu-virt" # str
6+
platform = "loongarch64-qemu-virt" # str
77
# Stack size of each task.
88
task-stack-size = 0x40000 # uint
99
# Number of timer ticks per second (Hz). A timer tick may contain several timer
@@ -15,92 +15,106 @@ ticks-per-sec = 100 # uint
1515
#
1616
[devices]
1717
# IPI interrupt num
18-
ipi-irq = "0x8000_0000_0000_0001" # uint
18+
ipi-irq = 12 # uint
19+
eiointc-irq = 0x03 # uint
20+
# eiointc@1400 {
21+
# reg = <0x00 0x1400 0x00 0x800>;
22+
# interrupts = <0x03>;
23+
# interrupt-parent = <0x8001>;
24+
# #interrupt-cells = <0x01>;
25+
# interrupt-controller;
26+
# compatible = "loongson,ls2k2000-eiointc";
27+
# phandle = <0x8002>;
28+
# };
29+
eiointc-paddr = 0x1400 # uint
30+
# poweroff {
31+
# value = <0x00000034>;
32+
# offset = <0x00000000>;
33+
# compatible = "syscon-poweroff";
34+
# };
35+
# ged@100e001c {
36+
# reg-io-width = <0x00000001>;
37+
# reg-shift = <0x00000000>;
38+
# reg = <0x00000000 0x100e001c 0x00000000 0x00000003>;
39+
# compatible = "syscon";
40+
# };
41+
ged-paddr = 0x100E001C # uint
1942
# MMIO ranges with format (`base_paddr`, `size`).
2043
mmio-ranges = [
21-
[0x0010_1000, 0x1000],
22-
[0x0c00_0000, 0x21_0000],
23-
[0x1000_0000, 0x1000],
24-
[0x1000_1000, 0x8000],
25-
[0x2000_0000, 0x400_0000],
26-
[0x3000_0000, 0x1000_0000],
27-
[0x4000_0000, 0x4000_0000]
44+
[0x1000_0000, 0x0000_0400],
45+
[0x100D_0000, 0x0000_1000],
46+
[0x100E_0000, 0x0000_1000],
47+
[0x1D00_0000, 0x40_0000],
48+
[0x1FE0_0000, 0x0000_1000],
49+
[0x2000_0000, 0x1000_0000],
50+
[0x4000_0000, 0x0002_0000]
2851
] # [(uint, uint)]
29-
# End PCI bus number (`bus-range` property in device tree).
30-
pci-bus-end = 0xff # uint
52+
# platic@10000000 {
53+
# loongson,pic-base-vec = <0x00>;
54+
# interrupt-parent = <0x8002>;
55+
# #interrupt-cells = <0x02>;
56+
# interrupt-controller;
57+
# reg = <0x00 0x10000000 0x00 0x400>;
58+
# compatible = "loongson,pch-pic-1.0";
59+
# phandle = <0x8003>;
60+
# };
61+
pch-pic-paddr = 0x10000000 # uint
62+
# End PCI bus number.
63+
pci-bus-end = 0x7f # uint
3164
# Base physical address of the PCIe ECAM space.
32-
pci-ecam-base = 0x3000_0000 # uint
33-
# PCI device memory ranges (`ranges` property in device tree).
65+
pci-ecam-base = 0x2000_0000 # uint
66+
# PCI device memory ranges.
3467
pci-ranges = [
35-
[0x0300_0000, 0x1_0000],
36-
[0x4000_0000, 0x4000_0000],
37-
[0x4_0000_0000, 0x4_0000_0000]
68+
[0, 0],
69+
[0x4000_0000, 0x0002_0000]
3870
] # [(uint, uint)]
39-
# plic@c000000 {
40-
# phandle = <0x03>;
41-
# riscv,ndev = <0x5f>;
42-
# reg = <0x00 0xc000000 0x00 0x600000>;
43-
# interrupts-extended = <0x02 0x0b 0x02 0x09>;
44-
# interrupt-controller;
45-
# compatible = "sifive,plic-1.0.0\0riscv,plic0";
46-
# };
47-
plic-paddr = 0x0c00_0000 # uint
48-
# rtc@101000 {
49-
# interrupts = <0x0b>;
50-
# interrupt-parent = <0x03>;
51-
# reg = <0x00 0x101000 0x00 0x1000>;
52-
# compatible = "google,goldfish-rtc";
53-
# };
54-
# RTC (goldfish) Address
55-
rtc-paddr = 0x10_1000 # uint
71+
# RTC (ls7a) Address
72+
rtc-paddr = 0x100d_0100 # uint
5673
# Timer interrupt frequency in Hz.
57-
timer-frequency = 10_000_000 # uint
58-
# Timer interrupt num.
59-
timer-irq = "0x8000_0000_0000_0005" # uint
60-
uart-irq = 0x0a # uint
61-
# serial@10000000 {
62-
# interrupts = <0x0a>;
63-
# interrupt-parent = <0x03>;
64-
# clock-frequency = "\08@";
65-
# reg = <0x00 0x10000000 0x00 0x100>;
74+
timer-frequency = 100_000_000 # uint
75+
# Timer interrupt number.
76+
timer-irq = 11 # uint
77+
uart-irq = 0x2 # uint
78+
# serial@1fe001e0 {
79+
# interrupt-parent = <0x00008003>;
80+
# interrupts = <0x00000002 0x00000004>;
81+
# clock-frequency = <0x05f5e100>;
82+
# reg = <0x00000000 0x1fe001e0 0x00000000 0x00000100>;
6683
# compatible = "ns16550a";
6784
# };
68-
uart-paddr = 0x1000_0000 # uint
85+
uart-paddr = 0x1FE001E0 # uint
6986
# VirtIO MMIO ranges with format (`base_paddr`, `size`).
70-
virtio-mmio-ranges = [
71-
[0x1000_1000, 0x1000],
72-
[0x1000_2000, 0x1000],
73-
[0x1000_3000, 0x1000],
74-
[0x1000_4000, 0x1000],
75-
[0x1000_5000, 0x1000],
76-
[0x1000_6000, 0x1000],
77-
[0x1000_7000, 0x1000],
78-
[0x1000_8000, 0x1000]
79-
] # [(uint, uint)]
87+
virtio-mmio-ranges = [] # [(uint, uint)]
8088

8189
#
8290
# Platform configs
8391
#
8492
[plat]
8593
# Stack size on bootstrapping. (256K)
8694
boot-stack-size = 0x40000 # uint
87-
# Number of CPUs.
88-
cpu-num = 1 # uint
95+
# Maximum number of CPUs.
96+
max-cpu-num = 1 # uint
97+
# Base address of the high physical memory.
98+
high-memory-base = 0x8000_0000 # uint
8999
# Kernel address space base.
90-
kernel-aspace-base = "0xffff_ffc0_0000_0000" # uint
100+
kernel-aspace-base = "0xffff_8000_0000_0000" # uint
91101
# Kernel address space size.
92-
kernel-aspace-size = "0x0000_003f_ffff_f000" # uint
102+
kernel-aspace-size = "0x0000_7fff_ffff_f000" # uint
93103
# Base physical address of the kernel image.
94-
kernel-base-paddr = 0x8020_0000 # uint
104+
kernel-base-paddr = 0x0020_0000 # uint
95105
# Base virtual address of the kernel image.
96-
kernel-base-vaddr = "0xffff_ffc0_8020_0000" # uint
106+
kernel-base-vaddr = "0xffff_8000_0020_0000" # uint
107+
# Base address of the low physical memory.
108+
low-memory-base = 0x0 # uint
109+
# Size of the low physical memory. (256M)
110+
low-memory-size = 0x1000_0000 # uint
111+
# Linear mapping offset at boot time.
112+
phys-boot-offset = "0x9000_0000_0000_0000" # uint
97113
# Offset of bus address and phys address. some boards, the bus address is
98114
# different from the physical address.
99115
phys-bus-offset = 0 # uint
100-
# Base address of the whole physical memory.
101-
phys-memory-base = 0x8000_0000 # uint
102116
# Size of the whole physical memory. (128M)
103117
phys-memory-size = 0x800_0000 # uint
104118
# Linear mapping offset, for quick conversions between physical and virtual
105119
# addresses.
106-
phys-virt-offset = "0xffff_ffc0_0000_0000" # uint
120+
phys-virt-offset = "0xffff_8000_0000_0000" # uint

0 commit comments

Comments
 (0)