pulled over some stuff from newos:
at boot, per cpu, detect the cpu, pull down all the relevant cpuid bits and save them into the per-cpu structure. Changed most of the code scattered here and there that reads the cpuid to use a new api, x86_check_feature, which looks at the saved bits. Also changed the system_info stuff to read from these bits. While i was at it, refreshed all the bits to be current. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20072 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <smp.h>
|
||||
#include <timer.h>
|
||||
#include <boot/kernel_args.h>
|
||||
#include <arch/cpu.h>
|
||||
|
||||
|
||||
/* CPU local data structure */
|
||||
@@ -29,6 +30,9 @@ typedef struct cpu_ent {
|
||||
bigtime_t last_user_time;
|
||||
|
||||
bool disabled;
|
||||
|
||||
// arch-specific stuff
|
||||
arch_cpu_info arch;
|
||||
} cpu_ent __attribute__((aligned(64)));
|
||||
|
||||
|
||||
@@ -41,6 +45,7 @@ extern "C" {
|
||||
|
||||
status_t cpu_preboot_init(struct kernel_args *args);
|
||||
status_t cpu_init(struct kernel_args *args);
|
||||
status_t cpu_init_percpu(kernel_args *ka, int curr_cpu);
|
||||
status_t cpu_init_post_vm(struct kernel_args *args);
|
||||
status_t cpu_init_post_modules(struct kernel_args *args);
|
||||
bigtime_t cpu_get_active_time(int32 cpu);
|
||||
|
||||
Reference in New Issue
Block a user