TianoCore EDK2 master
Loading...
Searching...
No Matches
IoLibNoIo.c
Go to the documentation of this file.
1
15//
16// Include common header file for this module.
17//
19
34UINT8
35EFIAPI
37 IN UINTN Port
38 )
39{
40 ASSERT (FALSE);
41 return 0;
42}
43
59UINT8
60EFIAPI
62 IN UINTN Port,
63 IN UINT8 Value
64 )
65{
66 ASSERT (FALSE);
67 return Value;
68}
69
84UINT16
85EFIAPI
87 IN UINTN Port
88 )
89{
90 ASSERT (FALSE);
91 return 0;
92}
93
109UINT16
110EFIAPI
112 IN UINTN Port,
113 IN UINT16 Value
114 )
115{
116 ASSERT (FALSE);
117 return Value;
118}
119
134UINT32
135EFIAPI
137 IN UINTN Port
138 )
139{
140 ASSERT (FALSE);
141 return 0;
142}
143
159UINT32
160EFIAPI
162 IN UINTN Port,
163 IN UINT32 Value
164 )
165{
166 ASSERT (FALSE);
167 return Value;
168}
169
185UINT64
186EFIAPI
188 IN UINTN Port
189 )
190{
191 ASSERT (FALSE);
192 return 0;
193}
194
211UINT64
212EFIAPI
214 IN UINTN Port,
215 IN UINT64 Value
216 )
217{
218 ASSERT (FALSE);
219 return 0;
220}
221
239VOID
240EFIAPI
242 IN UINTN Port,
243 IN UINTN Count,
244 OUT VOID *Buffer
245 )
246{
247 ASSERT (FALSE);
248}
249
267VOID
268EFIAPI
270 IN UINTN Port,
271 IN UINTN Count,
272 IN VOID *Buffer
273 )
274{
275 ASSERT (FALSE);
276}
277
295VOID
296EFIAPI
298 IN UINTN Port,
299 IN UINTN Count,
300 OUT VOID *Buffer
301 )
302{
303 ASSERT (FALSE);
304}
305
323VOID
324EFIAPI
326 IN UINTN Port,
327 IN UINTN Count,
328 IN VOID *Buffer
329 )
330{
331 ASSERT (FALSE);
332}
333
351VOID
352EFIAPI
354 IN UINTN Port,
355 IN UINTN Count,
356 OUT VOID *Buffer
357 )
358{
359 ASSERT (FALSE);
360}
361
379VOID
380EFIAPI
382 IN UINTN Port,
383 IN UINTN Count,
384 IN VOID *Buffer
385 )
386{
387 ASSERT (FALSE);
388}
389
404UINT8
405EFIAPI
407 IN UINTN Address
408 )
409{
410 UINT8 Value;
411 BOOLEAN Flag;
412
413 Flag = FilterBeforeMmIoRead (FilterWidth8, Address, &Value);
414 if (Flag) {
415 Value = *(volatile UINT8 *)Address;
416 }
417
418 FilterAfterMmIoRead (FilterWidth8, Address, &Value);
419
420 return Value;
421}
422
436UINT8
437EFIAPI
439 IN UINTN Address,
440 IN UINT8 Value
441 )
442{
443 BOOLEAN Flag;
444
445 Flag = FilterBeforeMmIoWrite (FilterWidth8, Address, &Value);
446 if (Flag) {
447 *(volatile UINT8 *)Address = Value;
448 }
449
450 FilterAfterMmIoWrite (FilterWidth8, Address, &Value);
451
452 return Value;
453}
454
469UINT16
470EFIAPI
472 IN UINTN Address
473 )
474{
475 UINT16 Value;
476 BOOLEAN Flag;
477
478 ASSERT ((Address & 1) == 0);
479
480 Flag = FilterBeforeMmIoRead (FilterWidth16, Address, &Value);
481 if (Flag) {
482 Value = *(volatile UINT16 *)Address;
483 }
484
485 FilterAfterMmIoRead (FilterWidth16, Address, &Value);
486
487 return Value;
488}
489
503UINT16
504EFIAPI
506 IN UINTN Address,
507 IN UINT16 Value
508 )
509{
510 BOOLEAN Flag;
511
512 ASSERT ((Address & 1) == 0);
513
514 Flag = FilterBeforeMmIoWrite (FilterWidth16, Address, &Value);
515 if (Flag) {
516 *(volatile UINT16 *)Address = Value;
517 }
518
519 FilterAfterMmIoWrite (FilterWidth16, Address, &Value);
520
521 return Value;
522}
523
538UINT32
539EFIAPI
541 IN UINTN Address
542 )
543{
544 UINT32 Value;
545 BOOLEAN Flag;
546
547 ASSERT ((Address & 3) == 0);
548
549 Flag = FilterBeforeMmIoRead (FilterWidth32, Address, &Value);
550 if (Flag) {
551 Value = *(volatile UINT32 *)Address;
552 }
553
554 FilterAfterMmIoRead (FilterWidth32, Address, &Value);
555
556 return Value;
557}
558
572UINT32
573EFIAPI
575 IN UINTN Address,
576 IN UINT32 Value
577 )
578{
579 BOOLEAN Flag;
580
581 ASSERT ((Address & 3) == 0);
582
583 Flag = FilterBeforeMmIoWrite (FilterWidth32, Address, &Value);
584 if (Flag) {
585 *(volatile UINT32 *)Address = Value;
586 }
587
588 FilterAfterMmIoWrite (FilterWidth32, Address, &Value);
589
590 return Value;
591}
592
607UINT64
608EFIAPI
610 IN UINTN Address
611 )
612{
613 UINT64 Value;
614 BOOLEAN Flag;
615
616 ASSERT ((Address & 7) == 0);
617
618 Flag = FilterBeforeMmIoRead (FilterWidth64, Address, &Value);
619 if (Flag) {
620 Value = *(volatile UINT64 *)Address;
621 }
622
623 FilterAfterMmIoRead (FilterWidth64, Address, &Value);
624
625 return Value;
626}
627
641UINT64
642EFIAPI
644 IN UINTN Address,
645 IN UINT64 Value
646 )
647{
648 BOOLEAN Flag;
649
650 ASSERT ((Address & 7) == 0);
651
652 Flag = FilterBeforeMmIoWrite (FilterWidth64, Address, &Value);
653 if (Flag) {
654 *(volatile UINT64 *)Address = Value;
655 }
656
657 FilterAfterMmIoWrite (FilterWidth64, Address, &Value);
658
659 return Value;
660}
UINT64 UINTN
UINT8 EFIAPI IoWrite8(IN UINTN Port, IN UINT8 Value)
Definition: IoLibNoIo.c:61
UINT64 EFIAPI MmioWrite64(IN UINTN Address, IN UINT64 Value)
Definition: IoLibNoIo.c:643
VOID EFIAPI IoWriteFifo32(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
Definition: IoLibNoIo.c:381
VOID EFIAPI IoReadFifo8(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
Definition: IoLibNoIo.c:241
UINT64 EFIAPI IoRead64(IN UINTN Port)
Definition: IoLibNoIo.c:187
VOID EFIAPI IoReadFifo16(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
Definition: IoLibNoIo.c:297
UINT64 EFIAPI IoWrite64(IN UINTN Port, IN UINT64 Value)
Definition: IoLibNoIo.c:213
VOID EFIAPI IoWriteFifo16(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
Definition: IoLibNoIo.c:325
UINT64 EFIAPI MmioRead64(IN UINTN Address)
Definition: IoLibNoIo.c:609
VOID EFIAPI IoReadFifo32(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
Definition: IoLibNoIo.c:353
UINT16 EFIAPI MmioRead16(IN UINTN Address)
Definition: IoLibNoIo.c:471
UINT8 EFIAPI MmioRead8(IN UINTN Address)
Definition: IoLibNoIo.c:406
UINT8 EFIAPI MmioWrite8(IN UINTN Address, IN UINT8 Value)
Definition: IoLibNoIo.c:438
UINT8 EFIAPI IoRead8(IN UINTN Port)
Definition: IoLibNoIo.c:36
UINT32 EFIAPI MmioRead32(IN UINTN Address)
Definition: IoLibNoIo.c:540
VOID EFIAPI IoWriteFifo8(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
Definition: IoLibNoIo.c:269
UINT16 EFIAPI IoRead16(IN UINTN Port)
Definition: IoLibNoIo.c:86
UINT16 EFIAPI MmioWrite16(IN UINTN Address, IN UINT16 Value)
Definition: IoLibNoIo.c:505
UINT32 EFIAPI IoRead32(IN UINTN Port)
Definition: IoLibNoIo.c:136
UINT32 EFIAPI IoWrite32(IN UINTN Port, IN UINT32 Value)
Definition: IoLibNoIo.c:161
UINT16 EFIAPI IoWrite16(IN UINTN Port, IN UINT16 Value)
Definition: IoLibNoIo.c:111
UINT32 EFIAPI MmioWrite32(IN UINTN Address, IN UINT32 Value)
Definition: IoLibNoIo.c:574
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
VOID EFIAPI FilterAfterMmIoWrite(IN FILTER_IO_WIDTH Width, IN UINTN Address, IN VOID *Buffer)
BOOLEAN EFIAPI FilterBeforeMmIoWrite(IN FILTER_IO_WIDTH Width, IN UINTN Address, IN VOID *Buffer)
BOOLEAN EFIAPI FilterBeforeMmIoRead(IN FILTER_IO_WIDTH Width, IN UINTN Address, IN OUT VOID *Buffer)
VOID EFIAPI FilterAfterMmIoRead(IN FILTER_IO_WIDTH Width, IN UINTN Address, IN VOID *Buffer)