summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/cpu/mp.c6
-rw-r--r--sys/inc/mu/cpu.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/sys/arch/amd64/cpu/mp.c b/sys/arch/amd64/cpu/mp.c
index df4798d..a84648b 100644
--- a/sys/arch/amd64/cpu/mp.c
+++ b/sys/arch/amd64/cpu/mp.c
@@ -373,6 +373,12 @@ cpu_get(uint32_t index)
return cpu_list[index];
}
+size_t
+cpu_count(void)
+{
+ return ap_count + 1;
+}
+
void
cpu_start_aps(struct cpu_info *ci)
{
diff --git a/sys/inc/mu/cpu.h b/sys/inc/mu/cpu.h
index 05637f5..d123f43 100644
--- a/sys/inc/mu/cpu.h
+++ b/sys/inc/mu/cpu.h
@@ -56,6 +56,11 @@ struct cpu_info *cpu_self(void);
struct cpu_info *cpu_get(uint32_t index);
/*
+ * Get the number of processors
+ */
+size_t cpu_count(void);
+
+/*
* Configure a processor core
*/
void cpu_conf(struct cpu_info *ci);