removed BaS copy to RAM.

Since flashing is intended from a self-contained, SD-card loaded image, this is not neccessary anymore.
This commit is contained in:
Markus Fröschle
2013-07-02 09:53:48 +00:00
parent 3f606545a9
commit 21232c7e09
7 changed files with 332 additions and 339 deletions

View File

@@ -144,7 +144,7 @@ $(LIBBAS): $(OBJS)
#$(OBJDIR)/init_fpga.o: CFLAGS += -mbitfield
# compile printf pc-relative so it can be used as well before and after copy of BaS
$(OBJDIR)/bas_printf.o: CFLAGS += -mpcrel
#$(OBJDIR)/bas_printf.o: CFLAGS += -mpcrel
# the same for flush_and_invalidate_cache()
$(OBJDIR)/cache.o: CFLAGS += -mpcrel

View File

@@ -14,6 +14,25 @@ SECTIONS
objs/init_fpga.o(.text)
objs/wait.o(.text)
objs/BaS.o(.text)
objs/wait.o(.text)
/* put other routines into the same segment (RAM) as BaS.o */
objs/unicode.o(.text)
objs/mmc.o(.text)
objs/ff.o(.text)
objs/sd_card.o(.text)
objs/s19reader.o(.text)
objs/bas_printf.o(.text)
objs/bas_string.o(.text)
objs/printf_helper.o(.text)
objs/cache.o(.text)
objs/mmu.o(.text)
objs/supervisor.o(.text)
objs/illegal_instruction.o(.text)
objs/exceptions.o(.text)
objs/xhdi_sd.o(.text)
objs/xhdi_interface.o(text)
objs/xhdi_vec.o(text)
#if (FORMAT == elf32-m68k)
*(.rodata)
*(.rodata.*)
@@ -28,25 +47,6 @@ SECTIONS
*/
AT (ALIGN(ADDR(.text) + SIZEOF(.text), 4))
{
objs/BaS.o(.text)
objs/wait.o(.text)
/* put other routines into the same segment (RAM) as BaS.o */
objs/unicode.o(.text)
objs/mmc.o(.text)
objs/ff.o(.text)
objs/sd_card.o(.text)
objs/s19reader.o(.text)
objs/bas_printf.o(.text)
objs/bas_string.o(.text)
objs/printf_helper.o(.text)
objs/cache.o(.text)
objs/mmu.o(.text)
objs/exceptions.o(.text)
objs/supervisor.o(.text)
objs/illegal_instruction.o(.text)
objs/xhdi_sd.o(.text)
objs/xhdi_interface.o(text)
objs/xhdi_vec.o(text)
*(.data)
*(.bss)

View File

@@ -21,8 +21,8 @@ SECTIONS
}
#define BAS_LABEL_LMA(x) ((x))
_xprintf_before_copy = BAS_LABEL_LMA(_xprintf);
_display_progress_before_copy = BAS_LABEL_LMA(_display_progress);
/* _xprintf_before_copy = BAS_LABEL_LMA(_xprintf); */
/* _display_progress_before_copy = BAS_LABEL_LMA(_display_progress); */
/* _flush_and_invalidate_caches_before_copy = BAS_LABEL_LMA(_flush_and_invalidate_caches); */
/*

View File

@@ -31,10 +31,7 @@
#define FPGA_DATA0 (1 << 3)
#define FPGA_CONF_DONE (1 << 5)
extern void xprintf_before_copy(const char *fmt, ...);
#define xprintf xprintf_before_copy
#define display_progress display_progress_before_copy
/*
* load FPGA
*/

View File

@@ -25,7 +25,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include "bas_printf.h"
#include "sd_card.h"

View File

@@ -33,11 +33,6 @@
#include "bas_types.h"
#include "wait.h"
extern void xprintf_before_copy(const char *fmt, ...);
#define xprintf xprintf_before_copy
extern void flush_and_invalidate_caches_before_copy(void);
#define flush_and_invalidate_caches flush_and_invalidate_caches_before_copy
#define UNUSED(x) (void)(x) /* Unused variable */
extern volatile long _VRAM; /* start address of video ram from linker script */
@@ -852,6 +847,7 @@ void initialize_hardware(void) {
//video_1280_1024();
init_ac97();
#ifdef _NOT_USED_
/* copy the BaS code contained in flash to its final location */
src = (uint32_t *)BAS_LMA;
end = (uint32_t *)(BAS_LMA + BAS_SIZE);
@@ -872,6 +868,7 @@ void initialize_hardware(void) {
flush_and_invalidate_caches();
/* jump into the BaS in RAM */
#endif /* _NOT_USED_ */
extern void BaS(void);
BaS();
}