diff options
Diffstat (limited to 'sys/include/arch/amd64')
-rw-r--r-- | sys/include/arch/amd64/cpu.h | 6 | ||||
-rw-r--r-- | sys/include/arch/amd64/intr.h | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sys/include/arch/amd64/cpu.h b/sys/include/arch/amd64/cpu.h index 46e5df7..a047cef 100644 --- a/sys/include/arch/amd64/cpu.h +++ b/sys/include/arch/amd64/cpu.h @@ -33,6 +33,7 @@ #include <sys/types.h> #include <sys/cdefs.h> #include <sys/proc.h> +#include <sys/sched.h> #include <sys/spinlock.h> #include <machine/tss.h> @@ -45,12 +46,15 @@ struct cpu_info { uint32_t apicid; uint32_t feat; + uint8_t model : 4; /* CPU model number */ + uint8_t family : 4; /* CPU family ID */ uint8_t has_x2apic : 1; uint8_t tlb_shootdown : 1; uint8_t ipl; size_t lapic_tmr_freq; uint8_t irq_mask; vaddr_t shootdown_va; + struct sched_cpu stat; struct tss_entry *tss; struct proc *curtd; struct spinlock lock; @@ -65,6 +69,8 @@ void cpu_enable_smep(void); void cpu_disable_smep(void); struct cpu_info *cpu_get(uint32_t index); +struct sched_cpu *cpu_get_stat(uint32_t cpu_index); + uint32_t cpu_count(void); void cpu_shootdown_tlb(vaddr_t va); diff --git a/sys/include/arch/amd64/intr.h b/sys/include/arch/amd64/intr.h index c848b6f..1877d20 100644 --- a/sys/include/arch/amd64/intr.h +++ b/sys/include/arch/amd64/intr.h @@ -69,9 +69,11 @@ struct intr_data { * [r]: Required for intr_register() * [o]: Not required for intr_register() * [v]: Returned by intr_register() + * [i]: Internal * * @func: The actual handler [r] * @data: Interrupt data [o/v] + * @nintr: Number of times it fired [o] * @name: Interrupt name [v] * @priority: Interrupt priority [r] * @irq: Interrupt request number [o] @@ -91,6 +93,7 @@ struct intr_data { */ struct intr_hand { int(*func)(void *); + size_t nintr; struct intr_data data; char *name; int priority; |