a cow based x86_64 operating system, using limine and stivale2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

26 lines
381 B

[section .text]
[global cpuid]
;struct cpuid_regs {
; uint32_t eax, ebx, ecx, edx;
;}
; void cpuid(uint32_t eax, struct cpuid_regs* out_regs);
cpuid:
push rbp
mov rbp, rsp
push rbx
mov eax, edi
cpuid
mov [rdi + 0], eax
mov [rdi + 4], ebx
mov [rdi + 8], ecx
mov [rdi + 12], edx
pop rbx
leave
ret