MOS Source Code
Loading...
Searching...
No Matches
cpu.c File Reference
#include "mos/x86/cpu/cpu.h"
#include "mos/platform/platform.h"
#include "mos/platform/platform_defs.h"
#include "mos/syslog/printk.h"
#include "mos/x86/cpu/cpuid.h"
#include <mos_string.h>
+ Include dependency graph for cpu.c:

Go to the source code of this file.

Macros

#define do_static_assert(feat)
 
#define test_ensure_all_leaves_are_supported(feature)
 
#define impl_fill_leaf(_l, _sl, _r)
 

Functions

void x86_cpu_initialise_caps (void)
 
void x86_cpu_setup_xsave_area (void)
 

Macro Definition Documentation

◆ do_static_assert

#define do_static_assert ( feat)
Value:
#define X86_CPUID_LEAF_ENUM(leaf, subleaf, reg,...)
Definition cpuid.h:89
#define MOS_STATIC_ASSERT
Definition mos_global.h:14

Definition at line 13 of file cpu.c.

◆ test_ensure_all_leaves_are_supported

#define test_ensure_all_leaves_are_supported ( feature)
Value:
do_static_assert(CPU_FEATURE_##feature)
#define do_static_assert(feat)
Definition cpu.c:13

Definition at line 14 of file cpu.c.

◆ impl_fill_leaf

#define impl_fill_leaf ( _l,
_sl,
_r )
Value:
cpuinfo->cpuid[X86_CPUID_LEAF_ENUM(_l, _sl, _r, _)] = x86_cpuid(_r, _l, _sl);
#define x86_cpuid(return_reg, leaf, subleaf)
Definition cpu.h:28

Referenced by x86_cpu_initialise_caps().

Function Documentation

◆ x86_cpu_initialise_caps()

void x86_cpu_initialise_caps ( void )

Definition at line 20 of file cpu.c.

Referenced by platform_ap_entry(), and platform_startup_early().

◆ x86_cpu_setup_xsave_area()

void x86_cpu_setup_xsave_area ( void )

Definition at line 37 of file cpu.c.

Referenced by platform_ap_entry(), and platform_startup_early().