Lines Matching refs:NV
133 …5.8.9 NV ...................................................................................…
227 …7.5 NV Command Support (NV_spt.c) ............................................................…
295 …8.4 NV.c .....................................................................................…
298 …8.4.3 NV Utility Functions ..................................................................…
304 …8.4.4 NV Index and Persistent Object Access Functions .......................................…
314 …8.4.5 RAM-based NV Index Data Access Functions ..............................................…
334 …8.4.7 NV Access Functions ...................................................................…
540 …9.7.4.3 NV.c ...............................................................................…
1020 …C.8.5. NV memory functions ...................................................................…
1533 14 // unrecoverable NV error
1561 …next three sections define the structures for the NV data areas: persistent, orderly, and state sa…
1886 172 // authorization for NV access.
2042 5.8.9 NV
2046 …This enumeration defines the master list of the elements of a reserved portion of NV. This list in…
2047 … the pre-defined data that takes space in NV, either as persistent data or as state save data. The
2049 into NV. This is method provides an imperfect analog to an actual NV implementation.
2054 268 // to NV as individual items.
2124 333 NV_RESERVE_LAST // end of NV reserved data list
2134 The NV_INDEX structure defines the internal format for an NV index. The indexData size varies
2218 This hack is to avoid adding another NV variable.
2228 another NV variable.
2236 …This flag indicates if NV should be updated at the end of a command. This flag is set to FALSE at …
2239 any pending NV writes will be committed to NV.
2250 in NV memory will be changed to SHUTDOWN_NONE.
2272 …This value indicates if the NV integrity check was successful or not. If not and the failure was s…
2273 …the TPM would have been put into failure mode after it had been re-manufactured. If the NV failure…
2438 481 // access with a master version in NV. These values are modified in a
2457 The data in this structure is saved to NV on each TPM2_Shutdown().
2472 503 // Clock has two parts. One is the state save part and one is the NV part. The
2474 505 // NV version is updated. When the TPM starts up, if the TPM was shutdown in and
2727 Flag indicating if NV update is pending for the lockOutAuthEnabled or failedTries DA parameter
2751 From NV.c
2764 … Reserved RAM space for frequently updated NV Index. The data layout in ram buffer is {NV_handle(),
2765 size of data, data} for each NV index data stored in RAM
2769 Address of size of RAM index space in NV
2773 Address of NV copy of RAM index space
2777 Address of maximum counter value; an auxiliary variable to implement NV counters
2781 Beginning of NV dynamic area; starts right after the s_maxCountAddr and s_evictHandleMapAddr
2786 Beginning of NV dynamic area; also the beginning of the predefined reserved data area.
2790 … NV availability is sampled as the start of each command and stored here so that its value remains
3377 64 // Set flags for NV access state. This should happen before any other
3378 65 // operation that may require a NV write. Note, that this needs to be done
3406 93 // Query platform to get the NV state. The result state is saved internally
3408 95 // accessibility of NV does not change during the execution of a command.
3409 96 // Specifically, if NV is available when the command execution starts and then
3410 97 // is not available later when it is necessary to write to NV, then the TPM
3659 326 // Try to commit all the writes to NV if any NV write happened during this
3661 328 // commands, because a failed one may trigger a NV write in DA logic as well.
3662 329 // This is the only place in the command execution path that may call the NV
3663 330 // commit. If the NV commit fails, the TPM should be put in failure mode.
3736 c) an NV Index with TPMA_NV_NO_DA bit SET, or
3848 86 // For TPM_RH_LOCKOUT, if lockoutRecovery is 0, no need to update NV since
3855 93 // No NV access for now. Put the TPM in pending mode.
3860 98 // Update NV.
3874 112 // No NV access for now. Put the TPM in pending mode.
3879 117 // Record changes to NV.
3941 … c) the command requires the ADMIN role and the authorized entity is a permanent handle or an NV
4082 255 // NV Index.
4188 337 // An NV Index.
4199 348 // Otherwise, the presence of the policy depends on the NV
4546 TPM_RC_NV_UNAVAILABLE NV is not available for write
4547 TPM_RC_NV_RATE NV is rate limiting
4689 733 // If this is not an NV index, the policy makes no sense so fail it.
4915 …checked is subject to DA protection. The TPM is in lockout if the NV is not available and a DA wri…
4921 TPM_RC_NV_RATE NV is rate limiting
4922 TPM_RC_NV_UNAVAILABLE NV is not available at this time
4932 933 // If NV is unavailable, and current cycle state recorded in NV is not
4939 940 // Check if DA info needs to be updated in NV.
4947 943 // If NV is accessible, ...
4988 on NV update pending on DA parameters
5036 1005 // If NV is unavailable, and current cycle state recorded in NV is not
5117 TPM_RC_NV_UNAVAILABLE NV is not available for write
5118 TPM_RC_NV_RATE NV is rate limiting
5135 1087 // If the audit digest is clear and command audit is required, NV must be
5137 1089 // audit counter. If NV is not available, the function bails out to prevent
5544 1410 // force an update to the NV on exit so that the change in digest will
5546 1412 // because the digest change will be written to NV when this code exits.
5562 1428 // Bump the counter and save its value to NV.
6203 117 // the reporting of clock info. If this is the case, check if NV is
6207 121 // The command needs NV update. Check if NV is available.
6564 7.5 NV Command Support (NV_spt.c)
6594 7 TPM_HANDLE nvHandle // IN: the handle of the NV index to be written
6599 12 // Get NV index info
6662 55 TPM_HANDLE nvHandle // IN: the handle of the NV index to be written
6667 60 // Get NV index info
8334 22 // Write command audit persistent data to NV
8373 NV after it is setting and clearing bits.
8413 NV after it is setting and clearing bits.
8613 14 // Record persistent DA parameter changes to NV
8634 This function requires that NV be available and not rate limiting.
8647 34 // Record the changes to NV
8659 46 // Record the change to NV
8719 84 // Update NV record
8744 109 // to NV
8768 127 // Record the changes to NV
8839 39 // Write hierarchy data to NV
9017 8.4 NV.c
9021 …The NV memory is divided into two area: dynamic space for user defined NV Indices and evict object…
9030 NV Index/evict object iterator value
9032 4 typedef UINT32 NV_ITER; // type of a NV iterator
9042 8.4.3 NV Utility Functions
9046 …Function to check the NV state by accessing the platform-specific function to get the NV state. Th…
9075 This function returns the NV availability parameter.
9079 TPM_RC_SUCCESS NV is available
9080 TPM_RC_NV_RATE NV is unavailable because of rate limit
9081 TPM_RC_NV_UNAVAILABLE NV is inaccessible
9094 This is a wrapper for the platform function to commit pending NV writes.
9113 This function returns the max NV counter value.
9128 This function updates the max counter value to NV memory.
9140 8.4.4 NV Index and Persistent Object Access Functions
9144 …These functions are used to access an NV Index and persistent object memory. In this implementatio…
9153 This function provides a method to traverse every data entry in NV dynamic area.
9179 74 // If iterator reaches the end of NV space, or iterator indicates list end
9198 Function to find the end of the NV dynamic data list
9225 This function returns the number of free octets in NV space.
9242 This function returns the size of an evict object in NV space
9255 This function returns the size of a counter index in NV space.
9285 141 // For NV Index, need to make sure that we do not allocate and Index if this
9324 This function adds a new entity to NV.
9332 175 // bufferSize. For NV Index, totalSize…
9355 198 // Write the end of list if it is not going to exceed the NV space
9359 202 // Set the flag so that NV changes are committed before the command completes.
9366 This function is used to delete an NV Index or persistent object from NV memory.
9393 225 // is no room for anything else because we are at the end of NV. The other
9396 228 // The loop condition checks for the end of NV.
9419 251 // Set the flag so that NV changes are committed before the command completes.
9424 8.4.5 RAM-based NV Index Data Access Functions
9428 …The data layout in ram buffer is {size of(NV_handle() + data), NV_handle(), data} for each NV Inde…
9430 … NV storage is updated when a NV Index is added or deleted. We do NOT updated NV storage when the
9435 This function indicates if there is enough RAM space to add a data for a new NV Index.
9465 This function returns the offset of NV data in the RAM buffer
9466 This function requires that NV Index is in RAM. That is, the index must be known to exist.
9470 267 TPMI_RH_NV_INDEX handle // IN: NV handle
9504 294 TPMI_RH_NV_INDEX handle, // IN: NV handle
9520 305 // Update NV version of s_ramIndexSize
9523 308 // Write reserved RAM space to NV to reflect the newly added NV Index
9532 This function is used to delete a RAM-backed NV Index data area.
9533 This function assumes the data of NV Index exists in RAM
9537 315 TPMI_RH_NV_INDEX handle // IN: NV handle
9562 340 // Update NV version of s_ramIndexSize
9565 343 // Write reserved RAM space to NV to reflect the newly delete NV Index
9582 This function initializes the static variables used in the NV subsystem.
9630 394 // is stored at the start of NV memory
9655 414 // dynamic memory ends at the end of NV memory
9664 This function initializes the NV system at pre-install time.
9666 The layout of NV memory space is an implementation choice.
9695 This function is used to move reserved data from NV memory to RAM.
9718 …This function is used to post a reserved data for writing to NV memory. Before the TPM completes t…
9732 465 // Set the flag that a NV write happens
9848 …This function returns the offset in NV of the next NV Index entry. A value of 0 indicates the end …
9876 …This function returns the offset in NV of the next evict object entry. A value of 0 indicates the …
9902 …this function returns the offset in NV memory of the entity associated with the input handle. A va…
9903 …o indicates that handle does not exist reference an existing persistent object or defined NV Index.
9935 This function is called at _TPM_Init() to initialize the NV environment.
9939 TRUE all NV was initialized
9940 … FALSE the NV containing saved state had an error and
9950 606 // NV and initialize the static variables
9965 …This function is used to cause the memory containing the RAM backed NV Indices to be written to NV.
9972 622 // Write RAM backed NV Index info to NV
9973 623 // No need to save s_ramIndexSize because we save it to NV whenever it is
9977 627 // Set the flag so that an NV write happens before the command completes.
9995 b) reset NV Index data that has TPMA_NV_CLEAR_STCLEAR SET; and
9997 It is a prerequisite that NV be available for writing before this function is called.
10015 648 // Iterate all the NV Index to clear the locks
10019 652 UINT32 indexAddr; // NV address points to index info
10024 657 // Read NV Index info structure
10039 672 // Reset NV data for TPMA_NV_CLEAR_STCLEAR
10046 679 // Reset NV data for orderly values that are not counters
10060 688 // Write NV Index info back if it has changed
10066 694 // Set the flag that a NV write happens
10079 707 // Read NV handle
10082 710 // Read the counter value saved to NV upon the last roll over.
10094 722 // No write to NV because an orderly shutdown will update the
10106 8.4.7 NV Access Functions
10110 … This set of functions provide accessing NV Index and persistent objects based using a handle for
10115 This function is used to verify that an NV Index is not defined. This is only used by
10128 TRUE the handle points to an existing NV Index
10147 748 // NV Index is defined
10154 …This function validates that a handle references a defined NV Index and that the Index is currently
10159 … TPM_RC_HANDLE the handle points to an undefined NV Index If shEnable is CLEAR,
10185 769 // Read NV Index info structure
10196 775 // if shEnable is CLEAR, an ownerCreate NV Index should not be
10209 788 // If the Index is write locked and this is an NV Write operation...
10218 797 // If the Index is read locked and this is an NV Read operation...
10228 807 // NV Index is accessible
10308 This function is used to retrieve the contents of an NV Index.
10309 …An implementation is allowed to save the NV Index in a vendor-defined format. If the format is dif…
10312 …equisite to calling this function is that the handle must be known to reference a defined NV Index.
10317 859 NV_INDEX *nvIndex // OUT: NV index structure
10324 866 // Find the address of NV index
10344 …tion returns the value to be used when a counter index is initialized. It will scan the NV counters
10366 895 // Read NV handle
10369 898 // Get NV Index
10393 …This function is used to access the data in an NV Index. The data is returned as a byte sequence. …
10400 …This function requires that the NV Index be defined, and that the required data is within the data…
10407 922 UINT32 offset, // IN: offset of NV data
10408 923 UINT16 size, // IN: size of NV data
10437 952 // Get data from NV
10438 953 // Skip NV Index info, read data buffer
10450 Get data in integer format of a bit or counter NV Index.
10451 …This function requires that the NV Index is defined and that the NV Index previously has been writ…
10456 964 NV_INDEX *nvIndex, // IN: RAM image of NV Index header
10473 976 // copy the contents of NV to output data buffer
10487 990 // Get data from NV
10488 991 // Skip NV Index info, read data buffer
10500 This function is called to queue the write of NV Index data to persistent memory.
10501 This function requires that NV Index is defined.
10505 TPM_RC_NV_RATE NV is rate limiting so retry
10506 TPM_RC_NV_UNAVAILABLE NV is not available
10511 1002 NV_INDEX *nvIndex // IN: NV Index info to be written
10517 1008 // Get the starting offset for the index in the RAM image of NV
10524 1015 // If the index data is actually changed, then a write to NV is required
10527 1018 // Make sure that NV is available
10545 This function is used to write NV index data.
10546 …This function requires that the NV Index is defined, and the data is within the defined data range…
10551 TPM_RC_NV_RATE NV is rate limiting so retry
10552 TPM_RC_NV_UNAVAILABLE NV is not available
10557 1030 NV_INDEX *nvIndex, // IN: RAM copy of NV Index
10558 1031 UINT32 offset, // IN: offset of NV data
10559 1032 UINT32 size, // IN: size of NV data
10586 1059 // NV update does not happen for orderly index. Have
10588 1061 // NV and an orderly shutdown is required. Only going to do this if we
10611 1078 // If the data is actually changed, then a write to NV is required
10614 1081 // Make sure that NV is available
10628 This function is used to compute the Name of an NV Index.
10631 This function requires that the NV Index is defined.
10645 1103 // Get NV public info
10667 This function is used to assign NV memory to an NV Index.
10678 TPM_RC_NV_SPACE insufficient NV space
10686 1127 // The buffer to be written to NV memory
10695 1136 // Check if we have enough space to create the NV Index
10696 1137 // In this implementation, the only resource limitation is the available NV
10698 1139 // NV slot
10716 1157 // Add index to NV memory
10719 1160 // If the data of NV Index is RAM backed, add the data area in RAM as well
10729 This function is used to assign NV memory to a persistent object.
10734 TPM_RC_NV_SPACE insufficient NV space
10748 1172 // The buffer to be written to NV memory
10767 1191 // In this implementation, the only resource limitation is the available NV
10788 1212 // Add evict to NV memory
10798 This function will delete a NV Index or an evict object.
10820 1232 // Read the NV Index info
10825 1237 // value, record it in NV memory
10836 1248 // If the NV Index is RAM back, delete the RAM data as well
10850 the function will also delete any NV Index define using ownerAuth.
10869 1274 // Handle NV Index
10872 1277 // If flush endorsement or platform hierarchy, no NV Index would be
10887 1287 // Delete the NV Index
10893 1293 // If the NV Index is RAM back, delete the RAM data as well
10933 This function is used to SET the TPMA_NV_WRITELOCKED attribute for all NV Indices that have
10967 1355 // Set the flag that a NV write happens
11083 1446 // number of NV Indices is small. For an implementation that may allow
11084 1447 // large number of NV Indices, a more efficient sorting algorithm may be
11101 …This function returns a list of handles of NV Indices, starting from handle. Handle must be in the…
11102 NV Indices, but does not have to reference an existing NV Index.
11147 1492 // number of NV Indices is small. For an implementation that may allow
11148 1493 // large number of NV Indices, a more efficient sorting algorithm may be
11164 This function returns the count of NV Indexes currently defined.
11182 Function returns the count of persistent objects currently in NV memory.
11201 NV memory.
11211 1531 // Compute the available space in NV storage
11214 1534 // Get the space needed to add a persistent object to NV storage
11223 Get the number of defined NV Indexes that have NV TPMA_NV_COUNTER attribute SET.
11244 1552 // Get NV Index info
11256 …This function returns an estimate of the number of additional counter type NV Indices that can be …
11269 1571 // Get the available space in NV storage
11283 1585 // Get the space needed to add a counter index to NV storage
11293 1595 // Return the min of counter number in NV and in RAM
11344 …In this implementation, a persistent object is moved from NV into an object slot for processing. I…
12633 164 // Store the initial configuration to NV
13012 442 // Copy PCR values to the structure that should be saved to NV
13493 802 // Save the required allocation to NV. Note that after NV is written, the
13494 803 // PCR allocation in NV is no longer consistent with the RAM data
13495 804 // gp.pcrAllocated. The NV version reflect the allocate after next
13909 15 // Write PP list to NV
15209 10 // Read orderly data info from NV memory
15266 55 // Write resetCount to NV
15274 63 // the NV totalResetCount when incrementing would make it 0. When the
15280 69 // Write total reset counter to NV
15297 …Because Clock updates may require a write to NV memory, Time and Clock are not allowed to advance …
15298 …NV is not available. When clock is not advancing, any function that uses Clock will fail and return
15451 193 // If NV is not available, clock stopped advancing and the value reported is
16368 Checks to see if an operation will write to NV memory
16382 108 // We check to see if the NV is write locked before we do the authorization
16395 Checks to see if an operation will write to NV memory
16408 128 // We check to see if the NV is read locked before we do the authorization
16567 …a persistent object handle, and the object exists, the persistent object is moved from NV memory i…
16676 96 // For an NV Index, use the platform-specific routine
16781 179 // authValue for an NV index
16871 252 // authPolicy for a NV index
16917 286 // Name for a NV index
16933 b) An NV index belongs to TPM_RH_PLATFORM if TPMA_NV_PLATFORMCREATE, is SET,
16935 …bject handle belongs to its hierarchy. All other handles belong to the platform hierarchy. or an NV
16964 322 // hierarchy for NV index
17091 9.7.4.3 NV.c
17410 25 // initialize NV
17425 40 // This should happen after NV is initialized because hierarchy data is
17426 41 // stored in NV.
17465 75 // initialize the current DRBG state in NV
17472 82 // Commit NV writes. Manufacture process is an artificial process existing
17474 84 // that what should be the expected behavior if the NV write fails at this
17475 85 // point. Therefore, it is assumed the NV write here is always success and
18463 86 // TPM NV memory
18496 114 // maximum number of NV indexes that are allowed to have the
18499 117 // of counters, except for the size of the NV Index memory.
18503 121 // maximum size of an NV index data area
18520 138 // TPMS_TIME_INFO .clock in NV
18715 318 // number of NV indexes currently defined
18745 348 // NV memory
18750 353 // into NV memory
18754 357 // number of defined NV indexes that have NV TPMA_NV_COUNTER
18759 362 // number of additional NV indexes that can be defined with their
19146 177 // OK to leave the TPM permanently bricked due to an unrecoverable NV
21820 1660 // If the shutdown was orderly, then the values recovered from NV will
25337 …t the size of the RNG state can be known to TPM.lib. This allows the allocation of some space in NV
25342 64 GET_STATE, // Get the state to save to NV
25343 65 PUT_STATE // Restore the state from NV
36019 …This file contains the NV read and write access methods. This implementation uses RAM/file and does
36020 … not manage the RAM/file as NV blocks. The implementation may become more sophisticated over time.
36035 …This function is used by the simulator to set the error flags in the NV subsystem to simulate an e…
36036 NV loading process
36051 Enable NV memory.
36052 …This version just pulls in data from a file. In a real TPM, with NV on chip, this function would v…
36053 …integrity of the saved context. If the NV memory was not on chip but was in something like RPMB, t…
36113 58 // read NV file data to memory
36118 63 // NV contents have been read and the error checks have been performed. For
36129 Disable NV memory
36139 78 // Close NV file
36158 Check if NV is available
36162 0 NV is available
36163 1 NV is not available due to write failure
36164 2 NV is not available due to rate limit
36171 92 // NV is not available if the TPM is in failure mode
36187 Function: Read a chunk of NV memory
36206 …This function checks to see if the NV is different from the test value. This is so that NV will no…
36219 TRUE the NV location is different from the test value
36220 FALSE the NV location is the same as the test value
36235 … This function is used to update NV memory. The write is to a memory copy of NV. At the end of the
36236 current command, any changes are written to the actual NV memory.
36247 135 // Copy the data to the NV image
36254 … Function: Move a chunk of NV memory from source to destination This function should ensure that if
36276 Update NV chip
36287 0 NV write success
36288 non-0 NV write fail
36296 159 // If NV file is not available, return failure
36300 163 // Write RAM data to NV
36313 …Set the current NV state to available. This function is for testing purpose only. It is not part o…
36314 platform NV logic
36328 …Set the current NV state to unavailable. This function is for testing purpose only. It is not part…
36329 platform NV logic
36417 41 // not need to reload NV ...
36431 49 // Prepare NV memory for power off
36570 C.8.5. NV memory functions
36574 …This function is used by the simulator to set the error flags in the NV subsystem to simulate an e…
36575 NV loading process
36586 … Enable platform NV memory NV memory is automatically enabled at power on event. This function is
36587 mostly for TPM_Manufacture() to access NV memory without a power on event
36602 …Disable platform NV memory NV memory is automatically disabled at power off event. This function is
36603 mostly for TPM_Manufacture() to disable NV memory without a power off event
36611 Check if NV is available
36615 0 NV is available
36616 1 NV is not available due to write failure
36617 2 NV is not available due to rate limit
36625 Update NV chip
36637 0 NV write success
36638 non-0 NV write fail
36646 Read a chunk of NV memory
36658 …This function checks to see if the NV is different from the test value. This is so that NV will no…
36663 TRUE the NV location is different from the test value
36664 FALSE the NV location is the same as the test value
36676 Write a chunk of NV memory
36688 …Move a chunk of NV memory from source to destination This function should ensure that if there ove…
36706 …Set the current NV state to available. This function is for testing purposes only. It is not part …
36707 platform NV logic
36715 …Set the current NV state to unavailable. This function is for testing purposes only. It is not par…
36716 platform NV logic
36881 … From NVMem.c Choose if the NV memory should be backed by RAM or by file. If this macro is defined,
36882 …then a file is used as NV. If it is not defined, then RAM is used to back NV memory. Comment out t…
36889 A file to emulate NV storage
36929 …This include is required to set the NV memory size consistently across all parts of the implementa…
38185 … In a system where the NV memory used by the TPM is not within the TPM, the NV may not always be
38186 available. This function turns on the indicator that indicates that NV is available.
38203 This function is used to set the indication that NV memory is no longer available.
38353 73 // Disable NV memory