TianoCore EDK2 master
Loading...
Searching...
No Matches
PciSegmentLibCommon.c
Go to the documentation of this file.
1
10#include "PciSegmentLibCommon.h"
11
12typedef struct {
13 UINT32 Register : 12;
14 UINT32 Function : 3;
15 UINT32 Device : 5;
16 UINT32 Bus : 8;
17 UINT32 Reserved1 : 4;
18 UINT32 Segment : 16;
19 UINT32 Reserved2 : 16;
21
35 IN UINT64 Address,
36 IN CONST PCI_SEGMENT_INFO *SegmentInfo,
37 IN UINTN Count
38 )
39{
40 while (Count != 0) {
41 if (SegmentInfo->SegmentNumber == ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Segment) {
42 break;
43 }
44
45 SegmentInfo++;
46 Count--;
47 }
48
49 ASSERT (Count != 0);
50 ASSERT (
51 (((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Reserved1 == 0) &&
52 (((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Reserved2 == 0)
53 );
54 ASSERT (((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Bus >= SegmentInfo->StartBusNumber);
55 ASSERT (((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Bus <= SegmentInfo->EndBusNumber);
56
57 Address = SegmentInfo->BaseAddress + PCI_ECAM_ADDRESS (
58 ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Bus,
59 ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Device,
60 ((PCI_SEGMENT_LIB_ADDRESS_STRUCTURE *)&Address)->Function,
62 );
63
64 if (sizeof (UINTN) == sizeof (UINT32)) {
65 ASSERT (Address < BASE_4GB);
66 }
67
68 return PciSegmentLibVirtualAddress ((UINTN)Address);
69}
70
84UINT8
85EFIAPI
87 IN UINT64 Address
88 )
89{
90 UINTN Count;
91 PCI_SEGMENT_INFO *SegmentInfo;
92
93 SegmentInfo = GetPciSegmentInfo (&Count);
94 return MmioRead8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count));
95}
96
111UINT8
112EFIAPI
114 IN UINT64 Address,
115 IN UINT8 Value
116 )
117{
118 UINTN Count;
119 PCI_SEGMENT_INFO *SegmentInfo;
120
121 SegmentInfo = GetPciSegmentInfo (&Count);
122 return MmioWrite8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), Value);
123}
124
142UINT8
143EFIAPI
145 IN UINT64 Address,
146 IN UINT8 OrData
147 )
148{
149 UINTN Count;
150 PCI_SEGMENT_INFO *SegmentInfo;
151
152 SegmentInfo = GetPciSegmentInfo (&Count);
153 return MmioOr8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), OrData);
154}
155
172UINT8
173EFIAPI
175 IN UINT64 Address,
176 IN UINT8 AndData
177 )
178{
179 UINTN Count;
180 PCI_SEGMENT_INFO *SegmentInfo;
181
182 SegmentInfo = GetPciSegmentInfo (&Count);
183 return MmioAnd8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), AndData);
184}
185
206UINT8
207EFIAPI
209 IN UINT64 Address,
210 IN UINT8 AndData,
211 IN UINT8 OrData
212 )
213{
214 UINTN Count;
215 PCI_SEGMENT_INFO *SegmentInfo;
216
217 SegmentInfo = GetPciSegmentInfo (&Count);
218 return MmioAndThenOr8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), AndData, OrData);
219}
220
242UINT8
243EFIAPI
245 IN UINT64 Address,
246 IN UINTN StartBit,
247 IN UINTN EndBit
248 )
249{
250 UINTN Count;
251 PCI_SEGMENT_INFO *SegmentInfo;
252
253 SegmentInfo = GetPciSegmentInfo (&Count);
254 return MmioBitFieldRead8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit);
255}
256
281UINT8
282EFIAPI
284 IN UINT64 Address,
285 IN UINTN StartBit,
286 IN UINTN EndBit,
287 IN UINT8 Value
288 )
289{
290 UINTN Count;
291 PCI_SEGMENT_INFO *SegmentInfo;
292
293 SegmentInfo = GetPciSegmentInfo (&Count);
294 return MmioBitFieldWrite8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, Value);
295}
296
324UINT8
325EFIAPI
327 IN UINT64 Address,
328 IN UINTN StartBit,
329 IN UINTN EndBit,
330 IN UINT8 OrData
331 )
332{
333 UINTN Count;
334 PCI_SEGMENT_INFO *SegmentInfo;
335
336 SegmentInfo = GetPciSegmentInfo (&Count);
337 return MmioBitFieldOr8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, OrData);
338}
339
367UINT8
368EFIAPI
370 IN UINT64 Address,
371 IN UINTN StartBit,
372 IN UINTN EndBit,
373 IN UINT8 AndData
374 )
375{
376 UINTN Count;
377 PCI_SEGMENT_INFO *SegmentInfo;
378
379 SegmentInfo = GetPciSegmentInfo (&Count);
380 return MmioBitFieldAnd8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, AndData);
381}
382
413UINT8
414EFIAPI
416 IN UINT64 Address,
417 IN UINTN StartBit,
418 IN UINTN EndBit,
419 IN UINT8 AndData,
420 IN UINT8 OrData
421 )
422{
423 UINTN Count;
424 PCI_SEGMENT_INFO *SegmentInfo;
425
426 SegmentInfo = GetPciSegmentInfo (&Count);
427 return MmioBitFieldAndThenOr8 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, AndData, OrData);
428}
429
444UINT16
445EFIAPI
447 IN UINT64 Address
448 )
449{
450 UINTN Count;
451 PCI_SEGMENT_INFO *SegmentInfo;
452
453 SegmentInfo = GetPciSegmentInfo (&Count);
454 return MmioRead16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count));
455}
456
472UINT16
473EFIAPI
475 IN UINT64 Address,
476 IN UINT16 Value
477 )
478{
479 UINTN Count;
480 PCI_SEGMENT_INFO *SegmentInfo;
481
482 SegmentInfo = GetPciSegmentInfo (&Count);
483 return MmioWrite16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), Value);
484}
485
506UINT16
507EFIAPI
509 IN UINT64 Address,
510 IN UINT16 OrData
511 )
512{
513 UINTN Count;
514 PCI_SEGMENT_INFO *SegmentInfo;
515
516 SegmentInfo = GetPciSegmentInfo (&Count);
517 return MmioOr16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), OrData);
518}
519
538UINT16
539EFIAPI
541 IN UINT64 Address,
542 IN UINT16 AndData
543 )
544{
545 UINTN Count;
546 PCI_SEGMENT_INFO *SegmentInfo;
547
548 SegmentInfo = GetPciSegmentInfo (&Count);
549 return MmioAnd16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), AndData);
550}
551
573UINT16
574EFIAPI
576 IN UINT64 Address,
577 IN UINT16 AndData,
578 IN UINT16 OrData
579 )
580{
581 UINTN Count;
582 PCI_SEGMENT_INFO *SegmentInfo;
583
584 SegmentInfo = GetPciSegmentInfo (&Count);
585 return MmioAndThenOr16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), AndData, OrData);
586}
587
610UINT16
611EFIAPI
613 IN UINT64 Address,
614 IN UINTN StartBit,
615 IN UINTN EndBit
616 )
617{
618 UINTN Count;
619 PCI_SEGMENT_INFO *SegmentInfo;
620
621 SegmentInfo = GetPciSegmentInfo (&Count);
622 return MmioBitFieldRead16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit);
623}
624
650UINT16
651EFIAPI
653 IN UINT64 Address,
654 IN UINTN StartBit,
655 IN UINTN EndBit,
656 IN UINT16 Value
657 )
658{
659 UINTN Count;
660 PCI_SEGMENT_INFO *SegmentInfo;
661
662 SegmentInfo = GetPciSegmentInfo (&Count);
663 return MmioBitFieldWrite16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, Value);
664}
665
694UINT16
695EFIAPI
697 IN UINT64 Address,
698 IN UINTN StartBit,
699 IN UINTN EndBit,
700 IN UINT16 OrData
701 )
702{
703 UINTN Count;
704 PCI_SEGMENT_INFO *SegmentInfo;
705
706 SegmentInfo = GetPciSegmentInfo (&Count);
707 return MmioBitFieldOr16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, OrData);
708}
709
738UINT16
739EFIAPI
741 IN UINT64 Address,
742 IN UINTN StartBit,
743 IN UINTN EndBit,
744 IN UINT16 AndData
745 )
746{
747 UINTN Count;
748 PCI_SEGMENT_INFO *SegmentInfo;
749
750 SegmentInfo = GetPciSegmentInfo (&Count);
751 return MmioBitFieldAnd16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, AndData);
752}
753
785UINT16
786EFIAPI
788 IN UINT64 Address,
789 IN UINTN StartBit,
790 IN UINTN EndBit,
791 IN UINT16 AndData,
792 IN UINT16 OrData
793 )
794{
795 UINTN Count;
796 PCI_SEGMENT_INFO *SegmentInfo;
797
798 SegmentInfo = GetPciSegmentInfo (&Count);
799 return MmioBitFieldAndThenOr16 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, AndData, OrData);
800}
801
816UINT32
817EFIAPI
819 IN UINT64 Address
820 )
821{
822 UINTN Count;
823 PCI_SEGMENT_INFO *SegmentInfo;
824
825 SegmentInfo = GetPciSegmentInfo (&Count);
826 return MmioRead32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count));
827}
828
844UINT32
845EFIAPI
847 IN UINT64 Address,
848 IN UINT32 Value
849 )
850{
851 UINTN Count;
852 PCI_SEGMENT_INFO *SegmentInfo;
853
854 SegmentInfo = GetPciSegmentInfo (&Count);
855 return MmioWrite32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), Value);
856}
857
876UINT32
877EFIAPI
879 IN UINT64 Address,
880 IN UINT32 OrData
881 )
882{
883 UINTN Count;
884 PCI_SEGMENT_INFO *SegmentInfo;
885
886 SegmentInfo = GetPciSegmentInfo (&Count);
887 return MmioOr32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), OrData);
888}
889
908UINT32
909EFIAPI
911 IN UINT64 Address,
912 IN UINT32 AndData
913 )
914{
915 UINTN Count;
916 PCI_SEGMENT_INFO *SegmentInfo;
917
918 SegmentInfo = GetPciSegmentInfo (&Count);
919 return MmioAnd32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), AndData);
920}
921
943UINT32
944EFIAPI
946 IN UINT64 Address,
947 IN UINT32 AndData,
948 IN UINT32 OrData
949 )
950{
951 UINTN Count;
952 PCI_SEGMENT_INFO *SegmentInfo;
953
954 SegmentInfo = GetPciSegmentInfo (&Count);
955 return MmioAndThenOr32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), AndData, OrData);
956}
957
980UINT32
981EFIAPI
983 IN UINT64 Address,
984 IN UINTN StartBit,
985 IN UINTN EndBit
986 )
987{
988 UINTN Count;
989 PCI_SEGMENT_INFO *SegmentInfo;
990
991 SegmentInfo = GetPciSegmentInfo (&Count);
992 return MmioBitFieldRead32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit);
993}
994
1020UINT32
1021EFIAPI
1023 IN UINT64 Address,
1024 IN UINTN StartBit,
1025 IN UINTN EndBit,
1026 IN UINT32 Value
1027 )
1028{
1029 UINTN Count;
1030 PCI_SEGMENT_INFO *SegmentInfo;
1031
1032 SegmentInfo = GetPciSegmentInfo (&Count);
1033 return MmioBitFieldWrite32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, Value);
1034}
1035
1063UINT32
1064EFIAPI
1066 IN UINT64 Address,
1067 IN UINTN StartBit,
1068 IN UINTN EndBit,
1069 IN UINT32 OrData
1070 )
1071{
1072 UINTN Count;
1073 PCI_SEGMENT_INFO *SegmentInfo;
1074
1075 SegmentInfo = GetPciSegmentInfo (&Count);
1076 return MmioBitFieldOr32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, OrData);
1077}
1078
1106UINT32
1107EFIAPI
1109 IN UINT64 Address,
1110 IN UINTN StartBit,
1111 IN UINTN EndBit,
1112 IN UINT32 AndData
1113 )
1114{
1115 UINTN Count;
1116 PCI_SEGMENT_INFO *SegmentInfo;
1117
1118 SegmentInfo = GetPciSegmentInfo (&Count);
1119 return MmioBitFieldAnd32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, AndData);
1120}
1121
1153UINT32
1154EFIAPI
1156 IN UINT64 Address,
1157 IN UINTN StartBit,
1158 IN UINTN EndBit,
1159 IN UINT32 AndData,
1160 IN UINT32 OrData
1161 )
1162{
1163 UINTN Count;
1164 PCI_SEGMENT_INFO *SegmentInfo;
1165
1166 SegmentInfo = GetPciSegmentInfo (&Count);
1167 return MmioBitFieldAndThenOr32 (PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count), StartBit, EndBit, AndData, OrData);
1168}
1169
1193UINTN
1194EFIAPI
1196 IN UINT64 StartAddress,
1197 IN UINTN Size,
1198 OUT VOID *Buffer
1199 )
1200{
1201 UINTN ReturnValue;
1202 UINTN Count;
1203 PCI_SEGMENT_INFO *SegmentInfo;
1204 UINTN Address;
1205
1206 ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);
1207
1208 SegmentInfo = GetPciSegmentInfo (&Count);
1209 Address = PciSegmentLibGetEcamAddress (StartAddress, SegmentInfo, Count);
1210
1211 if (Size == 0) {
1212 return 0;
1213 }
1214
1215 ASSERT (Buffer != NULL);
1216
1217 //
1218 // Save Size for return
1219 //
1220 ReturnValue = Size;
1221
1222 if ((Address & BIT0) != 0) {
1223 //
1224 // Read a byte if StartAddress is byte aligned
1225 //
1226 *(volatile UINT8 *)Buffer = MmioRead8 (Address);
1227 Address += sizeof (UINT8);
1228 Size -= sizeof (UINT8);
1229 Buffer = (UINT8 *)Buffer + 1;
1230 }
1231
1232 if ((Size >= sizeof (UINT16)) && ((Address & BIT1) != 0)) {
1233 //
1234 // Read a word if StartAddress is word aligned
1235 //
1236 WriteUnaligned16 (Buffer, MmioRead16 (Address));
1237 Address += sizeof (UINT16);
1238 Size -= sizeof (UINT16);
1239 Buffer = (UINT16 *)Buffer + 1;
1240 }
1241
1242 while (Size >= sizeof (UINT32)) {
1243 //
1244 // Read as many double words as possible
1245 //
1246 WriteUnaligned32 (Buffer, MmioRead32 (Address));
1247 Address += sizeof (UINT32);
1248 Size -= sizeof (UINT32);
1249 Buffer = (UINT32 *)Buffer + 1;
1250 }
1251
1252 if (Size >= sizeof (UINT16)) {
1253 //
1254 // Read the last remaining word if exist
1255 //
1256 WriteUnaligned16 (Buffer, MmioRead16 (Address));
1257 Address += sizeof (UINT16);
1258 Size -= sizeof (UINT16);
1259 Buffer = (UINT16 *)Buffer + 1;
1260 }
1261
1262 if (Size >= sizeof (UINT8)) {
1263 //
1264 // Read the last remaining byte if exist
1265 //
1266 *(volatile UINT8 *)Buffer = MmioRead8 (Address);
1267 }
1268
1269 return ReturnValue;
1270}
1271
1296UINTN
1297EFIAPI
1299 IN UINT64 StartAddress,
1300 IN UINTN Size,
1301 IN VOID *Buffer
1302 )
1303{
1304 UINTN ReturnValue;
1305 UINTN Count;
1306 PCI_SEGMENT_INFO *SegmentInfo;
1307 UINTN Address;
1308
1309 ASSERT (((StartAddress & 0xFFF) + Size) <= 0x1000);
1310
1311 SegmentInfo = GetPciSegmentInfo (&Count);
1312 Address = PciSegmentLibGetEcamAddress (StartAddress, SegmentInfo, Count);
1313
1314 if (Size == 0) {
1315 return 0;
1316 }
1317
1318 ASSERT (Buffer != NULL);
1319
1320 //
1321 // Save Size for return
1322 //
1323 ReturnValue = Size;
1324
1325 if ((Address & BIT0) != 0) {
1326 //
1327 // Write a byte if StartAddress is byte aligned
1328 //
1329 MmioWrite8 (Address, *(UINT8 *)Buffer);
1330 Address += sizeof (UINT8);
1331 Size -= sizeof (UINT8);
1332 Buffer = (UINT8 *)Buffer + 1;
1333 }
1334
1335 if ((Size >= sizeof (UINT16)) && ((Address & BIT1) != 0)) {
1336 //
1337 // Write a word if StartAddress is word aligned
1338 //
1339 MmioWrite16 (Address, ReadUnaligned16 (Buffer));
1340 Address += sizeof (UINT16);
1341 Size -= sizeof (UINT16);
1342 Buffer = (UINT16 *)Buffer + 1;
1343 }
1344
1345 while (Size >= sizeof (UINT32)) {
1346 //
1347 // Write as many double words as possible
1348 //
1349 MmioWrite32 (Address, ReadUnaligned32 (Buffer));
1350 Address += sizeof (UINT32);
1351 Size -= sizeof (UINT32);
1352 Buffer = (UINT32 *)Buffer + 1;
1353 }
1354
1355 if (Size >= sizeof (UINT16)) {
1356 //
1357 // Write the last remaining word if exist
1358 //
1359 MmioWrite16 (Address, ReadUnaligned16 (Buffer));
1360 Address += sizeof (UINT16);
1361 Size -= sizeof (UINT16);
1362 Buffer = (UINT16 *)Buffer + 1;
1363 }
1364
1365 if (Size >= sizeof (UINT8)) {
1366 //
1367 // Write the last remaining byte if exist
1368 //
1369 MmioWrite8 (Address, *(UINT8 *)Buffer);
1370 }
1371
1372 return ReturnValue;
1373}
UINT64 UINTN
UINT16 EFIAPI ReadUnaligned16(IN CONST UINT16 *Buffer)
Definition: Unaligned.c:29
UINT32 EFIAPI WriteUnaligned32(OUT UINT32 *Buffer, IN UINT32 Value)
Definition: Unaligned.c:177
UINT16 EFIAPI WriteUnaligned16(OUT UINT16 *Buffer, IN UINT16 Value)
Definition: Unaligned.c:61
UINT32 EFIAPI ReadUnaligned32(IN CONST UINT32 *Buffer)
Definition: Unaligned.c:145
UINTN PciSegmentLibVirtualAddress(IN UINTN Address)
UINT16 EFIAPI MmioBitFieldAndThenOr16(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData, IN UINT16 OrData)
Definition: IoHighLevel.c:1750
UINT8 EFIAPI MmioBitFieldRead8(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit)
Definition: IoHighLevel.c:1293
UINT32 EFIAPI MmioBitFieldWrite32(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 Value)
Definition: IoHighLevel.c:1912
UINT8 EFIAPI MmioBitFieldOr8(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 OrData)
Definition: IoHighLevel.c:1369
UINT8 EFIAPI MmioBitFieldWrite8(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 Value)
Definition: IoHighLevel.c:1327
UINT8 EFIAPI MmioAnd8(IN UINTN Address, IN UINT8 AndData)
Definition: IoHighLevel.c:1231
UINT16 EFIAPI MmioAndThenOr16(IN UINTN Address, IN UINT16 AndData, IN UINT16 OrData)
Definition: IoHighLevel.c:1551
UINT32 EFIAPI MmioBitFieldAndThenOr32(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData, IN UINT32 OrData)
Definition: IoHighLevel.c:2044
UINT8 EFIAPI MmioBitFieldAndThenOr8(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData, IN UINT8 OrData)
Definition: IoHighLevel.c:1456
UINT16 EFIAPI MmioBitFieldWrite16(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 Value)
Definition: IoHighLevel.c:1618
UINT32 EFIAPI MmioBitFieldOr32(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 OrData)
Definition: IoHighLevel.c:1955
UINT16 EFIAPI MmioBitFieldAnd16(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData)
Definition: IoHighLevel.c:1704
UINT32 EFIAPI MmioBitFieldRead32(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit)
Definition: IoHighLevel.c:1877
UINT16 EFIAPI MmioBitFieldOr16(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 OrData)
Definition: IoHighLevel.c:1661
UINT32 EFIAPI MmioAnd32(IN UINTN Address, IN UINT32 AndData)
Definition: IoHighLevel.c:1814
UINT32 EFIAPI MmioOr32(IN UINTN Address, IN UINT32 OrData)
Definition: IoHighLevel.c:1785
UINT8 EFIAPI MmioAndThenOr8(IN UINTN Address, IN UINT8 AndData, IN UINT8 OrData)
Definition: IoHighLevel.c:1262
UINT16 EFIAPI MmioBitFieldRead16(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit)
Definition: IoHighLevel.c:1583
UINT16 EFIAPI MmioRead16(IN UINTN Address)
Definition: IoLib.c:170
UINT8 EFIAPI MmioRead8(IN UINTN Address)
Definition: IoLib.c:82
UINT8 EFIAPI MmioOr8(IN UINTN Address, IN UINT8 OrData)
Definition: IoHighLevel.c:1203
UINT8 EFIAPI MmioWrite8(IN UINTN Address, IN UINT8 Value)
Definition: IoLib.c:126
UINT32 EFIAPI MmioRead32(IN UINTN Address)
Definition: IoLib.c:262
UINT16 EFIAPI MmioAnd16(IN UINTN Address, IN UINT16 AndData)
Definition: IoHighLevel.c:1520
UINT8 EFIAPI MmioBitFieldAnd8(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData)
Definition: IoHighLevel.c:1411
UINT16 EFIAPI MmioOr16(IN UINTN Address, IN UINT16 OrData)
Definition: IoHighLevel.c:1491
UINT16 EFIAPI MmioWrite16(IN UINTN Address, IN UINT16 Value)
Definition: IoLib.c:216
UINT32 EFIAPI MmioAndThenOr32(IN UINTN Address, IN UINT32 AndData, IN UINT32 OrData)
Definition: IoHighLevel.c:1845
UINT32 EFIAPI MmioBitFieldAnd32(IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData)
Definition: IoHighLevel.c:1998
UINT32 EFIAPI MmioWrite32(IN UINTN Address, IN UINT32 Value)
Definition: IoLib.c:309
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define PCI_ECAM_ADDRESS(Bus, Device, Function, Offset)
Definition: PciExpress21.h:29
PCI_SEGMENT_INFO *EFIAPI GetPciSegmentInfo(UINTN *Count)
UINT8 EFIAPI PciSegmentRead8(IN UINT64 Address)
UINT32 EFIAPI PciSegmentAnd32(IN UINT64 Address, IN UINT32 AndData)
UINT16 EFIAPI PciSegmentWrite16(IN UINT64 Address, IN UINT16 Value)
UINT16 EFIAPI PciSegmentBitFieldAnd16(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData)
UINT32 EFIAPI PciSegmentWrite32(IN UINT64 Address, IN UINT32 Value)
UINT8 EFIAPI PciSegmentBitFieldOr8(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 OrData)
UINT16 EFIAPI PciSegmentBitFieldOr16(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 OrData)
UINTN EFIAPI PciSegmentReadBuffer(IN UINT64 StartAddress, IN UINTN Size, OUT VOID *Buffer)
UINT8 EFIAPI PciSegmentBitFieldAnd8(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData)
UINT16 EFIAPI PciSegmentAnd16(IN UINT64 Address, IN UINT16 AndData)
UINT16 EFIAPI PciSegmentRead16(IN UINT64 Address)
UINT32 EFIAPI PciSegmentBitFieldWrite32(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 Value)
UINTN PciSegmentLibGetEcamAddress(IN UINT64 Address, IN CONST PCI_SEGMENT_INFO *SegmentInfo, IN UINTN Count)
UINT8 EFIAPI PciSegmentBitFieldWrite8(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 Value)
UINT16 EFIAPI PciSegmentOr16(IN UINT64 Address, IN UINT16 OrData)
UINT32 EFIAPI PciSegmentBitFieldAndThenOr32(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData, IN UINT32 OrData)
UINT8 EFIAPI PciSegmentBitFieldRead8(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit)
UINT8 EFIAPI PciSegmentOr8(IN UINT64 Address, IN UINT8 OrData)
UINT16 EFIAPI PciSegmentBitFieldAndThenOr16(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData, IN UINT16 OrData)
UINT16 EFIAPI PciSegmentBitFieldRead16(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit)
UINT32 EFIAPI PciSegmentAndThenOr32(IN UINT64 Address, IN UINT32 AndData, IN UINT32 OrData)
UINT32 EFIAPI PciSegmentRead32(IN UINT64 Address)
UINT8 EFIAPI PciSegmentAnd8(IN UINT64 Address, IN UINT8 AndData)
UINT8 EFIAPI PciSegmentBitFieldAndThenOr8(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData, IN UINT8 OrData)
UINT32 EFIAPI PciSegmentBitFieldOr32(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 OrData)
UINT16 EFIAPI PciSegmentAndThenOr16(IN UINT64 Address, IN UINT16 AndData, IN UINT16 OrData)
UINT32 EFIAPI PciSegmentBitFieldAnd32(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData)
UINT8 EFIAPI PciSegmentAndThenOr8(IN UINT64 Address, IN UINT8 AndData, IN UINT8 OrData)
UINT16 EFIAPI PciSegmentBitFieldWrite16(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 Value)
UINT8 EFIAPI PciSegmentWrite8(IN UINT64 Address, IN UINT8 Value)
UINT32 EFIAPI PciSegmentBitFieldRead32(IN UINT64 Address, IN UINTN StartBit, IN UINTN EndBit)
UINTN EFIAPI PciSegmentWriteBuffer(IN UINT64 StartAddress, IN UINTN Size, IN VOID *Buffer)
UINT32 EFIAPI PciSegmentOr32(IN UINT64 Address, IN UINT32 OrData)
EFI_STATUS EFIAPI Register(IN EFI_PEI_RSC_HANDLER_CALLBACK Callback)