summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-08-24 20:24:21 -0400
committerTom Rini <trini@konsulko.com>2020-08-25 08:12:05 -0400
commit8ee3a24fdc237c76cead618a173740594287dd96 (patch)
treea19a58ee49166c02dce5bdb35262bb48c2078e8c /include
parent3c0cec035e5b06b638fb52ccd7383bbd5bcede35 (diff)
parent3337b291442e31b1db0ff5975f74fec7d9741794 (diff)
Merge branch '2020-08-24-misc-improvements'
- Squashfs compression support - Coverity fixes - XEN guest updates - Finish previous MediaTek updates - Arm Total Compute platform support
Diffstat (limited to 'include')
-rw-r--r--include/avb_verify.h4
-rw-r--r--include/configs/total_compute.h89
-rw-r--r--include/configs/xenguest_arm64.h7
-rw-r--r--include/xen/gnttab.h3
4 files changed, 92 insertions, 11 deletions
diff --git a/include/avb_verify.h b/include/avb_verify.h
index a8d7090f79..1e787ba666 100644
--- a/include/avb_verify.h
+++ b/include/avb_verify.h
@@ -72,12 +72,12 @@ static inline uint64_t calc_offset(struct mmc_part *part, int64_t offset)
static inline size_t get_sector_buf_size(void)
{
- return (size_t)CONFIG_FASTBOOT_BUF_SIZE;
+ return (size_t)CONFIG_AVB_BUF_SIZE;
}
static inline void *get_sector_buf(void)
{
- return map_sysmem(CONFIG_FASTBOOT_BUF_ADDR, CONFIG_FASTBOOT_BUF_SIZE);
+ return map_sysmem(CONFIG_AVB_BUF_ADDR, CONFIG_AVB_BUF_SIZE);
}
static inline bool is_buf_unaligned(void *buffer)
diff --git a/include/configs/total_compute.h b/include/configs/total_compute.h
new file mode 100644
index 0000000000..cc93f1930a
--- /dev/null
+++ b/include/configs/total_compute.h
@@ -0,0 +1,89 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration for Total Compute platform. Parts were derived from other ARM
+ * configurations.
+ * (C) Copyright 2020 Arm Limited
+ * Usama Arif <usama.arif@arm.com>
+ */
+
+#ifndef __TOTAL_COMPUTE_H
+#define __TOTAL_COMPUTE_H
+
+#define CONFIG_REMAKE_ELF
+
+/* Link Definitions */
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
+
+#define CONFIG_SYS_BOOTM_LEN (64 << 20)
+
+#define UART0_BASE 0x7ff80000
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (8 << 20))
+
+/* PL011 Serial Configuration */
+#define CONFIG_PL011_CLOCK 7372800
+
+/* Miscellaneous configurable options */
+#define CONFIG_SYS_LOAD_ADDR 0x90000000
+
+/* Physical Memory Map */
+#define PHYS_SDRAM_1 0x80000000
+/* Top 48MB reserved for secure world use */
+#define DRAM_SEC_SIZE 0x03000000
+#define PHYS_SDRAM_1_SIZE 0x80000000 - DRAM_SEC_SIZE
+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
+
+#define CONFIG_ARM_PL180_MMCI_BASE 0x001c050000
+#define CONFIG_SYS_MMC_MAX_BLK_COUNT 127
+#define CONFIG_ARM_PL180_MMCI_CLOCK_FREQ 12000000
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "bootm_size=0x20000000\0" \
+ "load_addr=0xa0000000\0" \
+ "kernel_addr_r=0x80080000\0" \
+ "initrd_addr_r=0x88000000\0" \
+ "fdt_addr_r=0x83000000\0"
+/*
+ * If vbmeta partition is present, boot Android with verification using AVB.
+ * Else if system partition is present (no vbmeta partition), boot Android
+ * without verification (for development purposes).
+ * Else boot FIT image.
+ */
+#define CONFIG_BOOTCOMMAND \
+ "if part number mmc 0 vbmeta is_avb; then" \
+ " echo MMC with vbmeta partition detected.;" \
+ " echo starting Android Verified boot.;" \
+ " avb init 0; " \
+ " if avb verify; then " \
+ " set bootargs $bootargs $avb_bootargs; " \
+ " part start mmc 0 boot boot_start; " \
+ " part size mmc 0 boot boot_size; " \
+ " mmc read ${load_addr} ${boot_start} ${boot_size}; " \
+ " bootm ${load_addr} ${load_addr} ${fdt_addr_r}; " \
+ " else; " \
+ " echo AVB verification failed.; " \
+ " exit; " \
+ " fi; " \
+ "elif part number mmc 0 system is_non_avb_android; then " \
+ " booti ${kernel_addr_r} ${initrd_addr_r} ${fdt_addr_r};" \
+ "else;" \
+ " echo Booting FIT image.;" \
+ " bootm ${load_addr} ${load_addr} ${fdt_addr_r}; " \
+ "fi;"
+
+/* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
+#define CONFIG_SYS_MAXARGS 64 /* max command args */
+
+#define CONFIG_SYS_FLASH_BASE 0x0C000000
+/* 256 x 256KiB sectors */
+#define CONFIG_SYS_MAX_FLASH_SECT 256
+
+#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_32BIT
+#define CONFIG_SYS_MAX_FLASH_BANKS 1
+
+#define CONFIG_SYS_FLASH_EMPTY_INFO /* flinfo indicates empty blocks */
+#define FLASH_MAX_SECTOR_SIZE 0x00040000
+
+#endif /* __TOTAL_COMPUTE_H */
diff --git a/include/configs/xenguest_arm64.h b/include/configs/xenguest_arm64.h
index db3059a82c..c44381e966 100644
--- a/include/configs/xenguest_arm64.h
+++ b/include/configs/xenguest_arm64.h
@@ -9,8 +9,6 @@
#include <linux/types.h>
#endif
-#define CONFIG_BOARD_EARLY_INIT_F
-
#define CONFIG_EXTRA_ENV_SETTINGS
#undef CONFIG_NR_DRAM_BANKS
@@ -38,11 +36,6 @@
#define CONFIG_OF_SYSTEM_SETUP
-#define CONFIG_CMDLINE_TAG 1
-#define CONFIG_INITRD_TAG 1
-
-#define CONFIG_CMD_RUN
-
#undef CONFIG_EXTRA_ENV_SETTINGS
#define CONFIG_EXTRA_ENV_SETTINGS \
"loadimage=ext4load pvblock 0 0x90000000 /boot/Image;\0" \
diff --git a/include/xen/gnttab.h b/include/xen/gnttab.h
index db1d5361fe..db615004aa 100644
--- a/include/xen/gnttab.h
+++ b/include/xen/gnttab.h
@@ -1,5 +1,4 @@
-/*
- * SPDX-License-Identifier: GPL-2.0
+/* SPDX-License-Identifier: GPL-2.0
*
* (C) 2006, Steven Smith <sos22@cam.ac.uk>
* (C) 2006, Grzegorz Milos <gm281@cam.ac.uk>