Subversion Repositories Kolibri OS

Rev

Rev 1500 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1498 serge 1
 
2
#include 
3
4
 
5
6
 
7
#define ACPI_NS_SYSTEM_BUS      "_SB_"
8
9
 
10
	ACPI_IRQ_MODEL_PIC = 0,
11
	ACPI_IRQ_MODEL_IOAPIC,
12
	ACPI_IRQ_MODEL_IOSAPIC,
13
	ACPI_IRQ_MODEL_PLATFORM,
14
	ACPI_IRQ_MODEL_COUNT
15
};
16
17
 
18
 
19
    (addr_t)((addr_t)(addr) + (addr_t)(off))
20
21
 
22
//    (addr_t)((addr_t)(addr) + OS_BASE)
23
24
 
25
26
 
27
get_device_by_hid_callback(ACPI_HANDLE obj, u32_t depth, void* context,
28
    void** retval)
29
{
30
    static u32_t counter = 0;
31
    static char buff[256];
32
33
 
34
35
 
36
37
 
38
39
 
40
41
 
42
    buffer.Pointer = buff;
43
44
 
45
    if (status != AE_OK) {
46
        return AE_CTRL_TERMINATE;
47
    }
48
49
 
50
51
 
52
53
 
54
    buffer.Pointer = &info;
55
    memset(&info, 0, sizeof(ACPI_DEVICE_INFO));
56
    status = AcpiGetObjectInfo(obj, &buffer.Pointer);
57
58
 
59
    {
60
        dbgprintf (" HID: %s, ADR: %x %x, Status: %x",
61
        info.HardwareId.String,
62
        (UINT32)(info.Address>>32),(UINT32)info.Address,
63
        info.CurrentStatus);
64
    };
65
*/
66
67
 
68
    counter++;
69
70
 
71
}
72
73
 
74
{
75
    ACPI_PCI_ROUTING_TABLE *entry;
76
    char *prtptr;
77
78
 
79
    if (prt == NULL || prt->Pointer == NULL)
80
        return;
81
82
 
83
    prtptr = prt->Pointer;
84
    entry = (ACPI_PCI_ROUTING_TABLE *)prtptr;
85
    while (entry->Length != 0)
86
    {
87
88
 
89
                  (u32_t)entry->Address);
90
        dbgprintf("pin: %d  index: %d  source: %s\n",
91
                   entry->Pin,
92
                   entry->SourceIndex,
93
                   entry->Source);
94
95
 
96
        prtptr += entry->Length;
97
        entry = (ACPI_PCI_ROUTING_TABLE *)prtptr;
98
    }
99
}
100
101
 
102
 
103
 
104
 
105
{
106
    u32_t retval;
107
108
 
109
110
 
111
        return 0;
112
113
 
114
115
 
116
      if (status != AE_OK) {
117
            dbgprintf("AcpiInitializeSubsystem failed (%s)\n",
118
                       AcpiFormatException(status));
119
            goto err;
120
      }
121
122
 
123
      if (status != AE_OK) {
124
            dbgprintf("AcpiInitializeTables failed (%s)\n",
125
                       AcpiFormatException(status));
126
            goto err;
127
      }
128
129
 
130
      if (status != AE_OK) {
131
            dbgprintf("AcpiLoadTables failed (%s)\n",
132
                       AcpiFormatException(status));
133
            goto err;
134
      }
135
136
 
137
138
 
139
    if (status != AE_OK) {
140
        dbgprintf("AcpiEnableSubsystem failed (%s)\n",
141
            AcpiFormatException(status));
142
        goto err;
143
    }
144
145
 
146
    if (ACPI_FAILURE (status))
147
    {
148
        dbgprintf("AcpiInitializeObjects failed (%s)\n",
149
            AcpiFormatException(status));
150
        goto err;
151
    }
152
153
 
154
                      get_device_by_hid_callback, NULL, NULL, NULL);
155
156
 
157
158
 
159
    ACPI_HANDLE bus_handle;
160
    ACPI_HANDLE pci_root;
161
162
 
163
    dbgprintf("system bus handle %x\n", bus_handle);
164
165
 
166
167
 
168
        dbgprintf("AcpiGetHandle failed (%s)\n",
169
            AcpiFormatException(status));
170
        goto err;
171
    }
172
173
 
174
175
 
176
177
 
178
    prt_buffer.Pointer = NULL;
179
180
 
181
182
 
183
        dbgprintf("AcpiGetIrqRoutingTable failed (%s)\n",
184
            AcpiFormatException(status));
185
        goto err;
186
    }
187
188
 
189
190
 
191
 
192
    ACPI_OBJECT_LIST arg_list = { 1, &arg };
193
194
 
195
196
 
197
198
 
199
200
 
201
        dbgprintf("AcpiEvaluateObject failed (%s)\n",
202
            AcpiFormatException(status));
203
 //       goto err;
204
    }
205
206
 
207
 
208
209
 
210
        dbgprintf("AcpiGetIrqRoutingTable failed (%s)\n",
211
            AcpiFormatException(status));
212
        goto err;
213
    }
214
215
 
216
217
 
218
    dbgprintf("bus 0 device 31 function 1 pin %d\n", pin-1);
219
220
 
221
    dbgprintf("bus 0 device 31 function 2 pin %d\n", pin-1);
222
223
 
224
    dbgprintf("bus 0 device 31 function 3 pin %d\n", pin-1);
225
226
 
227
    dbgprintf("bus 0 device 31 function 4 pin %d\n", pin-1);
228
229
 
230
    dbgprintf("bus 0 device 31 function 5 pin %d\n", pin-1);
231
232
 
233
    dbgprintf("bus 0 device 31 function 6 pin %d\n", pin-1);
234
235
 
236
    dbgprintf("bus 0 device 31 function 7 pin %d\n", pin-1);
237
#endif
238
239
 
240
241
 
242
243
 
244