+processor_t
+cpu_processor_alloc(boolean_t is_boot_cpu)
+{
+ int ret;
+ processor_t proc;
+
+ if (is_boot_cpu)
+ return &processor_master;
+
+ ret = kmem_alloc(kernel_map, (vm_offset_t *) &proc, sizeof(*proc));
+ if (ret != KERN_SUCCESS)
+ return NULL;
+
+ bzero((void *) proc, sizeof(*proc));
+ return proc;
+}
+
+void
+cpu_processor_free(processor_t proc)
+{
+ if (proc != NULL && proc != &processor_master)
+ kfree((void *) proc, sizeof(*proc));
+}
+
+processor_t
+current_processor(void)
+{
+ return current_cpu_datap()->cpu_processor;
+}
+
+processor_t
+cpu_to_processor(
+ int cpu)
+{
+ return cpu_datap(cpu)->cpu_processor;
+}
+
+ast_t *
+ast_pending(void)
+{
+ return (¤t_cpu_datap()->cpu_pending_ast);
+}
+
+cpu_type_t
+slot_type(
+ int slot_num)
+{
+ return (cpu_datap(slot_num)->cpu_type);
+}
+
+cpu_subtype_t
+slot_subtype(
+ int slot_num)
+{
+ return (cpu_datap(slot_num)->cpu_subtype);
+}
+
+cpu_threadtype_t
+slot_threadtype(
+ int slot_num)
+{
+ return (cpu_datap(slot_num)->cpu_threadtype);
+}
+
+cpu_type_t
+cpu_type(void)
+{
+ return (current_cpu_datap()->cpu_type);
+}
+
+cpu_subtype_t
+cpu_subtype(void)
+{
+ return (current_cpu_datap()->cpu_subtype);
+}
+
+cpu_threadtype_t
+cpu_threadtype(void)
+{
+ return (current_cpu_datap()->cpu_threadtype);
+}