]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkPkg/Library/PeiHobLibFramework/HobLib.c
Add PeiHobLibFramework instance to provide a real implementation for BuildCvHob()
[mirror_edk2.git] / IntelFrameworkPkg / Library / PeiHobLibFramework / HobLib.c
1 /** @file
2 Instance of HOB Library using PEI Services.
3
4 HOB Library implementation that uses PEI Services to retrieve the HOB List.
5 This library instance uses EFI_HOB_TYPE_CV defined in Intel framework HOB specification v0.9
6 to implement HobLib BuildCvHob() API.
7
8 Copyright (c) 2007 - 2009, Intel Corporation<BR>
9 All rights reserved. This program and the accompanying materials
10 are licensed and made available under the terms and conditions of the BSD License
11 which accompanies this distribution. The full text of the license may be found at
12 http://opensource.org/licenses/bsd-license.php
13
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16
17 **/
18
19 #include <PiPei.h>
20 #include <FrameworkPei.h>
21
22 #include <Guid/MemoryAllocationHob.h>
23
24 #include <Library/HobLib.h>
25 #include <Library/DebugLib.h>
26 #include <Library/PeiServicesLib.h>
27 #include <Library/BaseMemoryLib.h>
28
29 /**
30 Returns the pointer to the HOB list.
31
32 This function returns the pointer to first HOB in the list.
33 For PEI phase, the PEI service GetHobList() can be used to retrieve the pointer
34 to the HOB list. For the DXE phase, the HOB list pointer can be retrieved through
35 the EFI System Table by looking up theHOB list GUID in the System Configuration Table.
36 Since the System Configuration Table does not exist that the time the DXE Core is
37 launched, the DXE Core uses a global variable from the DXE Core Entry Point Library
38 to manage the pointer to the HOB list.
39
40 If the pointer to the HOB list is NULL, then ASSERT().
41
42 @return The pointer to the HOB list.
43
44 **/
45 VOID *
46 EFIAPI
47 GetHobList (
48 VOID
49 )
50 {
51 EFI_STATUS Status;
52 VOID *HobList;
53
54 Status = PeiServicesGetHobList (&HobList);
55 ASSERT_EFI_ERROR (Status);
56 ASSERT (HobList != NULL);
57
58 return HobList;
59 }
60
61 /**
62 Returns the next instance of a HOB type from the starting HOB.
63
64 This function searches the first instance of a HOB type from the starting HOB pointer.
65 If there does not exist such HOB type from the starting HOB pointer, it will return NULL.
66 In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
67 unconditionally: it returns HobStart back if HobStart itself meets the requirement;
68 caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.
69
70 If HobStart is NULL, then ASSERT().
71
72 @param Type The HOB type to return.
73 @param HobStart The starting HOB pointer to search from.
74
75 @return The next instance of a HOB type from the starting HOB.
76
77 **/
78 VOID *
79 EFIAPI
80 GetNextHob (
81 IN UINT16 Type,
82 IN CONST VOID *HobStart
83 )
84 {
85 EFI_PEI_HOB_POINTERS Hob;
86
87 ASSERT (HobStart != NULL);
88
89 Hob.Raw = (UINT8 *) HobStart;
90 //
91 // Parse the HOB list until end of list or matching type is found.
92 //
93 while (!END_OF_HOB_LIST (Hob)) {
94 if (Hob.Header->HobType == Type) {
95 return Hob.Raw;
96 }
97 Hob.Raw = GET_NEXT_HOB (Hob);
98 }
99 return NULL;
100 }
101
102 /**
103 Returns the first instance of a HOB type among the whole HOB list.
104
105 This function searches the first instance of a HOB type among the whole HOB list.
106 If there does not exist such HOB type in the HOB list, it will return NULL.
107
108 If the pointer to the HOB list is NULL, then ASSERT().
109
110 @param Type The HOB type to return.
111
112 @return The next instance of a HOB type from the starting HOB.
113
114 **/
115 VOID *
116 EFIAPI
117 GetFirstHob (
118 IN UINT16 Type
119 )
120 {
121 VOID *HobList;
122
123 HobList = GetHobList ();
124 return GetNextHob (Type, HobList);
125 }
126
127 /**
128 Returns the next instance of the matched GUID HOB from the starting HOB.
129
130 This function searches the first instance of a HOB from the starting HOB pointer.
131 Such HOB should satisfy two conditions:
132 its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
133 If there does not exist such HOB from the starting HOB pointer, it will return NULL.
134 Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
135 to extract the data section and its size info respectively.
136 In contrast with macro GET_NEXT_HOB(), this function does not skip the starting HOB pointer
137 unconditionally: it returns HobStart back if HobStart itself meets the requirement;
138 caller is required to use GET_NEXT_HOB() if it wishes to skip current HobStart.
139
140 If Guid is NULL, then ASSERT().
141 If HobStart is NULL, then ASSERT().
142
143 @param Guid The GUID to match with in the HOB list.
144 @param HobStart A pointer to a Guid.
145
146 @return The next instance of the matched GUID HOB from the starting HOB.
147
148 **/
149 VOID *
150 EFIAPI
151 GetNextGuidHob (
152 IN CONST EFI_GUID *Guid,
153 IN CONST VOID *HobStart
154 )
155 {
156 EFI_PEI_HOB_POINTERS GuidHob;
157
158 GuidHob.Raw = (UINT8 *) HobStart;
159 while ((GuidHob.Raw = GetNextHob (EFI_HOB_TYPE_GUID_EXTENSION, GuidHob.Raw)) != NULL) {
160 if (CompareGuid (Guid, &GuidHob.Guid->Name)) {
161 break;
162 }
163 GuidHob.Raw = GET_NEXT_HOB (GuidHob);
164 }
165 return GuidHob.Raw;
166 }
167
168 /**
169 Returns the first instance of the matched GUID HOB among the whole HOB list.
170
171 This function searches the first instance of a HOB among the whole HOB list.
172 Such HOB should satisfy two conditions:
173 its HOB type is EFI_HOB_TYPE_GUID_EXTENSION and its GUID Name equals to the input Guid.
174 If there does not exist such HOB from the starting HOB pointer, it will return NULL.
175 Caller is required to apply GET_GUID_HOB_DATA () and GET_GUID_HOB_DATA_SIZE ()
176 to extract the data section and its size info respectively.
177
178 If the pointer to the HOB list is NULL, then ASSERT().
179 If Guid is NULL, then ASSERT().
180
181 @param Guid The GUID to match with in the HOB list.
182
183 @return The first instance of the matched GUID HOB among the whole HOB list.
184
185 **/
186 VOID *
187 EFIAPI
188 GetFirstGuidHob (
189 IN CONST EFI_GUID *Guid
190 )
191 {
192 VOID *HobList;
193
194 HobList = GetHobList ();
195 return GetNextGuidHob (Guid, HobList);
196 }
197
198 /**
199 Get the system boot mode from the HOB list.
200
201 This function returns the system boot mode information from the
202 PHIT HOB in HOB list.
203
204 If the pointer to the HOB list is NULL, then ASSERT().
205
206 @param VOID
207
208 @return The Boot Mode.
209
210 **/
211 EFI_BOOT_MODE
212 EFIAPI
213 GetBootModeHob (
214 VOID
215 )
216 {
217 EFI_STATUS Status;
218 EFI_BOOT_MODE BootMode;
219
220 Status = PeiServicesGetBootMode (&BootMode);
221 ASSERT_EFI_ERROR (Status);
222
223 return BootMode;
224 }
225
226 /**
227 Adds a new HOB to the HOB List.
228
229 This internal function enables PEIMs to create various types of HOBs.
230
231 @param Type Type of the new HOB.
232 @param Length Length of the new HOB to allocate.
233
234 @return The address of new HOB.
235
236 **/
237 VOID *
238 EFIAPI
239 InternalPeiCreateHob (
240 IN UINT16 Type,
241 IN UINT16 Length
242 )
243 {
244 EFI_STATUS Status;
245 VOID *Hob;
246
247 Status = PeiServicesCreateHob (Type, Length, &Hob);
248 //
249 // Assume the process of HOB building is always successful.
250 //
251 ASSERT_EFI_ERROR (Status);
252 return Hob;
253 }
254
255 /**
256 Builds a HOB for a loaded PE32 module.
257
258 This function builds a HOB for a loaded PE32 module.
259 It can only be invoked during PEI phase;
260 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
261
262 If ModuleName is NULL, then ASSERT().
263 If there is no additional space for HOB creation, then ASSERT().
264
265 @param ModuleName The GUID File Name of the module.
266 @param MemoryAllocationModule The 64 bit physical address of the module.
267 @param ModuleLength The length of the module in bytes.
268 @param EntryPoint The 64 bit physical address of the module entry point.
269
270 **/
271 VOID
272 EFIAPI
273 BuildModuleHob (
274 IN CONST EFI_GUID *ModuleName,
275 IN EFI_PHYSICAL_ADDRESS MemoryAllocationModule,
276 IN UINT64 ModuleLength,
277 IN EFI_PHYSICAL_ADDRESS EntryPoint
278 )
279 {
280 EFI_HOB_MEMORY_ALLOCATION_MODULE *Hob;
281
282 ASSERT (((MemoryAllocationModule & (EFI_PAGE_SIZE - 1)) == 0) &&
283 ((ModuleLength & (EFI_PAGE_SIZE - 1)) == 0));
284
285 Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, sizeof (EFI_HOB_MEMORY_ALLOCATION_MODULE));
286
287 CopyGuid (&(Hob->MemoryAllocationHeader.Name), &gEfiHobMemoryAllocModuleGuid);
288 Hob->MemoryAllocationHeader.MemoryBaseAddress = MemoryAllocationModule;
289 Hob->MemoryAllocationHeader.MemoryLength = ModuleLength;
290 Hob->MemoryAllocationHeader.MemoryType = EfiBootServicesCode;
291
292 //
293 // Zero the reserved space to match HOB spec
294 //
295 ZeroMem (Hob->MemoryAllocationHeader.Reserved, sizeof (Hob->MemoryAllocationHeader.Reserved));
296
297 CopyGuid (&Hob->ModuleName, ModuleName);
298 Hob->EntryPoint = EntryPoint;
299 }
300
301 /**
302 Builds a HOB that describes a chunk of system memory.
303
304 This function builds a HOB that describes a chunk of system memory.
305 It can only be invoked during PEI phase;
306 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
307
308 If there is no additional space for HOB creation, then ASSERT().
309
310 @param ResourceType The type of resource described by this HOB.
311 @param ResourceAttribute The resource attributes of the memory described by this HOB.
312 @param PhysicalStart The 64 bit physical address of memory described by this HOB.
313 @param NumberOfBytes The length of the memory described by this HOB in bytes.
314
315 **/
316 VOID
317 EFIAPI
318 BuildResourceDescriptorHob (
319 IN EFI_RESOURCE_TYPE ResourceType,
320 IN EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute,
321 IN EFI_PHYSICAL_ADDRESS PhysicalStart,
322 IN UINT64 NumberOfBytes
323 )
324 {
325 EFI_HOB_RESOURCE_DESCRIPTOR *Hob;
326
327 Hob = InternalPeiCreateHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, sizeof (EFI_HOB_RESOURCE_DESCRIPTOR));
328
329 Hob->ResourceType = ResourceType;
330 Hob->ResourceAttribute = ResourceAttribute;
331 Hob->PhysicalStart = PhysicalStart;
332 Hob->ResourceLength = NumberOfBytes;
333 }
334
335 /**
336 Builds a customized HOB tagged with a GUID for identification and returns
337 the start address of GUID HOB data.
338
339 This function builds a customized HOB tagged with a GUID for identification
340 and returns the start address of GUID HOB data so that caller can fill the customized data.
341 The HOB Header and Name field is already stripped.
342 It can only be invoked during PEI phase;
343 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
344
345 If Guid is NULL, then ASSERT().
346 If there is no additional space for HOB creation, then ASSERT().
347 If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
348
349 @param Guid The GUID to tag the customized HOB.
350 @param DataLength The size of the data payload for the GUID HOB.
351
352 @return The start address of GUID HOB data.
353
354 **/
355 VOID *
356 EFIAPI
357 BuildGuidHob (
358 IN CONST EFI_GUID *Guid,
359 IN UINTN DataLength
360 )
361 {
362 EFI_HOB_GUID_TYPE *Hob;
363
364 //
365 // Make sure that data length is not too long.
366 //
367 ASSERT (DataLength <= (0xffff - sizeof (EFI_HOB_GUID_TYPE)));
368
369 Hob = InternalPeiCreateHob (EFI_HOB_TYPE_GUID_EXTENSION, (UINT16) (sizeof (EFI_HOB_GUID_TYPE) + DataLength));
370 CopyGuid (&Hob->Name, Guid);
371 return Hob + 1;
372 }
373
374 /**
375 Builds a customized HOB tagged with a GUID for identification, copies the input data to the HOB
376 data field, and returns the start address of the GUID HOB data.
377
378 This function builds a customized HOB tagged with a GUID for identification and copies the input
379 data to the HOB data field and returns the start address of the GUID HOB data. It can only be
380 invoked during PEI phase; for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
381 The HOB Header and Name field is already stripped.
382 It can only be invoked during PEI phase;
383 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
384
385 If Guid is NULL, then ASSERT().
386 If Data is NULL and DataLength > 0, then ASSERT().
387 If there is no additional space for HOB creation, then ASSERT().
388 If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
389
390 @param Guid The GUID to tag the customized HOB.
391 @param Data The data to be copied into the data field of the GUID HOB.
392 @param DataLength The size of the data payload for the GUID HOB.
393
394 @return The start address of GUID HOB data.
395
396 **/
397 VOID *
398 EFIAPI
399 BuildGuidDataHob (
400 IN CONST EFI_GUID *Guid,
401 IN VOID *Data,
402 IN UINTN DataLength
403 )
404 {
405 VOID *HobData;
406
407 ASSERT (Data != NULL || DataLength == 0);
408
409 HobData = BuildGuidHob (Guid, DataLength);
410
411 return CopyMem (HobData, Data, DataLength);
412 }
413
414 /**
415 Builds a Firmware Volume HOB.
416
417 This function builds a Firmware Volume HOB.
418 It can only be invoked during PEI phase;
419 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
420
421 If there is no additional space for HOB creation, then ASSERT().
422
423 @param BaseAddress The base address of the Firmware Volume.
424 @param Length The size of the Firmware Volume in bytes.
425
426 **/
427 VOID
428 EFIAPI
429 BuildFvHob (
430 IN EFI_PHYSICAL_ADDRESS BaseAddress,
431 IN UINT64 Length
432 )
433 {
434 EFI_HOB_FIRMWARE_VOLUME *Hob;
435
436 Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV, sizeof (EFI_HOB_FIRMWARE_VOLUME));
437
438 Hob->BaseAddress = BaseAddress;
439 Hob->Length = Length;
440 }
441
442 /**
443 Builds a EFI_HOB_TYPE_FV2 HOB.
444
445 This function builds a EFI_HOB_TYPE_FV2 HOB.
446 It can only be invoked during PEI phase;
447 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
448
449 If there is no additional space for HOB creation, then ASSERT().
450
451 @param BaseAddress The base address of the Firmware Volume.
452 @param Length The size of the Firmware Volume in bytes.
453 @param FvName The name of the Firmware Volume.
454 @param FileName The name of the file.
455
456 **/
457 VOID
458 EFIAPI
459 BuildFv2Hob (
460 IN EFI_PHYSICAL_ADDRESS BaseAddress,
461 IN UINT64 Length,
462 IN CONST EFI_GUID *FvName,
463 IN CONST EFI_GUID *FileName
464 )
465 {
466 EFI_HOB_FIRMWARE_VOLUME2 *Hob;
467
468 Hob = InternalPeiCreateHob (EFI_HOB_TYPE_FV2, sizeof (EFI_HOB_FIRMWARE_VOLUME2));
469
470 Hob->BaseAddress = BaseAddress;
471 Hob->Length = Length;
472 CopyGuid (&Hob->FvName, FvName);
473 CopyGuid (&Hob->FileName, FileName);
474 }
475
476 /**
477 Builds a Capsule Volume HOB.
478
479 This function builds a Capsule Volume HOB.
480 It can only be invoked during PEI phase;
481 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
482
483 If there is no additional space for HOB creation, then ASSERT().
484
485 @param BaseAddress The base address of the Capsule Volume.
486 @param Length The size of the Capsule Volume in bytes.
487
488 **/
489 VOID
490 EFIAPI
491 BuildCvHob (
492 IN EFI_PHYSICAL_ADDRESS BaseAddress,
493 IN UINT64 Length
494 )
495 {
496 EFI_HOB_CAPSULE_VOLUME *Hob;
497
498 Hob = InternalPeiCreateHob (EFI_HOB_TYPE_CV, sizeof (EFI_HOB_CAPSULE_VOLUME));
499
500 Hob->BaseAddress = BaseAddress;
501 Hob->Length = Length;
502 }
503
504 /**
505 Builds a HOB for the CPU.
506
507 This function builds a HOB for the CPU.
508 It can only be invoked during PEI phase;
509 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
510
511 If there is no additional space for HOB creation, then ASSERT().
512
513 @param SizeOfMemorySpace The maximum physical memory addressability of the processor.
514 @param SizeOfIoSpace The maximum physical I/O addressability of the processor.
515
516 **/
517 VOID
518 EFIAPI
519 BuildCpuHob (
520 IN UINT8 SizeOfMemorySpace,
521 IN UINT8 SizeOfIoSpace
522 )
523 {
524 EFI_HOB_CPU *Hob;
525
526 Hob = InternalPeiCreateHob (EFI_HOB_TYPE_CPU, sizeof (EFI_HOB_CPU));
527
528 Hob->SizeOfMemorySpace = SizeOfMemorySpace;
529 Hob->SizeOfIoSpace = SizeOfIoSpace;
530
531 //
532 // Zero the reserved space to match HOB spec
533 //
534 ZeroMem (Hob->Reserved, sizeof (Hob->Reserved));
535 }
536
537 /**
538 Builds a HOB for the Stack.
539
540 This function builds a HOB for the stack.
541 It can only be invoked during PEI phase;
542 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
543
544 If there is no additional space for HOB creation, then ASSERT().
545
546 @param BaseAddress The 64 bit physical address of the Stack.
547 @param Length The length of the stack in bytes.
548
549 **/
550 VOID
551 EFIAPI
552 BuildStackHob (
553 IN EFI_PHYSICAL_ADDRESS BaseAddress,
554 IN UINT64 Length
555 )
556 {
557 EFI_HOB_MEMORY_ALLOCATION_STACK *Hob;
558
559 ASSERT (((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) &&
560 ((Length & (EFI_PAGE_SIZE - 1)) == 0));
561
562 Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, sizeof (EFI_HOB_MEMORY_ALLOCATION_STACK));
563
564 CopyGuid (&(Hob->AllocDescriptor.Name), &gEfiHobMemoryAllocStackGuid);
565 Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;
566 Hob->AllocDescriptor.MemoryLength = Length;
567 Hob->AllocDescriptor.MemoryType = EfiBootServicesData;
568
569 //
570 // Zero the reserved space to match HOB spec
571 //
572 ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));
573 }
574
575 /**
576 Builds a HOB for the BSP store.
577
578 This function builds a HOB for BSP store.
579 It can only be invoked during PEI phase;
580 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
581
582 If there is no additional space for HOB creation, then ASSERT().
583
584 @param BaseAddress The 64 bit physical address of the BSP.
585 @param Length The length of the BSP store in bytes.
586 @param MemoryType Type of memory allocated by this HOB.
587
588 **/
589 VOID
590 EFIAPI
591 BuildBspStoreHob (
592 IN EFI_PHYSICAL_ADDRESS BaseAddress,
593 IN UINT64 Length,
594 IN EFI_MEMORY_TYPE MemoryType
595 )
596 {
597 EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *Hob;
598
599 ASSERT (((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) &&
600 ((Length & (EFI_PAGE_SIZE - 1)) == 0));
601
602 Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, sizeof (EFI_HOB_MEMORY_ALLOCATION_BSP_STORE));
603
604 CopyGuid (&(Hob->AllocDescriptor.Name), &gEfiHobMemoryAllocBspStoreGuid);
605 Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;
606 Hob->AllocDescriptor.MemoryLength = Length;
607 Hob->AllocDescriptor.MemoryType = MemoryType;
608
609 //
610 // Zero the reserved space to match HOB spec
611 //
612 ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));
613 }
614
615 /**
616 Builds a HOB for the memory allocation.
617
618 This function builds a HOB for the memory allocation.
619 It can only be invoked during PEI phase;
620 for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase.
621
622 If there is no additional space for HOB creation, then ASSERT().
623
624 @param BaseAddress The 64 bit physical address of the memory.
625 @param Length The length of the memory allocation in bytes.
626 @param MemoryType Type of memory allocated by this HOB.
627
628 **/
629 VOID
630 EFIAPI
631 BuildMemoryAllocationHob (
632 IN EFI_PHYSICAL_ADDRESS BaseAddress,
633 IN UINT64 Length,
634 IN EFI_MEMORY_TYPE MemoryType
635 )
636 {
637 EFI_HOB_MEMORY_ALLOCATION *Hob;
638
639 ASSERT (((BaseAddress & (EFI_PAGE_SIZE - 1)) == 0) &&
640 ((Length & (EFI_PAGE_SIZE - 1)) == 0));
641
642 Hob = InternalPeiCreateHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, sizeof (EFI_HOB_MEMORY_ALLOCATION));
643
644 ZeroMem (&(Hob->AllocDescriptor.Name), sizeof (EFI_GUID));
645 Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;
646 Hob->AllocDescriptor.MemoryLength = Length;
647 Hob->AllocDescriptor.MemoryType = MemoryType;
648 //
649 // Zero the reserved space to match HOB spec
650 //
651 ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));
652 }