forked from Azure-stars/Starry
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: migration the arch module in https://github.com/yfblock/ByteOS/…
…tree/main/arch to crates/hal
- Loading branch information
1 parent
14f9c3b
commit e2ede64
Showing
98 changed files
with
6,520 additions
and
526 deletions.
There are no files selected for viewing
This file contains 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,29 @@ | ||
# Target Platform | ||
[build] | ||
target = 'riscv64gc-unknown-none-elf' | ||
# target = 'x86_64-unknown-none' | ||
# target = 'aarch64-unknown-none-softfloat' | ||
# target = 'loongarch64-unknown-none' | ||
|
||
# This flags also can be set from every target. | ||
rustflags = [ | ||
'-Cforce-frame-pointers=yes', | ||
'-Clink-arg=-no-pie', | ||
'--cfg=board="qemu"', | ||
'--cfg=driver="kvirtio,kgoldfish-rtc,ns16550a"', | ||
# '-Zunstable-options', | ||
# '--check-cfg=values(board, "qemu","k210","cv1811h", "knvme", "")', | ||
# '--cfg=kernel_base="0xffffffc080200000"', # riscv64gc-unknown-none-elf | ||
# '--cfg=kernel_base="0xffffff8000200000"', # x86_64-unknown-none | ||
] | ||
|
||
[target.riscv64gc-unknown-none-elf] | ||
|
||
[target.x86_64-unknown-none] | ||
|
||
[target.aarch64-unknown-none-softfloat] | ||
|
||
[target.loongarch64-unknown-none] | ||
|
||
[unstable] | ||
features = ['dev_dep','host_dep'] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 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,44 @@ | ||
[package] | ||
name = "hal" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[features] | ||
# whether to use the stackful coroutine | ||
stackful = [] | ||
alloc = [] | ||
|
||
[dependencies] | ||
log = "0.4" | ||
fdt = "0.1.5" | ||
bitflags = "2.0.2" | ||
cfg-if = "1.0.0" | ||
crate_interface = { path = "../crate_interface" } | ||
allocator = { path = "../allocator" } | ||
percpu = { path = "../percpu" } | ||
memory_addr = { path = "../memory_addr" } | ||
|
||
[target.'cfg(target_arch = "riscv64")'.dependencies] | ||
riscv = { git = "https://github.com/rcore-os/riscv", features = ["inline-asm"] } | ||
|
||
[target.'cfg(target_arch = "x86_64")'.dependencies] | ||
x86 = "0.52" | ||
x86_64 = "0.14" | ||
spin = { version = "0.9.8", features = ["mutex"] } | ||
irq_safety = { git = "https://github.com/theseus-os/irq_safety.git"} | ||
multiboot = "0.8.0" | ||
x2apic = "0.4" | ||
raw-cpuid = "11.0" | ||
|
||
[target.'cfg(target_arch = "aarch64")'.dependencies] | ||
aarch64-cpu = "9.3" | ||
arm_pl011 = { path = "../arm_pl011" } | ||
tock-registers = "0.8" | ||
irq_safety = { git = "https://github.com/theseus-os/irq_safety.git"} | ||
arm_gic = { path = "../arm_gic" } | ||
|
||
[target.'cfg(target_arch = "loongarch64")'.dependencies] | ||
spin = { version = "0.9.8", features = ["mutex"] } | ||
loongarch64 = {git = "https://github.com/Godones/loongArch64",package = "loongarch64" } |
Oops, something went wrong.