Home
last modified time | relevance | path

Searched refs:u64 (Results 1 – 25 of 107) sorted by relevance

12345

/DragonOS-0.1.9/kernel/src/arch/x86_64/driver/
Dtsc.rs17 const PIT_TICK_RATE: u64 = 1193182;
22 static mut TSC_KHZ: u64 = 0;
23 static mut CPU_KHZ: u64 = 0;
26 const DEFAULT_THRESHOLD: u64 = 0x20000;
106 fn calibrate_cpu_by_pit_hpet_ptimer() -> Result<u64, SystemError> { in calibrate_cpu_by_pit_hpet_ptimer()
113 let mut tsc_pit_min = u64::MAX; in calibrate_cpu_by_pit_hpet_ptimer()
114 let mut tsc_ref_min = u64::MAX; in calibrate_cpu_by_pit_hpet_ptimer()
137 let tsc_pit_khz = Self::pit_calibrate_tsc(latch, ms, loopmin).unwrap_or(u64::MAX); in calibrate_cpu_by_pit_hpet_ptimer()
154 if tsc1 == u64::MAX || tsc2 == u64::MAX { in calibrate_cpu_by_pit_hpet_ptimer()
183 if i == 1 && tsc_pit_min == u64::MAX { in calibrate_cpu_by_pit_hpet_ptimer()
[all …]
/DragonOS-0.1.9/kernel/src/driver/timers/hpet/
Dmod.rs9 _reserved0: Volatile<u64>,
10 general_config: Volatile<u64>,
11 _reserved1: Volatile<u64>,
12 general_intr_status: Volatile<u64>,
13 _reserved2: [Volatile<u64>; 25],
14 main_counter_value: Volatile<u64>,
15 _reserved3: Volatile<u64>,
28 pub fn counter_clock_period(&self) -> u64 { in counter_clock_period() argument
31 period as u64 in counter_clock_period()
35 pub fn frequency(&self) -> u64 { in frequency() argument
[all …]
/DragonOS-0.1.9/kernel/src/virt/kvm/
Dhost_mem.rs52 pub guest_phys_addr: u64, // 虚机内存区间起始物理地址
53 pub memory_size: u64, // 虚机内存区间大小
54 pub userspace_addr: u64, // 虚机内存区间对应的主机虚拟地址
59 pub base_gfn: u64, // 虚机内存区间起始物理页框号
60 pub npages: u64, // 虚机内存区间页数,即内存区间的大小
61 pub userspace_addr: u64, // 虚机内存区间对应的主机虚拟地址
89 fn __gfn_to_memslot(slots: KvmMemorySlots, gfn: u64) -> Option<KvmMemorySlot> { in __gfn_to_memslot()
101 fn __gfn_to_hva(slot: KvmMemorySlot, gfn: u64) -> u64 { in __gfn_to_hva() argument
102 return slot.userspace_addr + (gfn - slot.base_gfn) * (PAGE_SIZE as u64); in __gfn_to_hva()
106 gfn: u64, in __gfn_to_hva_many() argument
[all …]
/DragonOS-0.1.9/kernel/src/syscall/
Dmisc.rs19 uptime: u64,
20 loads: [u64; 3],
21 totalram: u64,
22 freeram: u64,
23 sharedram: u64,
24 bufferram: u64,
25 totalswap: u64,
26 freeswap: u64,
29 totalhigh: u64,
30 freehigh: u64,
[all …]
/DragonOS-0.1.9/kernel/src/arch/x86_64/kvm/vmx/
Dvmexit.rs67 interrupt_info as u64, in vmexit_vmx_instruction_executed()
70 …let rflags: u64 = vmx_vmread(VmcsFields::GUEST_RFLAGS as u32).unwrap() | 0x0001_0000; // set RF fl… in vmexit_vmx_instruction_executed()
131 pub r15: u64,
132 pub r14: u64,
133 pub r13: u64,
134 pub r12: u64,
135 pub r11: u64,
136 pub r10: u64,
137 pub r9: u64,
138 pub r8: u64,
[all …]
Dmmu.rs59 pub root_hpa: u64,
63 pub get_cr3: Option<fn(&VmxVcpu) -> u64>,
64 pub set_eptp: Option<fn(u64) -> Result<(), SystemError>>,
68 gpa: u64,
92 fn tdp_get_cr3(_vcpu: &VmxVcpu) -> u64 { in tdp_get_cr3() argument
97 fn tdp_set_eptp(root_hpa: u64) -> Result<(), SystemError> { in tdp_set_eptp()
100 let mut eptp = 0x0 as u64; in tdp_set_eptp()
103 eptp |= root_hpa & (PAGE_MASK as u64); in tdp_set_eptp()
110 gpa: u64, in tdp_page_fault() argument
211 gpa: u64, in __direct_map() argument
[all …]
Dvcpu.rs48 pub vmxon_region_physical_address: u64, // vmxon需要该地址
54 pub vmcs_region_physical_address: u64, // vmptrld, vmclear需要该地址
56 pub msr_bitmap_physical_address: u64,
105 unsafe { MMArch::virt_2_phys(vaddr).unwrap().data() as u64 } in alloc()
109 unsafe { MMArch::virt_2_phys(vaddr).unwrap().data() as u64 } in alloc()
113 unsafe { MMArch::virt_2_phys(vaddr).unwrap().data() as u64 } in alloc()
173 vmx_vmwrite(VmcsFields::GUEST_CR0 as u32, cr0.bits() as u64)?; in vmx_set_cr0()
203 vmx_vmwrite(VmcsFields::GUEST_GDTR_LIMIT as u32, 0x0000_FFFF as u64)?; in vmcs_init_guest()
206 vmx_vmwrite(VmcsFields::GUEST_IDTR_LIMIT as u32, 0x0000_FFFF as u64)?; in vmcs_init_guest()
217 vmx_vmwrite(VmcsFields::GUEST_CR0 as u32, cr0.bits() as u64)?; in vmcs_init_guest()
[all …]
Dvmx_asm_wrapper.rs7 pub fn vmxon(vmxon_pa: u64) -> Result<(), SystemError> { in vmxon()
26 pub fn vmx_vmwrite(vmcs_field: u32, value: u64) -> Result<(), SystemError> { in vmx_vmwrite()
38 pub fn vmx_vmread(vmcs_field: u32) -> Result<u64, SystemError> { in vmx_vmread() argument
48 pub fn vmx_vmptrld(vmcs_pa: u64) -> Result<(), SystemError> { in vmx_vmptrld()
91 pub fn vmx_vmclear(vmcs_pa: u64) -> Result<(), SystemError> { in vmx_vmclear()
/DragonOS-0.1.9/kernel/src/libs/intertrait/src/
Dhasher.rs7 pub struct FastHasher(u64);
13 fn finish(&self) -> u64 { in finish() argument
19 while bytes.len() > size_of::<u64>() { in write()
20 let (u64_bytes, remaining) = bytes.split_at(size_of::<u64>()); in write()
21 self.0 ^= u64::from_ne_bytes(u64_bytes.try_into().unwrap()); in write()
26 .fold(0u64, |result, b| (result << 8) | *b as u64); in write()
/DragonOS-0.1.9/kernel/crates/crc/src/tables/
Dcrc64.rs5 pub table: [u64; 256],
6 pub poly: u64,
10 pub const fn new(poly: u64, table: [u64; 256]) -> Self { in new() argument
16 type Target = [u64; 256];
/DragonOS-0.1.9/kernel/src/driver/base/block/
Ddisk_info.rs6 pub type SectorT = u64;
8 pub const BLK_TYPE_AHCI: u64 = 0;
16 pub lba_start: u64, // 起始LBA号
17 pub sectors_num: u64, // 该分区的扇区数
27 lba_start: u64, in new() argument
28 sectors_num: u64, in new() argument
/DragonOS-0.1.9/kernel/src/filesystem/fat/
Dfs.rs39 pub const MAX_FILE_SIZE: u64 = 0xffff_ffff;
45 pub cluster_num: u64,
46 pub parent_cluster: u64,
72 pub first_data_sector: u64,
234 offset: Option<u64>,
267 let fs_info_in_disk_bytes_offset = partition.lba_start * LBA_SIZE as u64 in new()
268 + bpb32.fs_info as u64 * bpb.bytes_per_sector as u64; in new()
279 let root_dir_sectors: u64 = ((bpb.root_entries_cnt as u64 * 32) in new()
280 + (bpb.bytes_per_sector as u64 - 1)) in new()
281 / (bpb.bytes_per_sector as u64); in new()
[all …]
/DragonOS-0.1.9/kernel/crates/crc/src/
Dcrc64.rs41 pub fn crc64_be(mut crc: u64, buf: &[u8]) -> u64 { in crc64_be() argument
43 let t = ((crc >> 56) ^ (byte as u64)) & 0xff; in crc64_be()
57 pub fn crc64_rocksoft_generic(mut crc: u64, buf: &[u8]) -> u64 { in crc64_rocksoft_generic() argument
/DragonOS-0.1.9/kernel/src/arch/x86_64/interrupt/
Dtrap.rs70 unsafe extern "C" fn do_divide_error(regs: &'static TrapFrame, error_code: u64) { in do_divide_error() argument
84 unsafe extern "C" fn do_debug(regs: &'static TrapFrame, error_code: u64) { in do_debug() argument
98 unsafe extern "C" fn do_nmi(regs: &'static TrapFrame, error_code: u64) { in do_nmi() argument
112 unsafe extern "C" fn do_int3(regs: &'static TrapFrame, error_code: u64) { in do_int3() argument
126 unsafe extern "C" fn do_overflow(regs: &'static TrapFrame, error_code: u64) { in do_overflow() argument
140 unsafe extern "C" fn do_bounds(regs: &'static TrapFrame, error_code: u64) { in do_bounds() argument
154 unsafe extern "C" fn do_undefined_opcode(regs: &'static TrapFrame, error_code: u64) { in do_undefined_opcode() argument
168 unsafe extern "C" fn do_dev_not_avaliable(regs: &'static TrapFrame, error_code: u64) { in do_dev_not_avaliable() argument
182 unsafe extern "C" fn do_double_fault(regs: &'static TrapFrame, error_code: u64) { in do_double_fault() argument
196 unsafe extern "C" fn do_coprocessor_segment_overrun(regs: &'static TrapFrame, error_code: u64) { in do_coprocessor_segment_overrun() argument
[all …]
/DragonOS-0.1.9/kernel/src/arch/x86_64/init/
Dmod.rs35 fn multiboot2_init(mb2_info: u64, mb2_magic: u32) -> bool; in multiboot2_init() argument
36 fn __init_set_cpu_stack_start(cpu: u32, stack_start: u64); in __init_set_cpu_stack_start() argument
41 mb2_info: u64, in kernel_main() argument
42 mb2_magic: u64, in kernel_main() argument
43 bsp_gdt_size: u64, in kernel_main() argument
44 bsp_idt_size: u64, in kernel_main() argument
71 let stack_start = unsafe { *(head_stack_start as *const u64) } as usize; in early_setup_arch() constant
84 unsafe { __init_set_cpu_stack_start(0, stack_start as u64) }; in early_setup_arch()
119 current_tss.set_rsp(x86::Ring::Ring0, stack_start as u64); in set_current_core_tss()
120 current_tss.set_ist(0, ist0 as u64); in set_current_core_tss()
/DragonOS-0.1.9/kernel/src/arch/x86_64/process/
Dkthread.rs33 frame.rbx = create_info as usize as u64; in __inner_create()
34 frame.ds = KERNEL_DS.bits() as u64; in __inner_create()
35 frame.es = KERNEL_DS.bits() as u64; in __inner_create()
36 frame.cs = KERNEL_CS.bits() as u64; in __inner_create()
37 frame.ss = KERNEL_DS.bits() as u64; in __inner_create()
42 frame.rip = kernel_thread_bootstrap_stage1 as usize as u64; in __inner_create()
Dtable.rs22 static mut GDT_Table: [u64; 512];
63 const LIMIT: u64 = 103; in set_tss_descriptor()
66 let gdt: &mut [u64] = core::slice::from_raw_parts_mut(gdt_vaddr.data() as *mut u64, 512); in set_tss_descriptor()
68 let vaddr = vaddr.data() as u64; in set_tss_descriptor()
/DragonOS-0.1.9/kernel/src/time/
Dsleep.rs32 let expired_tsc: u64 = unsafe { in nanosleep()
33 CurrentTimeArch::get_cycles() as u64 in nanosleep()
34 + (sleep_time.tv_nsec as u64 * Cpu_tsc_freq) / 1000000000 in nanosleep()
36 while (CurrentTimeArch::get_cycles() as u64) < expired_tsc { in nanosleep()
45 let total_sleep_time_us: u64 = in nanosleep()
46 sleep_time.tv_sec as u64 * 1000000 + sleep_time.tv_nsec as u64 / 1000; in nanosleep()
Dmod.rs43 pub const FSEC_PER_SEC: u64 = 1000000000000000;
72 CurrentTimeArch::get_cycles() as u64 / khz, in now()
89 Duration::from_micros((sec * 1000000 + nsec / 1000) as u64) in sub()
104 Duration::from_micros(val.tv_sec as u64 * 1000000 + val.tv_nsec as u64 / 1000) in from()
240 micros: u64,
246 pub const fn from_micros(micros: u64) -> Duration { in from_micros()
251 pub const fn from_millis(millis: u64) -> Duration { in from_millis()
258 pub const fn from_secs(secs: u64) -> Duration { in from_secs()
265 pub const fn millis(&self) -> u64 { in millis() argument
270 pub const fn micros(&self) -> u64 { in micros() argument
[all …]
/DragonOS-0.1.9/kernel/src/arch/x86_64/
Dfpu.rs12 word2: u64,
14 word3: u64,
18 mm: [u64; 16],
20 xmm: [u64; 32],
22 rest: [u64; 12],
Dc_adapter.rs7 unsafe extern "C" fn rs_get_cycles() -> u64 { in rs_get_cycles()
8 return CurrentTimeArch::get_cycles() as u64; in rs_get_cycles()
12 unsafe extern "C" fn rs_tsc_get_cpu_khz() -> u64 { in rs_tsc_get_cpu_khz()
/DragonOS-0.1.9/kernel/crates/klog_types/src/
Dlib.rs16 pub id: u64,
20 pub time: u64,
28 pub checksum: u64,
42 id: u64, in new() argument
46 time: u64, in new() argument
73 pub fn calculate_checksum(value: &Self) -> u64 { in calculate_checksum() argument
77 core::mem::size_of::<Self>() - core::mem::size_of::<u64>(), in calculate_checksum()
195 pub capacity: u64,
196 pub slots_offset: u64,
234 capacity: capacity as u64, in new()
[all …]
/DragonOS-0.1.9/docs/kernel/sched/
Dkernel_timer.md32 pub fn new(timer_func: Box<dyn TimerFunction>, expire_jiffies: u64) -> Arc<Self>
77 pub fn timer_get_first_expire() -> Result<u64, SystemError>
92 pub fn clock() -> u64
104 pub fn next_n_ms_timer_jiffies(expire_ms: u64) -> u64
122 pub fn next_n_us_timer_jiffies(expire_us: u64) -> u64
/DragonOS-0.1.9/kernel/src/driver/firmware/efi/
Dfdt.rs16 pub systable: Option<u64>,
18 pub mmap_base: Option<u64>,
20 pub mmap_size: Option<u64>,
22 pub mmap_desc_size: Option<u64>,
24 pub mmap_desc_version: Option<u64>,
162 let val: u64; in do_get_fdt_prop()
164 val = u32::from_be_bytes(prop.value[0..4].try_into().unwrap()) as u64; in do_get_fdt_prop()
166 val = u64::from_be_bytes(prop.value[0..8].try_into().unwrap()); in do_get_fdt_prop()
/DragonOS-0.1.9/kernel/src/driver/acpi/
Dpmtmr.rs1 pub const ACPI_PM_OVERRUN: u64 = 1 << 24;
4 pub const PMTMR_TICKS_PER_SEC: u64 = 3579545;

12345