TianoCore EDK2 master
Loading...
Searching...
No Matches
IoLibArmVirt.c
Go to the documentation of this file.
1
14
27UINT8
28EFIAPI
30 IN UINTN Address
31 );
32
44VOID
45EFIAPI
47 IN UINTN Address,
48 IN UINT8 Value
49 );
50
63UINT16
64EFIAPI
66 IN UINTN Address
67 );
68
80VOID
81EFIAPI
83 IN UINTN Address,
84 IN UINT16 Value
85 );
86
99UINT32
100EFIAPI
102 IN UINTN Address
103 );
104
116VOID
117EFIAPI
119 IN UINTN Address,
120 IN UINT32 Value
121 );
122
135UINT64
136EFIAPI
138 IN UINTN Address
139 );
140
152VOID
153EFIAPI
155 IN UINTN Address,
156 IN UINT64 Value
157 );
158
173UINT8
174EFIAPI
176 IN UINTN Port
177 )
178{
179 ASSERT (FALSE);
180 return 0;
181}
182
198UINT8
199EFIAPI
201 IN UINTN Port,
202 IN UINT8 Value
203 )
204{
205 ASSERT (FALSE);
206 return Value;
207}
208
223UINT16
224EFIAPI
226 IN UINTN Port
227 )
228{
229 ASSERT (FALSE);
230 return 0;
231}
232
248UINT16
249EFIAPI
251 IN UINTN Port,
252 IN UINT16 Value
253 )
254{
255 ASSERT (FALSE);
256 return Value;
257}
258
273UINT32
274EFIAPI
276 IN UINTN Port
277 )
278{
279 ASSERT (FALSE);
280 return 0;
281}
282
298UINT32
299EFIAPI
301 IN UINTN Port,
302 IN UINT32 Value
303 )
304{
305 ASSERT (FALSE);
306 return Value;
307}
308
324UINT64
325EFIAPI
327 IN UINTN Port
328 )
329{
330 ASSERT (FALSE);
331 return 0;
332}
333
350UINT64
351EFIAPI
353 IN UINTN Port,
354 IN UINT64 Value
355 )
356{
357 ASSERT (FALSE);
358 return 0;
359}
360
378VOID
379EFIAPI
381 IN UINTN Port,
382 IN UINTN Count,
383 OUT VOID *Buffer
384 )
385{
386 ASSERT (FALSE);
387}
388
406VOID
407EFIAPI
409 IN UINTN Port,
410 IN UINTN Count,
411 IN VOID *Buffer
412 )
413{
414 ASSERT (FALSE);
415}
416
434VOID
435EFIAPI
437 IN UINTN Port,
438 IN UINTN Count,
439 OUT VOID *Buffer
440 )
441{
442 ASSERT (FALSE);
443}
444
462VOID
463EFIAPI
465 IN UINTN Port,
466 IN UINTN Count,
467 IN VOID *Buffer
468 )
469{
470 ASSERT (FALSE);
471}
472
490VOID
491EFIAPI
493 IN UINTN Port,
494 IN UINTN Count,
495 OUT VOID *Buffer
496 )
497{
498 ASSERT (FALSE);
499}
500
518VOID
519EFIAPI
521 IN UINTN Port,
522 IN UINTN Count,
523 IN VOID *Buffer
524 )
525{
526 ASSERT (FALSE);
527}
528
543UINT8
544EFIAPI
546 IN UINTN Address
547 )
548{
549 UINT8 Value;
550 BOOLEAN Flag;
551
552 Flag = FilterBeforeMmIoRead (FilterWidth8, Address, &Value);
553 if (Flag) {
554 Value = MmioRead8Internal (Address);
555 }
556
557 FilterAfterMmIoRead (FilterWidth8, Address, &Value);
558
559 return Value;
560}
561
575UINT8
576EFIAPI
578 IN UINTN Address,
579 IN UINT8 Value
580 )
581{
582 BOOLEAN Flag;
583
584 Flag = FilterBeforeMmIoWrite (FilterWidth8, Address, &Value);
585 if (Flag) {
586 MmioWrite8Internal (Address, Value);
587 }
588
589 FilterAfterMmIoWrite (FilterWidth8, Address, &Value);
590
591 return Value;
592}
593
608UINT16
609EFIAPI
611 IN UINTN Address
612 )
613{
614 BOOLEAN Flag;
615 UINT16 Value;
616
617 ASSERT ((Address & 1) == 0);
618
619 Flag = FilterBeforeMmIoRead (FilterWidth16, Address, &Value);
620 if (Flag) {
621 Value = MmioRead16Internal (Address);
622 }
623
624 FilterAfterMmIoRead (FilterWidth16, Address, &Value);
625
626 return Value;
627}
628
642UINT16
643EFIAPI
645 IN UINTN Address,
646 IN UINT16 Value
647 )
648{
649 BOOLEAN Flag;
650
651 ASSERT ((Address & 1) == 0);
652
653 Flag = FilterBeforeMmIoWrite (FilterWidth16, Address, &Value);
654 if (Flag) {
655 MmioWrite16Internal (Address, Value);
656 }
657
658 FilterAfterMmIoWrite (FilterWidth16, Address, &Value);
659
660 return Value;
661}
662
677UINT32
678EFIAPI
680 IN UINTN Address
681 )
682{
683 BOOLEAN Flag;
684 UINT32 Value;
685
686 ASSERT ((Address & 3) == 0);
687
688 Flag = FilterBeforeMmIoRead (FilterWidth32, Address, &Value);
689 if (Flag) {
690 Value = MmioRead32Internal (Address);
691 }
692
693 FilterAfterMmIoRead (FilterWidth32, Address, &Value);
694
695 return Value;
696}
697
711UINT32
712EFIAPI
714 IN UINTN Address,
715 IN UINT32 Value
716 )
717{
718 BOOLEAN Flag;
719
720 ASSERT ((Address & 3) == 0);
721
722 Flag = FilterBeforeMmIoWrite (FilterWidth32, Address, &Value);
723 if (Flag) {
724 MmioWrite32Internal (Address, Value);
725 }
726
727 FilterAfterMmIoWrite (FilterWidth32, Address, &Value);
728
729 return Value;
730}
731
746UINT64
747EFIAPI
749 IN UINTN Address
750 )
751{
752 BOOLEAN Flag;
753 UINT64 Value;
754
755 ASSERT ((Address & 7) == 0);
756
757 Flag = FilterBeforeMmIoRead (FilterWidth64, Address, &Value);
758 if (Flag) {
759 Value = MmioRead64Internal (Address);
760 }
761
762 FilterAfterMmIoRead (FilterWidth64, Address, &Value);
763
764 return Value;
765}
766
780UINT64
781EFIAPI
783 IN UINTN Address,
784 IN UINT64 Value
785 )
786{
787 BOOLEAN Flag;
788
789 ASSERT ((Address & 7) == 0);
790
791 Flag = FilterBeforeMmIoWrite (FilterWidth64, Address, &Value);
792 if (Flag) {
793 MmioWrite64Internal (Address, Value);
794 }
795
796 FilterAfterMmIoWrite (FilterWidth64, Address, &Value);
797
798 return Value;
799}
UINT64 UINTN
UINT8 EFIAPI IoWrite8(IN UINTN Port, IN UINT8 Value)
Definition: IoLibArmVirt.c:200
UINT64 EFIAPI MmioWrite64(IN UINTN Address, IN UINT64 Value)
Definition: IoLibArmVirt.c:782
UINT64 EFIAPI MmioRead64Internal(IN UINTN Address)
VOID EFIAPI MmioWrite32Internal(IN UINTN Address, IN UINT32 Value)
UINT32 EFIAPI MmioRead32Internal(IN UINTN Address)
VOID EFIAPI IoWriteFifo32(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
Definition: IoLibArmVirt.c:520
VOID EFIAPI IoReadFifo8(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
Definition: IoLibArmVirt.c:380
UINT64 EFIAPI IoRead64(IN UINTN Port)
Definition: IoLibArmVirt.c:326
VOID EFIAPI MmioWrite64Internal(IN UINTN Address, IN UINT64 Value)
VOID EFIAPI IoReadFifo16(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
Definition: IoLibArmVirt.c:436
UINT8 EFIAPI MmioRead8Internal(IN UINTN Address)
UINT64 EFIAPI IoWrite64(IN UINTN Port, IN UINT64 Value)
Definition: IoLibArmVirt.c:352
VOID EFIAPI IoWriteFifo16(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
Definition: IoLibArmVirt.c:464
VOID EFIAPI MmioWrite8Internal(IN UINTN Address, IN UINT8 Value)
UINT64 EFIAPI MmioRead64(IN UINTN Address)
Definition: IoLibArmVirt.c:748
VOID EFIAPI MmioWrite16Internal(IN UINTN Address, IN UINT16 Value)
UINT16 EFIAPI MmioRead16Internal(IN UINTN Address)
VOID EFIAPI IoReadFifo32(IN UINTN Port, IN UINTN Count, OUT VOID *Buffer)
Definition: IoLibArmVirt.c:492
UINT16 EFIAPI MmioRead16(IN UINTN Address)
Definition: IoLibArmVirt.c:610
UINT8 EFIAPI MmioRead8(IN UINTN Address)
Definition: IoLibArmVirt.c:545
UINT8 EFIAPI MmioWrite8(IN UINTN Address, IN UINT8 Value)
Definition: IoLibArmVirt.c:577
UINT8 EFIAPI IoRead8(IN UINTN Port)
Definition: IoLibArmVirt.c:175
UINT32 EFIAPI MmioRead32(IN UINTN Address)
Definition: IoLibArmVirt.c:679
VOID EFIAPI IoWriteFifo8(IN UINTN Port, IN UINTN Count, IN VOID *Buffer)
Definition: IoLibArmVirt.c:408
UINT16 EFIAPI IoRead16(IN UINTN Port)
Definition: IoLibArmVirt.c:225
UINT16 EFIAPI MmioWrite16(IN UINTN Address, IN UINT16 Value)
Definition: IoLibArmVirt.c:644
UINT32 EFIAPI IoRead32(IN UINTN Port)
Definition: IoLibArmVirt.c:275
UINT32 EFIAPI IoWrite32(IN UINTN Port, IN UINT32 Value)
Definition: IoLibArmVirt.c:300
UINT16 EFIAPI IoWrite16(IN UINTN Port, IN UINT16 Value)
Definition: IoLibArmVirt.c:250
UINT32 EFIAPI MmioWrite32(IN UINTN Address, IN UINT32 Value)
Definition: IoLibArmVirt.c:713
#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)