# CrystalRidgePeim

## Function Table

| Address | Name | Description |
|---------|------|-------------|
|  | **CrystalRidgePeimEntry** |  |
|  | **GenerateSwSmiForNonceRestore** |  |
|  | **CrystalRidgeDebugPrint** |  |
|  | **CrystalRidgeDebugAssert** |  |
|  | **IsManufacturingMode** |  |
|  | **AsmReadIdtr** |  |
| CrystalRidge | **PPI GUID** |  |
| EFI_GUID | **gCrystalRidgeGuid = CRYSTAL_RIDGE_PPI_GUID;** |  |
| EndOfPei | **notification descriptor for CrystalRidge nonce restoration** |  |
| EFI_PEI_NOTIFY_DESCRIPTOR | **gCrystalRidgeNotifyDescriptor = {** |  |
| Trigger | **SW SMI 0xFB to restore CrystalRidge nonce in SMM** |  |
| IoWrite8 | **(0xB2, 0xFB);** |  |
| Read | **CMOS register 0x4A** |  |
| IoWrite8 | **(0x70, (IoRead8 (0x70) & 0x80) | 0x4A);** |  |
| Evaluate | **CMOS value** |  |
| if | **((UINT8)CmosValue <= 3) {** |  |
| Small | **values (0-3): evaluate directly** |  |
| if | **(CmosValue == 0) {** |  |
| Check | **hardware override at 0xFDAF0490** |  |
| CmosValue | **= (MmioRead8 (0xFDAF0490) & 2) | 1;** |  |
| Manufacturing | **mode** |  |
| Error | **reading CMOS** |  |
| Override | **PeiServicesTablePointerLibIdt's ReadIdtr with inline asm** |  |
| to | **avoid the library dependency. This reads the full 6-byte IDTR.** |  |
| VOID | **EFIAPI** |  |

---
*Generated by HR650X BIOS Decompilation Project*