Fixed potential BaS size alignment issue.
This commit is contained in:
@@ -91,7 +91,11 @@ SECTIONS {
|
|||||||
objs/illegal_instruction.o(.text)
|
objs/illegal_instruction.o(.text)
|
||||||
*(.data)
|
*(.data)
|
||||||
*(.bss)
|
*(.bss)
|
||||||
. = ALIGN(4);
|
|
||||||
|
/* The BaS copy routine assumes that tha BaS size
|
||||||
|
* is a multiple of the following value.
|
||||||
|
*/
|
||||||
|
. = ALIGN(16);
|
||||||
} > ram
|
} > ram
|
||||||
|
|
||||||
__BAS_LMA = LOADADDR(.bas);
|
__BAS_LMA = LOADADDR(.bas);
|
||||||
|
|||||||
@@ -807,14 +807,16 @@ void initialize_hardware(void) {
|
|||||||
end = (uint32_t *)(BAS_LMA + BAS_SIZE);
|
end = (uint32_t *)(BAS_LMA + BAS_SIZE);
|
||||||
dst = jmp = (uint32_t *)BAS_VMA;
|
dst = jmp = (uint32_t *)BAS_VMA;
|
||||||
|
|
||||||
/* FIXME: beware of possible alignment */
|
/* The linker script will ensure that the Bas size
|
||||||
do
|
* is a multiple of the following.
|
||||||
|
*/
|
||||||
|
while (src < end)
|
||||||
{
|
{
|
||||||
*dst++ = *src++;
|
*dst++ = *src++;
|
||||||
*dst++ = *src++;
|
*dst++ = *src++;
|
||||||
*dst++ = *src++;
|
*dst++ = *src++;
|
||||||
*dst++ = *src++;
|
*dst++ = *src++;
|
||||||
} while (src < end);
|
}
|
||||||
|
|
||||||
/* we have copied a code area, so flush the caches */
|
/* we have copied a code area, so flush the caches */
|
||||||
flush_and_invalidate_caches();
|
flush_and_invalidate_caches();
|
||||||
|
|||||||
Reference in New Issue
Block a user