|
@@ -17,6 +17,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
17
|
17
|
#ifndef __BASE_LIB__
|
18
|
18
|
#define __BASE_LIB__
|
19
|
19
|
|
|
20
|
+FILE_LICENCE ( BSD3 );
|
|
21
|
+
|
20
|
22
|
//
|
21
|
23
|
// Definitions for architecture-specific types
|
22
|
24
|
//
|
|
@@ -1291,7 +1293,7 @@ InitializeListHead (
|
1291
|
1293
|
If Entry is NULL, then ASSERT().
|
1292
|
1294
|
If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
1293
|
1295
|
InitializeListHead(), then ASSERT().
|
1294
|
|
- If PcdMaximumLinkedListLenth is not zero, and prior to insertion the number
|
|
1296
|
+ If PcdMaximumLinkedListLength is not zero, and prior to insertion the number
|
1295
|
1297
|
of nodes in ListHead, including the ListHead node, is greater than or
|
1296
|
1298
|
equal to PcdMaximumLinkedListLength, then ASSERT().
|
1297
|
1299
|
|
|
@@ -1321,7 +1323,7 @@ InsertHeadList (
|
1321
|
1323
|
If Entry is NULL, then ASSERT().
|
1322
|
1324
|
If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
1323
|
1325
|
InitializeListHead(), then ASSERT().
|
1324
|
|
- If PcdMaximumLinkedListLenth is not zero, and prior to insertion the number
|
|
1326
|
+ If PcdMaximumLinkedListLength is not zero, and prior to insertion the number
|
1325
|
1327
|
of nodes in ListHead, including the ListHead node, is greater than or
|
1326
|
1328
|
equal to PcdMaximumLinkedListLength, then ASSERT().
|
1327
|
1329
|
|
|
@@ -1350,7 +1352,7 @@ InsertTailList (
|
1350
|
1352
|
If List is NULL, then ASSERT().
|
1351
|
1353
|
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
1352
|
1354
|
InitializeListHead(), then ASSERT().
|
1353
|
|
- If PcdMaximumLinkedListLenth is not zero, and the number of nodes
|
|
1355
|
+ If PcdMaximumLinkedListLength is not zero, and the number of nodes
|
1354
|
1356
|
in List, including the List node, is greater than or equal to
|
1355
|
1357
|
PcdMaximumLinkedListLength, then ASSERT().
|
1356
|
1358
|
|
|
@@ -1378,8 +1380,8 @@ GetFirstNode (
|
1378
|
1380
|
If Node is NULL, then ASSERT().
|
1379
|
1381
|
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
1380
|
1382
|
InitializeListHead(), then ASSERT().
|
1381
|
|
- If PcdMaximumLinkedListLenth is not zero, and List contains more than
|
1382
|
|
- PcdMaximumLinkedListLenth nodes, then ASSERT().
|
|
1383
|
+ If PcdMaximumLinkedListLength is not zero, and List contains more than
|
|
1384
|
+ PcdMaximumLinkedListLength nodes, then ASSERT().
|
1383
|
1385
|
If PcdVerifyNodeInList is TRUE and Node is not a node in List, then ASSERT().
|
1384
|
1386
|
|
1385
|
1387
|
@param List A pointer to the head node of a doubly linked list.
|
|
@@ -1407,8 +1409,8 @@ GetNextNode (
|
1407
|
1409
|
If Node is NULL, then ASSERT().
|
1408
|
1410
|
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
1409
|
1411
|
InitializeListHead(), then ASSERT().
|
1410
|
|
- If PcdMaximumLinkedListLenth is not zero, and List contains more than
|
1411
|
|
- PcdMaximumLinkedListLenth nodes, then ASSERT().
|
|
1412
|
+ If PcdMaximumLinkedListLength is not zero, and List contains more than
|
|
1413
|
+ PcdMaximumLinkedListLength nodes, then ASSERT().
|
1412
|
1414
|
If PcdVerifyNodeInList is TRUE and Node is not a node in List, then ASSERT().
|
1413
|
1415
|
|
1414
|
1416
|
@param List A pointer to the head node of a doubly linked list.
|
|
@@ -1434,7 +1436,7 @@ GetPreviousNode (
|
1434
|
1436
|
If ListHead is NULL, then ASSERT().
|
1435
|
1437
|
If ListHead was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
1436
|
1438
|
InitializeListHead(), then ASSERT().
|
1437
|
|
- If PcdMaximumLinkedListLenth is not zero, and the number of nodes
|
|
1439
|
+ If PcdMaximumLinkedListLength is not zero, and the number of nodes
|
1438
|
1440
|
in List, including the List node, is greater than or equal to
|
1439
|
1441
|
PcdMaximumLinkedListLength, then ASSERT().
|
1440
|
1442
|
|
|
@@ -1464,7 +1466,7 @@ IsListEmpty (
|
1464
|
1466
|
If Node is NULL, then ASSERT().
|
1465
|
1467
|
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or InitializeListHead(),
|
1466
|
1468
|
then ASSERT().
|
1467
|
|
- If PcdMaximumLinkedListLenth is not zero, and the number of nodes
|
|
1469
|
+ If PcdMaximumLinkedListLength is not zero, and the number of nodes
|
1468
|
1470
|
in List, including the List node, is greater than or equal to
|
1469
|
1471
|
PcdMaximumLinkedListLength, then ASSERT().
|
1470
|
1472
|
If PcdVerifyNodeInList is TRUE and Node is not a node in List the and Node is not equal
|
|
@@ -1496,7 +1498,7 @@ IsNull (
|
1496
|
1498
|
If Node is NULL, then ASSERT().
|
1497
|
1499
|
If List was not initialized with INTIALIZE_LIST_HEAD_VARIABLE() or
|
1498
|
1500
|
InitializeListHead(), then ASSERT().
|
1499
|
|
- If PcdMaximumLinkedListLenth is not zero, and the number of nodes
|
|
1501
|
+ If PcdMaximumLinkedListLength is not zero, and the number of nodes
|
1500
|
1502
|
in List, including the List node, is greater than or equal to
|
1501
|
1503
|
PcdMaximumLinkedListLength, then ASSERT().
|
1502
|
1504
|
If PcdVerifyNodeInList is TRUE and Node is not a node in List, then ASSERT().
|
|
@@ -2343,6 +2345,7 @@ BitFieldRead8 (
|
2343
|
2345
|
If StartBit is greater than 7, then ASSERT().
|
2344
|
2346
|
If EndBit is greater than 7, then ASSERT().
|
2345
|
2347
|
If EndBit is less than StartBit, then ASSERT().
|
|
2348
|
+ If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2346
|
2349
|
|
2347
|
2350
|
@param Operand Operand on which to perform the bitfield operation.
|
2348
|
2351
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2376,6 +2379,7 @@ BitFieldWrite8 (
|
2376
|
2379
|
If StartBit is greater than 7, then ASSERT().
|
2377
|
2380
|
If EndBit is greater than 7, then ASSERT().
|
2378
|
2381
|
If EndBit is less than StartBit, then ASSERT().
|
|
2382
|
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2379
|
2383
|
|
2380
|
2384
|
@param Operand Operand on which to perform the bitfield operation.
|
2381
|
2385
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2409,6 +2413,7 @@ BitFieldOr8 (
|
2409
|
2413
|
If StartBit is greater than 7, then ASSERT().
|
2410
|
2414
|
If EndBit is greater than 7, then ASSERT().
|
2411
|
2415
|
If EndBit is less than StartBit, then ASSERT().
|
|
2416
|
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2412
|
2417
|
|
2413
|
2418
|
@param Operand Operand on which to perform the bitfield operation.
|
2414
|
2419
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2443,6 +2448,8 @@ BitFieldAnd8 (
|
2443
|
2448
|
If StartBit is greater than 7, then ASSERT().
|
2444
|
2449
|
If EndBit is greater than 7, then ASSERT().
|
2445
|
2450
|
If EndBit is less than StartBit, then ASSERT().
|
|
2451
|
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
|
2452
|
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2446
|
2453
|
|
2447
|
2454
|
@param Operand Operand on which to perform the bitfield operation.
|
2448
|
2455
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2505,6 +2512,7 @@ BitFieldRead16 (
|
2505
|
2512
|
If StartBit is greater than 15, then ASSERT().
|
2506
|
2513
|
If EndBit is greater than 15, then ASSERT().
|
2507
|
2514
|
If EndBit is less than StartBit, then ASSERT().
|
|
2515
|
+ If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2508
|
2516
|
|
2509
|
2517
|
@param Operand Operand on which to perform the bitfield operation.
|
2510
|
2518
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2538,6 +2546,7 @@ BitFieldWrite16 (
|
2538
|
2546
|
If StartBit is greater than 15, then ASSERT().
|
2539
|
2547
|
If EndBit is greater than 15, then ASSERT().
|
2540
|
2548
|
If EndBit is less than StartBit, then ASSERT().
|
|
2549
|
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2541
|
2550
|
|
2542
|
2551
|
@param Operand Operand on which to perform the bitfield operation.
|
2543
|
2552
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2571,6 +2580,7 @@ BitFieldOr16 (
|
2571
|
2580
|
If StartBit is greater than 15, then ASSERT().
|
2572
|
2581
|
If EndBit is greater than 15, then ASSERT().
|
2573
|
2582
|
If EndBit is less than StartBit, then ASSERT().
|
|
2583
|
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2574
|
2584
|
|
2575
|
2585
|
@param Operand Operand on which to perform the bitfield operation.
|
2576
|
2586
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2605,6 +2615,8 @@ BitFieldAnd16 (
|
2605
|
2615
|
If StartBit is greater than 15, then ASSERT().
|
2606
|
2616
|
If EndBit is greater than 15, then ASSERT().
|
2607
|
2617
|
If EndBit is less than StartBit, then ASSERT().
|
|
2618
|
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
|
2619
|
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2608
|
2620
|
|
2609
|
2621
|
@param Operand Operand on which to perform the bitfield operation.
|
2610
|
2622
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2667,6 +2679,7 @@ BitFieldRead32 (
|
2667
|
2679
|
If StartBit is greater than 31, then ASSERT().
|
2668
|
2680
|
If EndBit is greater than 31, then ASSERT().
|
2669
|
2681
|
If EndBit is less than StartBit, then ASSERT().
|
|
2682
|
+ If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2670
|
2683
|
|
2671
|
2684
|
@param Operand Operand on which to perform the bitfield operation.
|
2672
|
2685
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2700,6 +2713,7 @@ BitFieldWrite32 (
|
2700
|
2713
|
If StartBit is greater than 31, then ASSERT().
|
2701
|
2714
|
If EndBit is greater than 31, then ASSERT().
|
2702
|
2715
|
If EndBit is less than StartBit, then ASSERT().
|
|
2716
|
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2703
|
2717
|
|
2704
|
2718
|
@param Operand Operand on which to perform the bitfield operation.
|
2705
|
2719
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2733,6 +2747,7 @@ BitFieldOr32 (
|
2733
|
2747
|
If StartBit is greater than 31, then ASSERT().
|
2734
|
2748
|
If EndBit is greater than 31, then ASSERT().
|
2735
|
2749
|
If EndBit is less than StartBit, then ASSERT().
|
|
2750
|
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2736
|
2751
|
|
2737
|
2752
|
@param Operand Operand on which to perform the bitfield operation.
|
2738
|
2753
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2767,6 +2782,8 @@ BitFieldAnd32 (
|
2767
|
2782
|
If StartBit is greater than 31, then ASSERT().
|
2768
|
2783
|
If EndBit is greater than 31, then ASSERT().
|
2769
|
2784
|
If EndBit is less than StartBit, then ASSERT().
|
|
2785
|
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
|
2786
|
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2770
|
2787
|
|
2771
|
2788
|
@param Operand Operand on which to perform the bitfield operation.
|
2772
|
2789
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2829,6 +2846,7 @@ BitFieldRead64 (
|
2829
|
2846
|
If StartBit is greater than 63, then ASSERT().
|
2830
|
2847
|
If EndBit is greater than 63, then ASSERT().
|
2831
|
2848
|
If EndBit is less than StartBit, then ASSERT().
|
|
2849
|
+ If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2832
|
2850
|
|
2833
|
2851
|
@param Operand Operand on which to perform the bitfield operation.
|
2834
|
2852
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2862,6 +2880,7 @@ BitFieldWrite64 (
|
2862
|
2880
|
If StartBit is greater than 63, then ASSERT().
|
2863
|
2881
|
If EndBit is greater than 63, then ASSERT().
|
2864
|
2882
|
If EndBit is less than StartBit, then ASSERT().
|
|
2883
|
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2865
|
2884
|
|
2866
|
2885
|
@param Operand Operand on which to perform the bitfield operation.
|
2867
|
2886
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2895,6 +2914,7 @@ BitFieldOr64 (
|
2895
|
2914
|
If StartBit is greater than 63, then ASSERT().
|
2896
|
2915
|
If EndBit is greater than 63, then ASSERT().
|
2897
|
2916
|
If EndBit is less than StartBit, then ASSERT().
|
|
2917
|
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2898
|
2918
|
|
2899
|
2919
|
@param Operand Operand on which to perform the bitfield operation.
|
2900
|
2920
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -2929,6 +2949,8 @@ BitFieldAnd64 (
|
2929
|
2949
|
If StartBit is greater than 63, then ASSERT().
|
2930
|
2950
|
If EndBit is greater than 63, then ASSERT().
|
2931
|
2951
|
If EndBit is less than StartBit, then ASSERT().
|
|
2952
|
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
|
2953
|
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
2932
|
2954
|
|
2933
|
2955
|
@param Operand Operand on which to perform the bitfield operation.
|
2934
|
2956
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -5380,6 +5402,7 @@ AsmMsrBitFieldRead32 (
|
5380
|
5402
|
If StartBit is greater than 31, then ASSERT().
|
5381
|
5403
|
If EndBit is greater than 31, then ASSERT().
|
5382
|
5404
|
If EndBit is less than StartBit, then ASSERT().
|
|
5405
|
+ If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
5383
|
5406
|
|
5384
|
5407
|
@param Index The 32-bit MSR index to write.
|
5385
|
5408
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -5416,6 +5439,7 @@ AsmMsrBitFieldWrite32 (
|
5416
|
5439
|
If StartBit is greater than 31, then ASSERT().
|
5417
|
5440
|
If EndBit is greater than 31, then ASSERT().
|
5418
|
5441
|
If EndBit is less than StartBit, then ASSERT().
|
|
5442
|
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
5419
|
5443
|
|
5420
|
5444
|
@param Index The 32-bit MSR index to write.
|
5421
|
5445
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -5452,6 +5476,7 @@ AsmMsrBitFieldOr32 (
|
5452
|
5476
|
If StartBit is greater than 31, then ASSERT().
|
5453
|
5477
|
If EndBit is greater than 31, then ASSERT().
|
5454
|
5478
|
If EndBit is less than StartBit, then ASSERT().
|
|
5479
|
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
5455
|
5480
|
|
5456
|
5481
|
@param Index The 32-bit MSR index to write.
|
5457
|
5482
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -5490,6 +5515,8 @@ AsmMsrBitFieldAnd32 (
|
5490
|
5515
|
If StartBit is greater than 31, then ASSERT().
|
5491
|
5516
|
If EndBit is greater than 31, then ASSERT().
|
5492
|
5517
|
If EndBit is less than StartBit, then ASSERT().
|
|
5518
|
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
|
5519
|
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
5493
|
5520
|
|
5494
|
5521
|
@param Index The 32-bit MSR index to write.
|
5495
|
5522
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -5684,6 +5711,7 @@ AsmMsrBitFieldRead64 (
|
5684
|
5711
|
If StartBit is greater than 63, then ASSERT().
|
5685
|
5712
|
If EndBit is greater than 63, then ASSERT().
|
5686
|
5713
|
If EndBit is less than StartBit, then ASSERT().
|
|
5714
|
+ If Value is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
5687
|
5715
|
|
5688
|
5716
|
@param Index The 32-bit MSR index to write.
|
5689
|
5717
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -5720,6 +5748,7 @@ AsmMsrBitFieldWrite64 (
|
5720
|
5748
|
If StartBit is greater than 63, then ASSERT().
|
5721
|
5749
|
If EndBit is greater than 63, then ASSERT().
|
5722
|
5750
|
If EndBit is less than StartBit, then ASSERT().
|
|
5751
|
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
5723
|
5752
|
|
5724
|
5753
|
@param Index The 32-bit MSR index to write.
|
5725
|
5754
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -5756,6 +5785,7 @@ AsmMsrBitFieldOr64 (
|
5756
|
5785
|
If StartBit is greater than 63, then ASSERT().
|
5757
|
5786
|
If EndBit is greater than 63, then ASSERT().
|
5758
|
5787
|
If EndBit is less than StartBit, then ASSERT().
|
|
5788
|
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
5759
|
5789
|
|
5760
|
5790
|
@param Index The 32-bit MSR index to write.
|
5761
|
5791
|
@param StartBit The ordinal of the least significant bit in the bit field.
|
|
@@ -5793,6 +5823,8 @@ AsmMsrBitFieldAnd64 (
|
5793
|
5823
|
If StartBit is greater than 63, then ASSERT().
|
5794
|
5824
|
If EndBit is greater than 63, then ASSERT().
|
5795
|
5825
|
If EndBit is less than StartBit, then ASSERT().
|
|
5826
|
+ If AndData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
|
5827
|
+ If OrData is larger than the bitmask value range specified by StartBit and EndBit, then ASSERT().
|
5796
|
5828
|
|
5797
|
5829
|
@param Index The 32-bit MSR index to write.
|
5798
|
5830
|
@param StartBit The ordinal of the least significant bit in the bit field.
|