CloverBootloader/rEFIt_UEFI/Platform/FixBiosDsdt.h

58 lines
1.2 KiB
C
Raw Normal View History

/*
* FixBiosDsdt.h
*
* Created on: 16 Apr 2020
* Author: jief
*/
#ifndef PLATFORM_FIXBIOSDSDT_H_
#define PLATFORM_FIXBIOSDSDT_H_
extern "C" {
#include <IndustryStandard/Acpi20.h>
}
#include "../cpp_foundation/XBuffer.h"
#include "../Platform/MacOsVersion.h"
#include "../include/DsdtFixList.h"
2020-04-16 11:09:22 +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
FixBiosDsdt (
UINT8 *Dsdt,
EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE *fadt,
2020-11-12 22:25:56 +01:00
const MacOsVersion& OSVersion
);
2020-10-03 19:02:31 +02:00
void
RenameDevices(UINT8* table);
2020-10-03 19:02:31 +02:00
void
GetBiosRegions (
UINT8 *buffer
);
INT32
FindBin (
UINT8 *Array,
UINT32 ArrayLen,
const UINT8 *Pattern,
UINT32 PatternLen
);
INT32 FindBin (UINT8 *dsdt, size_t len, const XBuffer<UINT8>& bin);
UINT32 FixAny (UINT8* dsdt, UINT32 len, const XBuffer<UINT8> ToFind, const XBuffer<UINT8>& ToReplace, uint64_t Skip, int count);
UINT32 FixRenameByBridge2 (UINT8* dsdt, UINT32 len, const XBuffer<UINT8>& TgtBrgName, const XBuffer<UINT8>& ToFind, const XBuffer<UINT8>& ToReplace, uint64_t Skip, int count);
#endif /* PLATFORM_FIXBIOSDSDT_H_ */