[package]
authors = ["周睿 <zrufo747@outlook.com>"]
categories.workspace = true
description = "SomeHAL: A hardware abstraction layer for kernel development."
edition.workspace = true
keywords.workspace = true
license.workspace = true
name = "somehal"
repository.workspace = true
version = "0.7.0"

[features]
efi = ["someboot/efi"]
hv = ["mmu", "someboot/hv"]
mmu = ["someboot/mmu"]
percpu-prealloc = ["someboot/percpu-prealloc"]
thead-mae = ["someboot/thead-mae"]
uspace = ["mmu", "someboot/uspace"]

[dependencies]
anyhow = {workspace = true}
page-table-generic = {workspace = true}
rdif-intc.workspace = true
rdrive = {workspace = true}
someboot = {workspace = true}
somehal-macros = {workspace = true}
tock-registers.workspace = true
thiserror = {workspace = true}
log = {workspace = true}
kernutil = {workspace = true}
mmio-api = {workspace = true}
spin = { workspace = true }


[target.'cfg(target_arch = "aarch64")'.dependencies]
aarch64-cpu = "11"
arm-gic-driver = {workspace = true, features = ["rdif"]}

[target.'cfg(target_arch = "riscv64")'.dependencies]
ax-riscv-plic = { workspace = true }
riscv.workspace = true
sbi-rt = { workspace = true, features = ["legacy"] }

[target.'cfg(target_arch = "loongarch64")'.dependencies]
loongArch64 = "0.2"

[target.'cfg(target_arch = "x86_64")'.dependencies]
x2apic = "0.5"
x86 = "0.52"
