os/kernelhwsrv/kernel/eka/include/nkernsmp/x86/apic.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kernel/eka/include/nkernsmp/x86/apic.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,51 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// e32\include\nkernsmp\x86\apic.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#define	X86_LOCAL_APIC_BASE			0xFEE00000
    1.22 +
    1.23 +#define	X86_LOCAL_APIC_OFFSET_ID	0x20
    1.24 +#define	X86_LOCAL_APIC_OFFSET_VER	0x30
    1.25 +#define	X86_LOCAL_APIC_OFFSET_TPR	0x80
    1.26 +#define	X86_LOCAL_APIC_OFFSET_APR	0x90
    1.27 +#define	X86_LOCAL_APIC_OFFSET_PPR	0xA0
    1.28 +#define	X86_LOCAL_APIC_OFFSET_EOI	0xB0
    1.29 +#define	X86_LOCAL_APIC_OFFSET_LDR	0xD0
    1.30 +#define	X86_LOCAL_APIC_OFFSET_DFR	0xE0
    1.31 +#define	X86_LOCAL_APIC_OFFSET_SIVR	0xF0
    1.32 +#define	X86_LOCAL_APIC_OFFSET_ISR	0x100
    1.33 +#define	X86_LOCAL_APIC_OFFSET_TMR	0x180
    1.34 +#define	X86_LOCAL_APIC_OFFSET_IRR	0x200
    1.35 +#define	X86_LOCAL_APIC_OFFSET_ESR	0x280
    1.36 +#define	X86_LOCAL_APIC_OFFSET_ICRL	0x300
    1.37 +#define	X86_LOCAL_APIC_OFFSET_ICRH	0x310
    1.38 +#define	X86_LOCAL_APIC_OFFSET_LVTTMR	0x320
    1.39 +#define	X86_LOCAL_APIC_OFFSET_LVTTSR	0x330
    1.40 +#define	X86_LOCAL_APIC_OFFSET_LVTPMCR	0x340
    1.41 +#define	X86_LOCAL_APIC_OFFSET_LVTLINT0	0x350
    1.42 +#define	X86_LOCAL_APIC_OFFSET_LVTLINT1	0x360
    1.43 +#define	X86_LOCAL_APIC_OFFSET_LVTERR	0x370
    1.44 +#define	X86_LOCAL_APIC_OFFSET_INITCNT	0x380
    1.45 +#define	X86_LOCAL_APIC_OFFSET_CURRCNT	0x390
    1.46 +#define	X86_LOCAL_APIC_OFFSET_DIVCNF	0x3E0
    1.47 +
    1.48 +
    1.49 +
    1.50 +#define	apic_reg(x)				X86_LOCAL_APIC_OFFSET_##x
    1.51 +#define read_apic_reg(x)		*((volatile TUint32*)(X86_LOCAL_APIC_BASE + apic_reg(x)))
    1.52 +#define write_apic_reg(x,y)		*((volatile TUint32*)(X86_LOCAL_APIC_BASE + apic_reg(x))) = (y)
    1.53 +
    1.54 +#define __USE_LOGICAL_DEST_MODE__