Changeset 77662 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BasePcdLibNull
- Timestamp:
- Mar 12, 2019 12:40:12 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129295
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776 /vendor/edk2/current 103735-103757,103769-103776,129194-129237
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.uni
r58464 r77662 1 // /** @file1 // /** @file 2 2 // Instance of PCD Library without support of dynamic PCD entries. 3 3 // -
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BasePcdLibNull/PcdLib.c
r58466 r77662 2 2 A emptry template implementation of PCD Library. 3 3 4 Copyright (c) 2006 - 201 4, Intel Corporation. All rights reserved.<BR>4 Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials 6 6 are licensed and made available under the terms and conditions of the BSD License … … 28 28 set values associated with a PCD token. 29 29 30 If SkuId >= 0x100, then ASSERT().31 32 30 @return Return the SKU ID that just be set. 33 31 … … 396 394 397 395 396 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES 398 397 /** 399 398 This function provides a means by which to set a value for a given PCD token. … … 401 400 Sets the 8-bit value for the token specified by TokenNumber 402 401 to the value specified by Value. Value is returned. 403 404 If the set operation was not correctly performed, then ASSERT().405 402 406 403 @param[in] TokenNumber The PCD token number to set a current value for. … … 430 427 to the value specified by Value. Value is returned. 431 428 432 If the set operation was not correctly performed, then ASSERT().433 434 429 @param[in] TokenNumber The PCD token number to set a current value for. 435 430 @param[in] Value The 16-bit value to set. … … 458 453 to the value specified by Value. Value is returned. 459 454 460 If the set operation was not correctly performed, then ASSERT().461 462 455 @param[in] TokenNumber The PCD token number to set a current value for. 463 456 @param[in] Value The 32-bit value to set. … … 485 478 Sets the 64-bit value for the token specified by TokenNumber 486 479 to the value specified by Value. Value is returned. 487 488 If the set operation was not correctly performed, then ASSERT().489 480 490 481 @param[in] TokenNumber The PCD token number to set a current value for. … … 515 506 If SizeOfBuffer is greater than the maximum size support by TokenNumber, 516 507 then set SizeOfBuffer to the maximum size supported by TokenNumber and 517 return NULL to indicate that the set operation was not actually performed, 518 or ASSERT() if the set operation was not corretly performed. 508 return NULL to indicate that the set operation was not actually performed. 519 509 520 510 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the … … 552 542 to the value specified by Value. Value is returned. 553 543 554 If the set operation was not correctly performed, then ASSERT().555 556 544 @param[in] TokenNumber The PCD token number to set a current value for. 557 545 @param[in] Value The boolean value to set. … … 581 569 582 570 If Guid is NULL, then ASSERT(). 583 If the set operation was not correctly performed, then ASSERT().584 571 585 572 @param[in] Guid The pointer to a 128-bit unique value that … … 613 600 614 601 If Guid is NULL, then ASSERT(). 615 If the set operation was not correctly performed, then ASSERT().616 602 617 603 @param[in] Guid The pointer to a 128-bit unique value that … … 645 631 646 632 If Guid is NULL, then ASSERT(). 647 If the set operation was not correctly performed, then ASSERT().648 633 649 634 @param[in] Guid The pointer to a 128-bit unique value that … … 677 662 678 663 If Guid is NULL, then ASSERT(). 679 If the set operation was not correctly performed, then ASSERT().680 664 681 665 @param[in] Guid The pointer to a 128-bit unique value that … … 709 693 the maximum size support by TokenNumber, then set SizeOfBuffer to the maximum size 710 694 supported by TokenNumber and return NULL to indicate that the set operation 711 was not actually performed , or ASSERT() if the set operation was not corretly performed.695 was not actually performed. 712 696 713 697 If Guid is NULL, then ASSERT(). … … 747 731 748 732 If Guid is NULL, then ASSERT(). 749 If the set operation was not correctly performed, then ASSERT().750 733 751 734 @param[in] Guid The pointer to a 128-bit unique value that … … 769 752 return FALSE; 770 753 } 771 772 754 #endif 755 756 /** 757 This function provides a means by which to set a value for a given PCD token. 758 759 Sets the 8-bit value for the token specified by TokenNumber 760 to the value specified by Value. 761 762 @param[in] TokenNumber The PCD token number to set a current value for. 763 @param[in] Value The 8-bit value to set. 764 765 @return The status of the set operation. 766 767 **/ 768 RETURN_STATUS 769 EFIAPI 770 LibPcdSet8S ( 771 IN UINTN TokenNumber, 772 IN UINT8 Value 773 ) 774 { 775 ASSERT (FALSE); 776 777 return RETURN_INVALID_PARAMETER; 778 } 779 780 /** 781 This function provides a means by which to set a value for a given PCD token. 782 783 Sets the 16-bit value for the token specified by TokenNumber 784 to the value specified by Value. 785 786 @param[in] TokenNumber The PCD token number to set a current value for. 787 @param[in] Value The 16-bit value to set. 788 789 @return The status of the set operation. 790 791 **/ 792 RETURN_STATUS 793 EFIAPI 794 LibPcdSet16S ( 795 IN UINTN TokenNumber, 796 IN UINT16 Value 797 ) 798 { 799 ASSERT (FALSE); 800 801 return RETURN_INVALID_PARAMETER; 802 } 803 804 /** 805 This function provides a means by which to set a value for a given PCD token. 806 807 Sets the 32-bit value for the token specified by TokenNumber 808 to the value specified by Value. 809 810 @param[in] TokenNumber The PCD token number to set a current value for. 811 @param[in] Value The 32-bit value to set. 812 813 @return The status of the set operation. 814 815 **/ 816 RETURN_STATUS 817 EFIAPI 818 LibPcdSet32S ( 819 IN UINTN TokenNumber, 820 IN UINT32 Value 821 ) 822 { 823 ASSERT (FALSE); 824 825 return RETURN_INVALID_PARAMETER; 826 } 827 828 /** 829 This function provides a means by which to set a value for a given PCD token. 830 831 Sets the 64-bit value for the token specified by TokenNumber 832 to the value specified by Value. 833 834 @param[in] TokenNumber The PCD token number to set a current value for. 835 @param[in] Value The 64-bit value to set. 836 837 @return The status of the set operation. 838 839 **/ 840 RETURN_STATUS 841 EFIAPI 842 LibPcdSet64S ( 843 IN UINTN TokenNumber, 844 IN UINT64 Value 845 ) 846 { 847 ASSERT (FALSE); 848 849 return RETURN_INVALID_PARAMETER; 850 } 851 852 /** 853 This function provides a means by which to set a value for a given PCD token. 854 855 Sets a buffer for the token specified by TokenNumber to the value specified 856 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size 857 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by 858 TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation 859 was not actually performed. 860 861 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to the 862 maximum size supported by TokenName and EFI_INVALID_PARAMETER must be returned. 863 864 If SizeOfBuffer is NULL, then ASSERT(). 865 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 866 867 @param[in] TokenNumber The PCD token number to set a current value for. 868 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. 869 @param[in] Buffer A pointer to the buffer to set. 870 871 @return The status of the set operation. 872 873 **/ 874 RETURN_STATUS 875 EFIAPI 876 LibPcdSetPtrS ( 877 IN UINTN TokenNumber, 878 IN OUT UINTN *SizeOfBuffer, 879 IN CONST VOID *Buffer 880 ) 881 { 882 ASSERT (FALSE); 883 884 return RETURN_INVALID_PARAMETER; 885 } 886 887 /** 888 This function provides a means by which to set a value for a given PCD token. 889 890 Sets the boolean value for the token specified by TokenNumber 891 to the value specified by Value. 892 893 @param[in] TokenNumber The PCD token number to set a current value for. 894 @param[in] Value The boolean value to set. 895 896 @return The status of the set operation. 897 898 **/ 899 RETURN_STATUS 900 EFIAPI 901 LibPcdSetBoolS ( 902 IN UINTN TokenNumber, 903 IN BOOLEAN Value 904 ) 905 { 906 ASSERT (FALSE); 907 908 return RETURN_INVALID_PARAMETER; 909 } 910 911 /** 912 This function provides a means by which to set a value for a given PCD token. 913 914 Sets the 8-bit value for the token specified by TokenNumber 915 to the value specified by Value. 916 917 If Guid is NULL, then ASSERT(). 918 919 @param[in] Guid The pointer to a 128-bit unique value that 920 designates which namespace to set a value from. 921 @param[in] TokenNumber The PCD token number to set a current value for. 922 @param[in] Value The 8-bit value to set. 923 924 @return The status of the set operation. 925 926 **/ 927 RETURN_STATUS 928 EFIAPI 929 LibPcdSetEx8S ( 930 IN CONST GUID *Guid, 931 IN UINTN TokenNumber, 932 IN UINT8 Value 933 ) 934 { 935 ASSERT (FALSE); 936 937 return RETURN_INVALID_PARAMETER; 938 } 939 940 /** 941 This function provides a means by which to set a value for a given PCD token. 942 943 Sets the 16-bit value for the token specified by TokenNumber 944 to the value specified by Value. 945 946 If Guid is NULL, then ASSERT(). 947 948 @param[in] Guid The pointer to a 128-bit unique value that 949 designates which namespace to set a value from. 950 @param[in] TokenNumber The PCD token number to set a current value for. 951 @param[in] Value The 16-bit value to set. 952 953 @return The status of the set operation. 954 955 **/ 956 RETURN_STATUS 957 EFIAPI 958 LibPcdSetEx16S ( 959 IN CONST GUID *Guid, 960 IN UINTN TokenNumber, 961 IN UINT16 Value 962 ) 963 { 964 ASSERT (FALSE); 965 966 return RETURN_INVALID_PARAMETER; 967 } 968 969 /** 970 This function provides a means by which to set a value for a given PCD token. 971 972 Sets the 32-bit value for the token specified by TokenNumber 973 to the value specified by Value. 974 975 If Guid is NULL, then ASSERT(). 976 977 @param[in] Guid The pointer to a 128-bit unique value that 978 designates which namespace to set a value from. 979 @param[in] TokenNumber The PCD token number to set a current value for. 980 @param[in] Value The 32-bit value to set. 981 982 @return The status of the set operation. 983 984 **/ 985 RETURN_STATUS 986 EFIAPI 987 LibPcdSetEx32S ( 988 IN CONST GUID *Guid, 989 IN UINTN TokenNumber, 990 IN UINT32 Value 991 ) 992 { 993 ASSERT (FALSE); 994 995 return RETURN_INVALID_PARAMETER; 996 } 997 998 /** 999 This function provides a means by which to set a value for a given PCD token. 1000 1001 Sets the 64-bit value for the token specified by TokenNumber 1002 to the value specified by Value. 1003 1004 If Guid is NULL, then ASSERT(). 1005 1006 @param[in] Guid The pointer to a 128-bit unique value that 1007 designates which namespace to set a value from. 1008 @param[in] TokenNumber The PCD token number to set a current value for. 1009 @param[in] Value The 64-bit value to set. 1010 1011 @return The status of the set operation. 1012 1013 **/ 1014 RETURN_STATUS 1015 EFIAPI 1016 LibPcdSetEx64S ( 1017 IN CONST GUID *Guid, 1018 IN UINTN TokenNumber, 1019 IN UINT64 Value 1020 ) 1021 { 1022 ASSERT (FALSE); 1023 1024 return RETURN_INVALID_PARAMETER; 1025 } 1026 1027 /** 1028 This function provides a means by which to set a value for a given PCD token. 1029 1030 Sets a buffer for the token specified by TokenNumber to the value specified by 1031 Buffer and SizeOfBuffer. If SizeOfBuffer is greater than the maximum size 1032 support by TokenNumber, then set SizeOfBuffer to the maximum size supported by 1033 TokenNumber and return EFI_INVALID_PARAMETER to indicate that the set operation 1034 was not actually performed. 1035 1036 If Guid is NULL, then ASSERT(). 1037 If SizeOfBuffer is NULL, then ASSERT(). 1038 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 1039 1040 @param[in] Guid Pointer to a 128-bit unique value that 1041 designates which namespace to set a value from. 1042 @param[in] TokenNumber The PCD token number to set a current value for. 1043 @param[in, out] SizeOfBuffer The size, in bytes, of Buffer. 1044 @param[in] Buffer A pointer to the buffer to set. 1045 1046 @return The status of the set operation. 1047 1048 **/ 1049 RETURN_STATUS 1050 EFIAPI 1051 LibPcdSetExPtrS ( 1052 IN CONST GUID *Guid, 1053 IN UINTN TokenNumber, 1054 IN OUT UINTN *SizeOfBuffer, 1055 IN VOID *Buffer 1056 ) 1057 { 1058 ASSERT (FALSE); 1059 1060 return RETURN_INVALID_PARAMETER; 1061 } 1062 1063 /** 1064 This function provides a means by which to set a value for a given PCD token. 1065 1066 Sets the boolean value for the token specified by TokenNumber 1067 to the value specified by Value. 1068 1069 If Guid is NULL, then ASSERT(). 1070 1071 @param[in] Guid The pointer to a 128-bit unique value that 1072 designates which namespace to set a value from. 1073 @param[in] TokenNumber The PCD token number to set a current value for. 1074 @param[in] Value The boolean value to set. 1075 1076 @return The status of the set operation. 1077 1078 **/ 1079 RETURN_STATUS 1080 EFIAPI 1081 LibPcdSetExBoolS ( 1082 IN CONST GUID *Guid, 1083 IN UINTN TokenNumber, 1084 IN BOOLEAN Value 1085 ) 1086 { 1087 ASSERT (FALSE); 1088 1089 return RETURN_INVALID_PARAMETER; 1090 } 773 1091 774 1092 /** … … 901 1219 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 902 1220 903 @param[ in] PatchVariableA pointer to the global variable in a module that is1221 @param[out] PatchVariable A pointer to the global variable in a module that is 904 1222 the target of the set operation. 905 1223 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. … … 913 1231 EFIAPI 914 1232 LibPatchPcdSetPtr ( 915 INVOID *PatchVariable,1233 OUT VOID *PatchVariable, 916 1234 IN UINTN MaximumDatumSize, 917 1235 IN OUT UINTN *SizeOfBuffer, … … 938 1256 939 1257 /** 1258 Sets a value of a patchable PCD entry that is type pointer. 1259 1260 Sets the PCD entry specified by PatchVariable to the value specified 1261 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize, 1262 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER 1263 to indicate that the set operation was not actually performed. 1264 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to 1265 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned. 1266 1267 If PatchVariable is NULL, then ASSERT(). 1268 If SizeOfBuffer is NULL, then ASSERT(). 1269 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 1270 1271 @param[out] PatchVariable A pointer to the global variable in a module that is 1272 the target of the set operation. 1273 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. 1274 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. 1275 @param[in] Buffer A pointer to the buffer to used to set the target variable. 1276 1277 @return The status of the set operation. 1278 1279 **/ 1280 RETURN_STATUS 1281 EFIAPI 1282 LibPatchPcdSetPtrS ( 1283 OUT VOID *PatchVariable, 1284 IN UINTN MaximumDatumSize, 1285 IN OUT UINTN *SizeOfBuffer, 1286 IN CONST VOID *Buffer 1287 ) 1288 { 1289 ASSERT (PatchVariable != NULL); 1290 ASSERT (SizeOfBuffer != NULL); 1291 1292 if (*SizeOfBuffer > 0) { 1293 ASSERT (Buffer != NULL); 1294 } 1295 1296 if ((*SizeOfBuffer > MaximumDatumSize) || 1297 (*SizeOfBuffer == MAX_ADDRESS)) { 1298 *SizeOfBuffer = MaximumDatumSize; 1299 return RETURN_INVALID_PARAMETER; 1300 } 1301 1302 CopyMem (PatchVariable, Buffer, *SizeOfBuffer); 1303 1304 return RETURN_SUCCESS; 1305 } 1306 1307 /** 1308 Sets a value and size of a patchable PCD entry that is type pointer. 1309 1310 Sets the PCD entry specified by PatchVariable to the value specified by Buffer 1311 and SizeOfBuffer. Buffer is returned. If SizeOfBuffer is greater than 1312 MaximumDatumSize, then set SizeOfBuffer to MaximumDatumSize and return 1313 NULL to indicate that the set operation was not actually performed. 1314 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to 1315 MaximumDatumSize and NULL must be returned. 1316 1317 If PatchVariable is NULL, then ASSERT(). 1318 If SizeOfPatchVariable is NULL, then ASSERT(). 1319 If SizeOfBuffer is NULL, then ASSERT(). 1320 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 1321 1322 @param[out] PatchVariable A pointer to the global variable in a module that is 1323 the target of the set operation. 1324 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable. 1325 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. 1326 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. 1327 @param[in] Buffer A pointer to the buffer to used to set the target variable. 1328 1329 @return Return the pointer to the buffer been set. 1330 1331 **/ 1332 VOID * 1333 EFIAPI 1334 LibPatchPcdSetPtrAndSize ( 1335 OUT VOID *PatchVariable, 1336 OUT UINTN *SizeOfPatchVariable, 1337 IN UINTN MaximumDatumSize, 1338 IN OUT UINTN *SizeOfBuffer, 1339 IN CONST VOID *Buffer 1340 ) 1341 { 1342 ASSERT (PatchVariable != NULL); 1343 ASSERT (SizeOfPatchVariable != NULL); 1344 ASSERT (SizeOfBuffer != NULL); 1345 1346 if (*SizeOfBuffer > 0) { 1347 ASSERT (Buffer != NULL); 1348 } 1349 1350 if ((*SizeOfBuffer > MaximumDatumSize) || 1351 (*SizeOfBuffer == MAX_ADDRESS)) { 1352 *SizeOfBuffer = MaximumDatumSize; 1353 return NULL; 1354 } 1355 1356 CopyMem (PatchVariable, Buffer, *SizeOfBuffer); 1357 *SizeOfPatchVariable = *SizeOfBuffer; 1358 1359 return (VOID *) Buffer; 1360 } 1361 1362 /** 1363 Sets a value and size of a patchable PCD entry that is type pointer. 1364 1365 Sets the PCD entry specified by PatchVariable to the value specified 1366 by Buffer and SizeOfBuffer. If SizeOfBuffer is greater than MaximumDatumSize, 1367 then set SizeOfBuffer to MaximumDatumSize and return RETURN_INVALID_PARAMETER 1368 to indicate that the set operation was not actually performed. 1369 If SizeOfBuffer is set to MAX_ADDRESS, then SizeOfBuffer must be set to 1370 MaximumDatumSize and RETURN_INVALID_PARAMETER must be returned. 1371 1372 If PatchVariable is NULL, then ASSERT(). 1373 If SizeOfPatchVariable is NULL, then ASSERT(). 1374 If SizeOfBuffer is NULL, then ASSERT(). 1375 If SizeOfBuffer > 0 and Buffer is NULL, then ASSERT(). 1376 1377 @param[out] PatchVariable A pointer to the global variable in a module that is 1378 the target of the set operation. 1379 @param[out] SizeOfPatchVariable A pointer to the size, in bytes, of PatchVariable. 1380 @param[in] MaximumDatumSize The maximum size allowed for the PCD entry specified by PatchVariable. 1381 @param[in, out] SizeOfBuffer A pointer to the size, in bytes, of Buffer. 1382 @param[in] Buffer A pointer to the buffer to used to set the target variable. 1383 1384 @return The status of the set operation. 1385 1386 **/ 1387 RETURN_STATUS 1388 EFIAPI 1389 LibPatchPcdSetPtrAndSizeS ( 1390 OUT VOID *PatchVariable, 1391 OUT UINTN *SizeOfPatchVariable, 1392 IN UINTN MaximumDatumSize, 1393 IN OUT UINTN *SizeOfBuffer, 1394 IN CONST VOID *Buffer 1395 ) 1396 { 1397 ASSERT (PatchVariable != NULL); 1398 ASSERT (SizeOfPatchVariable != NULL); 1399 ASSERT (SizeOfBuffer != NULL); 1400 1401 if (*SizeOfBuffer > 0) { 1402 ASSERT (Buffer != NULL); 1403 } 1404 1405 if ((*SizeOfBuffer > MaximumDatumSize) || 1406 (*SizeOfBuffer == MAX_ADDRESS)) { 1407 *SizeOfBuffer = MaximumDatumSize; 1408 return RETURN_INVALID_PARAMETER; 1409 } 1410 1411 CopyMem (PatchVariable, Buffer, *SizeOfBuffer); 1412 *SizeOfPatchVariable = *SizeOfBuffer; 1413 1414 return RETURN_SUCCESS; 1415 } 1416 1417 /** 940 1418 Retrieve additional information associated with a PCD token. 941 1419 … … 986 1464 Retrieve the currently set SKU Id. 987 1465 988 If the sku id got >= PCD_MAX_SKU_ID, then ASSERT().989 990 1466 @return The currently set SKU Id. If the platform has not set at a SKU Id, then the 991 1467 default SKU Id value of 0 is returned. If the platform has set a SKU Id, then the currently set SKU
Note:
See TracChangeset
for help on using the changeset viewer.