forked from corellium/preloader-m1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tunable.h
36 lines (29 loc) · 960 Bytes
/
tunable.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
/*
*
* Copyright (C) 2021 Corellium LLC
* All rights reserved.
*
*/
#ifndef _TUNABLE_H
#define _TUNABLE_H
#include "libc.h"
#include "dtree.h"
#define TUNABLE_LEGACY 0
#define TUNABLE_FANCY 1
#define TUNABLE_PCIE 2
#define TUNABLE_PCIE_PARENT 3
#define TUNABLE_PLAIN 4
#define PLAIN_BYTE 0
#define PLAIN_HALF 1
#define PLAIN_WORD 2
#define PLAIN_LONG 3
void prepare_tunable(dtree *adt, const char *adtnname, const char *adtpname, dtree *ldt, const char *ldtnname, const char *ldtpname, unsigned mode, uint64_t base);
struct tunable_fuse_map {
uint64_t src_addr;
uint32_t dst_offs;
uint8_t src_lsb, src_width;
uint8_t dst_lsb, dst_width;
};
void prepare_fuse_tunable(dtree *ldt, const char *ldtnname, const char *ldtpname, const struct tunable_fuse_map *map, uint64_t base);
#endif