Merge pull request #8305 from cleverca22/move-stack
raise kernel load addr and slip stack under kernel on both 32bit and 64bit
This commit is contained in:
commit
2eb62f8238
@ -171,4 +171,13 @@ $(BUILD)/firmware.disk.img.zip: $(BUILD)/kernel$(SUFFIX).img
|
|||||||
$(Q)zip $@ $(BUILD)/circuitpython-disk.img
|
$(Q)zip $@ $(BUILD)/circuitpython-disk.img
|
||||||
$(Q)rm $(BUILD)/circuitpython-disk.img
|
$(Q)rm $(BUILD)/circuitpython-disk.img
|
||||||
|
|
||||||
|
.PHONY: $(BUILD)/rpiboot rpiboot
|
||||||
|
rpiboot: $(BUILD)/rpiboot
|
||||||
|
$(BUILD)/rpiboot: $(BUILD)/kernel$(SUFFIX).img
|
||||||
|
mkdir -vp $@
|
||||||
|
cp -vf $(BUILD)/kernel$(SUFFIX).img $@/
|
||||||
|
cp -vfr config.txt firmware/bootcode.bin firmware/fixup* firmware/start* firmware/*.dtb $@/
|
||||||
|
#sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" $@/bootcode.bin $@/bootcode.bin
|
||||||
|
echo uart_2ndstage=1 >> $@/config.txt
|
||||||
|
|
||||||
include $(TOP)/py/mkrules.mk
|
include $(TOP)/py/mkrules.mk
|
||||||
|
@ -7,3 +7,4 @@ enable_jtag_gpio=1
|
|||||||
# hdmi_group=1
|
# hdmi_group=1
|
||||||
# hdmi_mode=16
|
# hdmi_mode=16
|
||||||
gpu_mem=16
|
gpu_mem=16
|
||||||
|
kernel_address=0x100000
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit d3a6b50a21e7dd49ba4bfa0374da3407594caa50
|
Subproject commit ec1043800fc987f7067fc07615193439843695d6
|
@ -124,30 +124,18 @@ void reset_cpu(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool port_has_fixed_stack(void) {
|
bool port_has_fixed_stack(void) {
|
||||||
#ifdef __aarch64__
|
|
||||||
return true;
|
return true;
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// From the linker script
|
// From the linker script
|
||||||
extern uint32_t __bss_end;
|
extern uint32_t __bss_end;
|
||||||
extern uint32_t _ld_ram_end;
|
extern uint32_t _ld_ram_end;
|
||||||
uint32_t *port_stack_get_limit(void) {
|
uint32_t *port_stack_get_limit(void) {
|
||||||
#ifdef __aarch64__
|
|
||||||
return (uint32_t *)0x4;
|
return (uint32_t *)0x4;
|
||||||
#else
|
|
||||||
return &__bss_end;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t *port_stack_get_top(void) {
|
uint32_t *port_stack_get_top(void) {
|
||||||
#ifdef __aarch64__
|
return (uint32_t *)0x100000;
|
||||||
return (uint32_t *)0x80000;
|
|
||||||
#else
|
|
||||||
return &_ld_ram_end;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t *port_heap_get_bottom(void) {
|
uint32_t *port_heap_get_bottom(void) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user