summaryrefslogtreecommitdiff
path: root/payloads/libpayload/arch
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2013-08-09 04:27:35 -0700
committerIsaac Christensen <isaac.christensen@se-eng.com>2014-08-05 18:44:08 +0200
commit1ee2c6dbdfe7e35ab5e25a6136eab824ed2fec8f (patch)
treefabae429ff872caed315281a0c243fa0bd753565 /payloads/libpayload/arch
parentb77431336e44ba9721f18220e2a7dedafe250528 (diff)
libpayload: Change CONFIG_* to CONFIG_LP_* in the kconfig.
When libpayload header files are included in the payload itself, it's possible that the payloads config settings will conflict with the ones in libpayload. It's also possible for the libpayload config settings to conflict with the payloads. To avoid that, the libpayload config settings have _LP_ (for libpayload) added to them. The symbols themselves as defined in the Config.in files are still the same, but the prefix added to them is now CONFIG_LP_ instead of just CONFIG_. Change-Id: Ib8a46d202e7880afdeac7924d69a949bfbcc5f97 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: https://gerrit.chromium.org/gerrit/65303 Reviewed-by: Stefan Reinauer <reinauer@google.com> Tested-by: Gabe Black <gabeblack@chromium.org> Commit-Queue: Gabe Black <gabeblack@chromium.org> (cherry picked from commit 23e866da20862cace0ed2a67d6fb74056bc9ea9a) Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/6427 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'payloads/libpayload/arch')
-rw-r--r--payloads/libpayload/arch/armv7/Makefile.inc2
-rw-r--r--payloads/libpayload/arch/armv7/coreboot.c19
-rw-r--r--payloads/libpayload/arch/armv7/main.c2
-rw-r--r--payloads/libpayload/arch/x86/Makefile.inc4
-rw-r--r--payloads/libpayload/arch/x86/coreboot.c14
-rw-r--r--payloads/libpayload/arch/x86/main.c2
-rw-r--r--payloads/libpayload/arch/x86/multiboot.c4
-rw-r--r--payloads/libpayload/arch/x86/rom_media.c10
-rw-r--r--payloads/libpayload/arch/x86/sysinfo.c6
9 files changed, 32 insertions, 31 deletions
diff --git a/payloads/libpayload/arch/armv7/Makefile.inc b/payloads/libpayload/arch/armv7/Makefile.inc
index a27fdd4b0a..cd909bb5a6 100644
--- a/payloads/libpayload/arch/armv7/Makefile.inc
+++ b/payloads/libpayload/arch/armv7/Makefile.inc
@@ -36,4 +36,4 @@ libc-y += virtual.c
libc-y += memcpy.S memset.S
libc-y += exception_asm.S exception.c
libc-y += cache.c
-libcbfs-$(CONFIG_CBFS) += dummy_media.c
+libcbfs-$(CONFIG_LP_CBFS) += dummy_media.c
diff --git a/payloads/libpayload/arch/armv7/coreboot.c b/payloads/libpayload/arch/armv7/coreboot.c
index bc9b47e8ae..076010d64d 100644
--- a/payloads/libpayload/arch/armv7/coreboot.c
+++ b/payloads/libpayload/arch/armv7/coreboot.c
@@ -56,7 +56,7 @@ static void cb_parse_memory(void *ptr, struct sysinfo_t *info)
for (i = 0; i < count; i++) {
struct cb_memory_range *range = MEM_RANGE_PTR(mem, i);
-#ifdef CONFIG_MEMMAP_RAM_ONLY
+#ifdef CONFIG_LP_MEMMAP_RAM_ONLY
if (range->type != CB_MEM_RAM)
continue;
#endif
@@ -78,7 +78,7 @@ static void cb_parse_serial(void *ptr, struct sysinfo_t *info)
info->serial = ((struct cb_serial *)ptr);
}
-#ifdef CONFIG_CHROMEOS
+#ifdef CONFIG_LP_CHROMEOS
static void cb_parse_vbnv(unsigned char *ptr, struct sysinfo_t *info)
{
struct cb_vbnv *vbnv = (struct cb_vbnv *)ptr;
@@ -126,7 +126,7 @@ static void cb_parse_mrc_cache(unsigned char *ptr, struct sysinfo_t *info)
info->mrc_cache = phys_to_virt(cbmem->cbmem_tab);
}
-#ifdef CONFIG_NVRAM
+#ifdef CONFIG_LP_NVRAM
static void cb_parse_optiontable(void *ptr, struct sysinfo_t *info)
{
/* ptr points to a coreboot table entry and is already virtual */
@@ -142,7 +142,7 @@ static void cb_parse_checksum(void *ptr, struct sysinfo_t *info)
}
#endif
-#ifdef CONFIG_COREBOOT_VIDEO_CONSOLE
+#ifdef CONFIG_LP_COREBOOT_VIDEO_CONSOLE
static void cb_parse_framebuffer(void *ptr, struct sysinfo_t *info)
{
/* ptr points to a coreboot table entry and is already virtual */
@@ -233,7 +233,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_ASSEMBLER:
cb_parse_string(ptr, &info->assembler);
break;
-#ifdef CONFIG_NVRAM
+#ifdef CONFIG_LP_NVRAM
case CB_TAG_CMOS_OPTION_TABLE:
cb_parse_optiontable(ptr, info);
break;
@@ -241,7 +241,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
cb_parse_checksum(ptr, info);
break;
#endif
-#ifdef CONFIG_COREBOOT_VIDEO_CONSOLE
+#ifdef CONFIG_LP_COREBOOT_VIDEO_CONSOLE
// FIXME we should warn on serial if coreboot set up a
// framebuffer buf the payload does not know about it.
case CB_TAG_FRAMEBUFFER:
@@ -251,7 +251,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_MAINBOARD:
info->mainboard = (struct cb_mainboard *)ptr;
break;
-#ifdef CONFIG_CHROMEOS
+#ifdef CONFIG_LP_CHROMEOS
case CB_TAG_GPIO:
cb_parse_gpios(ptr, info);
break;
@@ -284,8 +284,9 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
int get_coreboot_info(struct sysinfo_t *info)
{
- int ret = cb_parse_header(phys_to_virt(CONFIG_COREBOOT_INFO_RANGE_BASE),
- CONFIG_COREBOOT_INFO_RANGE_SIZE, info);
+ int ret = cb_parse_header(
+ phys_to_virt(CONFIG_LP_COREBOOT_INFO_RANGE_BASE),
+ CONFIG_LP_COREBOOT_INFO_RANGE_SIZE, info);
return (ret == 1) ? 0 : -1;
}
diff --git a/payloads/libpayload/arch/armv7/main.c b/payloads/libpayload/arch/armv7/main.c
index 93cfce5c63..4e7c05dfe1 100644
--- a/payloads/libpayload/arch/armv7/main.c
+++ b/payloads/libpayload/arch/armv7/main.c
@@ -48,7 +48,7 @@ void start_main(void)
lib_get_sysinfo();
/* Optionally set up the consoles. */
-#ifndef CONFIG_SKIP_CONSOLE_INIT
+#ifndef CONFIG_LP_SKIP_CONSOLE_INIT
console_init();
#endif
diff --git a/payloads/libpayload/arch/x86/Makefile.inc b/payloads/libpayload/arch/x86/Makefile.inc
index 0977eb1638..8efbc12831 100644
--- a/payloads/libpayload/arch/x86/Makefile.inc
+++ b/payloads/libpayload/arch/x86/Makefile.inc
@@ -33,7 +33,7 @@ libc-y += timer.c coreboot.c util.S
libc-y += exec.S virtual.c
libc-y += string.c
-libcbfs-$(CONFIG_CBFS) += rom_media.c
+libcbfs-$(CONFIG_LP_CBFS) += rom_media.c
# Multiboot support is configurable
-libc-$(CONFIG_MULTIBOOT) += multiboot.c
+libc-$(CONFIG_LP_MULTIBOOT) += multiboot.c
diff --git a/payloads/libpayload/arch/x86/coreboot.c b/payloads/libpayload/arch/x86/coreboot.c
index 43aa97069c..05ab336940 100644
--- a/payloads/libpayload/arch/x86/coreboot.c
+++ b/payloads/libpayload/arch/x86/coreboot.c
@@ -57,7 +57,7 @@ static void cb_parse_memory(void *ptr, struct sysinfo_t *info)
for (i = 0; i < count; i++) {
struct cb_memory_range *range = MEM_RANGE_PTR(mem, i);
-#ifdef CONFIG_MEMMAP_RAM_ONLY
+#ifdef CONFIG_LP_MEMMAP_RAM_ONLY
if (range->type != CB_MEM_RAM)
continue;
#endif
@@ -79,7 +79,7 @@ static void cb_parse_serial(void *ptr, struct sysinfo_t *info)
info->serial = ((struct cb_serial *)ptr);
}
-#ifdef CONFIG_CHROMEOS
+#ifdef CONFIG_LP_CHROMEOS
static void cb_parse_vboot_handoff(unsigned char *ptr, struct sysinfo_t *info)
{
struct cb_vboot_handoff *vbho = (struct cb_vboot_handoff *)ptr;
@@ -141,7 +141,7 @@ static void cb_parse_acpi_gnvs(unsigned char *ptr, struct sysinfo_t *info)
info->acpi_gnvs = phys_to_virt(cbmem->cbmem_tab);
}
-#ifdef CONFIG_NVRAM
+#ifdef CONFIG_LP_NVRAM
static void cb_parse_optiontable(void *ptr, struct sysinfo_t *info)
{
/* ptr points to a coreboot table entry and is already virtual */
@@ -157,7 +157,7 @@ static void cb_parse_checksum(void *ptr, struct sysinfo_t *info)
}
#endif
-#ifdef CONFIG_COREBOOT_VIDEO_CONSOLE
+#ifdef CONFIG_LP_COREBOOT_VIDEO_CONSOLE
static void cb_parse_framebuffer(void *ptr, struct sysinfo_t *info)
{
/* ptr points to a coreboot table entry and is already virtual */
@@ -254,7 +254,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
case CB_TAG_ASSEMBLER:
cb_parse_string(ptr, &info->assembler);
break;
-#ifdef CONFIG_NVRAM
+#ifdef CONFIG_LP_NVRAM
case CB_TAG_CMOS_OPTION_TABLE:
cb_parse_optiontable(ptr, info);
break;
@@ -262,7 +262,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
cb_parse_checksum(ptr, info);
break;
#endif
-#ifdef CONFIG_COREBOOT_VIDEO_CONSOLE
+#ifdef CONFIG_LP_COREBOOT_VIDEO_CONSOLE
// FIXME we should warn on serial if coreboot set up a
// framebuffer buf the payload does not know about it.
case CB_TAG_FRAMEBUFFER:
@@ -271,7 +271,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
#endif
case CB_TAG_MAINBOARD:
info->mainboard = (struct cb_mainboard *)ptr;
-#ifdef CONFIG_CHROMEOS
+#ifdef CONFIG_LP_CHROMEOS
case CB_TAG_GPIO:
cb_parse_gpios(ptr, info);
break;
diff --git a/payloads/libpayload/arch/x86/main.c b/payloads/libpayload/arch/x86/main.c
index 1bac7a8aaa..c788f0f670 100644
--- a/payloads/libpayload/arch/x86/main.c
+++ b/payloads/libpayload/arch/x86/main.c
@@ -50,7 +50,7 @@ void start_main(void)
lib_get_sysinfo();
/* Optionally set up the consoles. */
-#ifndef CONFIG_SKIP_CONSOLE_INIT
+#ifndef CONFIG_LP_SKIP_CONSOLE_INIT
console_init();
#endif
diff --git a/payloads/libpayload/arch/x86/multiboot.c b/payloads/libpayload/arch/x86/multiboot.c
index fa0c576dc9..c2c360732f 100644
--- a/payloads/libpayload/arch/x86/multiboot.c
+++ b/payloads/libpayload/arch/x86/multiboot.c
@@ -45,7 +45,7 @@ static void mb_parse_mmap(struct multiboot_header *table,
while(ptr < (start + table->mmap_length)) {
struct multiboot_mmap *mmap = (struct multiboot_mmap *) ptr;
-#ifdef CONFIG_MEMMAP_RAM_ONLY
+#ifdef CONFIG_LP_MEMMAP_RAM_ONLY
/* 1 == normal RAM. Ignore everything else for now */
if (mmap->type == 1) {
@@ -56,7 +56,7 @@ static void mb_parse_mmap(struct multiboot_header *table,
if (++info->n_memranges == SYSINFO_MAX_MEM_RANGES)
return;
-#ifdef CONFIG_MEMMAP_RAM_ONLY
+#ifdef CONFIG_LP_MEMMAP_RAM_ONLY
}
#endif
diff --git a/payloads/libpayload/arch/x86/rom_media.c b/payloads/libpayload/arch/x86/rom_media.c
index e338d1ca1b..5b8cbade1f 100644
--- a/payloads/libpayload/arch/x86/rom_media.c
+++ b/payloads/libpayload/arch/x86/rom_media.c
@@ -83,19 +83,19 @@ int init_x86rom_cbfs_media(struct cbfs_media *media) {
struct cbfs_header *header = (struct cbfs_header*)
*(uint32_t*)(0xfffffffc);
if (CBFS_HEADER_MAGIC != ntohl(header->magic)) {
-#if defined(CONFIG_ROM_SIZE)
+#if defined(CONFIG_LP_ROM_SIZE)
printk(BIOS_ERR, "Invalid CBFS master header at %p\n", header);
- media->context = (void*)CONFIG_ROM_SIZE;
+ media->context = (void*)CONFIG_LP_ROM_SIZE;
#else
return -1;
#endif
} else {
uint32_t romsize = ntohl(header->romsize);
media->context = (void*)romsize;
-#if defined(CONFIG_ROM_SIZE)
- if (CONFIG_ROM_SIZE != romsize)
+#if defined(CONFIG_LP_ROM_SIZE)
+ if (CONFIG_LP_ROM_SIZE != romsize)
printk(BIOS_INFO, "Warning: rom size unmatch (%d/%d)\n",
- CONFIG_ROM_SIZE, romsize);
+ CONFIG_LP_ROM_SIZE, romsize);
#endif
}
media->open = x86_rom_open;
diff --git a/payloads/libpayload/arch/x86/sysinfo.c b/payloads/libpayload/arch/x86/sysinfo.c
index 6c1ef3fc1c..8e8b1c8d0a 100644
--- a/payloads/libpayload/arch/x86/sysinfo.c
+++ b/payloads/libpayload/arch/x86/sysinfo.c
@@ -38,8 +38,8 @@
*/
struct sysinfo_t lib_sysinfo = {
.cpu_khz = 200,
-#ifdef CONFIG_SERIAL_CONSOLE
- .ser_ioport = CONFIG_SERIAL_IOBASE,
+#ifdef CONFIG_LP_SERIAL_CONSOLE
+ .ser_ioport = CONFIG_LP_SERIAL_IOBASE,
#else
.ser_ioport = 0x3f8,
#endif
@@ -52,7 +52,7 @@ int lib_get_sysinfo(void)
/* Get the CPU speed (for delays). */
lib_sysinfo.cpu_khz = get_cpu_speed();
-#ifdef CONFIG_MULTIBOOT
+#ifdef CONFIG_LP_MULTIBOOT
/* Get the information from the multiboot tables,
* if they exist */
get_multiboot_info(&lib_sysinfo);