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

Refactor config system with axconfig-gen #214

Merged
merged 6 commits into from
Dec 30, 2024
Merged

Refactor config system with axconfig-gen #214

merged 6 commits into from
Dec 30, 2024

Conversation

equation314
Copy link
Member

@equation314 equation314 commented Dec 25, 2024

  • Better config file parsing (Split the axconfig-gen crate).
  • Richer config types support (High-dimensional arrays and tuples).
  • Easier to modify kernel and platform configs (by .axconfig.toml).
  • Including external config files and managing them together (e.g., app configs).

Copy link
Contributor

@hky1999 hky1999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we fix this problem in this PR?

set mem_size in scripts/make/qemu.mk as 4G

make A=examples/shell ARCH=x86_64 BLK=y run

[  0.014208 0 axhal::arch::x86_64::trap:16] No registered handler for trap PAGE_FAULT
[  0.014954 0 axruntime::lang_items:5] panicked at modules/axhal/src/arch/x86_64/trap.rs:17:9:
Unhandled kernel #PF @ 0xffffff800020b112, fault_vaddr=VA:0x378000000014, error_code=0x2 (WRITE):
TrapFrame {
    rax: 0x2,
    rcx: 0x400,
    rdx: 0x800,
    rbx: 0x378000000000,
    rbp: 0xffffff80b0000000,
    rsi: 0xffffff800028cd50,
    rdi: 0xffffff800028bdd0,
    r8: 0x3000,
    r9: 0x10,
    r10: 0x380000000000,
    r11: 0x10000000,
    r12: 0x378000000000,
    r13: 0x378000003000,
    r14: 0x300,
    r15: 0x10300,
    vector: 0xe,
    error_code: 0x2,
    rip: 0xffffff800020b112,
    cs: 0x10,
    rflags: 0x10086,
    rsp: 0xffffff800028bc30,
    ss: 0x0,
}

modules/axhal/src/platform/aarch64_bsta1000b/misc.rs Outdated Show resolved Hide resolved
scripts/make/config.mk Outdated Show resolved Hide resolved
@equation314
Copy link
Member Author

should we fix this problem in this PR?

set mem_size in scripts/make/qemu.mk as 4G

make A=examples/shell ARCH=x86_64 BLK=y run

[  0.014208 0 axhal::arch::x86_64::trap:16] No registered handler for trap PAGE_FAULT
[  0.014954 0 axruntime::lang_items:5] panicked at modules/axhal/src/arch/x86_64/trap.rs:17:9:
Unhandled kernel #PF @ 0xffffff800020b112, fault_vaddr=VA:0x378000000014, error_code=0x2 (WRITE):
TrapFrame {
    rax: 0x2,
    rcx: 0x400,
    rdx: 0x800,
    rbx: 0x378000000000,
    rbp: 0xffffff80b0000000,
    rsi: 0xffffff800028cd50,
    rdi: 0xffffff800028bdd0,
    r8: 0x3000,
    r9: 0x10,
    r10: 0x380000000000,
    r11: 0x10000000,
    r12: 0x378000000000,
    r13: 0x378000003000,
    r14: 0x300,
    r15: 0x10300,
    vector: 0xe,
    error_code: 0x2,
    rip: 0xffffff800020b112,
    cs: 0x10,
    rflags: 0x10086,
    rsp: 0xffffff800028bc30,
    ss: 0x0,
}

Ok, change phys-virt-offset to "0xffff_8000_0000_0000"?

.github/workflows/build.yml Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
api/axfeat/Cargo.toml Show resolved Hide resolved
@hky1999
Copy link
Contributor

hky1999 commented Dec 27, 2024

BTW, will we support features checking? how do we do that?

for example, if we just compile hello_world app with FEATURES=sched_cfs, it will throw a compile error caused by undefined symbols related with KernelGuardIf

make SMP=4 LOG=info FEATURES=sched_cfs ARCH=aarch64 ACCEL=n

@equation314
Copy link
Member Author

make SMP=4 LOG=info FEATURES=sched_cfs ARCH=aarch64 ACCEL=n

Maybe in next PR for feature system refactoring.

hky1999
hky1999 previously approved these changes Dec 28, 2024
README.md Show resolved Hide resolved
hky1999
hky1999 previously approved these changes Dec 30, 2024
Copy link
Contributor

@hky1999 hky1999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@equation314 equation314 merged commit 0b1f95a into main Dec 30, 2024
38 checks passed
@equation314 equation314 deleted the new-axconfig branch January 2, 2025 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants