Add (Broken) payload launching

This commit is contained in:
Such Meme, Many Skill
2019-08-17 01:08:00 +02:00
parent 819d08415d
commit ada4fd2c7f
5 changed files with 113 additions and 6 deletions

View File

@@ -0,0 +1,15 @@
#pragma once
#define RELOC_META_OFF 0x7C
#define PATCHED_RELOC_SZ 0x94
#define PATCHED_RELOC_STACK 0x40007000
#define PATCHED_RELOC_ENTRY 0x40010000
#define EXT_PAYLOAD_ADDR 0xC03C0000
#define RCM_PAYLOAD_ADDR (EXT_PAYLOAD_ADDR + ALIGN(PATCHED_RELOC_SZ, 0x10))
#define COREBOOT_ADDR (0xD0000000 - 0x100000)
#define CBFS_DRAM_EN_ADDR 0x4003e000
#define CBFS_DRAM_MAGIC 0x4452414D // "DRAM"
#define EMC_BASE 0x7001B000
#define EMC(off) _REG(EMC_BASE, off)
int launch_payload(char *path, int update);