| 850 | //UINT32 get_size(UINT8 * An, UINT32 ); // Let borrow from FixBiosDsdt. |
| 851 | |
| 852 | static XStringW GenerateFileName(CONST CHAR16* FileNamePrefix, UINTN SsdtCount, UINTN ChildCount, CHAR8 OemTableId[9]) |
| 853 | // ChildCount == IGNORE_INDEX indicates normal SSDT |
| 854 | // SsdtCount == IGNORE_INDEX indicates dynamic SSDT in DSDT |
| 855 | // otherwise is child SSDT from normal SSDT |
| 856 | { |
| 857 | XStringW FileName; |
| 858 | CHAR8 Suffix[10]; // "-" + OemTableId + NUL |
| 859 | if (gSettings.NoOemTableId || 0 == OemTableId[0]) { |
| 860 | Suffix[0] = 0; |
| 861 | } else { |
| 862 | Suffix[0] = '-'; |
| 863 | CopyMem(Suffix+1, OemTableId, 9); |
| 864 | } |
| 865 | if (IGNORE_INDEX == ChildCount) { |
| 866 | // normal SSDT |
| 867 | FileName = SWPrintf("%lsSSDT-%llu%s.aml", FileNamePrefix, SsdtCount, Suffix); |
| 868 | } else if (IGNORE_INDEX == SsdtCount) { |
| 869 | // dynamic SSDT in DSDT |
| 870 | FileName = SWPrintf("%lsSSDT-xDSDT_%llu%s.aml", FileNamePrefix, ChildCount, Suffix); |
| 871 | } else { |
| 872 | // dynamic SSDT in static SSDT |
| 873 | FileName = SWPrintf("%lsSSDT-x%llu_%llu%s.aml", FileNamePrefix, SsdtCount, ChildCount, Suffix); |
| 874 | } |
| 875 | return FileName; |
| 876 | } |
| 877 | |
| 878 | VOID DumpChildSsdt(EFI_ACPI_DESCRIPTION_HEADER *TableEntry, CONST CHAR16 *DirName, CONST CHAR16 *FileNamePrefix, UINTN SsdtCount) |
| 879 | { |
no test coverage detected