Use MSR to map framebuffer as WC (write-combining) = huge speed diff on real HW
This commit is contained in:
20
src/arch/x86/cpuid.c
Normal file
20
src/arch/x86/cpuid.c
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* @author xamidev <xamidev@riseup.net>
|
||||
* @brief x86 CPU identification
|
||||
* @license GPL-3.0-only
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/*
|
||||
* cpuid - Wrapper for CPUID instruction
|
||||
* @leaf: Requested leaf
|
||||
* @eax: EAX register value
|
||||
* @ebx: EBX register value
|
||||
* @ecx: ECX register value
|
||||
* @edx: EDX register value
|
||||
*/
|
||||
void cpuid(uint32_t leaf, uint32_t* eax, uint32_t* ebx, uint32_t* ecx, uint32_t* edx)
|
||||
{
|
||||
__asm__ volatile("cpuid" : "=a"(*eax), "=b"(*ebx), "=c"(*ecx), "=d"(*edx) : "a"(leaf));
|
||||
}
|
||||
Reference in New Issue
Block a user