summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/apicreg.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-06-22 16:04:22 +0000
committerpeter <peter@FreeBSD.org>1997-06-22 16:04:22 +0000
commit2dc5ff96e76a38f1a5ffd4c22e350c882f7592eb (patch)
tree281c7f0e4899a210947f7dfa14231536350272d2 /sys/amd64/include/apicreg.h
parente0245a10b266a1abf80916d730d18966653de374 (diff)
downloadFreeBSD-src-2dc5ff96e76a38f1a5ffd4c22e350c882f7592eb.zip
FreeBSD-src-2dc5ff96e76a38f1a5ffd4c22e350c882f7592eb.tar.gz
Preliminary support for per-cpu data pages.
This eliminates a lot of #ifdef SMP type code. Things like _curproc reside in a data page that is unique on each cpu, eliminating the expensive macros like: #define curproc (SMPcurproc[cpunumber()]) There are some unresolved bootstrap and address space sharing issues at present, but Steve is waiting on this for other work. There is still some strictly temporary code present that isn't exactly pretty. This is part of a larger change that has run into some bumps, this part is standalone so it should be safe. The temporary code goes away when the full idle cpu support is finished. Reviewed by: fsmp, dyson
Diffstat (limited to 'sys/amd64/include/apicreg.h')
-rw-r--r--sys/amd64/include/apicreg.h113
1 files changed, 1 insertions, 112 deletions
diff --git a/sys/amd64/include/apicreg.h b/sys/amd64/include/apicreg.h
index 1d92faf..8e7f2a8 100644
--- a/sys/amd64/include/apicreg.h
+++ b/sys/amd64/include/apicreg.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: apic.h,v 1.1 1997/05/28 19:43:45 smp Exp smp $
+ * $Id: apic.h,v 1.3 1997/05/29 05:57:43 fsmp Exp $
*/
#ifndef _MACHINE_APIC_H_
@@ -223,76 +223,6 @@ typedef struct IOAPIC ioapic_t;
/* default physical locations of LOCAL (CPU) APICs */
#define DEFAULT_APIC_BASE 0xfee00000
-# if defined(LOCORE)
-
-#define APIC_ID 0x020
-#define APIC_VER 0x030
-#define APIC_TPR 0x080
-#define APIC_APR 0x090
-#define APIC_PPR 0x0a0
-#define APIC_EOI 0x0b0
-#define APIC_RR 0x0c0
-#define APIC_LDR 0x0d0
-#define APIC_DFR 0x0e0
-#define APIC_SVR 0x0f0
-#define APIC_ISR 0x100
-#define APIC_ISR0 0x100
-#define APIC_ISR1 0x110
-#define APIC_ISR2 0x120
-#define APIC_TMR 0x180
-#define APIC_IRR 0x200
-#define APIC_IRR0 0x200
-#define APIC_IRR1 0x210
-#define APIC_IRR2 0x220
-#define APIC_ESR 0x280
-#define APIC_ICR_LOW 0x300
-#define APIC_ICR_HI 0x310
-#define APIC_LVTT 0x320
-#define APIC_LVT1 0x350
-#define APIC_LVT2 0x360
-#define APIC_LVT3 0x370
-#define APIC_TICR 0x380
-#define APIC_TCCR 0x390
-#define APIC_TDCR 0x3e0
-
-# else /* !LOCORE */
-
-#if 0 /** XXX APIC_STRUCT */
-/* offsets in apic_base[] */
-#define APIC_ID (0x020/4)
-#define APIC_VER (0x030/4)
-#define APIC_TPR (0x080/4)
-#define APIC_APR (0x090/4)
-#define APIC_PPR (0x0a0/4)
-#define APIC_EOI (0x0b0/4)
-#define APIC_RR (0x0c0/4)
-#define APIC_LDR (0x0d0/4)
-#define APIC_DFR (0x0e0/4)
-#define APIC_SVR (0x0f0/4)
-#define APIC_ISR (0x100/4)
-#define APIC_ISR0 (0x100/4)
-#define APIC_ISR1 (0x110/4)
-#define APIC_ISR2 (0x120/4)
-#define APIC_TMR (0x180/4)
-#define APIC_IRR (0x200/4)
-#define APIC_IRR0 (0x200/4)
-#define APIC_IRR1 (0x210/4)
-#define APIC_IRR2 (0x220/4)
-#define APIC_ESR (0x280/4)
-#define APIC_ICR_LOW (0x300/4)
-#define APIC_ICR_HI (0x310/4)
-#define APIC_LVTT (0x320/4)
-#define APIC_LVT1 (0x350/4)
-#define APIC_LVT2 (0x360/4)
-#define APIC_LVT3 (0x370/4)
-#define APIC_TICR (0x380/4)
-#define APIC_TCCR (0x390/4)
-#define APIC_TDCR (0x3e0/4)
-#endif /** XXX APIC_STRUCT */
-
-# endif /* LOCORE */
-
-
/* fields in VER */
#define APIC_VER_VERSION 0x000000ff
#define APIC_VER_MAXLVT 0x00ff0000
@@ -501,45 +431,4 @@ typedef struct IOAPIC ioapic_t;
#define IOART_INTVEC 0x000000ff /* R/W: INTerrupt vector field */
-/**
- * XXX FIXME: temproary defines till we get private pages...
- */
-#if 1 /** XXX APIC_STRUCT */
-
-/* XXX when automatically mapped to a virtual page */
-#define lapic__id lapic->id
-#define lapic__version lapic->version
-#define lapic__eoi lapic->eoi
-#define lapic__irr1 lapic->irr1
-#define lapic__lvt_lint0 lapic->lvt_lint0
-#define lapic__lvt_lint1 lapic->lvt_lint1
-#define lapic__tpr lapic->tpr
-#define lapic__svr lapic->svr
-#define lapic__icr_lo lapic->icr_lo
-#define lapic__icr_hi lapic->icr_hi
-#define lapic__dcr_timer lapic->dcr_timer
-#define lapic__lvt_timer lapic->lvt_timer
-#define lapic__icr_timer lapic->icr_timer
-#define lapic__ccr_timer lapic->ccr_timer
-
-#else
-
-/* XXX when mapped to a known virtual address */
-#define lapic__id lapic.id
-#define lapic__version lapic.version
-#define lapic__eoi lapic.eoi
-#define lapic__irr1 lapic.irr1
-#define lapic__lvt_lint0 lapic.lvt_lint0
-#define lapic__lvt_lint1 lapic.lvt_lint1
-#define lapic__tpr lapic.tpr
-#define lapic__svr lapic.svr
-#define lapic__icr_lo lapic.icr_lo
-#define lapic__icr_hi lapic.icr_hi
-#define lapic__dcr_timer lapic.dcr_timer
-#define lapic__lvt_timer lapic.lvt_timer
-#define lapic__icr_timer lapic.icr_timer
-#define lapic__ccr_timer lapic.ccr_timer
-
-#endif /** XXX APIC_STRUCT */
-
#endif /* _MACHINE_APIC_H_ */
OpenPOWER on IntegriCloud