]> granicus.if.org Git - esp-idf/commit
bootloader: account for load address when mapping cache pages
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 3 Sep 2018 10:15:20 +0000 (18:15 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Wed, 23 Jan 2019 09:02:02 +0000 (17:02 +0800)
commitb1ee25afde07a3a6b5d9e1cd51a8316ac67bde64
treebf7a200360e38ffb9355fef0f5dc7db066101228
parentcccaa68467d8a309a99fb0b4489f0cdff33e7a93
bootloader: account for load address when mapping cache pages

Bootloader used to calculate the number of cache pages assuming that
load address was aligned, while in reality load address for DROM and
IROM was offset by 0x20 bytes from the start of 64kB page. This
caused the bootloader to map one less page if the size of the image
was 0x4..0x1c less than a multiple of 64kB.

Reported in https://esp32.com/viewtopic.php?f=13&t=6952.
components/bootloader_support/include_bootloader/bootloader_flash.h
components/bootloader_support/src/bootloader_flash.c
components/bootloader_support/src/bootloader_utility.c