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

Merge main into dev #66

Merged
merged 8 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/driver_block/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ default = []
[dependencies]
log = "0.4"
driver_common = { path = "../driver_common" }
bcm2835-sdhci = { git = "https://github.com/lhw2002426/bcm2835-sdhci.git", rev = "e974f16", optional = true }
bcm2835-sdhci = { git = "https://github.com/lhw2002426/bcm2835-sdhci.git", rev = "bf07a72", optional = true }
8 changes: 6 additions & 2 deletions modules/ruxhal/src/platform/aarch64_raspi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,18 @@ extern "C" {
fn rust_main_secondary(cpu_id: usize);
}

pub(crate) unsafe extern "C" fn rust_entry(cpu_id: usize, dtb: usize) {
pub(crate) unsafe extern "C" fn rust_entry(cpu_id: usize) {
crate::mem::clear_bss();
crate::arch::set_exception_vector_base(exception_vector_base as usize);
crate::arch::write_page_table_root0(0.into()); // disable low address access
unsafe {
// Set the physical address of the dtb file to 0x03000000 in config.txt
dtb::init(crate::mem::phys_to_virt(0x03000000.into()).as_ptr());
}
crate::cpu::init_primary(cpu_id);
super::aarch64_common::pl011::init_early();
super::aarch64_common::generic_timer::init_early();
rust_main(cpu_id, dtb);
rust_main(cpu_id, 0x03000000);
}

#[cfg(feature = "smp")]
Expand Down
1 change: 1 addition & 0 deletions platforms/aarch64-raspi4.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ kernel-base-vaddr = "0xffff_0000_0008_0000"
phys-virt-offset = "0xffff_0000_0000_0000"
# MMIO regions with format (`base_paddr`, `size`).
mmio-regions = [
["0xFE34_0000", "0x1000"], # SD card
["0xFE20_1000", "0x1000"], # PL011 UART
["0xFF84_1000", "0x8000"], # GICv2
]
Expand Down
4 changes: 2 additions & 2 deletions scripts/make/raspi4.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ openocd:
## Start GDB session
##------------------------------------------------------------------------------
gdb: RUSTC_MISC_ARGS += -C debuginfo=2
gdb: $(KERNEL_ELF)
gdb: $(OUT_ELF)
$(call color_header, "Launching GDB")
@$(DOCKER_GDB) gdb-multiarch -q $(KERNEL_ELF)
@$(DOCKER_GDB) gdb-multiarch -q $(OUT_ELF)
Binary file added tools/raspi4/X1_JTAG_boot/jtag_boot_rpi4.img
Binary file not shown.
Loading