/DragonOS/kernel/src/libs/ |
H A D | align.rs | 143 pub const fn align_up(addr: usize, align: usize) -> usize { in align_up() 144 assert!(align != 0 && align.is_power_of_two()); in align_up() 145 return (addr + align - 1) & (!(align - 1)); in align_up() 148 pub const fn align_down(addr: usize, align: usize) -> usize { in align_down() 149 assert!(align != 0 && align.is_power_of_two()); in align_down() 150 return addr & (!(align - 1)); in align_down() 164 pub fn check_aligned(value: usize, align: usize) -> bool { in check_aligned() 165 assert!(align != 0 && align.is_power_of_two()); in check_aligned() 166 return value & (align - 1) == 0; in check_aligned()
|
H A D | mod.rs | 1 pub mod align; module
|
/DragonOS/kernel/src/arch/x86_64/asm/ |
H A D | apu_boot.S | 5 .align 0x1000 // 按照4k对齐 57 .align 0x1000 84 .align 0x1000 90 .align 0x1000 95 .align 0x1000 106 .align 0x1000 111 .align 0x1000 116 .align 0x1000
|
H A D | head.S | 99 .align 4 104 2:.align 4 106 4:.align 4 130 .align MULTIBOOT2_HEADER_ALIGN 145 .align 8 154 .align 8 578 .align 0x1000 //设置为4k对齐 599 .align 16 652 .align 0x1000 664 .align 16
|
/DragonOS/kernel/src/bpf/map/ |
H A D | util.rs | 84 pub fn round_up(x: usize, align: usize) -> usize { in round_up() 85 (x + align - 1) & !(align - 1) in round_up()
|
/DragonOS/kernel/crates/crc/src/tables/ |
H A D | crc64.rs | 3 #[repr(align(128))]
|
/DragonOS/kernel/src/arch/riscv64/driver/ |
H A D | of.rs | 6 libs::align::page_align_up,
|
/DragonOS/kernel/src/arch/x86_64/ |
H A D | fpu.rs | 4 #[repr(C, align(16))]
|
/DragonOS/kernel/src/arch/x86_64/mm/ |
H A D | bump.rs | 2 libs::align::{page_align_down, page_align_up},
|
/DragonOS/kernel/crates/rust-slabmalloc/src/ |
H A D | sc.rs | 270 let new_layout = unsafe { Layout::from_size_align_unchecked(self.size, layout.align()) }; in allocate() 338 let new_layout = unsafe { Layout::from_size_align_unchecked(self.size, layout.align()) }; in deallocate()
|
/DragonOS/kernel/src/mm/ |
H A D | kernel_mapper.rs | 10 libs::align::page_align_up,
|
H A D | mod.rs | 185 pub fn check_aligned(&self, align: usize) -> bool { in check_aligned() 186 return self.0 & (align - 1) == 0; in check_aligned() 308 pub fn check_aligned(&self, align: usize) -> bool { in check_aligned() 309 return self.0 & (align - 1) == 0; in check_aligned()
|
H A D | early_ioremap.rs | 6 align::{page_align_down, page_align_up},
|
H A D | fault.rs | 12 libs::align::align_down, 79 address: VirtAddr::new(crate::libs::align::page_align_down(address.data())), in new() 103 VirtAddr::new(crate::libs::align::page_align_down(self.address.data())) in address_aligned_down()
|
H A D | no_init.rs | 32 #[repr(align(4096))]
|
/DragonOS/kernel/src/arch/x86_64/syscall/ |
H A D | mod.rs | 9 libs::align::SafeForZero,
|
/DragonOS/kernel/src/arch/riscv64/interrupt/ |
H A D | mod.rs | 9 libs::align::align_up,
|
H A D | entry.rs | 13 #[repr(align(4))]
|
/DragonOS/kernel/src/driver/firmware/efi/ |
H A D | memmap.rs | 8 libs::align::page_align_down,
|
/DragonOS/kernel/src/driver/virtio/ |
H A D | transport_mmio.rs | 16 libs::align::page_align_up,
|
/DragonOS/kernel/src/arch/x86_64/ipc/ |
H A D | signal.rs | 226 #[repr(C,align(8))] 318 #[repr(C, align(16))] 329 #[repr(C, align(16))]
|
/DragonOS/ |
H A D | README.md | 1 <div align="center">
|
/DragonOS/kernel/src/mm/allocator/ |
H A D | kernel_allocator.rs | 6 libs::align::page_align_up,
|
/DragonOS/kernel/src/driver/open_firmware/ |
H A D | fdt.rs | 216 libs::align::page_align_down, in early_init_dt_add_memory() 330 use crate::libs::align::{page_align_down, page_align_up}; in early_reserve_fdt_itself()
|
/DragonOS/kernel/src/driver/acpi/ |
H A D | mod.rs | 11 libs::align::{page_align_down, page_align_up, AlignedBox},
|