Ignore:
Timestamp:
Jun 28, 2017, 1:23:51 PM (7 years ago)
Author:
max@…
Message:

Rename a certain number of things, and improve the APIC support.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_apic.h

    r81 r82  
    11/*
    2  * hal_lapic.h - Local APIC values
    3  * 
     2 * hal_apic.h - APIC values (for LAPIC and IOAPIC)
     3 *
    44 * Copyright (c) 2017 Maxime Villard
    5  * 
     5 *
    66 * This file is part of ALMOS-MKH.
    77 *
     
    2121
    2222uint32_t hal_lapic_gid();
    23 void hal_lapic_init();
     23void hal_apic_init();
    2424
    2525#define LAPIC_SPURIOUS_VECTOR   LAPICVEC_MIN
     
    103103#define LAPIC_ICRHI     0x310           /* Int. cmd. RW */
    104104
    105 #define LAPIC_LVTT      0x320           /* Loc.vec.(timer) RW */
    106 #       define LAPIC_LVTT_VEC_MASK      0x000000ff
    107 #       define LAPIC_LVTT_DS            0x00001000
    108 #       define LAPIC_LVTT_M             0x00010000
    109 #       define LAPIC_LVTT_TM            0x00020000
     105#define LAPIC_LVT_TMR   0x320           /* Loc.vec.(timer) RW */
     106#       define LAPIC_TMR_VEC_MASK       0x000000ff
     107#       define LAPIC_TMR_DS             0x00001000
     108#       define LAPIC_TMR_M              0x00010000
     109#       define LAPIC_TMR_TM             0x00020000
    110110
    111 #define LAPIC_TMINT     0x330           /* Loc.vec (Thermal) RW */
    112 #define LAPIC_PCINT     0x340           /* Loc.vec (Perf Mon) RW */
    113 #define LAPIC_LVINT0    0x350           /* Loc.vec (LINT0) RW */
    114 #       define LAPIC_LVT_DM_MASK        0x00000700
    115 #       define LAPIC_LVT_DM_FIXED       0x00000000
    116 #       define LAPIC_LVT_DM_SMI         0x00000200
    117 #       define LAPIC_LVT_DM_NMI         0x00000400
    118 #       define LAPIC_LVT_DM_INIT        0x00000500
    119 #       define LAPIC_LVT_DM_EXTINT      0x00000700
    120 #       define LAPIC_LVT_MASKED         0x00010000
    121 #       define LAPIC_LVT_LEVTRIG        0x00008000
    122 #       define LAPIC_LVT_REMOTE_IRR     0x00004000
    123 #       define LAPIC_INP_POL            0x00002000
    124 #       define LAPIC_PEND_SEND          0x00001000
     111#define LAPIC_LVT_THM   0x330           /* Loc.vec (Thermal) RW */
     112#       define LAPIC_THM_MT_MASK        0x00000700
     113#       define LAPIC_THM_MT_FIXED       0x00000000
     114#       define LAPIC_THM_MT_SMI         0x00000200
     115#       define LAPIC_THM_MT_NMI         0x00000400
     116#       define LAPIC_THM_MT_INIT        0x00000500
     117#       define LAPIC_THM_MT_EXTINT      0x00000700
     118#       define LAPIC_THM_DS             0x00001000
     119#       define LAPIC_THM_M              0x00010000
    125120
    126 #define LAPIC_LVINT1    0x360           /* Loc.vec (LINT1) RW */
    127 #define LAPIC_LVERR     0x370           /* Loc.vec (ERROR) RW */
     121#define LAPIC_LVT_PMC   0x340           /* Loc.vec (Perf Mon) RW */
     122#       define LAPIC_PMC_MT_MASK        0x00000700
     123#       define LAPIC_PMC_MT_FIXED       0x00000000
     124#       define LAPIC_PMC_MT_SMI         0x00000200
     125#       define LAPIC_PMC_MT_NMI         0x00000400
     126#       define LAPIC_PMC_MT_INIT        0x00000500
     127#       define LAPIC_PMC_MT_EXTINT      0x00000700
     128#       define LAPIC_PMC_DS             0x00001000
     129#       define LAPIC_PMC_M              0x00010000
     130
     131#define LAPIC_LVT_LINT0 0x350           /* Loc.vec (LINT0) RW */
     132#define LAPIC_LVT_LINT1 0x360           /* Loc.vec (LINT1) RW */
     133#       define LAPIC_LINT_MT_MASK       0x00000700
     134#       define LAPIC_LINT_MT_FIXED      0x00000000
     135#       define LAPIC_LINT_MT_SMI        0x00000200
     136#       define LAPIC_LINT_MT_NMI        0x00000400
     137#       define LAPIC_LINT_MT_INIT       0x00000500
     138#       define LAPIC_LINT_MT_EXTINT     0x00000700
     139#       define LAPIC_LINT_DS            0x00001000
     140#       define LAPIC_LINT_RIR           0x00004000
     141#       define LAPIC_LINT_TGM           0x00008000
     142#       define LAPIC_LINT_M             0x00010000
     143
     144#define LAPIC_LVT_ERR   0x370           /* Loc.vec (ERROR) RW */
     145#       define LAPIC_ERR_MT_MASK        0x00000700
     146#       define LAPIC_ERR_MT_FIXED       0x00000000
     147#       define LAPIC_ERR_MT_SMI         0x00000200
     148#       define LAPIC_ERR_MT_NMI         0x00000400
     149#       define LAPIC_ERR_MT_INIT        0x00000500
     150#       define LAPIC_ERR_MT_EXTINT      0x00000700
     151#       define LAPIC_ERR_DS             0x00001000
     152#       define LAPIC_ERR_M              0x00010000
     153
    128154#define LAPIC_ICR_TIMER 0x380           /* Initial count RW */
    129155#define LAPIC_CCR_TIMER 0x390           /* Current count RO */
Note: See TracChangeset for help on using the changeset viewer.