-
Notifications
You must be signed in to change notification settings - Fork 52
loongarch64: add SMP support for LoongArch 3A6000 #304
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
Open
BoneInscri
wants to merge
14
commits into
syswonder:dev
Choose a base branch
from
BoneInscri:dev
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d37fd47
loongarch64: add disa target for ls3a5000/ls3a6000, update .gitignore
BoneInscri 68d53e9
feat(loongarch64): add SMP support for LoongArch 3A5000/3A6000
BoneInscri 6efe78b
loongarch64: smp support, refactor cpu/ipi/trap, add logo and build s…
BoneInscri 688d511
loongarch64: implement IPI event routing and virtio IRQ injection
BoneInscri b016043
loongarch64: ls3a6000: update memory regions and ipi buf size
BoneInscri 80b3207
la/loongarch64: add boot_method support and improve fault handling
BoneInscri 27483b5
fix: detect broken symlink in build.rs and expand ROOT_ZONE_CPUS to 7…
BoneInscri e52e9d2
Merge branch 'smp-la-support' into dev
BoneInscri 55ba550
fix: restore arch_secondary_entry import in main.rs
BoneInscri 98bc9aa
fix: gate arch_secondary_entry and iommu_init imports with cfg attrib…
BoneInscri b611acd
run make fmt
BoneInscri ab1d67e
Merge upstream/dev into dev
BoneInscri 6788134
fix the bug of merge due to vcpu introduce (power_on and vcpu_state)
BoneInscri 6a55073
remove the target_arch in main.rs
BoneInscri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #!/bin/bash | ||
| make BID=loongarch64/ls3a6000 LOG=info FEATURES="loongson_3a6000 loongson_7a2000 loongson_uart" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| # hvisor for loongarch64 makefile | ||
| # wheatfox(wheatfox17@icloud.com) 2024.6 | ||
| # boneinscri(boneinscri@163.com) 2026.4 | ||
|
|
||
| # HVISOR ENTRY | ||
| HVISOR_ENTRY_PA := 0x9000000080000000 | ||
|
|
@@ -22,4 +23,9 @@ HVISOR_ENTRY_PA := 0x9000000080000000 | |
| # QEMU_ARGS += -device loader,file="$(zone0_dtb)",addr=0x8f000000,force-raw=on | ||
|
|
||
| $(hvisor_bin): elf | ||
| $(OBJCOPY) $(hvisor_elf) --strip-all -O binary $@ | ||
| $(OBJCOPY) $(hvisor_elf) --strip-all -O binary $@ | ||
| # objdump + hvisor-trap-vector.txt | ||
| readelf -a $(hvisor_elf) > hvisor-elf.txt | ||
| loongarch64-linux-gnu-objdump --disassemble $(hvisor_elf) > hvisor.S | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Previously, the toolchain used for LoongArch was loongarch64-unknown-linux-gnu-. Since loongarch64-linux-gnu- has only been added here, could you please confirm whether a new loongarch64-linux-gnu- toolchain is actually required, or if this is simply a toolchain naming error? |
||
| cp $(hvisor_elf) hvisor.elf | ||
| nm -n hvisor.elf | grep -w _hyp_trap_vector | awk '{print "0x"$$1""}' > hvisor-trap-vector.txt | ||
|
Comment on lines
25
to
+31
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using a 32GB address is not possible on most loongarch machines, maybe we should restrict the hvisor location < 16G?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
测试机器用的是16GB x 2 内存条