summaryrefslogtreecommitdiffstats
path: root/hw/misc/macio/trace-events
diff options
context:
space:
mode:
authorMark Cave-Ayland2018-06-12 18:43:58 +0200
committerDavid Gibson2018-06-16 08:32:33 +0200
commit7c4166a971b54a65900d9624ccd9669ba99d75ad (patch)
treea3217491665ad013d2359e57ee0ac9a90e75aebd /hw/misc/macio/trace-events
parentmac_newworld: add via machine option to control mac99 VIA/ADB configuration (diff)
downloadqemu-7c4166a971b54a65900d9624ccd9669ba99d75ad.tar.gz
qemu-7c4166a971b54a65900d9624ccd9669ba99d75ad.tar.xz
qemu-7c4166a971b54a65900d9624ccd9669ba99d75ad.zip
mac_newworld: add gpios to macio devices with PMU enabled
PMU-enabled New World Macs expose their GPIOs via a separate memory region within the macio device. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/misc/macio/trace-events')
-rw-r--r--hw/misc/macio/trace-events7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/misc/macio/trace-events b/hw/misc/macio/trace-events
index d499d78c99..71c47520eb 100644
--- a/hw/misc/macio/trace-events
+++ b/hw/misc/macio/trace-events
@@ -13,3 +13,10 @@ cuda_packet_send_data(int i, const uint8_t data) "[%d] 0x%02x"
# hw/misc/macio/macio.c
macio_timer_write(uint64_t addr, unsigned len, uint64_t val) "write addr 0x%"PRIx64 " len %d val 0x%"PRIx64
macio_timer_read(uint64_t addr, unsigned len, uint32_t val) "read addr 0x%"PRIx64 " len %d val 0x%"PRIx32
+
+# hw/misc/macio/gpio.c
+macio_set_gpio(int gpio, bool state) "setting GPIO %d to %d"
+macio_gpio_irq_assert(int gpio) "asserting GPIO %d"
+macio_gpio_irq_deassert(int gpio) "deasserting GPIO %d"
+macio_gpio_write(uint64_t addr, uint64_t val) "addr: 0x%"PRIx64" value: 0x%"PRIx64
+macio_gpio_read(uint64_t addr, uint64_t val) "addr: 0x%"PRIx64" value: 0x%"PRIx64
tion' href='/bwlp/qemu.git/commit/include/qapi/error.h?id=edf6f3b3358597d37da0cf636ce3ed8a546d0f26'>edf6f3b335 ^
f4d0064afc ^
ae7c80a7bd ^

f4d0064afc ^
ae7c80a7bd ^
f4d0064afc ^

ae7c80a7bd ^
f4d0064afc ^

9aac7d486c ^

10303f04b9 ^
edf6f3b335 ^


10303f04b9 ^
8277d2aa58 ^

edf6f3b335 ^



f4d0064afc ^
edf6f3b335 ^
9aac7d486c ^























edf6f3b335 ^


a12a5a1a01 ^



9aac7d486c ^




edf6f3b335 ^


e3fe3988d7 ^



edf6f3b335 ^

e3fe3988d7 ^
ae7c80a7bd ^







edf6f3b335 ^



ae7c80a7bd ^
edf6f3b335 ^
ae7c80a7bd ^
edf6f3b335 ^



ae7c80a7bd ^
edf6f3b335 ^



8d780f4392 ^
e3fe3988d7 ^













ae7c80a7bd ^












8d780f4392 ^









47ff5ac81e ^
8d780f4392 ^





47ff5ac81e ^









ae7c80a7bd ^






























































8220f3ac74 ^

edf6f3b335 ^

d5ec4f27c3 ^


abb3d37d0c ^
d5ec4f27c3 ^
edf6f3b335 ^
f22a28b898 ^




d20a580bc0 ^

d20a580bc0 ^


f22a28b898 ^


edf6f3b335 ^
d5ec4f27c3 ^
d59ce6f344 ^
d5ec4f27c3 ^
edf6f3b335 ^











a29a37b994 ^
edf6f3b335 ^


f4d0064afc ^

10303f04b9 ^


edf6f3b335 ^
1e9b65bb1b ^






edf6f3b335 ^




98cb89af4d ^


680d16dcb7 ^
1e9b65bb1b ^






680d16dcb7 ^
20840d4cfe ^
edf6f3b335 ^



20840d4cfe ^
1e9b65bb1b ^






20840d4cfe ^

edf6f3b335 ^







a29a37b994 ^

edf6f3b335 ^



