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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
|
From: Al Stone <ahs3@ahs3.net>
Date: Mon, 7 Apr 2014 19:09:37 +0000
Subject: [PATCH 1/2] Fixup aapits build
From http://git.linaro.org/people/al.stone/acpica-tools.git
Upstream-Status: Pending
diff -urN acpica-unix2-20130626/tests/aapits/atexec.c acpica-unix2-20130626-aapits/tests/aapits/atexec.c
--- acpica-unix2-20130626/tests/aapits/atexec.c 2013-01-17 12:48:28.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/atexec.c 2013-07-25 13:44:23.023894441 -0600
@@ -639,6 +639,7 @@
}
+#if ACPI_MACHINE_WIDTH == 32
/*******************************************************************************
*
* FUNCTION: AtBuildLocalRSDT
@@ -757,8 +758,9 @@
LocalRSDT->Header.Checksum = (UINT8)~LocalRSDT->Header.Checksum;
}
}
+#endif
/*******************************************************************************
*
* FUNCTION: AtBuildLocalXSDT
@@ -1424,7 +1426,7 @@
ACPI_WARNING ((AE_INFO,
"Request on [%4.4s] is beyond region limit Req-%X+%X, Base=%X, Len-%X\n",
(RegionObject->Region.Node)->Name.Ascii, (UINT32) Address,
- ByteWidth, (UINT32) BufferAddress, Length));
+ ByteWidth, (UINT32) BufferAddress, (UINT32) Length));
return (AE_AML_REGION_LIMIT);
}
@@ -1792,7 +1796,9 @@
Path, Obj.Integer.Value, Value);
#else
printf ("API Error: Value of %s is 0x%llx instead of expected 0x%llx\n",
- Path, Obj.Integer.Value, Value);
+ Path,
+ (long long unsigned int) Obj.Integer.Value,
+ (long long unsigned int) Value);
#endif
Status = AE_ERROR;
}
@@ -1871,7 +1877,7 @@
{
TestErrors++;
printf ("Test Error: cannot allocate buffer of %d bytes\n",
- Results.Length);
+ (int) Results.Length);
return (AE_NO_MEMORY);
}
Results.Pointer = Object;
@@ -1952,7 +1956,8 @@
{
printf ("AtCheckBuffer: unexpected length %d of Buffer vs"
" calculated %d bytes\n",
- Results.Length, ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof (ACPI_OBJECT) + Length));
+ (int)Results.Length,
+ (int)(ACPI_ROUND_UP_TO_NATIVE_WORD(sizeof (ACPI_OBJECT) + Length)));
}
/* Initialize the return buffer structure */
@@ -1961,7 +1968,7 @@
{
TestErrors++;
printf ("Test Error: cannot allocate buffer of %d bytes\n",
- Results.Length);
+ (int) Results.Length);
return (AE_NO_MEMORY);
}
Results.Pointer = Object;
diff -urN acpica-unix2-20130626/tests/aapits/atinit.c acpica-unix2-20130626-aapits/tests/aapits/atinit.c
--- acpica-unix2-20130626/tests/aapits/atinit.c 2013-01-17 12:48:28.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/atinit.c 2013-07-25 13:20:19.706705960 -0600
@@ -3024,7 +3024,7 @@
AapiErrors++;
printf ("API Error: AcpiGetSystemInfo() returned"
" Length %d, expected %d\n",
- OutBuffer.Length, sizeof (Info));
+ (int) OutBuffer.Length, (int) sizeof (Info));
return (AE_ERROR);
}
@@ -3046,7 +3046,7 @@
AapiErrors++;
printf ("API Error: AcpiGetSystemInfo() returned"
" Length %d, expected %d\n",
- OutBuffer.Length, sizeof (Info));
+ (int) OutBuffer.Length, (int) sizeof (Info));
return (AE_ERROR);
}
@@ -3066,7 +3066,7 @@
AapiErrors++;
printf ("API Error: AcpiGetSystemInfo() returned"
" Length %d, expected %d\n",
- OutBuffer.Length, sizeof (Info));
+ (int) OutBuffer.Length, (int) sizeof (Info));
return (AE_ERROR);
}
else if (OutBuffer.Pointer != &Info)
@@ -3149,7 +3149,7 @@
AapiErrors++;
printf ("API Error: AcpiGetSystemInfo() returned"
" Length %d, expected %d\n",
- OutBuffer.Length, sizeof (Info));
+ (int) OutBuffer.Length, (int) sizeof (Info));
return (AE_ERROR);
}
else if (OutBuffer.Pointer != &Info)
@@ -3214,7 +3214,7 @@
AapiErrors++;
printf ("API Error: AcpiGetSystemInfo() returned"
" Length %d, expected %d\n",
- OutBuffer.Length, sizeof (ACPI_SYSTEM_INFO));
+ (int) OutBuffer.Length, (int) sizeof (ACPI_SYSTEM_INFO));
return (AE_ERROR);
}
else
diff -urN acpica-unix2-20130626/tests/aapits/atmain.c acpica-unix2-20130626-aapits/tests/aapits/atmain.c
--- acpica-unix2-20130626/tests/aapits/atmain.c 2013-01-17 12:48:28.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/atmain.c 2013-07-25 13:18:22.083323948 -0600
@@ -315,7 +315,7 @@
{
printf ("ACPICA API TS err: test num %ld of test case %ld"
" is not implemented\n",
- test_num, test_case);
+ (long int) test_num, (long int) test_case);
return (AtRetNotImpl);
}
@@ -430,7 +432,7 @@
if (test_case < 1 || test_case > AT_TEST_CASE_NUM)
{
printf ("ACPICA API TS err: test case %ld is out of range 1 - %d\n",
- test_case, AT_TEST_CASE_NUM);
+ (long int) test_case, (int) AT_TEST_CASE_NUM);
return (AtRetBadParam);
}
@@ -438,7 +440,7 @@
if (test_num < 0 || test_num > AtTestCase[test_case].TestsNum)
{
printf ("ACPICA API TS err: test num %ld is out of range 0 - %d\n",
- test_num, AtTestCase[test_case].TestsNum);
+ (long int) test_num, AtTestCase[test_case].TestsNum);
return (AtRetBadParam);
}
diff -urN acpica-unix2-20130626/tests/aapits/atnamespace.c acpica-unix2-20130626-aapits/tests/aapits/atnamespace.c
--- acpica-unix2-20130626/tests/aapits/atnamespace.c 2013-01-17 12:48:28.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/atnamespace.c 2013-07-25 13:24:15.366466707 -0600
@@ -2535,7 +2535,8 @@
#else
printf ("API Error: Address of %s (0x%llX) != (0x%llX)\n",
PathNames[2 * i + 1],
- Info->Address, ExpectedInfo[i].Address);
+ (long long unsigned int) Info->Address,
+ (long long unsigned int) ExpectedInfo[i].Address);
#endif
#else
printf ("API Error: Address of %s (0x%X) != (0x%X)\n",
@@ -2908,7 +2909,8 @@
TestErrors++;
printf ("AtGetNextObjectTypeCommon: different numbers of entities"
"in TypesNames (%d) and LevelTypes0000 (%d)\n",
- TypesCount, sizeof (LevelTypes0000) / sizeof (ACPI_OBJECT_TYPE));
+ TypesCount,
+ (int) (sizeof (LevelTypes0000) / sizeof (ACPI_OBJECT_TYPE)));
return (AE_ERROR);
}
@@ -4192,7 +4194,9 @@
Pathname, Obj.Integer.Value, Value);
#else
printf ("API Error: Value of %s is 0x%llx instead of expected 0x%llx\n",
- Pathname, Obj.Integer.Value, Value);
+ Pathname,
+ (long long unsigned int) Obj.Integer.Value,
+ (long long unsigned int) Value);
#endif
Status = AE_ERROR;
}
@@ -5199,7 +5203,7 @@
{
AapiErrors++;
printf ("API Error: AcpiOsAllocate(%d) returned NULL\n",
- OutName.Length);
+ (int) OutName.Length);
return (AE_ERROR);
}
}
diff -urN acpica-unix2-20130626/tests/aapits/atosxfctrl.c acpica-unix2-20130626-aapits/tests/aapits/atosxfctrl.c
--- acpica-unix2-20130626/tests/aapits/atosxfctrl.c 2013-01-17 12:48:28.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/atosxfctrl.c 2013-07-25 13:30:00.375492751 -0600
@@ -737,13 +737,15 @@
#if ACPI_MACHINE_WIDTH == 64
#ifdef _MSC_VER
printf("OsxfCtrlFingReg: unexpected Width %d of Reg 0x%I64x\n",
+ Width, Address);
#else
printf("OsxfCtrlFingReg: unexpected Width %d of Reg 0x%llx\n",
+ Width, (long long unsigned int) Address);
#endif
#else
printf("OsxfCtrlFingReg: unexpected Width %d of Reg 0x%x\n",
-#endif
Width, Address);
+#endif
return (NULL);
}
@@ -764,15 +766,19 @@
#ifdef _MSC_VER
printf("OsxfCtrlFingReg: intersection Regs (0x%I64x: 0x%x)"
" and (0x%I64x: 0x%x)\n",
+ Reg->Address, Reg->Width, Address, Width);
#else
printf("OsxfCtrlFingReg: intersection Regs (0x%llx: 0x%x)"
" and (0x%llx: 0x%x)\n",
+ (long long unsigned int) Reg->Address,
+ Reg->Width,
+ (long long unsigned int) Address, Width);
#endif
#else
printf("OsxfCtrlFingReg: intersection Regs (0x%x: 0x%x)"
" and (0x%x: 0x%x)\n",
-#endif
Reg->Address, Reg->Width, Address, Width);
+#endif
return (NULL);
}
}
@@ -786,13 +792,15 @@
#if ACPI_MACHINE_WIDTH == 64
#ifdef _MSC_VER
printf("OsxfCtrlFingReg: no memory for Reg (0x%I64x: 0x%x)\n",
+ Reg->Address, Reg->Width);
#else
printf("OsxfCtrlFingReg: no memory for Reg (0x%llx: 0x%x)\n",
+ (long long unsigned int) Reg->Address, Reg->Width);
#endif
#else
printf("OsxfCtrlFingReg: no memory for Reg (0x%x: 0x%x)\n",
-#endif
Reg->Address, Reg->Width);
+#endif
return (NULL);
}
Reg->Type = Type;
@@ -932,14 +940,19 @@
#if ACPI_MACHINE_WIDTH == 64
#ifdef _MSC_VER
printf("%.2u (%s Address 0x%I64x: Width %.2u) r/w counts: %u/%u\n",
+ i, (Reg->Type == EMUL_REG_SYS)? "SYS": "IO",
+ Reg->Address, Reg->Width, Reg->ReadCount, Reg->WriteCount);
#else
printf("%.2u (%s Address 0x%llx: Width %.2u) r/w counts: %u/%u\n",
+ i, (Reg->Type == EMUL_REG_SYS)? "SYS": "IO",
+ (long long unsigned int) Reg->Address,
+ Reg->Width, Reg->ReadCount, Reg->WriteCount);
#endif
#else
printf("%.2u (%s Address 0x%.4x: Width %.2u) r/w counts: %u/%u\n",
-#endif
i, (Reg->Type == EMUL_REG_SYS)? "SYS": "IO",
Reg->Address, Reg->Width, Reg->ReadCount, Reg->WriteCount);
+#endif
Reg = Reg->Next;
i++;
}
diff -urN acpica-unix2-20130626/tests/aapits/atresource.c acpica-unix2-20130626-aapits/tests/aapits/atresource.c
--- acpica-unix2-20130626/tests/aapits/atresource.c 2013-01-17 12:48:29.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/atresource.c 2013-07-25 13:25:49.423565947 -0600
@@ -174,7 +174,7 @@
AapiErrors++;
printf ("API Error: AcpiGetCurrentResources(%s) returned Length %d,"
" expected %d\n",
- Pathname, OutBuffer.Length, RT0000_DEV0_CRS_LEN);
+ Pathname, (int) OutBuffer.Length, RT0000_DEV0_CRS_LEN);
return (AE_ERROR);
}
@@ -490,7 +490,7 @@
AapiErrors++;
printf ("API Error: AcpiGetCurrentResources(%s) returned Length %d,"
" expected %d\n",
- Pathname, OutBuffer.Length, RT0000_DEV0_CRS_LEN);
+ Pathname, (int) OutBuffer.Length, RT0000_DEV0_CRS_LEN);
return (AE_ERROR);
}
@@ -689,7 +689,7 @@
AapiErrors++;
printf ("Api Error: Resource->Length (%d) != %d\n",
CurrentResource->Length,
- ACPI_ROUND_UP_TO_NATIVE_WORD (ACPI_RS_SIZE (ACPI_RESOURCE_IRQ)));
+ (int) (ACPI_ROUND_UP_TO_NATIVE_WORD (ACPI_RS_SIZE (ACPI_RESOURCE_IRQ))));
}
if (CurrentResource->Data.Irq.Triggering != 0) /* Level-Triggered */
@@ -981,7 +981,7 @@
AapiErrors++;
printf ("API Error: AcpiGetPossibleResources(%s) returned Length %d,"
" expected %d\n",
- Pathname, OutBuffer.Length, RT0000_DEV0_CRS_LEN);
+ Pathname, (int) OutBuffer.Length, RT0000_DEV0_CRS_LEN);
return (AE_ERROR);
}
@@ -1923,7 +1923,7 @@
AapiErrors++;
printf ("API Error: AcpiGetIrqRoutingTable(%s) returned Length %d,"
" expected %d\n",
- Pathname, OutBuffer.Length, 0xA48);
+ Pathname, (int) OutBuffer.Length, 0xA48);
return (AE_ERROR);
}
diff -urN acpica-unix2-20130626/tests/aapits/Makefile acpica-unix2-20130626-aapits/tests/aapits/Makefile
--- acpica-unix2-20130626/tests/aapits/Makefile 2013-01-17 12:48:29.000000000 -0700
+++ acpica-unix2-20130626-aapits/tests/aapits/Makefile 2013-07-25 15:17:09.309236422 -0600
@@ -194,7 +194,7 @@
CFLAGS+= -Wall -g -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_APITS -DACPI_EXEC_APP -D_MULTI_THREADED -Wstrict-prototypes -I../../source/include
-acpiexec : $(patsubst %.c,%.o, $(SRCS))
+$(PROG) : $(patsubst %.c,%.o, $(SRCS))
$(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -o $(PROG)
CLEANFILES= $(PROG)
|