1 | /** |
---|
2 | * @file rtems/score/idtr.h |
---|
3 | */ |
---|
4 | |
---|
5 | /* |
---|
6 | * This file contains definitions for data structure related |
---|
7 | * to Intel system programming. More information can be found |
---|
8 | * on Intel site and more precisely in the following book : |
---|
9 | * |
---|
10 | * Pentium Processor familly |
---|
11 | * Developper's Manual |
---|
12 | * |
---|
13 | * Volume 3 : Architecture and Programming Manual |
---|
14 | * |
---|
15 | * Formerly contained in and extracted from libcpu/i386/cpu.h. |
---|
16 | * |
---|
17 | * Copyright (C) 1998 Eric Valette (valette@crf.canon.fr) |
---|
18 | * Canon Centre Recherche France. |
---|
19 | * |
---|
20 | * The license and distribution terms for this file may be |
---|
21 | * found in found in the file LICENSE in this distribution or at |
---|
22 | * http://www.rtems.com/license/LICENSE. |
---|
23 | * |
---|
24 | * $Id$ |
---|
25 | * |
---|
26 | * Applications must not include this file directly. |
---|
27 | */ |
---|
28 | |
---|
29 | #ifndef _RTEMS_SCORE_IDTR_H |
---|
30 | #define _RTEMS_SCORE_IDTR_H |
---|
31 | |
---|
32 | /* |
---|
33 | * See page 14.9 Figure 14-2. |
---|
34 | * |
---|
35 | */ |
---|
36 | typedef struct |
---|
37 | { |
---|
38 | unsigned int low_offsets_bits:16; |
---|
39 | unsigned int segment_selector:16; |
---|
40 | unsigned int fixed_value_bits:8; |
---|
41 | unsigned int gate_type:5; |
---|
42 | unsigned int privilege:2; |
---|
43 | unsigned int present:1; |
---|
44 | unsigned int high_offsets_bits:16; |
---|
45 | } interrupt_gate_descriptor; |
---|
46 | |
---|
47 | /* |
---|
48 | * C callable function enabling to create a interrupt_gate_descriptor |
---|
49 | */ |
---|
50 | extern void create_interrupt_gate_descriptor (interrupt_gate_descriptor*, rtems_raw_irq_hdl); |
---|
51 | |
---|
52 | /* |
---|
53 | * C callable function enabling to get easily usable info from |
---|
54 | * the actual value of IDT register. |
---|
55 | */ |
---|
56 | extern void i386_get_info_from_IDTR (interrupt_gate_descriptor** table, |
---|
57 | unsigned* limit); |
---|
58 | |
---|
59 | /* |
---|
60 | * C callable function enabling to change the value of IDT register. Must be called |
---|
61 | * with interrupts masked at processor level!!!. |
---|
62 | */ |
---|
63 | extern void i386_set_IDTR (interrupt_gate_descriptor* table, |
---|
64 | unsigned limit); |
---|
65 | |
---|
66 | #endif |
---|