kernel/eka/include/nkernsmp/x86/apic.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // e32\include\nkernsmp\x86\apic.h
       
    15 // 
       
    16 //
       
    17 
       
    18 #define	X86_LOCAL_APIC_BASE			0xFEE00000
       
    19 
       
    20 #define	X86_LOCAL_APIC_OFFSET_ID	0x20
       
    21 #define	X86_LOCAL_APIC_OFFSET_VER	0x30
       
    22 #define	X86_LOCAL_APIC_OFFSET_TPR	0x80
       
    23 #define	X86_LOCAL_APIC_OFFSET_APR	0x90
       
    24 #define	X86_LOCAL_APIC_OFFSET_PPR	0xA0
       
    25 #define	X86_LOCAL_APIC_OFFSET_EOI	0xB0
       
    26 #define	X86_LOCAL_APIC_OFFSET_LDR	0xD0
       
    27 #define	X86_LOCAL_APIC_OFFSET_DFR	0xE0
       
    28 #define	X86_LOCAL_APIC_OFFSET_SIVR	0xF0
       
    29 #define	X86_LOCAL_APIC_OFFSET_ISR	0x100
       
    30 #define	X86_LOCAL_APIC_OFFSET_TMR	0x180
       
    31 #define	X86_LOCAL_APIC_OFFSET_IRR	0x200
       
    32 #define	X86_LOCAL_APIC_OFFSET_ESR	0x280
       
    33 #define	X86_LOCAL_APIC_OFFSET_ICRL	0x300
       
    34 #define	X86_LOCAL_APIC_OFFSET_ICRH	0x310
       
    35 #define	X86_LOCAL_APIC_OFFSET_LVTTMR	0x320
       
    36 #define	X86_LOCAL_APIC_OFFSET_LVTTSR	0x330
       
    37 #define	X86_LOCAL_APIC_OFFSET_LVTPMCR	0x340
       
    38 #define	X86_LOCAL_APIC_OFFSET_LVTLINT0	0x350
       
    39 #define	X86_LOCAL_APIC_OFFSET_LVTLINT1	0x360
       
    40 #define	X86_LOCAL_APIC_OFFSET_LVTERR	0x370
       
    41 #define	X86_LOCAL_APIC_OFFSET_INITCNT	0x380
       
    42 #define	X86_LOCAL_APIC_OFFSET_CURRCNT	0x390
       
    43 #define	X86_LOCAL_APIC_OFFSET_DIVCNF	0x3E0
       
    44 
       
    45 
       
    46 
       
    47 #define	apic_reg(x)				X86_LOCAL_APIC_OFFSET_##x
       
    48 #define read_apic_reg(x)		*((volatile TUint32*)(X86_LOCAL_APIC_BASE + apic_reg(x)))
       
    49 #define write_apic_reg(x,y)		*((volatile TUint32*)(X86_LOCAL_APIC_BASE + apic_reg(x))) = (y)
       
    50 
       
    51 #define __USE_LOGICAL_DEST_MODE__