ae7c80a7bd ^
10303f04b9 ^

75d789f8d3 ^
edf6f3b335 ^
75d789f8d3 ^
4b5766488f ^





ae7c80a7bd ^
4b5766488f ^

192cf54ac5 ^

4b5766488f ^
8277d2aa58 ^



192cf54ac5 ^

8277d2aa58 ^




49fbc7236d ^
8277d2aa58 ^


50b7b000c9 ^
508de4780c ^





f4d0064afc ^




50b7b000c9 ^
49fbc7236d ^
50b7b000c9 ^

edf6f3b335 ^

54028d7542 ^
1e9b65bb1b ^





54028d7542 ^
ea25fbca88 ^
edf6f3b335 ^
79020cfcbb ^


edf6f3b335 ^


d5ec4f27c3 ^
edf6f3b335 ^
d5ec4f27c3 ^
edf6f3b335 ^
a12a5a1a01 ^




e43ead1d0b ^
508de4780c ^
e43ead1d0b ^



edf6f3b335 ^
508de4780c ^
2ee2f1e415 ^
f4d0064afc ^
2ee2f1e415 ^
edf6f3b335 ^
e43ead1d0b ^





8277d2aa58 ^





edf6f3b335 ^


d5ec4f27c3 ^
1e9b65bb1b ^






d5ec4f27c3 ^
edf6f3b335 ^
ae7c80a7bd ^







































10303f04b9 ^

5d24ee70bc ^
5d24ee70bc ^

a29a37b994 ^
10303f04b9 ^

a29a37b994 ^


d5ec4f27c3 ^
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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534



                            
                                        


                                           
                                         



                                                                         



                                                                














                                                                      



                                                                   











                                                                         

                      
                   

                                                           
  
                                                  

                                                                     
                                                  
                                                            

                            
                                                   

                                                                             

                                      
                                                                      


                               
                                                

                                                                   



                                               
                                                             
  























                                                  


                                                                



                                                                  




                                                                 


                                                           



                                                                       

                              
                                                         







                                                                 



                              
                                                    
        
                                                



                              
                                                           



                                                               
  













                                                                  












                                                                    









                                                           
                         





                                                 









                                                        






























































                                                                           

                                                                

   


               
                                  
 
  




                                                                       

                                                                     


                                                                     


             
                                           
   
                                               
 











                                                                     
                                                                  


                                                                   

                                                                      


                                                                     
   






                                                                     




                                                                     


                                                                    
   






                                                                             
 
             



                                                                       
   






                                                                           

      







                                                                   

                                                                   



                                                                      
                                                 

                                                              
   
                                                         
 





                                                            
                                                                     

                                                                

                                                  
 



                                                             

                                                                    




                                                             
                                                            


                       
                                                                         





                                                                    




                                                                      
   
                                                                

                       

                                                 
   





                                                                               
 
  
                                


                                    


                    
   
                            
 
  




                                                                            
                                                       
                                                            



                                 
                                                        
                                                            
   
                                  
 
  





                                                                        





                                                                         


                                                                     
   






                                                                    
 
  







































                                                                            

                                                      
   

                          
  

                                                      


                          
      
/*
 * QEMU Error Objects
 *
 * Copyright IBM, Corp. 2011
 * Copyright (C) 2011-2015 Red Hat, Inc.
 *
 * Authors:
 *  Anthony Liguori   <aliguori@us.ibm.com>
 *  Markus Armbruster <armbru@redhat.com>
 *
 * This work is licensed under the terms of the GNU LGPL, version 2.  See
 * the COPYING.LIB file in the top-level directory.
 */

