ACPI AML decompiler w/ CFG recovery and structured pseudocode
1#ifndef TOBI_P_H
2#define TOBI_P_H
3
4#include "dg.h"
5#include "ir.h"
6#include "nm.h"
7
8#include <stddef.h>
9#include <stdint.h>
10
11typedef struct tobi_input_meta {
12 int is_table;
13 char signature[5];
14 size_t table_len;
15 size_t aml_off;
16 size_t aml_len;
17 uint8_t checksum_sum;
18 int checksum_valid;
19} tobi_input_meta;
20
21typedef struct tobi_parse_result {
22 tobi_ir *root;
23 tobi_diag_list diag;
24 tobi_ns ns;
25 tobi_input_meta meta;
26} tobi_parse_result;
27
28typedef struct tobi_parse_input {
29 const uint8_t *data;
30 size_t len;
31 const char *name;
32} tobi_parse_input;
33
34int tobi_parse(const uint8_t *data, size_t len, int strict, tobi_parse_result *out);
35
36int tobi_parse_multi(const tobi_parse_input *inputs, size_t count, int strict, tobi_parse_result *out);
37
38void tobi_parse_result_free(tobi_parse_result *res);
39
40#endif