Home
last modified time | relevance | path

Searched refs:align (Results 1 – 25 of 46) sorted by relevance

12

/DragonOS/kernel/src/libs/
H A Dalign.rs143 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 Dmod.rs1 pub mod align; module
/DragonOS/kernel/src/arch/x86_64/asm/
H A Dapu_boot.S5 .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 Dhead.S99 .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 Dutil.rs84 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 Dcrc64.rs3 #[repr(align(128))]
/DragonOS/kernel/src/arch/riscv64/driver/
H A Dof.rs6 libs::align::page_align_up,
/DragonOS/kernel/src/arch/x86_64/
H A Dfpu.rs4 #[repr(C, align(16))]
/DragonOS/kernel/src/arch/x86_64/mm/
H A Dbump.rs2 libs::align::{page_align_down, page_align_up},
/DragonOS/kernel/crates/rust-slabmalloc/src/
H A Dsc.rs270 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 Dkernel_mapper.rs10 libs::align::page_align_up,
H A Dmod.rs185 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 Dearly_ioremap.rs6 align::{page_align_down, page_align_up},
H A Dfault.rs12 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 Dno_init.rs32 #[repr(align(4096))]
/DragonOS/kernel/src/arch/x86_64/syscall/
H A Dmod.rs9 libs::align::SafeForZero,
/DragonOS/kernel/src/arch/riscv64/interrupt/
H A Dmod.rs9 libs::align::align_up,
H A Dentry.rs13 #[repr(align(4))]
/DragonOS/kernel/src/driver/firmware/efi/
H A Dmemmap.rs8 libs::align::page_align_down,
/DragonOS/kernel/src/driver/virtio/
H A Dtransport_mmio.rs16 libs::align::page_align_up,
/DragonOS/kernel/src/arch/x86_64/ipc/
H A Dsignal.rs226 #[repr(C,align(8))]
318 #[repr(C, align(16))]
329 #[repr(C, align(16))]
/DragonOS/
H A DREADME.md1 <div align="center">
/DragonOS/kernel/src/mm/allocator/
H A Dkernel_allocator.rs6 libs::align::page_align_up,
/DragonOS/kernel/src/driver/open_firmware/
H A Dfdt.rs216 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 Dmod.rs11 libs::align::{page_align_down, page_align_up, AlignedBox},

12