Commit 1af4a350 authored by Julius Werner's avatar Julius Werner Committed by Ricardo Cañuelo Navarro

image: Expand kernel buffer size to 512MB

This patch expands the kernel buffer to 512MB (or to 128MB on arm32
devices where that's the Linux ABI limit anyway, or to less on some
older specialty platforms where it otherwise wouldn't fit). The kernel
partition size on disk has traditionally only been 16MB, and we don't
plan on changing that... however, on a recovery USB stick we can make
the partition as large as we want, and we may need to do that if we want
to add more stuff to the recovery initramfs. Unfortunately we'll be
stuck with the exisiting limits on old platforms since recovery firmware
is not updateable, but this CL is meant to ensure that we'll at least
have lots of headroom to grow on future platforms.

Some memory layouts had to be adjusted to fit the new buffer. Also
document the individual arch-dependent constraints for placing various
regions in the Kconfig help (some of these only apply to older Linux
versions, but since we don't update our kernels it's better to mention
everything that might apply... boards can still violate them after they
made sure that they're unaffected).

BRANCH=None
BUG=chromium:873135
TEST=Booted Cheza (not feasible to test *every* platform, I've
double-checked everything manually as best as I could).

Change-Id: I23f1a2c78f4e82c1f1e4a16d823ab36d2e90ef1d
Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1179122Reviewed-by: default avatarAaron Durbin <adurbin@chromium.org>
parent 2ea3df34
......@@ -7,10 +7,9 @@ CONFIG_BOARD="bob"
CONFIG_BOARD_DIR="gru"
# Image
CONFIG_BASE_ADDRESS=0x18000000
CONFIG_FMAP_OFFSET=0x00300000
CONFIG_BASE_ADDRESS=0x40000000
CONFIG_HEAP_SIZE=0x01000000
CONFIG_KERNEL_START=0x15000000
CONFIG_KERNEL_START=0x20000000
# Vboot
CONFIG_TPM2_MODE=y
......@@ -23,7 +22,7 @@ CONFIG_NV_STORAGE_FLASH=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x6400000
CONFIG_KERNEL_FIT_FDT_ADDR=0x1f800000
# Drivers
CONFIG_DRIVER_BUS_I2S_ROCKCHIP=y
......
......@@ -9,7 +9,7 @@ CONFIG_BOARD="foster"
CONFIG_BASE_ADDRESS=0xd4000000
CONFIG_FMAP_OFFSET=0x00200000
CONFIG_HEAP_SIZE=0x04000000
CONFIG_KERNEL_START=0x85000000
CONFIG_KERNEL_START=0xa0000000
# Vboot
CONFIG_VIRTUAL_DEV_SWITCH=y
......@@ -18,7 +18,7 @@ CONFIG_NV_STORAGE_FLASH=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x9ff00000
CONFIG_KERNEL_FIT_FDT_ADDR=0x9f800000
# Drivers
CONFIG_DRIVER_BUS_I2C_TEGRA=y
......
......@@ -15,6 +15,7 @@ CONFIG_BASE_ADDRESS=0x88000000
CONFIG_FMAP_OFFSET=0x00300000
CONFIG_HEAP_SIZE=0x01200000
CONFIG_KERNEL_START=0x80208000
CONFIG_KERNEL_SIZE=0x05000000
# Vboot
CONFIG_VIRTUAL_DEV_SWITCH=y
......
......@@ -6,10 +6,9 @@ CONFIG_ARCH_ARM_V8=y
CONFIG_BOARD="gru"
# Image
CONFIG_BASE_ADDRESS=0x18000000
CONFIG_FMAP_OFFSET=0x00300000
CONFIG_BASE_ADDRESS=0x40000000
CONFIG_HEAP_SIZE=0x01000000
CONFIG_KERNEL_START=0x15000000
CONFIG_KERNEL_START=0x20000000
# Vboot
CONFIG_TPM2_MODE=y
......@@ -22,7 +21,7 @@ CONFIG_NV_STORAGE_FLASH=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x6400000
CONFIG_KERNEL_FIT_FDT_ADDR=0x1f800000
# Drivers
CONFIG_DRIVER_BUS_I2C_ROCKCHIP=y
......
......@@ -7,10 +7,9 @@ CONFIG_BOARD="kevin"
CONFIG_BOARD_DIR="gru"
# Image
CONFIG_BASE_ADDRESS=0x18000000
CONFIG_FMAP_OFFSET=0x00300000
CONFIG_BASE_ADDRESS=0x40000000
CONFIG_HEAP_SIZE=0x01000000
CONFIG_KERNEL_START=0x15000000
CONFIG_KERNEL_START=0x20000000
# Vboot
CONFIG_EC_SOFTWARE_SYNC=y
......@@ -21,7 +20,7 @@ CONFIG_NV_STORAGE_FLASH=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x6400000
CONFIG_KERNEL_FIT_FDT_ADDR=0x1f800000
# Drivers
CONFIG_DRIVER_BUS_I2C_ROCKCHIP=y
......
......@@ -3,14 +3,13 @@ CONFIG_ARCH_ARM=y
CONFIG_ARCH_ARM_V8=y
# Board
CONFIG_BOARD="nefario"
CONFIG_BOARD="rainier"
CONFIG_BOARD_DIR="gru"
# Image
CONFIG_BASE_ADDRESS=0x18000000
CONFIG_FMAP_OFFSET=0x00300000
CONFIG_BASE_ADDRESS=0x40000000
CONFIG_HEAP_SIZE=0x01000000
CONFIG_KERNEL_START=0x15000000
CONFIG_KERNEL_START=0x20000000
# Vboot
CONFIG_TPM2_MODE=y
......@@ -18,12 +17,11 @@ CONFIG_EC_SOFTWARE_SYNC=y
CONFIG_VIRTUAL_DEV_SWITCH=y
CONFIG_CROSSYSTEM_FDT=y
#CONFIG_NV_STORAGE_CROS_EC=y
CONFIG_NV_STORAGE_FLASH=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x6400000
CONFIG_KERNEL_FIT_FDT_ADDR=0x1f800000
# Drivers
CONFIG_DRIVER_BUS_I2S_ROCKCHIP=y
......@@ -46,6 +44,6 @@ CONFIG_DRIVER_TPM_SPI=y
CONFIG_DRIVER_VIDEO_EC_PWM_BACKLIGHT=y
CONFIG_DRIVER_VIDEO_RK3399=y
# Board specific
CONFIG_GRU_USB2_BOOT_REQUIRED=y
CONFIG_GRU_SPEAKER_VOLUME=6400
# Rainier is derived from Scarlet, therefore shares many components
# and pinouts.
CONFIG_GRU_SCARLET=y
......@@ -7,10 +7,9 @@ CONFIG_BOARD="scarlet"
CONFIG_BOARD_DIR="gru"
# Image
CONFIG_BASE_ADDRESS=0x18000000
CONFIG_FMAP_OFFSET=0x00300000
CONFIG_BASE_ADDRESS=0x40000000
CONFIG_HEAP_SIZE=0x01000000
CONFIG_KERNEL_START=0x15000000
CONFIG_KERNEL_START=0x20000000
# Vboot
CONFIG_TPM2_MODE=y
......@@ -23,7 +22,7 @@ CONFIG_NV_STORAGE_FLASH=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x6400000
CONFIG_KERNEL_FIT_FDT_ADDR=0x1f800000
# Drivers
CONFIG_DRIVER_BUS_I2S_ROCKCHIP=y
......@@ -48,3 +47,4 @@ CONFIG_DRIVER_VIDEO_RK3399=y
# Board specific
CONFIG_GRU_SCARLET=y
CONFIG_GRU_MIPI_DISPLAY=y
......@@ -12,7 +12,7 @@ CONFIG_ANDROID_DT_FIXUP=y
CONFIG_BASE_ADDRESS=0xd4000000
CONFIG_FMAP_OFFSET=0x00400000
CONFIG_HEAP_SIZE=0x04000000
CONFIG_KERNEL_START=0x85000000
CONFIG_KERNEL_START=0xa0000000
# Vboot
CONFIG_EC_SOFTWARE_SYNC=y
......@@ -22,7 +22,7 @@ CONFIG_NV_STORAGE_FLASH=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x9ff00000
CONFIG_KERNEL_FIT_FDT_ADDR=0x9f800000
# Drivers
CONFIG_DRIVER_BUS_I2C_TEGRA=y
......
......@@ -16,5 +16,6 @@ CONFIG_HEAP_SIZE=0x00800000
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x00ff0000
CONFIG_KERNEL_START=0x01000000
CONFIG_KERNEL_SIZE=0x0E000000
CONFIG_LDSCRIPT_ARCH=y
CONFIG_NV_STORAGE_FLASH=y
......@@ -9,7 +9,7 @@ CONFIG_BOARD_DIR="veyron"
CONFIG_BASE_ADDRESS=0x43000000
CONFIG_FMAP_OFFSET=0x00100000
CONFIG_HEAP_SIZE=0x01000000
CONFIG_KERNEL_START=0x2000000
CONFIG_KERNEL_START=0x02000000
# Vboot
CONFIG_EC_SOFTWARE_SYNC=y
......@@ -23,7 +23,7 @@ CONFIG_NV_STORAGE_CROS_EC=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x6400000
CONFIG_KERNEL_FIT_FDT_ADDR=0x1f800000
# Drivers
CONFIG_DRIVER_GPIO_RK3288=y
......
......@@ -9,7 +9,7 @@ CONFIG_BOARD_DIR="veyron"
CONFIG_BASE_ADDRESS=0x43000000
CONFIG_FMAP_OFFSET=0x00100000
CONFIG_HEAP_SIZE=0x01000000
CONFIG_KERNEL_START=0x2000000
CONFIG_KERNEL_START=0x02000000
# Vboot
CONFIG_EC_SOFTWARE_SYNC=y
......@@ -23,7 +23,7 @@ CONFIG_NV_STORAGE_CROS_EC=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x6400000
CONFIG_KERNEL_FIT_FDT_ADDR=0x1f800000
# Drivers
CONFIG_DRIVER_GPIO_RK3288=y
......
......@@ -8,7 +8,7 @@ CONFIG_BOARD="veyron_mickey"
CONFIG_BASE_ADDRESS=0x43000000
CONFIG_FMAP_OFFSET=0x00180000
CONFIG_HEAP_SIZE=0x01000000
CONFIG_KERNEL_START=0x2000000
CONFIG_KERNEL_START=0x02000000
# Vboot
CONFIG_VIRTUAL_DEV_SWITCH=y
......@@ -21,7 +21,7 @@ CONFIG_NV_STORAGE_FLASH=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x6400000
CONFIG_KERNEL_FIT_FDT_ADDR=0x1f800000
# Drivers
CONFIG_DRIVER_GPIO_RK3288=y
......
......@@ -9,7 +9,7 @@ CONFIG_BOARD_DIR="veyron"
CONFIG_BASE_ADDRESS=0x43000000
CONFIG_FMAP_OFFSET=0x00100000
CONFIG_HEAP_SIZE=0x01000000
CONFIG_KERNEL_START=0x2000000
CONFIG_KERNEL_START=0x02000000
# Vboot
CONFIG_EC_SOFTWARE_SYNC=y
......@@ -23,7 +23,7 @@ CONFIG_NV_STORAGE_CROS_EC=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x6400000
CONFIG_KERNEL_FIT_FDT_ADDR=0x1f800000
# Drivers
CONFIG_DRIVER_GPIO_RK3288=y
......
......@@ -9,7 +9,7 @@ CONFIG_BOARD_DIR="veyron"
CONFIG_BASE_ADDRESS=0x43000000
CONFIG_FMAP_OFFSET=0x00100000
CONFIG_HEAP_SIZE=0x01000000
CONFIG_KERNEL_START=0x2000000
CONFIG_KERNEL_START=0x02000000
# Vboot
CONFIG_EC_SOFTWARE_SYNC=y
......@@ -23,7 +23,7 @@ CONFIG_NV_STORAGE_CROS_EC=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x6400000
CONFIG_KERNEL_FIT_FDT_ADDR=0x1f800000
# Drivers
CONFIG_DRIVER_GPIO_RK3288=y
......
......@@ -8,7 +8,7 @@ CONFIG_BOARD="veyron_rialto"
CONFIG_BASE_ADDRESS=0x23000000
CONFIG_FMAP_OFFSET=0x00100000
CONFIG_HEAP_SIZE=0x01000000
CONFIG_KERNEL_START=0x2000000
CONFIG_KERNEL_START=0x02000000
# Vboot
CONFIG_CUSTOM_MUSIC=y
......@@ -24,7 +24,7 @@ CONFIG_HEADLESS=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x6400000
CONFIG_KERNEL_FIT_FDT_ADDR=0x1f800000
# Drivers
CONFIG_DRIVER_GPIO_RK3288=y
......
......@@ -9,7 +9,7 @@ CONFIG_BOARD_DIR="veyron"
CONFIG_BASE_ADDRESS=0x43000000
CONFIG_FMAP_OFFSET=0x00100000
CONFIG_HEAP_SIZE=0x01000000
CONFIG_KERNEL_START=0x2000000
CONFIG_KERNEL_START=0x02000000
# Vboot
CONFIG_EC_SOFTWARE_SYNC=y
......@@ -23,7 +23,7 @@ CONFIG_NV_STORAGE_CROS_EC=y
# Kernel format
CONFIG_KERNEL_FIT=y
CONFIG_KERNEL_FIT_FDT_ADDR=0x6400000
CONFIG_KERNEL_FIT_FDT_ADDR=0x1f800000
# Drivers
CONFIG_DRIVER_GPIO_RK3288=y
......
......@@ -56,7 +56,14 @@ config KERNEL_FIT_FDT_ADDR
hex "FIT device tree load address."
depends on KERNEL_FIT
help
Where to put the updated device tree when booting a FIT image.
Where to put the updated device tree when booting a FIT image. The
area reserved by this is 8MB.
==== Placement guide (also see kernel/Documentation/<arch>/boot*) ====
arm32: Somewhere between 128MB and 512MB from the start of RAM. Do not
overlap DMA_COHERENT area (from coreboot memlayout)!
arm64: Within the first 512MB of RAM, but as far away from the start
of RAM as possible (i.e. ideally at 504MB).
config ANDROID_DT_FIXUP
bool "Fixup device tree with properties for Android"
......
......@@ -31,21 +31,32 @@ config KERNEL_START
a wrapper around the actual kernel code (e.g. FIT) and may or may not
require further decompression or relocation.
==== Placement guide (also see kernel/Documentation/<arch>/boot*) ====
arm32: Within first 128MB of RAM. Ideally at exactly 32MB. Do not
overlap DMA_COHERENT area (from coreboot memlayout)!
arm64: Anywhere, but leave as much space as possible empty from the
start of RAM (ideally up to 512MB, see KERNEL_FIT_FDT_ADDR help).
x86: Do not change, defaults should work fine.
config KERNEL_SIZE
hex "The size of the region the kernel image is loaded into"
default 0x10000000 if FASTBOOT_MODE
default 0x2000000
default 0x08000000 if ARCH_ARM_V7 # kernel ABI limitation
default 0x20000000
help
The size of the memory region described in KERNEL_START.
The size of the memory region described in KERNEL_START. Note that we
want this to be very generous, to have the option of loading recovery
kernels with large attached initramfs in the future. While the kernel
partition size on the fixed disk is usually much smaller anyway, we
can make the partition on the recovery USB stick as big as we want
later on. Since recovery firmware cannot be updated, this limit needs
to be made sufficiently large in advance.
(NOTE: Pre-2018 devices have significantly smaller limits here.)
config BASE_ADDRESS
hex "The address depthcharge is linked to run at"
default 0x2000000
default 0x30000000
help
The address that the main part of depthcharge runs at. That includes
everything except the code which pivots between the read only and
read/write firmware which is linked to run from the region of memory
the kernel is eventually loaded into.
The address that the the depthcharge code and data is linked to.
config HEAP_SIZE
hex "The size of the heap in bytes"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment