smp.h (75393) | smp.h (76078) |
---|---|
1/* 2 * ---------------------------------------------------------------------------- 3 * "THE BEER-WARE LICENSE" (Revision 42): 4 * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you 5 * can do whatever you want with this stuff. If we meet some day, and you think 6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7 * ---------------------------------------------------------------------------- 8 * | 1/* 2 * ---------------------------------------------------------------------------- 3 * "THE BEER-WARE LICENSE" (Revision 42): 4 * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you 5 * can do whatever you want with this stuff. If we meet some day, and you think 6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7 * ---------------------------------------------------------------------------- 8 * |
9 * $FreeBSD: head/sys/amd64/include/smp.h 75393 2001-04-10 21:34:13Z jhb $ | 9 * $FreeBSD: head/sys/amd64/include/smp.h 76078 2001-04-27 19:28:25Z jhb $ |
10 * 11 */ 12 13#ifndef _MACHINE_SMP_H_ 14#define _MACHINE_SMP_H_ 15 16#ifdef _KERNEL 17 --- 18 unchanged lines hidden (view full) --- 36#define POSTCODE_LO(X) current_postcode &= 0xf0, \ 37 current_postcode |= ((X) & 0x0f), \ 38 outb(0x80, current_postcode) 39#define POSTCODE_HI(X) current_postcode &= 0x0f, \ 40 current_postcode |= (((X) << 4) & 0xf0), \ 41 outb(0x80, current_postcode) 42 43 | 10 * 11 */ 12 13#ifndef _MACHINE_SMP_H_ 14#define _MACHINE_SMP_H_ 15 16#ifdef _KERNEL 17 --- 18 unchanged lines hidden (view full) --- 36#define POSTCODE_LO(X) current_postcode &= 0xf0, \ 37 current_postcode |= ((X) & 0x0f), \ 38 outb(0x80, current_postcode) 39#define POSTCODE_HI(X) current_postcode &= 0x0f, \ 40 current_postcode |= (((X) << 4) & 0xf0), \ 41 outb(0x80, current_postcode) 42 43 |
44#include <sys/bus.h> /* XXX */ |
|
44#include <machine/apic.h> | 45#include <machine/apic.h> |
46#include <machine/frame.h> 47#include <i386/isa/icu.h> 48#include <i386/isa/intr_machdep.h> |
|
45 | 49 |
50/* 51 * Interprocessor interrupts for SMP. 52 */ 53#define IPI_INVLTLB XINVLTLB_OFFSET 54#define IPI_RENDEZVOUS XRENDEZVOUS_OFFSET 55#define IPI_AST XCPUAST_OFFSET 56#define IPI_STOP XCPUSTOP_OFFSET 57#define IPI_HARDCLOCK XHARDCLOCK_OFFSET 58#define IPI_STATCLOCK XSTATCLOCK_OFFSET 59 |
|
46/* global data in mpboot.s */ 47extern int bootMP_size; 48 49/* functions in mpboot.s */ 50void bootMP __P((void)); 51 | 60/* global data in mpboot.s */ 61extern int bootMP_size; 62 63/* functions in mpboot.s */ 64void bootMP __P((void)); 65 |
52/* global data in apic_vector.s */ 53extern volatile u_int stopped_cpus; 54extern volatile u_int started_cpus; 55 56extern volatile u_int checkstate_probed_cpus; 57extern volatile u_int checkstate_need_ast; 58extern volatile u_int resched_cpus; 59extern void (*cpustop_restartfunc) __P((void)); 60 | |
61/* global data in mp_machdep.c */ 62extern int bsp_apic_ready; | 66/* global data in mp_machdep.c */ 67extern int bsp_apic_ready; |
63extern int mp_ncpus; | |
64extern int mp_naps; 65extern int mp_nbusses; 66extern int mp_napics; 67extern int mp_picmode; 68extern int boot_cpu_id; 69extern vm_offset_t cpu_apic_address; 70extern vm_offset_t io_apic_address[]; 71extern u_int32_t cpu_apic_versions[]; --- 4 unchanged lines hidden (view full) --- 76#define APIC_INTMAPSIZE 32 77struct apic_intmapinfo { 78 int ioapic; 79 int int_pin; 80 volatile void *apic_address; 81 int redirindex; 82}; 83extern struct apic_intmapinfo int_to_apicintpin[]; | 68extern int mp_naps; 69extern int mp_nbusses; 70extern int mp_napics; 71extern int mp_picmode; 72extern int boot_cpu_id; 73extern vm_offset_t cpu_apic_address; 74extern vm_offset_t io_apic_address[]; 75extern u_int32_t cpu_apic_versions[]; --- 4 unchanged lines hidden (view full) --- 80#define APIC_INTMAPSIZE 32 81struct apic_intmapinfo { 82 int ioapic; 83 int int_pin; 84 volatile void *apic_address; 85 int redirindex; 86}; 87extern struct apic_intmapinfo int_to_apicintpin[]; |
84extern u_int all_cpus; | |
85extern struct pcb stoppcbs[]; 86 87/* functions in mp_machdep.c */ | 88extern struct pcb stoppcbs[]; 89 90/* functions in mp_machdep.c */ |
91void i386_mp_probe __P((void)); |
|
88u_int mp_bootaddress __P((u_int)); | 92u_int mp_bootaddress __P((u_int)); |
89int mp_probe __P((void)); 90void mp_start __P((void)); 91void mp_announce __P((void)); | |
92u_int isa_apic_mask __P((u_int)); 93int isa_apic_irq __P((int)); 94int pci_apic_irq __P((int, int, int)); 95int apic_irq __P((int, int)); 96int next_apic_irq __P((int)); 97int undirect_isa_irq __P((int)); 98int undirect_pci_irq __P((int)); 99int apic_bus_type __P((int)); 100int apic_src_bus_id __P((int, int)); 101int apic_src_bus_irq __P((int, int)); 102int apic_int_type __P((int, int)); 103int apic_trigger __P((int, int)); 104int apic_polarity __P((int, int)); 105void assign_apic_irq __P((int apic, int intpin, int irq)); 106void revoke_apic_irq __P((int irq)); 107void bsp_apic_configure __P((void)); 108void init_secondary __P((void)); 109void smp_invltlb __P((void)); | 93u_int isa_apic_mask __P((u_int)); 94int isa_apic_irq __P((int)); 95int pci_apic_irq __P((int, int, int)); 96int apic_irq __P((int, int)); 97int next_apic_irq __P((int)); 98int undirect_isa_irq __P((int)); 99int undirect_pci_irq __P((int)); 100int apic_bus_type __P((int)); 101int apic_src_bus_id __P((int, int)); 102int apic_src_bus_irq __P((int, int)); 103int apic_int_type __P((int, int)); 104int apic_trigger __P((int, int)); 105int apic_polarity __P((int, int)); 106void assign_apic_irq __P((int apic, int intpin, int irq)); 107void revoke_apic_irq __P((int irq)); 108void bsp_apic_configure __P((void)); 109void init_secondary __P((void)); 110void smp_invltlb __P((void)); |
110int stop_cpus __P((u_int)); 111int restart_cpus __P((u_int)); 112void forward_statclock __P((int pscnt)); 113void forward_hardclock __P((int pscnt)); 114void forward_signal __P((struct proc *)); 115void forward_roundrobin __P((void)); | 111void forward_statclock __P((void)); 112void forwarded_statclock __P((struct trapframe frame)); 113void forward_hardclock __P((void)); 114void forwarded_hardclock __P((struct trapframe frame)); 115void ipi_selected __P((u_int cpus, u_int ipi)); 116void ipi_all __P((u_int ipi)); 117void ipi_all_but_self __P((u_int ipi)); 118void ipi_self __P((u_int ipi)); |
116#ifdef APIC_INTR_REORDER 117void set_lapic_isrloc __P((int, int)); 118#endif /* APIC_INTR_REORDER */ | 119#ifdef APIC_INTR_REORDER 120void set_lapic_isrloc __P((int, int)); 121#endif /* APIC_INTR_REORDER */ |
119void smp_rendezvous_action __P((void)); 120void smp_rendezvous __P((void (*)(void *), 121 void (*)(void *), 122 void (*)(void *), 123 void *arg)); | |
124 125/* global data in mpapic.c */ 126extern volatile lapic_t lapic; 127extern volatile ioapic_t **ioapic; 128 129/* functions in mpapic.c */ 130void apic_dump __P((char*)); 131void apic_initialize __P((void)); --- 10 unchanged lines hidden (view full) --- 142int read_apic_timer __P((void)); 143void u_sleep __P((int)); 144u_int io_apic_read __P((int, int)); 145void io_apic_write __P((int, int, u_int)); 146 147 148/* global data in init_smp.c */ 149extern int invltlb_ok; | 122 123/* global data in mpapic.c */ 124extern volatile lapic_t lapic; 125extern volatile ioapic_t **ioapic; 126 127/* functions in mpapic.c */ 128void apic_dump __P((char*)); 129void apic_initialize __P((void)); --- 10 unchanged lines hidden (view full) --- 140int read_apic_timer __P((void)); 141void u_sleep __P((int)); 142u_int io_apic_read __P((int, int)); 143void io_apic_write __P((int, int, u_int)); 144 145 146/* global data in init_smp.c */ 147extern int invltlb_ok; |
150extern int smp_active; 151extern int smp_started; | |
152extern volatile int smp_idle_loops; 153 154#endif /* !LOCORE */ 155#endif /* SMP && !APIC_IO */ 156 157#endif /* _KERNEL */ 158#endif /* _MACHINE_SMP_H_ */ | 148extern volatile int smp_idle_loops; 149 150#endif /* !LOCORE */ 151#endif /* SMP && !APIC_IO */ 152 153#endif /* _KERNEL */ 154#endif /* _MACHINE_SMP_H_ */ |