1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-01-11 02:46:20 +01:00
Files
u-boot-megous/include
Sean Anderson 38ef64e6ce spl: nand: Set bl_len to page size
Since commit 34793598c8 ("mtd: nand: mxs_nand_spl: Remove the page aligned
access") there are no longer any users of nand_get_mtd. However, it is
still important to know what the page size is so we can allocate a
large-enough buffer. If the image size is not page-aligned, we will go off
the end of the buffer and clobber some memory.

Introduce a new function nand_page_size which returns the page size. For
most drivers it is easy to determine the page size. However, a few need to
be modified since they only keep the page size around temporarily.

It's possible that this patch could cause a regression on some platforms if
the offset is non-aligned and there is invalid address space immediately
before the load address. spl_load_legacy_img does not (except when
compressing) respect bl_len, so only boards with SPL_LOAD_FIT (8 boards) or
SPL_LOAD_IMX_CONTAINER (none in tree) would be affected.

defconfig               CONFIG_TEXT_BASE
======================= ================
am335x_evm              0x80800000
am43xx_evm              0x80800000
am43xx_evm_rtconly      0x80800000
am43xx_evm_usbhost_boot 0x80800000
am43xx_hs_evm           0x80800000
dra7xx_evm              0x80800000
gwventana_nand          0x17800000
imx8mn_bsh_smm_s2       0x40200000

All the sitara boards have DDR mapped at 0x80000000. gwventana is an i.MX6Q
which has DDR at 0x10000000. I don't have the IMX8MNRM handy, but on the
i.MX8M DDR starts at 0x40000000. Therefore all of these boards can handle a
little underflow.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
2023-11-16 12:43:48 -05:00
..
2023-10-24 15:55:16 +08:00
2023-10-02 10:55:44 -04:00
2023-05-05 17:48:44 -04:00
2022-10-30 20:07:16 +01:00
2022-01-19 18:11:34 +01:00
2022-09-29 16:07:57 -04:00
2023-02-07 14:33:50 -05:00
2022-09-24 10:47:01 -04:00
2023-08-25 13:54:33 -04:00
2022-07-26 02:30:56 -06:00
2022-01-19 18:11:34 +01:00
2021-01-15 14:36:12 -05:00
2023-08-08 10:22:03 -04:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-30 01:25:00 +00:00
2022-01-30 01:25:00 +00:00
2022-01-19 18:11:34 +01:00
2023-02-09 16:32:25 -05:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2023-10-27 13:15:57 +03:00
2022-01-19 18:11:34 +01:00
2023-07-17 15:38:11 -04:00
2023-08-19 04:12:53 +02:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2021-01-30 14:25:42 -07:00
2022-11-02 08:42:03 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2023-10-27 13:14:47 +03:00
2023-02-06 13:04:52 -05:00
2023-02-09 16:32:25 -05:00
2022-03-15 16:19:29 -04:00
2022-04-06 14:01:42 -04:00
2023-10-23 17:07:06 +03:00
2023-05-02 14:23:34 -04:00
2022-01-19 18:11:34 +01:00
2023-05-15 10:00:30 +02:00
2022-10-18 09:32:53 +08:00
2023-01-20 12:27:06 -05:00
2021-07-07 19:52:22 -04:00
2022-07-26 11:29:00 +02:00
2021-04-10 08:04:42 -04:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-06-08 13:59:53 -04:00
2023-10-31 09:08:51 +01:00
2022-01-19 18:11:34 +01:00
2021-08-30 14:13:28 -04:00
2023-04-27 13:51:06 -04:00
2023-10-27 13:15:57 +03:00
2022-07-26 11:29:02 +02:00
2022-01-19 18:11:34 +01:00
2023-01-27 14:47:57 -05:00
2022-01-19 18:11:34 +01:00
2023-08-19 04:12:53 +02:00
2022-01-19 18:11:34 +01:00
2022-04-28 09:26:44 -04:00
2022-10-30 20:07:17 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2023-10-11 15:43:55 -04:00
2022-01-24 10:35:10 -05:00
2021-09-28 12:03:20 -04:00
2023-03-02 17:45:58 -05:00
2023-11-16 12:43:48 -05:00
2022-06-08 14:00:22 -04:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2023-09-11 16:27:49 -04:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2023-01-16 18:01:10 +08:00
2022-12-09 14:10:28 -05:00
2022-01-19 18:11:34 +01:00
2022-04-01 15:03:13 -04:00
2023-10-15 12:23:48 +02:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-09-13 12:08:40 -04:00
2022-10-16 12:23:22 +02:00
2022-01-19 18:11:34 +01:00
2022-04-06 14:03:17 -04:00
2023-10-09 15:24:31 -04:00
2022-09-24 10:47:01 -04:00
2023-02-10 07:41:40 -05:00
2022-01-19 18:11:34 +01:00
2023-10-27 13:14:47 +03:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2022-12-07 16:04:17 -05:00
2022-12-22 10:31:49 -05:00
2022-12-22 10:31:49 -05:00
2022-01-19 18:11:34 +01:00
2022-01-19 18:11:34 +01:00
2023-09-04 10:51:58 -04:00
2022-01-19 18:11:34 +01:00
2022-09-18 10:26:49 +02:00
2022-01-19 18:11:34 +01:00
2021-01-15 14:36:12 -05:00