2020-04-16 09:15:26 +02:00
|
|
|
/*
|
|
|
|
* AcpiPatcher.h
|
|
|
|
*
|
|
|
|
* Created on: 16 Apr 2020
|
|
|
|
* Author: jief
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PLATFORM_ACPIPATCHER_H_
|
|
|
|
#define PLATFORM_ACPIPATCHER_H_
|
|
|
|
|
2020-08-17 21:40:52 +02:00
|
|
|
#include "../Platform/Settings.h"
|
2020-04-16 09:48:13 +02:00
|
|
|
|
|
|
|
#pragma pack(push)
|
|
|
|
#pragma pack(1)
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
|
|
|
EFI_ACPI_DESCRIPTION_HEADER Header;
|
|
|
|
UINT32 Entry;
|
|
|
|
|
|
|
|
} RSDT_TABLE;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
|
|
|
EFI_ACPI_DESCRIPTION_HEADER Header;
|
|
|
|
UINT64 Entry;
|
|
|
|
|
|
|
|
} XSDT_TABLE;
|
|
|
|
|
|
|
|
#pragma pack(pop)
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-16 09:15:26 +02:00
|
|
|
extern UINT64 BiosDsdt;
|
|
|
|
extern UINT32 BiosDsdtLen;
|
|
|
|
#define acpi_cpu_max 128
|
|
|
|
extern UINT8 acpi_cpu_count;
|
|
|
|
extern CHAR8 *acpi_cpu_name[];
|
|
|
|
extern UINT8 acpi_cpu_processor_id[];
|
|
|
|
extern CHAR8 *acpi_cpu_score;
|
|
|
|
|
|
|
|
extern UINT64 machineSignature;
|
|
|
|
|
|
|
|
|
|
|
|
//ACPI
|
|
|
|
EFI_STATUS
|
2020-08-12 17:15:47 +02:00
|
|
|
PatchACPI(IN REFIT_VOLUME *Volume, const XString8& OSVersion);
|
2020-04-16 09:15:26 +02:00
|
|
|
|
|
|
|
EFI_STATUS
|
|
|
|
PatchACPI_OtherOS(CONST CHAR16* OsSubdir, BOOLEAN DropSSDT);
|
|
|
|
|
|
|
|
UINT8
|
|
|
|
Checksum8 (
|
2020-10-03 19:02:31 +02:00
|
|
|
void *startPtr,
|
2020-04-16 09:15:26 +02:00
|
|
|
UINT32 len
|
|
|
|
);
|
|
|
|
|
|
|
|
void FixChecksum(EFI_ACPI_DESCRIPTION_HEADER* Table);
|
|
|
|
|
|
|
|
|
2020-10-03 19:02:31 +02:00
|
|
|
void
|
2020-04-16 09:15:26 +02:00
|
|
|
SaveOemDsdt (
|
|
|
|
BOOLEAN FullPatch
|
|
|
|
);
|
|
|
|
|
2020-10-03 19:02:31 +02:00
|
|
|
void
|
|
|
|
SaveOemTables (void);
|
2020-04-16 09:15:26 +02:00
|
|
|
|
|
|
|
EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE
|
2020-10-03 19:02:31 +02:00
|
|
|
*GetFadt (void);
|
2020-04-16 09:15:26 +02:00
|
|
|
|
|
|
|
|
2020-10-03 19:02:31 +02:00
|
|
|
void
|
|
|
|
GetAcpiTablesList (void);
|
2020-04-16 09:15:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* PLATFORM_ACPIPATCHER_H_ */
|