Utilize hekate's BDK for hekate main and Nyx

This commit is contained in:
CTCaer
2020-06-14 16:45:45 +03:00
parent 185526d134
commit 6e256d29c7
186 changed files with 1138 additions and 1016 deletions

View File

@@ -16,11 +16,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bpmp.h"
#include "clock.h"
#include "t210.h"
#include "../../common/memory_map.h"
#include "../utils/util.h"
#include <soc/bpmp.h>
#include <soc/clock.h>
#include <soc/t210.h>
#include <memory_map.h>
#include <utils/util.h>
#define BPMP_MMU_CACHE_LINE_SIZE 0x20

View File

@@ -19,7 +19,7 @@
#ifndef _BPMP_H_
#define _BPMP_H_
#include "../utils/types.h"
#include <utils/types.h>
typedef enum
{

View File

@@ -14,14 +14,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../soc/ccplex.h"
#include "../soc/i2c.h"
#include "../soc/clock.h"
#include "../utils/util.h"
#include "../soc/pmc.h"
#include "../soc/t210.h"
#include "../power/max77620.h"
#include "../power/max7762x.h"
#include <soc/ccplex.h>
#include <soc/i2c.h>
#include <soc/clock.h>
#include <utils/util.h>
#include <soc/pmc.h>
#include <soc/t210.h>
#include <power/max77620.h>
#include <power/max7762x.h>
void _ccplex_enable_power()
{

View File

@@ -17,7 +17,7 @@
#ifndef _CCPLEX_H_
#define _CCPLEX_H_
#include "../utils/types.h"
#include <utils/types.h>
void ccplex_boot_cpu0(u32 entry);

View File

@@ -15,10 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../soc/clock.h"
#include "../soc/t210.h"
#include "../utils/util.h"
#include "../storage/sdmmc.h"
#include <soc/clock.h>
#include <soc/t210.h>
#include <storage/sdmmc.h>
#include <utils/util.h>
/*
* CLOCK Peripherals:

View File

@@ -18,7 +18,7 @@
#ifndef _CLOCK_H_
#define _CLOCK_H_
#include "../utils/types.h"
#include <utils/types.h>
/*! Clock registers. */
#define CLK_RST_CONTROLLER_RST_SOURCE 0x0

View File

@@ -19,8 +19,8 @@
#include <string.h>
#include "../soc/fuse.h"
#include "../soc/t210.h"
#include <soc/fuse.h>
#include <soc/t210.h>
#define ARRAYSIZE(x) (sizeof(x) / sizeof(*x))

View File

@@ -19,7 +19,7 @@
#ifndef _FUSE_H_
#define _FUSE_H_
#include "../utils/types.h"
#include <utils/types.h>
/*! Fuse registers. */
#define FUSE_CTRL 0x0

View File

@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gpio.h"
#include "t210.h"
#include <soc/gpio.h>
#include <soc/t210.h>
#define GPIO_BANK_IDX(port) (port >> 2)

View File

@@ -18,7 +18,7 @@
#ifndef _GPIO_H_
#define _GPIO_H_
#include "../utils/types.h"
#include <utils/types.h>
#define GPIO_MODE_SPIO 0
#define GPIO_MODE_GPIO 1

View File

@@ -17,32 +17,32 @@
#include <string.h>
#include "hw_init.h"
#include "bpmp.h"
#include "clock.h"
#include "fuse.h"
#include "gpio.h"
#include "i2c.h"
#include "pinmux.h"
#include "pmc.h"
#include "uart.h"
#include "t210.h"
#include "../input/joycon.h"
#include "../input/touch.h"
#include "../gfx/di.h"
#include "../mem/mc.h"
#include "../mem/minerva.h"
#include "../mem/sdram.h"
#include "../sec/se.h"
#include "../sec/se_t210.h"
#include "../power/max77620.h"
#include "../power/max7762x.h"
#include "../gfx/di.h"
#include "../power/regulator_5v.h"
#include "../storage/nx_sd.h"
#include "../storage/sdmmc.h"
#include "../thermal/fan.h"
#include "../utils/util.h"
#include <soc/hw_init.h>
#include <gfx/di.h>
#include <input/joycon.h>
#include <input/touch.h>
#include <sec/se.h>
#include <sec/se_t210.h>
#include <soc/bpmp.h>
#include <soc/clock.h>
#include <soc/fuse.h>
#include <soc/gpio.h>
#include <soc/i2c.h>
#include <soc/pinmux.h>
#include <soc/pmc.h>
#include <soc/uart.h>
#include <soc/t210.h>
#include <mem/mc.h>
#include <mem/minerva.h>
#include <mem/sdram.h>
#include <power/bq24193.h>
#include <power/max77620.h>
#include <power/max7762x.h>
#include <power/regulator_5v.h>
#include <storage/nx_sd.h>
#include <storage/sdmmc.h>
#include <thermal/fan.h>
#include <utils/util.h>
extern boot_cfg_t b_cfg;
extern volatile nyx_storage_t *nyx_str;

View File

@@ -18,7 +18,7 @@
#ifndef _HW_INIT_H_
#define _HW_INIT_H_
#include "../utils/types.h"
#include <utils/types.h>
void config_hw();
void reconfig_hw_workaround(bool extra_reconfig, u32 magic);

View File

@@ -17,8 +17,8 @@
#include <string.h>
#include "i2c.h"
#include "../utils/util.h"
#include <soc/i2c.h>
#include <utils/util.h>
static const u32 i2c_addrs[] = {
0x7000C000, 0x7000C400, 0x7000C500,

View File

@@ -18,7 +18,7 @@
#ifndef _I2C_H_
#define _I2C_H_
#include "../utils/types.h"
#include <utils/types.h>
#define I2C_1 0
#define I2C_2 1

View File

@@ -19,9 +19,9 @@
#include <string.h>
#include "irq.h"
#include "t210.h"
#include "../gfx/gfx.h"
#include "../mem/heap.h"
#include <soc/t210.h>
#include <gfx_utils.h>
#include <mem/heap.h>
//#define DPRINTF(...) gfx_printf(__VA_ARGS__)
#define DPRINTF(...)

View File

@@ -19,7 +19,7 @@
#ifndef IRQ_H
#define IRQ_H
#include "../utils/types.h"
#include <utils/types.h>
#define IRQ_MAX_HANDLERS 16

View File

@@ -14,9 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../soc/kfuse.h"
#include "../soc/clock.h"
#include "../soc/t210.h"
#include <soc/kfuse.h>
#include <soc/clock.h>
#include <soc/t210.h>
int kfuse_wait_ready()
{

View File

@@ -17,7 +17,7 @@
#ifndef _KFUSE_H_
#define _KFUSE_H_
#include "../utils/types.h"
#include <utils/types.h>
#define KFUSE_STATE_SOFTRESET (1 << 31)
#define KFUSE_STATE_STOP (1 << 25)

View File

@@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../soc/pinmux.h"
#include "../soc/t210.h"
#include <soc/pinmux.h>
#include <soc/t210.h>
void pinmux_config_uart(u32 idx)
{

View File

@@ -17,7 +17,7 @@
#ifndef _PINMUX_H_
#define _PINMUX_H_
#include "../utils/types.h"
#include <utils/types.h>
/*! APB MISC registers. */
#define APB_MISC_GP_SDMMC1_CLK_LPBK_CONTROL 0x8D4

View File

@@ -14,7 +14,7 @@
#ifndef _TEGRA210_PMC_H_
#define _TEGRA210_PMC_H_
#include "../utils/types.h"
#include <utils/types.h>
struct tegra_pmc_regs
{

View File

@@ -17,7 +17,7 @@
#ifndef _T210_H_
#define _T210_H_
#include "../utils/types.h"
#include <utils/types.h>
#define BOOTROM_BASE 0x100000
#define IRAM_BASE 0x40000000
@@ -162,6 +162,8 @@
#define APB_MISC_PP_STRAPPING_OPT_A 0x08
#define APB_MISC_PP_PINMUX_GLOBAL 0x40
#define APB_MISC_GP_HIDREV 0x804
#define GP_HIDREV_MAJOR_T210 0x1
#define GP_HIDREV_MAJOR_T210B01 0x2
#define APB_MISC_GP_AUD_MCLK_CFGPADCTRL 0x8F4
#define APB_MISC_GP_LCD_BL_PWM_CFGPADCTRL 0xA34
#define APB_MISC_GP_SDMMC1_PAD_CFGPADCTRL 0xA98

View File

@@ -15,10 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../soc/uart.h"
#include "../soc/clock.h"
#include "../soc/t210.h"
#include "../utils/util.h"
#include <soc/uart.h>
#include <soc/clock.h>
#include <soc/t210.h>
#include <utils/util.h>
/* UART A, B, C, D and E. */
static const u32 uart_baseoff[5] = { 0, 0x40, 0x200, 0x300, 0x400 };

View File

@@ -18,7 +18,7 @@
#ifndef _UART_H_
#define _UART_H_
#include "../utils/types.h"
#include <utils/types.h>
#define UART_A 0
#define UART_B 1