6f92bdd0c1
- The apic interrupt entry points have been rewritten so that each entry point can serve 32 different vectors. When the entry is executed, it uses one of the 32-bit ISR registers to determine which vector in its assigned range was triggered. Thus, the apic code can support 159 different interrupt vectors with only 5 entry points. - We now always to disable the local APIC to work around an errata in certain PPros and then re-enable it again if we decide to use the APICs to route interrupts. - We no longer map IO APICs or local APICs using special page table entries. Instead, we just use pmap_mapdev(). We also no longer export the virtual address of the local APIC as a global symbol to the rest of the system, but only in local_apic.c. To aid this, the APIC ID of each CPU is exported as a per-CPU variable. - Interrupt sources are provided for each intpin on each IO APIC. Currently, each source is given a unique interrupt vector meaning that PCI interrupts are not shared on most machines with an I/O APIC. That mapping for interrupt sources to interrupt vectors is up to the APIC enumerator driver however. - We no longer probe to see if we need to use mixed mode to route IRQ 0, instead we always use mixed mode to route IRQ 0 for now. This can be disabled via the 'NO_MIXED_MODE' kernel option. - The npx(4) driver now always probes to see if a built-in FPU is present since this test can now be performed with the new APIC code. However, an SMP kernel will panic if there is more than one CPU and a built-in FPU is not found. - PCI interrupts are now properly routed when using APICs to route interrupts, so remove the hack to psuedo-route interrupts when the intpin register was read. - The apic.h header was moved to apicreg.h and a new apicvar.h header that declares the APIs used by the new APIC code was added.
53 lines
1.1 KiB
C
53 lines
1.1 KiB
C
/*
|
|
* Kernel interface to machine-dependent clock driver.
|
|
* Garrett Wollman, September 1994.
|
|
* This file is in the public domain.
|
|
*
|
|
* $FreeBSD$
|
|
*/
|
|
|
|
#ifndef _MACHINE_CLOCK_H_
|
|
#define _MACHINE_CLOCK_H_
|
|
|
|
#ifdef _KERNEL
|
|
/*
|
|
* i386 to clock driver interface.
|
|
* XXX large parts of the driver and its interface are misplaced.
|
|
*/
|
|
extern int adjkerntz;
|
|
extern int disable_rtc_set;
|
|
extern int pscnt;
|
|
extern int psdiv;
|
|
extern int statclock_disable;
|
|
extern u_int timer_freq;
|
|
extern int timer0_max_count;
|
|
extern uint64_t tsc_freq;
|
|
extern int tsc_is_broken;
|
|
extern int wall_cmos_clock;
|
|
|
|
/*
|
|
* Driver to clock driver interface.
|
|
*/
|
|
struct clockframe;
|
|
|
|
int acquire_timer2(int mode);
|
|
int release_timer2(void);
|
|
#ifndef PC98
|
|
int rtcin(int val);
|
|
#else
|
|
int acquire_timer1(int mode);
|
|
int release_timer1(void);
|
|
#endif
|
|
#ifndef BURN_BRIDGES
|
|
int acquire_timer0(int rate, void (*function)(struct clockframe *frame));
|
|
int release_timer0(void);
|
|
#endif
|
|
int sysbeep(int pitch, int period);
|
|
void timer_restore(void);
|
|
void init_TSC(void);
|
|
void init_TSC_tc(void);
|
|
|
|
#endif /* _KERNEL */
|
|
|
|
#endif /* !_MACHINE_CLOCK_H_ */
|