3 Implement ReadOnly Variable Services required by PEIM and install
4 PEI ReadOnly Varaiable2 PPI. These services operates the non volatile storage space.
6 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
24 EFI_PEI_READ_ONLY_VARIABLE2_PPI mVariablePpi
= {
26 PeiGetNextVariableName
29 EFI_PEI_PPI_DESCRIPTOR mPpiListVariable
= {
30 (EFI_PEI_PPI_DESCRIPTOR_PPI
| EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST
),
31 &gEfiPeiReadOnlyVariable2PpiGuid
,
37 Provide the functionality of the variable services.
39 @param FileHandle Handle of the file being invoked.
40 Type EFI_PEI_FILE_HANDLE is defined in FfsFindNextFile().
41 @param PeiServices General purpose services available to every PEIM.
43 @retval EFI_SUCCESS If the interface could be successfully installed
44 @retval Others Returned from PeiServicesInstallPpi()
48 PeimInitializeVariableServices (
49 IN EFI_PEI_FILE_HANDLE FileHandle
,
50 IN CONST EFI_PEI_SERVICES
**PeiServices
53 return PeiServicesInstallPpi (&mPpiListVariable
);
58 Gets the pointer to the first variable header in given variable store area.
60 @param VarStoreHeader Pointer to the Variable Store Header.
62 @return Pointer to the first variable header
67 IN VARIABLE_STORE_HEADER
*VarStoreHeader
71 // The end of variable store
73 return (VARIABLE_HEADER
*) HEADER_ALIGN (VarStoreHeader
+ 1);
78 This code gets the pointer to the last variable memory pointer byte.
80 @param VarStoreHeader Pointer to the Variable Store Header.
82 @return VARIABLE_HEADER* pointer to last unavailable Variable Header.
87 IN VARIABLE_STORE_HEADER
*VarStoreHeader
91 // The end of variable store
93 return (VARIABLE_HEADER
*) HEADER_ALIGN ((UINTN
) VarStoreHeader
+ VarStoreHeader
->Size
);
98 This code checks if variable header is valid or not.
100 @param Variable Pointer to the Variable Header.
102 @retval TRUE Variable header is valid.
103 @retval FALSE Variable header is not valid.
107 IsValidVariableHeader (
108 IN VARIABLE_HEADER
*Variable
111 if (Variable
== NULL
|| Variable
->StartId
!= VARIABLE_DATA
) {
120 This code gets the size of name of variable.
122 @param Variable Pointer to the Variable Header.
124 @return Size of variable in bytes in type UINTN.
129 IN VARIABLE_HEADER
*Variable
132 if (Variable
->State
== (UINT8
) (-1) ||
133 Variable
->DataSize
== (UINT32
) (-1) ||
134 Variable
->NameSize
== (UINT32
) (-1) ||
135 Variable
->Attributes
== (UINT32
) (-1)) {
138 return (UINTN
) Variable
->NameSize
;
143 This code gets the size of data of variable.
145 @param Variable Pointer to the Variable Header.
147 @return Size of variable in bytes in type UINTN.
152 IN VARIABLE_HEADER
*Variable
155 if (Variable
->State
== (UINT8
) (-1) ||
156 Variable
->DataSize
== (UINT32
) (-1) ||
157 Variable
->NameSize
== (UINT32
) (-1) ||
158 Variable
->Attributes
== (UINT32
) (-1)) {
161 return (UINTN
) Variable
->DataSize
;
165 This code gets the pointer to the variable name.
167 @param Variable Pointer to the Variable Header.
169 @return A CHAR16* pointer to Variable Name.
174 IN VARIABLE_HEADER
*Variable
178 return (CHAR16
*) (Variable
+ 1);
183 This code gets the pointer to the variable data.
185 @param Variable Pointer to the Variable Header.
187 @return A UINT8* pointer to Variable Data.
192 IN VARIABLE_HEADER
*Variable
198 // Be careful about pad size for alignment
200 Value
= (UINTN
) GetVariableNamePtr (Variable
);
201 Value
+= NameSizeOfVariable (Variable
);
202 Value
+= GET_PAD_SIZE (NameSizeOfVariable (Variable
));
204 return (UINT8
*) Value
;
209 This code gets the pointer to the next variable header.
211 @param Variable Pointer to the Variable Header.
213 @return A VARIABLE_HEADER* pointer to next variable header.
218 IN VARIABLE_HEADER
*Variable
223 if (!IsValidVariableHeader (Variable
)) {
227 Value
= (UINTN
) GetVariableDataPtr (Variable
);
228 Value
+= DataSizeOfVariable (Variable
);
229 Value
+= GET_PAD_SIZE (DataSizeOfVariable (Variable
));
232 // Be careful about pad size for alignment
234 return (VARIABLE_HEADER
*) HEADER_ALIGN (Value
);
238 This code gets the pointer to the variable name.
240 @param VarStoreHeader Pointer to the Variable Store Header.
242 @retval EfiRaw Variable store is raw
243 @retval EfiValid Variable store is valid
244 @retval EfiInvalid Variable store is invalid
247 VARIABLE_STORE_STATUS
248 GetVariableStoreStatus (
249 IN VARIABLE_STORE_HEADER
*VarStoreHeader
253 if (CompareGuid (&VarStoreHeader
->Signature
, &gEfiVariableGuid
) &&
254 VarStoreHeader
->Format
== VARIABLE_STORE_FORMATTED
&&
255 VarStoreHeader
->State
== VARIABLE_STORE_HEALTHY
261 if (((UINT32
*)(&VarStoreHeader
->Signature
))[0] == 0xffffffff &&
262 ((UINT32
*)(&VarStoreHeader
->Signature
))[1] == 0xffffffff &&
263 ((UINT32
*)(&VarStoreHeader
->Signature
))[2] == 0xffffffff &&
264 ((UINT32
*)(&VarStoreHeader
->Signature
))[3] == 0xffffffff &&
265 VarStoreHeader
->Size
== 0xffffffff &&
266 VarStoreHeader
->Format
== 0xff &&
267 VarStoreHeader
->State
== 0xff
278 This function compares a variable with variable entries in database.
280 @param Variable Pointer to the variable in our database
281 @param VariableName Name of the variable to compare to 'Variable'
282 @param VendorGuid GUID of the variable to compare to 'Variable'
283 @param PtrTrack Variable Track Pointer structure that contains Variable Information.
285 @retval EFI_SUCCESS Found match variable
286 @retval EFI_NOT_FOUND Variable not found
290 CompareWithValidVariable (
291 IN VARIABLE_HEADER
*Variable
,
292 IN CONST CHAR16
*VariableName
,
293 IN CONST EFI_GUID
*VendorGuid
,
294 OUT VARIABLE_POINTER_TRACK
*PtrTrack
299 if (VariableName
[0] == 0) {
300 PtrTrack
->CurrPtr
= Variable
;
304 // Don't use CompareGuid function here for performance reasons.
305 // Instead we compare the GUID a UINT32 at a time and branch
306 // on the first failed comparison.
308 if ((((INT32
*) VendorGuid
)[0] == ((INT32
*) &Variable
->VendorGuid
)[0]) &&
309 (((INT32
*) VendorGuid
)[1] == ((INT32
*) &Variable
->VendorGuid
)[1]) &&
310 (((INT32
*) VendorGuid
)[2] == ((INT32
*) &Variable
->VendorGuid
)[2]) &&
311 (((INT32
*) VendorGuid
)[3] == ((INT32
*) &Variable
->VendorGuid
)[3])
313 ASSERT (NameSizeOfVariable (Variable
) != 0);
314 Point
= (VOID
*) GetVariableNamePtr (Variable
);
315 if (CompareMem (VariableName
, Point
, NameSizeOfVariable (Variable
)) == 0) {
316 PtrTrack
->CurrPtr
= Variable
;
322 return EFI_NOT_FOUND
;
326 Return the variable store header and the index table based on the Index.
328 @param Type The type of the variable store.
329 @param IndexTable Return the index table.
331 @return Pointer to the variable store header.
333 VARIABLE_STORE_HEADER
*
335 IN VARIABLE_STORE_TYPE Type
,
336 OUT VARIABLE_INDEX_TABLE
**IndexTable OPTIONAL
339 EFI_HOB_GUID_TYPE
*GuidHob
;
340 EFI_FIRMWARE_VOLUME_HEADER
*FvHeader
;
341 VARIABLE_STORE_HEADER
*VariableStoreHeader
;
343 if (IndexTable
!= NULL
) {
346 VariableStoreHeader
= NULL
;
348 case VariableStoreTypeHob
:
349 GuidHob
= GetFirstGuidHob (&gEfiVariableGuid
);
350 if (GuidHob
!= NULL
) {
351 VariableStoreHeader
= (VARIABLE_STORE_HEADER
*) GET_GUID_HOB_DATA (GuidHob
);
355 case VariableStoreTypeNv
:
356 if (GetBootModeHob () != BOOT_IN_RECOVERY_MODE
) {
358 // The content of NV storage for variable is not reliable in recovery boot mode.
360 FvHeader
= (EFI_FIRMWARE_VOLUME_HEADER
*) (UINTN
) (PcdGet64 (PcdFlashNvStorageVariableBase64
) != 0 ?
361 PcdGet64 (PcdFlashNvStorageVariableBase64
) :
362 PcdGet32 (PcdFlashNvStorageVariableBase
)
366 // Check if the Firmware Volume is not corrupted
368 if ((FvHeader
->Signature
!= EFI_FVH_SIGNATURE
) || (!CompareGuid (&gEfiSystemNvDataFvGuid
, &FvHeader
->FileSystemGuid
))) {
369 DEBUG ((EFI_D_ERROR
, "Firmware Volume for Variable Store is corrupted\n"));
373 VariableStoreHeader
= (VARIABLE_STORE_HEADER
*) ((UINT8
*) FvHeader
+ FvHeader
->HeaderLength
);
375 if (IndexTable
!= NULL
) {
376 GuidHob
= GetFirstGuidHob (&gEfiVariableIndexTableGuid
);
377 if (GuidHob
!= NULL
) {
378 *IndexTable
= GET_GUID_HOB_DATA (GuidHob
);
381 // If it's the first time to access variable region in flash, create a guid hob to record
382 // VAR_ADDED type variable info.
383 // Note that as the resource of PEI phase is limited, only store the limited number of
384 // VAR_ADDED type variables to reduce access time.
386 *IndexTable
= BuildGuidHob (&gEfiVariableIndexTableGuid
, sizeof (VARIABLE_INDEX_TABLE
));
387 (*IndexTable
)->Length
= 0;
388 (*IndexTable
)->StartPtr
= GetStartPointer (VariableStoreHeader
);
389 (*IndexTable
)->EndPtr
= GetEndPointer (VariableStoreHeader
);
390 (*IndexTable
)->GoneThrough
= 0;
401 return VariableStoreHeader
;
405 Find the variable in the specified variable store.
407 @param VariableStoreHeader Pointer to the variable store header.
408 @param IndexTable Pointer to the index table.
409 @param VariableName Name of the variable to be found
410 @param VendorGuid Vendor GUID to be found.
411 @param PtrTrack Variable Track Pointer structure that contains Variable Information.
413 @retval EFI_SUCCESS Variable found successfully
414 @retval EFI_NOT_FOUND Variable not found
415 @retval EFI_INVALID_PARAMETER Invalid variable name
420 IN VARIABLE_STORE_HEADER
*VariableStoreHeader
,
421 IN VARIABLE_INDEX_TABLE
*IndexTable
,
422 IN CONST CHAR16
*VariableName
,
423 IN CONST EFI_GUID
*VendorGuid
,
424 OUT VARIABLE_POINTER_TRACK
*PtrTrack
427 VARIABLE_HEADER
*Variable
;
428 VARIABLE_HEADER
*LastVariable
;
429 VARIABLE_HEADER
*MaxIndex
;
434 if (VariableStoreHeader
== NULL
) {
435 return EFI_INVALID_PARAMETER
;
438 if (GetVariableStoreStatus (VariableStoreHeader
) != EfiValid
) {
439 return EFI_UNSUPPORTED
;
442 if (~VariableStoreHeader
->Size
== 0) {
443 return EFI_NOT_FOUND
;
446 PtrTrack
->StartPtr
= GetStartPointer (VariableStoreHeader
);
447 PtrTrack
->EndPtr
= GetEndPointer (VariableStoreHeader
);
450 // No Variable Address equals zero, so 0 as initial value is safe.
454 if (IndexTable
!= NULL
) {
456 // traverse the variable index table to look for varible.
457 // The IndexTable->Index[Index] records the distance of two neighbouring VAR_ADDED type variables.
459 for (Offset
= 0, Index
= 0; Index
< IndexTable
->Length
; Index
++) {
460 ASSERT (Index
< sizeof (IndexTable
->Index
) / sizeof (IndexTable
->Index
[0]));
461 Offset
+= IndexTable
->Index
[Index
];
462 MaxIndex
= (VARIABLE_HEADER
*) ((UINT8
*) IndexTable
->StartPtr
+ Offset
);
463 if (CompareWithValidVariable (MaxIndex
, VariableName
, VendorGuid
, PtrTrack
) == EFI_SUCCESS
) {
468 if (IndexTable
->GoneThrough
!= 0) {
470 // If the table has all the existing variables indexed and we still cannot find it.
472 return EFI_NOT_FOUND
;
476 if (MaxIndex
!= NULL
) {
478 // HOB exists but the variable cannot be found in HOB
479 // If not found in HOB, then let's start from the MaxIndex we've found.
481 Variable
= GetNextVariablePtr (MaxIndex
);
482 LastVariable
= MaxIndex
;
485 // Start Pointers for the variable.
486 // Actual Data Pointer where data can be written.
488 Variable
= PtrTrack
->StartPtr
;
489 LastVariable
= PtrTrack
->StartPtr
;
493 // Find the variable by walk through non-volatile variable store
496 while ((Variable
< PtrTrack
->EndPtr
) && IsValidVariableHeader (Variable
)) {
497 if (Variable
->State
== VAR_ADDED
) {
499 // Record Variable in VariableIndex HOB
501 if ((IndexTable
!= NULL
) && !StopRecord
) {
502 Offset
= (UINTN
) Variable
- (UINTN
) LastVariable
;
503 if ((Offset
> 0x0FFFF) || (IndexTable
->Length
== sizeof (IndexTable
->Index
) / sizeof (IndexTable
->Index
[0]))) {
505 // Stop to record if the distance of two neighbouring VAR_ADDED variable is larger than the allowable scope(UINT16),
506 // or the record buffer is full.
510 IndexTable
->Index
[IndexTable
->Length
++] = (UINT16
) Offset
;
511 LastVariable
= Variable
;
515 if (CompareWithValidVariable (Variable
, VariableName
, VendorGuid
, PtrTrack
) == EFI_SUCCESS
) {
520 Variable
= GetNextVariablePtr (Variable
);
523 // If gone through the VariableStore, that means we never find in Firmware any more.
525 if ((IndexTable
!= NULL
) && !StopRecord
) {
526 IndexTable
->GoneThrough
= 1;
529 PtrTrack
->CurrPtr
= NULL
;
531 return EFI_NOT_FOUND
;
535 Find the variable in HOB and Non-Volatile variable storages.
537 @param VariableName Name of the variable to be found
538 @param VendorGuid Vendor GUID to be found.
539 @param PtrTrack Variable Track Pointer structure that contains Variable Information.
541 @retval EFI_SUCCESS Variable found successfully
542 @retval EFI_NOT_FOUND Variable not found
543 @retval EFI_INVALID_PARAMETER Invalid variable name
547 IN CONST CHAR16
*VariableName
,
548 IN CONST EFI_GUID
*VendorGuid
,
549 OUT VARIABLE_POINTER_TRACK
*PtrTrack
553 VARIABLE_STORE_HEADER
*VariableStoreHeader
;
554 VARIABLE_INDEX_TABLE
*IndexTable
;
555 VARIABLE_STORE_TYPE Type
;
557 if (VariableName
[0] != 0 && VendorGuid
== NULL
) {
558 return EFI_INVALID_PARAMETER
;
561 for (Type
= (VARIABLE_STORE_TYPE
) 0; Type
< VariableStoreTypeMax
; Type
++) {
562 VariableStoreHeader
= GetVariableStore (Type
, &IndexTable
);
563 Status
= FindVariableEx (
570 if (!EFI_ERROR (Status
)) {
575 return EFI_NOT_FOUND
;
579 This service retrieves a variable's value using its name and GUID.
581 Read the specified variable from the UEFI variable store. If the Data
582 buffer is too small to hold the contents of the variable, the error
583 EFI_BUFFER_TOO_SMALL is returned and DataSize is set to the required buffer
584 size to obtain the data.
586 @param This A pointer to this instance of the EFI_PEI_READ_ONLY_VARIABLE2_PPI.
587 @param VariableName A pointer to a null-terminated string that is the variable's name.
588 @param VariableGuid A pointer to an EFI_GUID that is the variable's GUID. The combination of
589 VariableGuid and VariableName must be unique.
590 @param Attributes If non-NULL, on return, points to the variable's attributes.
591 @param DataSize On entry, points to the size in bytes of the Data buffer.
592 On return, points to the size of the data returned in Data.
593 @param Data Points to the buffer which will hold the returned variable value.
595 @retval EFI_SUCCESS The variable was read successfully.
596 @retval EFI_NOT_FOUND The variable could not be found.
597 @retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the resulting data.
598 DataSize is updated with the size required for
599 the specified variable.
600 @retval EFI_INVALID_PARAMETER VariableName, VariableGuid, DataSize or Data is NULL.
601 @retval EFI_DEVICE_ERROR The variable could not be retrieved because of a device error.
607 IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI
*This
,
608 IN CONST CHAR16
*VariableName
,
609 IN CONST EFI_GUID
*VariableGuid
,
610 OUT UINT32
*Attributes
,
611 IN OUT UINTN
*DataSize
,
615 VARIABLE_POINTER_TRACK Variable
;
619 if (VariableName
== NULL
|| VariableGuid
== NULL
|| DataSize
== NULL
) {
620 return EFI_INVALID_PARAMETER
;
624 // Find existing variable
626 Status
= FindVariable (VariableName
, VariableGuid
, &Variable
);
627 if (EFI_ERROR (Status
)) {
633 VarDataSize
= DataSizeOfVariable (Variable
.CurrPtr
);
634 if (*DataSize
>= VarDataSize
) {
636 return EFI_INVALID_PARAMETER
;
639 CopyMem (Data
, GetVariableDataPtr (Variable
.CurrPtr
), VarDataSize
);
641 if (Attributes
!= NULL
) {
642 *Attributes
= Variable
.CurrPtr
->Attributes
;
645 *DataSize
= VarDataSize
;
648 *DataSize
= VarDataSize
;
649 return EFI_BUFFER_TOO_SMALL
;
654 Return the next variable name and GUID.
656 This function is called multiple times to retrieve the VariableName
657 and VariableGuid of all variables currently available in the system.
658 On each call, the previous results are passed into the interface,
659 and, on return, the interface returns the data for the next
660 interface. When the entire variable list has been returned,
661 EFI_NOT_FOUND is returned.
663 @param This A pointer to this instance of the EFI_PEI_READ_ONLY_VARIABLE2_PPI.
665 @param VariableNameSize On entry, points to the size of the buffer pointed to by VariableName.
666 On return, the size of the variable name buffer.
667 @param VariableName On entry, a pointer to a null-terminated string that is the variable's name.
668 On return, points to the next variable's null-terminated name string.
669 @param VariableGuid On entry, a pointer to an EFI_GUID that is the variable's GUID.
670 On return, a pointer to the next variable's GUID.
672 @retval EFI_SUCCESS The variable was read successfully.
673 @retval EFI_NOT_FOUND The variable could not be found.
674 @retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the resulting
675 data. VariableNameSize is updated with the size
676 required for the specified variable.
677 @retval EFI_INVALID_PARAMETER VariableName, VariableGuid or
678 VariableNameSize is NULL.
679 @retval EFI_DEVICE_ERROR The variable could not be retrieved because of a device error.
684 PeiGetNextVariableName (
685 IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI
*This
,
686 IN OUT UINTN
*VariableNameSize
,
687 IN OUT CHAR16
*VariableName
,
688 IN OUT EFI_GUID
*VariableGuid
691 VARIABLE_STORE_TYPE Type
;
692 VARIABLE_POINTER_TRACK Variable
;
693 VARIABLE_POINTER_TRACK VariableInHob
;
696 VARIABLE_STORE_HEADER
*VariableStoreHeader
[VariableStoreTypeMax
];
698 if (VariableName
== NULL
|| VariableGuid
== NULL
|| VariableNameSize
== NULL
) {
699 return EFI_INVALID_PARAMETER
;
702 Status
= FindVariable (VariableName
, VariableGuid
, &Variable
);
703 if (Variable
.CurrPtr
== NULL
|| Status
!= EFI_SUCCESS
) {
707 if (VariableName
[0] != 0) {
709 // If variable name is not NULL, get next variable
711 Variable
.CurrPtr
= GetNextVariablePtr (Variable
.CurrPtr
);
714 VariableStoreHeader
[VariableStoreTypeHob
] = GetVariableStore (VariableStoreTypeHob
, NULL
);
715 VariableStoreHeader
[VariableStoreTypeNv
] = GetVariableStore (VariableStoreTypeNv
, NULL
);
719 // Switch from HOB to Non-Volatile.
721 while ((Variable
.CurrPtr
>= Variable
.EndPtr
) ||
722 (Variable
.CurrPtr
== NULL
) ||
723 !IsValidVariableHeader (Variable
.CurrPtr
)
726 // Find current storage index
728 for (Type
= (VARIABLE_STORE_TYPE
) 0; Type
< VariableStoreTypeMax
; Type
++) {
729 if ((VariableStoreHeader
[Type
] != NULL
) && (Variable
.StartPtr
== GetStartPointer (VariableStoreHeader
[Type
]))) {
733 ASSERT (Type
< VariableStoreTypeMax
);
735 // Switch to next storage
737 for (Type
++; Type
< VariableStoreTypeMax
; Type
++) {
738 if (VariableStoreHeader
[Type
] != NULL
) {
743 // Capture the case that
744 // 1. current storage is the last one, or
745 // 2. no further storage
747 if (Type
== VariableStoreTypeMax
) {
748 return EFI_NOT_FOUND
;
750 Variable
.StartPtr
= GetStartPointer (VariableStoreHeader
[Type
]);
751 Variable
.EndPtr
= GetEndPointer (VariableStoreHeader
[Type
]);
752 Variable
.CurrPtr
= Variable
.StartPtr
;
755 if (Variable
.CurrPtr
->State
== VAR_ADDED
) {
758 // Don't return NV variable when HOB overrides it
760 if ((VariableStoreHeader
[VariableStoreTypeHob
] != NULL
) && (VariableStoreHeader
[VariableStoreTypeNv
] != NULL
) &&
761 (Variable
.StartPtr
== GetStartPointer (VariableStoreHeader
[VariableStoreTypeNv
]))
763 Status
= FindVariableEx (
764 VariableStoreHeader
[VariableStoreTypeHob
],
766 GetVariableNamePtr (Variable
.CurrPtr
),
767 &Variable
.CurrPtr
->VendorGuid
,
770 if (!EFI_ERROR (Status
)) {
771 Variable
.CurrPtr
= GetNextVariablePtr (Variable
.CurrPtr
);
776 VarNameSize
= NameSizeOfVariable (Variable
.CurrPtr
);
777 ASSERT (VarNameSize
!= 0);
779 if (VarNameSize
<= *VariableNameSize
) {
780 CopyMem (VariableName
, GetVariableNamePtr (Variable
.CurrPtr
), VarNameSize
);
782 CopyMem (VariableGuid
, &Variable
.CurrPtr
->VendorGuid
, sizeof (EFI_GUID
));
784 Status
= EFI_SUCCESS
;
786 Status
= EFI_BUFFER_TOO_SMALL
;
789 *VariableNameSize
= VarNameSize
;
795 Variable
.CurrPtr
= GetNextVariablePtr (Variable
.CurrPtr
);