mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-11 07:19:20 +00:00
Added APIC & SMP stub
This commit is contained in:
35
include/smp.hpp
Normal file
35
include/smp.hpp
Normal file
@ -0,0 +1,35 @@
|
||||
#ifndef __FENNIX_KERNEL_SMP_H__
|
||||
#define __FENNIX_KERNEL_SMP_H__
|
||||
|
||||
#include <types.h>
|
||||
|
||||
#define CPU_DATA_CHECKSUM 0xC0FFEE
|
||||
|
||||
struct CPUData
|
||||
{
|
||||
/**
|
||||
* @brief CPU ID.
|
||||
*/
|
||||
uint64_t ID;
|
||||
/**
|
||||
* @brief Local CPU error code.
|
||||
*/
|
||||
long ErrorCode;
|
||||
/**
|
||||
* @brief Is CPU online?
|
||||
*/
|
||||
bool IsActive;
|
||||
/**
|
||||
* @brief Architecture-specific CPU data.
|
||||
*/
|
||||
void *Data;
|
||||
/**
|
||||
* @brief Checksum. Used to verify the integrity of the data. Must be equal to CPU_DATA_CHECKSUM (0xC0FFEE).
|
||||
*/
|
||||
int Checksum;
|
||||
} __attribute__((packed));
|
||||
|
||||
CPUData *GetCurrentCPU();
|
||||
CPUData *GetCPU(uint64_t ID);
|
||||
|
||||
#endif // !__FENNIX_KERNEL_SMP_H__
|
Reference in New Issue
Block a user