35#ifndef _RTEMS_OPENPIC_H
36#define _RTEMS_OPENPIC_H
41#define OPENPIC_MAX_SOURCES 2048
42#define OPENPIC_MAX_PROCESSORS 32
44#define OPENPIC_NUM_TIMERS 4
45#define OPENPIC_NUM_IPI 4
46#define OPENPIC_NUM_PRI 16
47#define OPENPIC_NUM_VECTORS 256
53#define OPENPIC_VEC_SOURCE 0x10
54#define OPENPIC_VEC_TIMER 0x40
55#define OPENPIC_VEC_IPI 0x50
56#define OPENPIC_VEC_SPURIOUS 99
75 unsigned int IPI0_Dispatch_Shadow;
77 unsigned int IPI0_Vector_Priority_Shadow;
188#define OPENPIC_CURRENT_TASK_PRIORITY_MASK 0x0000000f
194#define OPENPIC_WHO_AM_I_ID_MASK 0x0000001f
200#define OPENPIC_FEATURE_LAST_SOURCE_MASK 0x07ff0000
201#define OPENPIC_FEATURE_LAST_SOURCE_SHIFT 16
202#define OPENPIC_FEATURE_LAST_PROCESSOR_MASK 0x00001f00
203#define OPENPIC_FEATURE_LAST_PROCESSOR_SHIFT 8
204#define OPENPIC_FEATURE_VERSION_MASK 0x000000ff
210#define OPENPIC_CONFIG_RESET 0x80000000
211#define OPENPIC_CONFIG_8259_PASSTHROUGH_DISABLE 0x20000000
212#define OPENPIC_CONFIG_BASE_MASK 0x000fffff
218#define OPENPIC_VENDOR_ID_STEPPING_MASK 0x00ff0000
219#define OPENPIC_VENDOR_ID_STEPPING_SHIFT 16
220#define OPENPIC_VENDOR_ID_DEVICE_ID_MASK 0x0000ff00
221#define OPENPIC_VENDOR_ID_DEVICE_ID_SHIFT 8
222#define OPENPIC_VENDOR_ID_VENDOR_ID_MASK 0x000000ff
228#define OPENPIC_MASK 0x80000000
229#define OPENPIC_ACTIVITY 0x40000000
230#define OPENPIC_PRIORITY_MASK 0x000f0000
231#define OPENPIC_PRIORITY_SHIFT 16
232#define OPENPIC_VECTOR_MASK 0x000000ff
238#define OPENPIC_SENSE_POLARITY 0x00800000
239#define OPENPIC_SENSE_LEVEL 0x00400000
245#define OPENPIC_COUNT_MASK 0x7fffffff
246#define OPENPIC_TIMER_TOGGLE 0x80000000
247#define OPENPIC_TIMER_COUNT_INHIBIT 0x80000000
254#define IPI_Dispatch(i) _IPI_Dispatch[i].Reg
255#define Current_Task_Priority _Current_Task_Priority.Reg
256#define Interrupt_Acknowledge _Interrupt_Acknowledge.Reg
260#define Feature_Reporting0 _Feature_Reporting0.Reg
261#define Feature_Reporting1 _Feature_Reporting1.Reg
262#define Global_Configuration0 _Global_Configuration0.Reg
263#define Global_Configuration1 _Global_Configuration1.Reg
264#define Vendor_Specific(i) _Vendor_Specific[i].Reg
265#define Vendor_Identification _Vendor_Identification.Reg
266#define Processor_Initialization _Processor_Initialization.Reg
267#define IPI_Vector_Priority(i) _IPI_Vector_Priority[i].Reg
268#define Spurious_Vector _Spurious_Vector.Reg
269#define Timer_Frequency _Timer_Frequency.Reg
272#define Current_Count _Current_Count.Reg
273#define Base_Count _Base_Count.Reg
274#define Vector_Priority _Vector_Priority.Reg
275#define Destination _Destination.Reg
278#define Vector_Priority _Vector_Priority.Reg
279#define Destination _Destination.Reg
285#define OPENPIC_VENDOR_ID_APPLE 0x14
286#define OPENPIC_DEVICE_ID_APPLE_HYDRA 0x46
321extern unsigned openpic_set_eoi_delay(
unsigned tb_cycles);
345extern void openpic_init(
int main_pic,
unsigned char *polarities,
unsigned char *senses,
int num_sources,
int source_offset,
unsigned long epic_freq);
347extern void openpic_reset(
void);
348extern void openpic_enable_8259_pass_through(
void);
349extern void openpic_disable_8259_pass_through(
void);
350extern unsigned int openpic_irq(
unsigned int cpu);
351extern void openpic_eoi(
unsigned int cpu);
352extern unsigned int openpic_get_priority(
unsigned int cpu);
353extern void openpic_set_priority(
unsigned int cpu,
unsigned int pri);
354extern unsigned int openpic_get_spurious(
void);
355extern void openpic_set_spurious(
unsigned int vector);
356extern void openpic_init_processor(
unsigned int cpumask);
359extern void openpic_initipi(
unsigned int ipi,
unsigned int pri,
unsigned int vector);
360extern void openpic_cause_IPI(
unsigned int cpu,
unsigned int ipi,
unsigned int cpumask);
363extern void openpic_inittimer(
unsigned int timer,
unsigned int pri,
unsigned int vector);
364extern void openpic_settimer(
unsigned int timer,
unsigned int base_count,
int irq_enable);
365extern unsigned int openpic_gettimer(
unsigned int timer);
366extern void openpic_maptimer(
unsigned int timer,
unsigned int cpumask);
369extern void openpic_enable_irq(
unsigned int irq);
370extern int openpic_disable_irq(
unsigned int irq);
371extern void openpic_initirq(
unsigned int irq,
unsigned int pri,
unsigned int vector,
int polarity,
373extern void openpic_mapirq(
unsigned int irq,
unsigned int cpumask);
374extern void openpic_set_sense(
unsigned int irq,
int sense);
375extern unsigned int openpic_get_source_priority(
unsigned int irq);
376extern void openpic_set_source_priority(
unsigned int irq,
unsigned int pri);
Definition: openpic.h:166
Definition: openpic.h:114
Definition: openpic.h:157
Definition: openpic.h:103