2020-04-16 09:15:26 +02:00
|
|
|
/*
|
|
|
|
* FixBiosDsdt.h
|
|
|
|
*
|
|
|
|
* Created on: 16 Apr 2020
|
|
|
|
* Author: jief
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PLATFORM_FIXBIOSDSDT_H_
|
|
|
|
#define PLATFORM_FIXBIOSDSDT_H_
|
|
|
|
|
2021-02-07 15:39:03 +01:00
|
|
|
extern "C" {
|
2021-02-06 18:16:46 +01:00
|
|
|
#include <IndustryStandard/Acpi20.h>
|
2021-02-07 15:39:03 +01:00
|
|
|
}
|
2021-02-06 18:16:46 +01:00
|
|
|
|
2021-02-07 15:39:03 +01:00
|
|
|
#include "../cpp_foundation/XBuffer.h"
|
|
|
|
#include "../Platform/MacOsVersion.h"
|
|
|
|
#include "../include/DsdtFixList.h"
|
2020-04-16 11:09:22 +02:00
|
|
|
|
2020-04-16 09:48:13 +02:00
|
|
|
struct _oper_region {
|
|
|
|
CHAR8 Name[8];
|
|
|
|
UINT32 Address;
|
|
|
|
struct _oper_region *next;
|
|
|
|
};
|
|
|
|
typedef struct _oper_region OPER_REGION;
|
|
|
|
|
|
|
|
|
2020-10-03 19:02:31 +02:00
|
|
|
void
|
2020-04-16 09:15:26 +02:00
|
|
|
FixBiosDsdt (
|
|
|
|
UINT8 *Dsdt,
|
|
|
|
EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *fadt,
|
2020-11-12 22:25:56 +01:00
|
|
|
const MacOsVersion& OSVersion
|
2020-04-16 09:15:26 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
|
2020-10-03 19:02:31 +02:00
|
|
|
void
|
2020-04-16 09:15:26 +02:00
|
|
|
RenameDevices(UINT8* table);
|
|
|
|
|
2020-10-03 19:02:31 +02:00
|
|
|
void
|
2020-04-16 09:15:26 +02:00
|
|
|
GetBiosRegions (
|
|
|
|
UINT8 *buffer
|
|
|
|
);
|
|
|
|
|
|
|
|
INT32
|
|
|
|
FindBin (
|
|
|
|
UINT8 *Array,
|
|
|
|
UINT32 ArrayLen,
|
2020-04-27 17:16:43 +02:00
|
|
|
const UINT8 *Pattern,
|
2020-04-16 09:15:26 +02:00
|
|
|
UINT32 PatternLen
|
|
|
|
);
|
2020-08-27 20:47:56 +02:00
|
|
|
INT32 FindBin (UINT8 *dsdt, size_t len, const XBuffer<UINT8>& bin);
|
2020-04-16 09:15:26 +02:00
|
|
|
|
|
|
|
|
2020-08-27 20:47:56 +02:00
|
|
|
UINT32 FixAny (UINT8* dsdt, UINT32 len, const XBuffer<UINT8> ToFind, const XBuffer<UINT8> ToReplace);
|
2020-10-07 11:15:21 +02:00
|
|
|
UINT32 FixRenameByBridge2 (UINT8* dsdt, UINT32 len, const XBuffer<UINT8>& TgtBrgName, const XBuffer<UINT8>& ToFind, const XBuffer<UINT8>& ToReplace);
|
2020-04-16 09:15:26 +02:00
|
|
|
|
2020-06-30 14:56:16 +02:00
|
|
|
|
2020-04-16 09:15:26 +02:00
|
|
|
#endif /* PLATFORM_FIXBIOSDSDT_H_ */
|