mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-30 06:48:22 +00:00
feat(pl/ke): initial amd64 support
This commit is contained in:
@@ -1,6 +1,25 @@
|
||||
const entry = @import("entry.zig");
|
||||
const b = @import("base");
|
||||
const ki = b.ke.private;
|
||||
|
||||
pub const first_init = entry.first_init;
|
||||
pub const name = "AMD64";
|
||||
|
||||
pub fn first_init() void {}
|
||||
|
||||
pub fn early_init() void {
|
||||
const impl_cpu = &ki.bootstrap_cpu.impl;
|
||||
impl_cpu.self_ptr = impl_cpu;
|
||||
impl_cpu.percpu_offset = 0;
|
||||
|
||||
const impl_cpu_ptr = @intFromPtr(impl_cpu);
|
||||
asm volatile ("wrmsr"
|
||||
:
|
||||
: [_] "{eax}" (@as(u32, @intCast(impl_cpu_ptr & 0xFFFFFFFF))),
|
||||
[_] "{edx}" (@as(u32, @truncate(impl_cpu_ptr >> 32))),
|
||||
[_] "{ecx}" (0xC000_0101),
|
||||
);
|
||||
}
|
||||
|
||||
pub fn late_init() void {}
|
||||
|
||||
pub fn devices_init() void {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user