Move all I/DRAM addresses into a memory map

Many addresses were moved around to pack the memory usage!
This commit is contained in:
CTCaer
2019-12-08 02:23:03 +02:00
parent 0290892b23
commit f256bd5909
31 changed files with 152 additions and 91 deletions

View File

@@ -24,6 +24,7 @@
#include "gui.h"
#include "fe_emmc_tools.h"
#include "fe_emummc_tools.h"
#include "../../../common/memory_map.h"
#include "../config/config.h"
#include "../libs/fatfs/ff.h"
#include "../mem/heap.h"
@@ -35,10 +36,6 @@
#include "../utils/sprintf.h"
#include "../utils/util.h"
#define EMMC_BUF_ALIGNED 0xB5000000
#define SDXC_BUF_ALIGNED 0xB6000000
#define MIXD_BUF_ALIGNED 0xB7000000
#define NUM_SECTORS_PER_ITER 8192 // 4MB Cache.
#define OUT_FILENAME_SZ 128
#define HASH_FILENAME_SZ (OUT_FILENAME_SZ + 11) // 11 == strlen(".sha256sums")

View File

@@ -32,10 +32,6 @@
#include "../utils/sprintf.h"
#include "../utils/util.h"
#define EMMC_BUF_ALIGNED 0xB5000000
#define SDXC_BUF_ALIGNED 0xB6000000
#define MIXD_BUF_ALIGNED 0xB7000000
#define NUM_SECTORS_PER_ITER 8192 // 4MB Cache.
#define OUT_FILENAME_SZ 128

View File

@@ -40,6 +40,7 @@
#include "../soc/hw_init.h"
#include "../soc/t210.h"
#include "../storage/sdmmc.h"
#include "../thermal/fan.h"
#include "../thermal/tmp451.h"
#include "../utils/dirlist.h"
#include "../utils/sprintf.h"
@@ -87,7 +88,7 @@ static void _save_fb_to_bmp()
const u32 file_size = 0x384000 + 0x36;
u8 *bitmap = malloc(file_size);
u32 *fb = malloc(0x384000);
u32 *fb_ptr = gfx_ctxt.fb;
u32 *fb_ptr = (u32 *)NYX_FB_ADDRESS;
// Reconstruct FB for bottom-top, landscape bmp.
for (u32 x = 0; x < 1280; x++)
@@ -163,7 +164,7 @@ static void _save_fb_to_bmp()
static void _disp_fb_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t *color_p)
{
// Draw to framebuffer.
gfx_set_rect_land_pitch(gfx_ctxt.fb, (u32 *)color_p, x1, y1, x2, y2); //pitch
gfx_set_rect_land_pitch((u32 *)NYX_FB_ADDRESS, (u32 *)color_p, x1, y1, x2, y2); //pitch
// Check if display init was done. If it's the first big draw, init.
if (!disp_init_done && ((x2 - x1 + 1) > 600))