Skip to content

Commit

Permalink
finish
Browse files Browse the repository at this point in the history
  • Loading branch information
lhw2002426 committed Jul 25, 2023
1 parent d32f550 commit 20e74ca
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 6 deletions.
36 changes: 36 additions & 0 deletions .gdb_history
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,39 @@ load apps/fs/shell/shell_raspi4-aarch64.elf
set $pc = 0x80000
continue
q
target remote :3333
load apps/helloword/helloword_raspi4-aarch64.elf
load apps/helloworld/helloworld_raspi4-aarch64.elf
set $pc = 0x80000
continue
q
load apps/helloword/helloword_raspi4-aarch64.elf
target remote :3333
load apps/helloworld/helloworld_raspi4-aarch64.elf
set $pc = 0x80000
continue
q
target remote :3333
load apps/helloworld/helloworld_raspi4-aarch64.elf
set $pc = 0x80000
continue
q
target remote :3333
load apps/helloworld/helloworld_raspi4-aarch64.elf
set $pc = 0x80000
continue
q
target remote :3333
load apps/helloworld/helloworld_raspi4-aarch64.elf
set $pc = 0x80000
continue
q
target remote :3333
load apps/helloworld/helloworld_raspi4-aarch64.elf
q
continue
target remote :3333
load apps/helloworld/helloworld_raspi4-aarch64.elf
set $pc = 0x80000
continue
q
6 changes: 3 additions & 3 deletions crates/driver_mmc/src/bcm2835_sdhci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1672,19 +1672,19 @@ impl BlockDriverOps for SDHCIDriver {
}
let buf = unsafe { slice::from_raw_parts_mut(buf.as_ptr() as *mut u32, BLOCK_SIZE / 4) };
let res = self.0.lock().read_block(block_id as u32, 1, buf);
if block_id == 0{
/*if block_id == 0{
let len = buf.len();
for i in 0..len{
debug!("out read res {}: {:X}",i,buf[i]);
}
debug!("mmc read block {},{:X}",block_id,buf[0]);
}
}*/
res
}

fn write_block(&mut self, block_id: u64, buf: &[u8]) -> DevResult {
if block_id == 0{
for i in 0..8{
for i in 0..16{
debug!("out write res {}: {:X}",i,buf[i]);
}
debug!("mmc write block {},{:X}",block_id,buf[0]);
Expand Down
1 change: 1 addition & 0 deletions modules/axalloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ impl GlobalAllocator {
/// a small region (32 KB) to initialize the byte allocator. Therefore,
/// the given region must be larger than 32 KB.
pub fn init(&self, start_vaddr: usize, size: usize) {
debug!("size:{}, {}",size,MIN_HEAP_SIZE);
assert!(size > MIN_HEAP_SIZE);
let init_heap_size = MIN_HEAP_SIZE;
self.palloc.lock().init(start_vaddr, size);
Expand Down
4 changes: 2 additions & 2 deletions modules/axfs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ fatfs = ["dep:fatfs"]
myfs = ["dep:crate_interface"]
use-ramdisk = []

default = ["devfs", "ramfs", "fatfs","use-ramdisk"]
#default = ["devfs", "ramfs", "fatfs"]
#default = ["devfs", "ramfs", "fatfs","use-ramdisk"]
default = ["devfs", "ramfs", "fatfs"]

[dependencies]
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion modules/axhal/src/platform/raspi4_aarch64/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub(crate) fn extern_memory_region_at(idx: usize) -> Option<MemRegion> {
Some(MemRegion {
paddr: 0x0.into(),
size: 0x1000,
flags: MemRegionFlags::FREE | MemRegionFlags::READ | MemRegionFlags::WRITE,
flags: MemRegionFlags::READ | MemRegionFlags::WRITE,
name: "spintable",
})
} else {
Expand Down

0 comments on commit 20e74ca

Please sign in to comment.