-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
brom-dump: payloads: add partial mt6573 support (usb-dump)
hello-world-uart doesn't print anything yet.
- Loading branch information
Showing
7 changed files
with
132 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
# SPDX-License-Identifier: Unlicense | ||
|
||
for target in $(make print-targets); do | ||
make TARGET="$target" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
// SPDX-FileCopyrightText: 2023 arzamas-16 <https://github.com/arzamas-16> | ||
|
||
#include <stdint.h> | ||
|
||
void (*DA_putc_wrapper_uart)(uint8_t) = | ||
( void (*)(uint8_t) ) | ||
(0x90007AFE + 1); | ||
void (*DA_print_hex_value)(uint32_t, uint32_t) = | ||
( void (*)(uint32_t, uint32_t) ) | ||
(0x90007B14 + 1); | ||
void (*DA_printf_uart)(uint8_t*, uint32_t, uint32_t, uint32_t) = | ||
( void (*)(uint8_t*, uint32_t, uint32_t, uint32_t) ) | ||
(0x90007B42 + 1); | ||
|
||
|
||
|
||
void (*DA_io_usb_write)(uint8_t*, uint32_t) = | ||
( void (*)(uint8_t*, uint32_t) ) | ||
(0x900099FE + 1); | ||
uint32_t (*DA_io_usb_readl)() = | ||
( uint32_t (*)() ) | ||
(0x90009BB8 + 1); | ||
void (*DA_io_usb_writel)(uint32_t) = | ||
( void (*)(uint32_t) ) | ||
(0x90009BE4 + 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
// SPDX-FileCopyrightText: 2023 arzamas-16 <https://github.com/arzamas-16> | ||
|
||
#define HW_reg_chip_id 0x70026008 | ||
|
||
#define MEM_brom_start 0x48000000 | ||
#define MEM_brom_length 0x10000 | ||
#define MEM_sram_start 0x40000000 | ||
#define MEM_sram_length 0x40000 | ||
#define MEM_da_start 0x90005000 | ||
#define MEM_da_length 0x1B000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@ SPDX-License-Identifier: GPL-3.0-only | ||
@ SPDX-FileCopyrightText: 2023 arzamas-16 <https://github.com/arzamas-16> | ||
|
||
@ derived from the original mt6573 DA, see 0x90005068 | ||
.equ MEM_stack_base, 0x400013FC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* SPDX-License-Identifier: GPL-3.0-only */ | ||
/* SPDX-FileCopyrightText: 2023 arzamas-16 <https://github.com/arzamas-16> */ | ||
|
||
ENTRY(_init) | ||
|
||
MEMORY | ||
{ | ||
DA_RAM (IWX) : ORIGIN = 0x9001b334, LENGTH = 0x800 | ||
} | ||
|
||
SECTIONS | ||
{ | ||
.text : | ||
{ | ||
*(.text.init); | ||
*(.text*); | ||
} | ||
|
||
.rodata : | ||
{ | ||
*(.rodata); | ||
*(.rodata.*); | ||
*(.gnu.linkonce.r.*); | ||
} | ||
|
||
.data : | ||
{ | ||
*(.data); | ||
*(.data.*); | ||
*(.gnu.linkonce.d.*); | ||
} | ||
|
||
.bss : | ||
{ | ||
|
||
*(.bss); | ||
*(.bss.*); | ||
*(.gnu.linkonce.b.*); | ||
|
||
*(COMMON); | ||
} | ||
|
||
.fill : | ||
{ | ||
FILL(0); | ||
. = ORIGIN(DA_RAM) + LENGTH(DA_RAM) - 1; | ||
BYTE(0); | ||
} | ||
} |