Home
last modified time | relevance | path

Searched refs:x86 (Results 1 – 25 of 38) sorted by relevance

12

/DragonOS/kernel/src/arch/x86_64/interrupt/
H A Dipi.rs4 use x86::apic::ApicId;
63 Specified(x86::apic::ApicId),
84 return x86::apic::ApicId::X2Apic(0); in from()
86 return x86::apic::ApicId::XApic(0); in from()
103 fn cpu_id_to_apic_id(cpu_id: ProcessorId) -> x86::apic::ApicId { in cpu_id_to_apic_id()
105 x86::apic::ApicId::X2Apic(cpu_id.data()) in cpu_id_to_apic_id()
107 x86::apic::ApicId::XApic(cpu_id.data() as u8) in cpu_id_to_apic_id()
112 impl From<ArchIpiTarget> for x86::apic::DestinationShorthand {
115 ArchIpiTarget::Specified(_) => x86::apic::DestinationShorthand::NoShorthand, in from()
116 ArchIpiTarget::Current => x86::apic::DestinationShorthand::Myself, in from()
[all …]
/DragonOS/kernel/src/arch/x86_64/asm/
H A Dpio.rs8 x86::io::inb(port) in in8()
13 x86::io::inw(port) in in16()
18 x86::io::inl(port) in in32()
23 x86::io::outb(port, data) in out8()
28 x86::io::outw(port, data) in out16()
33 x86::io::outl(port, data) in out32()
/DragonOS/kernel/src/arch/x86_64/syscall/
H A Dmod.rs138 let mut efer = x86::msr::rdmsr(x86::msr::IA32_EFER); in init_syscall_64()
140 x86::msr::wrmsr(x86::msr::IA32_EFER, efer); in init_syscall_64()
146 x86::msr::wrmsr(x86::msr::IA32_STAR, u64::from(high) << 32); in init_syscall_64()
149 x86::msr::wrmsr(x86::msr::IA32_LSTAR, syscall_64 as usize as u64); in init_syscall_64()
150 x86::msr::wrmsr(x86::msr::IA32_FMASK, 0xfffffffe); in init_syscall_64()
/DragonOS/kernel/src/arch/x86_64/kvm/vmx/
H A Dvmx_asm_wrapper.rs6 use x86;
9 match unsafe { x86::bits64::vmx::vmxon(vmxon_pa) } { in vmxon()
20 match unsafe { x86::bits64::vmx::vmxoff() } { in vmxoff()
28 match unsafe { x86::bits64::vmx::vmwrite(vmcs_field, value) } { in vmx_vmwrite()
40 match unsafe { x86::bits64::vmx::vmread(vmcs_field) } { in vmx_vmread()
50 match unsafe { x86::bits64::vmx::vmptrld(vmcs_pa) } { in vmx_vmptrld()
93 match unsafe { x86::bits64::vmx::vmclear(vmcs_pa) } { in vmx_vmclear()
H A Dvcpu.rs23 use x86;
24 use x86::{controlregs, msr, segmentation};
301 (x86::task::tr().bits() & (!0x07)).into() in vmcs_init_host()
310 let mut pseudo_descriptpr: x86::dtables::DescriptorTablePointer<u64> = Default::default(); in vmcs_init_host()
312 x86::dtables::sgdt(&mut pseudo_descriptpr); in vmcs_init_host()
318 x86::task::tr().bits() in vmcs_init_host()
326 let mut pseudo_descriptpr: x86::dtables::DescriptorTablePointer<u64> = in vmcs_init_host()
328 x86::dtables::sidt(&mut pseudo_descriptpr); in vmcs_init_host()
H A Dept.rs11 use x86::msr;
/DragonOS/kernel/src/arch/x86_64/process/
H A Dmod.rs13 use x86::{controlregs::Cr4, segmentation::SegmentSelector};
177 if x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_FSGSBASE) { in save_fsbase()
178 self.fsbase = x86::current::segmentation::rdfsbase() as usize; in save_fsbase()
180 self.fsbase = x86::msr::rdmsr(x86::msr::IA32_FS_BASE) as usize; in save_fsbase()
185 if x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_FSGSBASE) { in save_gsbase()
186 self.gsbase = x86::current::segmentation::rdgsbase() as usize; in save_gsbase()
188 self.gsbase = x86::msr::rdmsr(x86::msr::IA32_GS_BASE) as usize; in save_gsbase()
193 if x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_FSGSBASE) { in restore_fsbase()
194 x86::current::segmentation::wrfsbase(self.fsbase as u64); in restore_fsbase()
196 x86::msr::wrmsr(x86::msr::IA32_FS_BASE, self.fsbase as u64); in restore_fsbase()
[all …]
H A Dtable.rs1 use x86::{current::task::TaskStateSegment, segmentation::SegmentSelector, Ring};
29 x86::segmentation::load_fs(fs); in switch_fs_and_gs()
30 x86::segmentation::load_gs(gs); in switch_fs_and_gs()
59 x86::task::load_tr(selector); in load_tr()
H A Didle.rs22 x86::halt(); in arch_idle_func()
/DragonOS/kernel/src/arch/x86_64/
H A Dlink.lds2 OUTPUT_FORMAT("elf64-x86-64","elf64-x86-64","elf64-x86-64")
3 OUTPUT_ARCH(i386:x86-64)
H A Dcpu.rs3 use x86::cpuid::{cpuid, CpuIdResult};
18 unsafe { x86::io::outb(0x64, 0xfe) }; in cpu_reset()
H A Dtime.rs17 unsafe { x86::time::rdtsc() as usize } in get_cycles()
/DragonOS/kernel/src/
H A DMakefile77 …$(LD) -b elf64-x86-64 -z muldefs $(LDFLAGS_UNWIND) -o kernel $(shell find . -name "*.o") ../target…
90 …$(LD) -b elf64-x86-64 -z muldefs $(LDFLAGS_UNWIND) -o kernel $(shell find . -name "*.o") ../target…
94 $(OBJCOPY) -I elf64-x86-64 -O elf64-x86-64 kernel ../../bin/kernel/kernel.elf
96 $(OBJCOPY) -I elf64-x86-64 -O elf64-x86-64 -R ".eh_frame" kernel ../../bin/kernel/kernel.elf
H A Dlib.rs87 extern crate x86;
/DragonOS/kernel/src/arch/x86_64/init/
H A Dmod.rs8 use x86::dtables::DescriptorTablePointer;
67 x86::dtables::lgdt(&gdtp); in kernel_main()
68 x86::dtables::lidt(&idtp); in kernel_main()
129 current_tss.set_rsp(x86::Ring::Ring0, stack_start as u64); in set_current_core_tss()
/DragonOS/kernel/src/arch/x86_64/driver/apic/
H A Dx2apic.rs4 use x86::msr::{
17 return x86::cpuid::CpuId::new() in support()
123 fn write_icr(&self, icr: x86::apic::Icr) { in write_icr()
H A Dxapic.rs210 return x86::cpuid::CpuId::new() in support()
220 x86::msr::wrmsr(x86::msr::APIC_BASE, (self.xapic_base.data() | 0x800) as u64); in init_current_cpu()
221 let val = x86::msr::rdmsr(x86::msr::APIC_BASE); in init_current_cpu()
322 fn write_icr(&self, icr: x86::apic::Icr) { in write_icr()
H A Dapic_timer.rs24 use x86::cpuid::cpuid;
25 use x86::msr::{wrmsr, IA32_X2APIC_DIV_CONF, IA32_X2APIC_INIT_COUNT};
/DragonOS/docs/kernel/cpu_arch/x86_64/
H A Dindex.rst1 x86-64相关文档
/DragonOS/kernel/crates/kprobe/
H A DCargo.toml10 yaxpeax-x86 = { version = "2", default-features = false, features = ["fmt"] }
/DragonOS/kernel/crates/rbpf/mk/
H A Dappveyor.bat6 SET PATH=C:\Program Files (x86)\MSBuild\%TOOLCHAIN_VERSION%\Bin;%PATH%
8 set VCVARSALL="C:\Program Files (x86)\Microsoft Visual Studio %TOOLCHAIN_VERSION%\VC\vcvarsall.bat"
21 set TARGET_PROGRAM_FILES=%ProgramFiles(x86)%
/DragonOS/kernel/src/arch/x86_64/mm/
H A Dfault.rs8 use x86::{bits64::rflags::RFlags, controlregs::Cr4};
82 && unsafe { x86::controlregs::cr4().contains(Cr4::CR4_ENABLE_SMEP) } in show_fault_oops()
191 let feature = x86::cpuid::CpuId::new() in do_user_addr_fault()
/DragonOS/kernel/crates/kprobe/src/arch/
H A Dmod.rs11 mod x86; module
18 pub use x86::*;
/DragonOS/docs/kernel/trace/
H A Dkprobe.md29 内核目前对x86和riscv64都进行了支持,由于 riscv64 没有单步执行模式,因此我们使用 break 异常来进行模拟,在保存探测点指令时,我们会额外填充一条 break 指令,这样就可以使…
/DragonOS/kernel/src/process/
H A Didle.rs90 return VirtAddr::new(x86::current::registers::rsp() as usize); in stack_ptr()

12