/*
 * Error reporting system loosely patterned after Glib's GError.
 *
 * = Rules =
 *
 * - Functions that use Error to report errors have an Error **errp
 *   parameter.  It should be the last parameter, except for functions
 *   taking variable arguments.
 *
 * - You may pass NULL to not receive the error, &error_abort to abort
 *   on error, &error_fatal to exit(1) on error, or a pointer to a
 *   variable containing NULL to receive the error.
 *
 * - Separation of concerns: the function is responsible for detecting
 *   errors and failing cleanly; handling the error is its caller's
 *   job.  Since the value of @errp is about handling the error, the
 *   function should not examine it.
 *
 * - The function may pass @errp to functions it calls to pass on
 *   their errors to its caller.  If it dereferences @errp to check
 *   for errors, it must use ERRP_GUARD().
 *
 * - On success, the function should not touch *errp.  On failure, it
 *   should set a new error, e.g. with error_setg(errp, ...), or
 *   propagate an existing one, e.g. with error_propagate(errp, ...).
 *
 * - Whenever practical, also return a value that indicates success /
 *   failure.  This can make the error checking more concise, and can
 *   avoid useless error object creation and destruction.  Note that
 *   we still have many functions returning void.  We recommend
 *   • bool-valued functions return true on success / false on failure,
 *   • pointer-valued functions return non-null / null pointer, and
 *   • integer-valued functions return non-negative / negative.
 *
 * = Creating errors =
 *
 * Create an error:
 *     error_setg(errp, "situation normal, all fouled up");
 * where @errp points to the location to receive the error.
 *
 * Create an error and add additional explanation:
 *     error_setg(errp, "invalid quark");
 *     error_append_hint(errp, "Valid quarks are up, down, strange, "
 *                       "charm, top, bottom.\n");
 * This may require use of ERRP_GUARD(); more on that below.
 *
 * Do *not* contract this to
 *     error_setg(errp, "invalid quark\n" // WRONG!
 *                "Valid quarks are up, down, strange, charm, top, bottom.");
 *
 * = Reporting and destroying errors =
 *
 * Report an error to the current monitor if we have one, else stderr:
 *     error_report_err(err);
 * This frees the error object.
 *
 * Likewise, but with additional text prepended:
 *     error_reportf_err(err, "Could not frobnicate '%s': ", name);
 *
 * Report an error somewhere else:
 *     const char *msg = error_get_pretty(err);
 *     do with msg what needs to be done...
 *     error_free(err);
 * Note that this loses hints added with error_append_hint().
 *
 * Call a function ignoring errors:
 *     foo(arg, NULL);
 * This is more concise than
 *     Error *err = NULL;
 *     foo(arg, &err);
 *     error_free(err); // don't do this
 *
 * Call a function aborting on errors:
 *     foo(arg, &error_abort);
 * This is more concise and fails more nicely than
 *     Error *err = NULL;
 *     foo(arg, &err);
 *     assert(!err); // don't do this
 *
 * Call a function treating errors as fatal:
 *     foo(arg, &error_fatal);
 * This is more concise than
 *     Error *err = NULL;
 *     foo(arg, &err);
 *     if (err) { // don't do this
 *         error_report_err(err);
 *         exit(1);
 *     }
 *
 * Handle an error without reporting it (just for completeness):
 *     error_free(err);
 *
 * Assert that an expected error occurred, but clean it up without
 * reporting it (primarily useful in testsuites):
 *     error_free_or_abort(&err);
 *
 * = Passing errors around =
 *
 * Errors get passed to the caller through the conventional @errp
 * parameter.
 *
 * Create a new error and pass it to the caller:
 *     error_setg(errp, "situation normal, all fouled up");
 *
 * Call a function, receive an error from it, and pass it to the caller
 * - when the function returns a value that indicates failure, say
 *   false:
 *     if (!foo(arg, errp)) {
 *         handle the error...
 *     }
 * - when it does not, say because it is a void function:
 *     ERRP_GUARD();
 *     foo(arg, errp);
 *     if (*errp) {
 *         handle the error...
 *     }
 * More on ERRP_GUARD() below.
 *
 * Code predating ERRP_GUARD() still exists, and looks like this:
 *     Error *err = NULL;
 *     foo(arg, &err);
 *     if (err) {
 *         handle the error...
 *         error_propagate(errp, err); // deprecated
 *     }
 * Avoid in new code.  Do *not* "optimize" it to
 *     foo(arg, errp);
 *     if (*errp) { // WRONG!
 *         handle the error...
 *     }
 * because errp may be NULL without the ERRP_GUARD() guard.
 *
 * But when all you do with the error is pass it on, please use
 *     foo(arg, errp);
 * for readability.
 *
 * Receive an error, and handle it locally
 * - when the function returns a value that indicates failure, say
 *   false:
 *     Error *err = NULL;
 *     if (!foo(arg, &err)) {
 *         handle the error...
 *     }
 * - when it does not, say because it is a void function:
 *     Error *err = NULL;
 *     foo(arg, &err);
 *     if (err) {
 *         handle the error...
 *     }
 *
 * Pass an existing error to the caller:
 *     error_propagate(errp, err);
 * This is rarely needed.  When @err is a local variable, use of
 * ERRP_GUARD() commonly results in more readable code.
 *
 * Pass an existing error to the caller with the message modified:
 *     error_propagate_prepend(errp, err,