summaryrefslogtreecommitdiffstats
path: root/private/ntos/nthals/haltimbr/alpha/eb164.h
blob: 700aa4e346dc6e3b68252a4929cd05dad5f3f0f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*++

Copyright (c) 1994  Digital Equipment Corporation

Module Name:

    eb164.h

Abstract:

    This file contains definitions specific to the EB164 platform.

Author:

    Joe Notarangelo 06-Sep-1994

Environment:

    Kernel mode

Revision History:


--*/

#ifndef _EB164H_
#define _EB164H_

//
// Include definitions for the components that make up EB164.
//

#include "axp21164.h"               // 21164 (EV5) microprocessor definitions
#include "cia.h"                    // CIA controller definitions

//
// Define number of PCI, ISA, and combo slots
//

#define NUMBER_ISA_SLOTS 3
#define NUMBER_PCI_SLOTS 4
#define NUMBER_COMBO_SLOTS 1

//
// PCI bus address values:
//

#define PCI_MAX_LOCAL_DEVICE        (PCI_MAX_DEVICES - 1)
#define PCI_MAX_INTERRUPT_VECTOR    (MAXIMUM_PCI_VECTOR - PCI_VECTORS)
#define PCI_MAX_INTERRUPT           (0x15)

//
// Define numbers and names of cpus.
//

#define HAL_PRIMARY_PROCESSOR ((ULONG)0)
#define HAL_MAXIMUM_PROCESSOR ((ULONG)0)

//
// Define default processor frequency.
//

#define DEFAULT_PROCESSOR_FREQUENCY_MHZ (250)

//
// Define EB164-specific routines that are really macros for performance.
//

#define HalpAcknowledgeEisaInterrupt(x) INTERRUPT_ACKNOWLEDGE(x)

//
// Define the per-processor data structures allocated in the PCR.
//

typedef struct _EB164_PCR{
    ULONGLONG       HalpCycleCount;         // 64-bit per-processor cycle count
    ULONG           Reserved[3];            // Pad ProfileCount to offset 20
    EV5ProfileCount ProfileCount;           // Profile counter state
    } EB164_PCR, *PEB164_PCR;

#define HAL_PCR ( (PEB164_PCR)(&(PCR->HalReserved)) )

//
// Define the locations of the interrupt mask registers.
//

#define INTERRUPT_MASK0_QVA \
    ((ULONG)HAL_MAKE_QVA(CIA_PCI_SPARSE_IO_PHYSICAL) + 0x804)
#define INTERRUPT_MASK1_QVA \
    ((ULONG)HAL_MAKE_QVA(CIA_PCI_SPARSE_IO_PHYSICAL) + 0x805)
#define INTERRUPT_MASK2_QVA \
    ((ULONG)HAL_MAKE_QVA(CIA_PCI_SPARSE_IO_PHYSICAL) + 0x806)

//
// Define the location of the flash environment block
//

#define NVRAM_ENVIRONMENT_QVA \
    ((ULONG)HAL_MAKE_QVA(CIA_PCI_SPARSE_MEMORY_PHYSICAL) + 0xf0000)

#define CIA_MCR_QVA ((ULONG)HAL_MAKE_QVA(CIA_MEMORY_CSRS_PHYSICAL))

//
// Define EB164 SIO dispatch
//
BOOLEAN
HalpEB164SioDispatch(
    PKINTERRUPT Interrupt,
    PVOID ServiceContext,
    PKTRAP_FRAME TrapFrame
    );

typedef BOOLEAN (*PEB164_SECOND_LEVEL_DISPATCH)(
    PKINTERRUPT Interrupt,
    PVOID ServiceContext,
    PKTRAP_FRAME TrapFrame
    );

#endif //_EB164H_