|
PatchworkOS
|
SIMD context management. More...
Data Structures | |
| struct | simd_ctx_t |
Functions | |
| void | simd_cpu_init (void) |
| uint64_t | simd_ctx_init (simd_ctx_t *ctx) |
| void | simd_ctx_deinit (simd_ctx_t *ctx) |
| void | simd_ctx_save (simd_ctx_t *ctx) |
| void | simd_ctx_load (simd_ctx_t *ctx) |
SIMD context management.
SIMD (Single Instruction, Multiple Data) context management allows saving and restoring the state of SIMD registers, the fact that SIMD uses its own registers is the reason that we cant use SIMD in the kernel normally.
| void simd_cpu_init | ( | void | ) |
Definition at line 42 of file simd.c.
References CPUID_EBX_AVX512F, CPUID_ECX_AVX, CPUID_ECX_OSXSAVE, cpuid_extended_feature_info(), cpuid_feature_info(), CR0_EMULATION, CR0_MONITOR_CO_PROCESSOR, CR0_NUMERIC_ERROR_ENABLE, cr0_read(), cr0_write(), CR4_FXSR_ENABLE, cr4_read(), CR4_SIMD_EXCEPTION, cr4_write(), cpuid_extended_feature_info_t::featuresEbx, info, LOG_INFO, simd_xsave_init(), smp_self_unsafe(), and UINT64_MAX.
Referenced by cpu_init().
| void simd_ctx_deinit | ( | simd_ctx_t * | ctx | ) |
Definition at line 99 of file simd.c.
References simd_ctx_t::buffer, and pmm_free().
Referenced by thread_free().
| uint64_t simd_ctx_init | ( | simd_ctx_t * | ctx | ) |
Definition at line 86 of file simd.c.
References simd_ctx_t::buffer, ERR, memcpy(), NULL, PAGE_SIZE, and pmm_alloc().
Referenced by thread_init().
| void simd_ctx_load | ( | simd_ctx_t * | ctx | ) |
Definition at line 119 of file simd.c.
References simd_ctx_t::buffer, CPUID_ECX_OSXSAVE, cpuid_feature_info(), info, and UINT64_MAX.
Referenced by thread_load().
| void simd_ctx_save | ( | simd_ctx_t * | ctx | ) |
Definition at line 104 of file simd.c.
References simd_ctx_t::buffer, CPUID_ECX_OSXSAVE, cpuid_feature_info(), info, and UINT64_MAX.
Referenced by thread_save().