the following patch was just integrated into master:
commit 08f2ab6aac9d4e5d0f992d25b9bc8d77620f03d9
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Fri Mar 27 14:03:22 2015 +0100
build system: rename mips/bootblock.inc to mips/bootblock.S
This is inspired by the commit listed below, but rewritten to match
upstream, and split in smaller pieces to keep intent clear.
Change-Id: I192fa50989b586fd8e967d4c22db56ac9de7a30e
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b
Based-On-Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170
Reviewed-on: http://review.coreboot.org/9108
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)google.com>
See http://review.coreboot.org/9108 for details.
-gerrit
Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9160
-gerrit
commit 72fbb452b2d2ae071d4f1163d4ce5dabd4ebbc1e
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Sun Mar 29 22:16:55 2015 -0500
x86: fix SMM programs linked with gc-sections
Commit f69a99db (coreboot: x86: enable gc-sections) added
gc-sections to the linker command line. The SMM-specific
linker scripts were not interrogated to see if all the
sections were being included properly. .data, .bss, and .sbss
did not have the proper globs set to put the SMM programs in
the expected order.
Lastly, explicitly set the ENTRY for the SMM programs.
Change-Id: Ibb579d18d4819af666d6ec7dfc30776e8c404b71
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/cpu/x86/smm/smm.ld | 4 ++++
src/cpu/x86/smm/smm_tseg.ld | 4 ++++
src/cpu/x86/smm/smmhandler.S | 1 +
src/cpu/x86/smm/smmhandler_tseg.S | 1 +
4 files changed, 10 insertions(+)
diff --git a/src/cpu/x86/smm/smm.ld b/src/cpu/x86/smm/smm.ld
index 5d316a8..c198161 100644
--- a/src/cpu/x86/smm/smm.ld
+++ b/src/cpu/x86/smm/smm.ld
@@ -1,6 +1,7 @@
/* Maximum number of CPUs/cores */
CPUS = 4;
+ENTRY(smm_handler_start);
SECTIONS
{
@@ -25,11 +26,14 @@ SECTIONS
/* C read-write data of the SMM handler */
. = ALIGN(4);
*(.data)
+ *(.data.*)
/* C uninitialized data of the SMM handler */
. = ALIGN(4);
*(.bss)
+ *(.bss.*)
*(.sbss)
+ *(.sbss.*)
/* What is this? */
*(COMMON)
diff --git a/src/cpu/x86/smm/smm_tseg.ld b/src/cpu/x86/smm/smm_tseg.ld
index 99f2aa0..b57461c 100644
--- a/src/cpu/x86/smm/smm_tseg.ld
+++ b/src/cpu/x86/smm/smm_tseg.ld
@@ -1,5 +1,6 @@
/* Maximum number of CPUs/cores */
CPUS = 16;
+ENTRY(smm_handler_start);
SECTIONS
{
@@ -52,11 +53,14 @@ SECTIONS
/* C read-write data of the SMM handler */
. = ALIGN(4);
*(.data)
+ *(.data.*)
/* C uninitialized data of the SMM handler */
. = ALIGN(4);
*(.bss)
+ *(.bss.*)
*(.sbss)
+ *(.sbss.*)
*(COMMON)
. = ALIGN(4);
diff --git a/src/cpu/x86/smm/smmhandler.S b/src/cpu/x86/smm/smmhandler.S
index 5d3aae3..611c0f3 100644
--- a/src/cpu/x86/smm/smmhandler.S
+++ b/src/cpu/x86/smm/smmhandler.S
@@ -75,6 +75,7 @@
*
* All the bad magic is not all that bad after all.
*/
+.global smm_handler_start
smm_handler_start:
movw $(smm_gdtptr16 - smm_handler_start + SMM_HANDLER_OFFSET), %bx
data32 lgdt %cs:(%bx)
diff --git a/src/cpu/x86/smm/smmhandler_tseg.S b/src/cpu/x86/smm/smmhandler_tseg.S
index c9d78b9..ee8bd26 100644
--- a/src/cpu/x86/smm/smmhandler_tseg.S
+++ b/src/cpu/x86/smm/smmhandler_tseg.S
@@ -91,6 +91,7 @@
*
* All the bad magic is not all that bad after all.
*/
+.global smm_handler_start
smm_handler_start:
movl $(TSEG_BAR), %eax /* Get TSEG base from PCIE */
addr32 movl (%eax), %edx /* Save TSEG_BAR in %edx */
Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9160
-gerrit
commit 19a1b51a2fd5e1cceb0a76b502641eacd5a9dbd9
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Sun Mar 29 22:16:55 2015 -0500
x86: fix SMM programs linked with gc-sections
Commit f69a99db (coreboot: x86: enable gc-sections) added
gc-sections to the linker command line. The SMM-specific
linker scripts were not interrogated to see if all the
sections were being included properly. .data, .bss, and .sbss
were did not have the proper globs set to put the SMM
programs in the expected order.
Lastly, explicitly set the ENTRY for the SMM programs.
Change-Id: Ibb579d18d4819af666d6ec7dfc30776e8c404b71
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/cpu/x86/smm/smm.ld | 4 ++++
src/cpu/x86/smm/smm_tseg.ld | 4 ++++
src/cpu/x86/smm/smmhandler.S | 1 +
src/cpu/x86/smm/smmhandler_tseg.S | 1 +
4 files changed, 10 insertions(+)
diff --git a/src/cpu/x86/smm/smm.ld b/src/cpu/x86/smm/smm.ld
index 5d316a8..c198161 100644
--- a/src/cpu/x86/smm/smm.ld
+++ b/src/cpu/x86/smm/smm.ld
@@ -1,6 +1,7 @@
/* Maximum number of CPUs/cores */
CPUS = 4;
+ENTRY(smm_handler_start);
SECTIONS
{
@@ -25,11 +26,14 @@ SECTIONS
/* C read-write data of the SMM handler */
. = ALIGN(4);
*(.data)
+ *(.data.*)
/* C uninitialized data of the SMM handler */
. = ALIGN(4);
*(.bss)
+ *(.bss.*)
*(.sbss)
+ *(.sbss.*)
/* What is this? */
*(COMMON)
diff --git a/src/cpu/x86/smm/smm_tseg.ld b/src/cpu/x86/smm/smm_tseg.ld
index 99f2aa0..b57461c 100644
--- a/src/cpu/x86/smm/smm_tseg.ld
+++ b/src/cpu/x86/smm/smm_tseg.ld
@@ -1,5 +1,6 @@
/* Maximum number of CPUs/cores */
CPUS = 16;
+ENTRY(smm_handler_start);
SECTIONS
{
@@ -52,11 +53,14 @@ SECTIONS
/* C read-write data of the SMM handler */
. = ALIGN(4);
*(.data)
+ *(.data.*)
/* C uninitialized data of the SMM handler */
. = ALIGN(4);
*(.bss)
+ *(.bss.*)
*(.sbss)
+ *(.sbss.*)
*(COMMON)
. = ALIGN(4);
diff --git a/src/cpu/x86/smm/smmhandler.S b/src/cpu/x86/smm/smmhandler.S
index 5d3aae3..611c0f3 100644
--- a/src/cpu/x86/smm/smmhandler.S
+++ b/src/cpu/x86/smm/smmhandler.S
@@ -75,6 +75,7 @@
*
* All the bad magic is not all that bad after all.
*/
+.global smm_handler_start
smm_handler_start:
movw $(smm_gdtptr16 - smm_handler_start + SMM_HANDLER_OFFSET), %bx
data32 lgdt %cs:(%bx)
diff --git a/src/cpu/x86/smm/smmhandler_tseg.S b/src/cpu/x86/smm/smmhandler_tseg.S
index c9d78b9..ee8bd26 100644
--- a/src/cpu/x86/smm/smmhandler_tseg.S
+++ b/src/cpu/x86/smm/smmhandler_tseg.S
@@ -91,6 +91,7 @@
*
* All the bad magic is not all that bad after all.
*/
+.global smm_handler_start
smm_handler_start:
movl $(TSEG_BAR), %eax /* Get TSEG base from PCIE */
addr32 movl (%eax), %edx /* Save TSEG_BAR in %edx */
Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9160
-gerrit
commit e105eb1d04dfed049c4183b840ec57ccd5c90b7c
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Sun Mar 29 22:16:55 2015 -0500
x86: fix SMM programs linked with gc-sections
Commit f69a99db (coreboot: x86: enable gc-sections) added
gc-sections to the linker command line. The SMM-specific
linker scripts were not interrogated to see if all the
sections were being included properly. .data, .bss, and .sbss
were did not have the proper globs set to put the SMM
programs in the expected order.
Lastly, explicitly set the ENTRY for the SMM programs.
Change-Id: Ibb579d18d4819af666d6ec7dfc30776e8c404b71
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/cpu/x86/smm/smm.ld | 1 +
src/cpu/x86/smm/smm_tseg.ld | 6 ++++--
src/cpu/x86/smm/smmhandler.S | 1 +
src/cpu/x86/smm/smmhandler_tseg.S | 1 +
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/cpu/x86/smm/smm.ld b/src/cpu/x86/smm/smm.ld
index 5d316a8..6cbde09 100644
--- a/src/cpu/x86/smm/smm.ld
+++ b/src/cpu/x86/smm/smm.ld
@@ -1,6 +1,7 @@
/* Maximum number of CPUs/cores */
CPUS = 4;
+ENTRY(smm_handler_start);
SECTIONS
{
diff --git a/src/cpu/x86/smm/smm_tseg.ld b/src/cpu/x86/smm/smm_tseg.ld
index 99f2aa0..e8f067d 100644
--- a/src/cpu/x86/smm/smm_tseg.ld
+++ b/src/cpu/x86/smm/smm_tseg.ld
@@ -1,5 +1,6 @@
/* Maximum number of CPUs/cores */
CPUS = 16;
+ENTRY(smm_handler_start);
SECTIONS
{
@@ -52,11 +53,12 @@ SECTIONS
/* C read-write data of the SMM handler */
. = ALIGN(4);
*(.data)
+ *(.data.*)
/* C uninitialized data of the SMM handler */
. = ALIGN(4);
- *(.bss)
- *(.sbss)
+ *(.bss.*)
+ *(.sbss.*)
*(COMMON)
. = ALIGN(4);
diff --git a/src/cpu/x86/smm/smmhandler.S b/src/cpu/x86/smm/smmhandler.S
index 5d3aae3..611c0f3 100644
--- a/src/cpu/x86/smm/smmhandler.S
+++ b/src/cpu/x86/smm/smmhandler.S
@@ -75,6 +75,7 @@
*
* All the bad magic is not all that bad after all.
*/
+.global smm_handler_start
smm_handler_start:
movw $(smm_gdtptr16 - smm_handler_start + SMM_HANDLER_OFFSET), %bx
data32 lgdt %cs:(%bx)
diff --git a/src/cpu/x86/smm/smmhandler_tseg.S b/src/cpu/x86/smm/smmhandler_tseg.S
index c9d78b9..ee8bd26 100644
--- a/src/cpu/x86/smm/smmhandler_tseg.S
+++ b/src/cpu/x86/smm/smmhandler_tseg.S
@@ -91,6 +91,7 @@
*
* All the bad magic is not all that bad after all.
*/
+.global smm_handler_start
smm_handler_start:
movl $(TSEG_BAR), %eax /* Get TSEG base from PCIE */
addr32 movl (%eax), %edx /* Save TSEG_BAR in %edx */
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9164
-gerrit
commit 18cdea24fa9c4a529aaa016035319792b830c8b3
Author: Patrick Georgi <pgeorgi(a)google.com>
Date: Mon Mar 30 13:29:45 2015 +0200
emulation/imgvp-pistachio: Drop board
This doesn't even compile in downstream.
Change-Id: Ic7b3736db86e8de155e0f37afa970ce5095396fa
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
---
src/mainboard/emulation/Kconfig | 4 --
src/mainboard/emulation/imgvp-pistachio/Kconfig | 53 ----------------------
.../emulation/imgvp-pistachio/Makefile.inc | 22 ---------
.../emulation/imgvp-pistachio/bootblock.c | 24 ----------
.../emulation/imgvp-pistachio/devicetree.cb | 26 -----------
.../emulation/imgvp-pistachio/mainboard.c | 33 --------------
src/mainboard/emulation/imgvp-pistachio/romstage.c | 29 ------------
7 files changed, 191 deletions(-)
diff --git a/src/mainboard/emulation/Kconfig b/src/mainboard/emulation/Kconfig
index d2706fa..e48c242 100644
--- a/src/mainboard/emulation/Kconfig
+++ b/src/mainboard/emulation/Kconfig
@@ -14,9 +14,6 @@ config BOARD_EMULATION_QEMU_ARMV7
config BOARD_EMULATION_QEMU_UCB_RISCV
bool "QEMU ucb riscv"
-config BOARD_EMULATION_IMGVP_PISTACHIO
- bool "ImgTec Pistachio Virtual Platform"
-
endchoice
config BOARD_EMULATION_QEMU_X86
@@ -28,7 +25,6 @@ source "src/mainboard/emulation/qemu-i440fx/Kconfig"
source "src/mainboard/emulation/qemu-q35/Kconfig"
source "src/mainboard/emulation/qemu-armv7/Kconfig"
source "src/mainboard/emulation/qemu-riscv/Kconfig"
-source "src/mainboard/emulation/imgvp-pistachio/Kconfig"
config MAINBOARD_VENDOR
string
diff --git a/src/mainboard/emulation/imgvp-pistachio/Kconfig b/src/mainboard/emulation/imgvp-pistachio/Kconfig
deleted file mode 100644
index 068528e..0000000
--- a/src/mainboard/emulation/imgvp-pistachio/Kconfig
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# This file is part of the coreboot project.
-#
-# Copyright (C) 2014 Imagination Technologies
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; version 2 of
-# the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-#
-
-if BOARD_EMULATION_IMGVP_PISTACHIO
-
-config BOARD_SPECIFIC_OPTIONS
- def_bool y
- select BOOTBLOCK_CONSOLE
- select CPU_IMGTEC_PISTACHIO
-
-config MAINBOARD_DIR
- string
- default emulation/imgvp-pistachio
-
-config MAINBOARD_PART_NUMBER
- string
- default "ImgTec Pistachio Virtual Platform"
-
-config BOOTBLOCK_MAINBOARD_INIT
- string
- default "mainboard/emulation/imgvp-pistachio/bootblock.c"
-
-config SYS_SDRAM_BASE
- hex "SDRAM base address"
- default 0x80000000
-
-config DRAM_SIZE_MB
- int
- default 256
-
-config HEAP_SIZE
- hex
- default 0x08000000
-
-endif
diff --git a/src/mainboard/emulation/imgvp-pistachio/Makefile.inc b/src/mainboard/emulation/imgvp-pistachio/Makefile.inc
deleted file mode 100644
index 8be1b22..0000000
--- a/src/mainboard/emulation/imgvp-pistachio/Makefile.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# This file is part of the coreboot project.
-#
-# Copyright 2014 Imagination Technologies Ltd.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; version 2 of
-# the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-#
-
-romstage-y += romstage.c
diff --git a/src/mainboard/emulation/imgvp-pistachio/bootblock.c b/src/mainboard/emulation/imgvp-pistachio/bootblock.c
deleted file mode 100644
index 1784a02..0000000
--- a/src/mainboard/emulation/imgvp-pistachio/bootblock.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2014 Imagination Technologies
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; version 2 of
- * the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-void bootblock_mainboard_init(void)
-{
-}
diff --git a/src/mainboard/emulation/imgvp-pistachio/devicetree.cb b/src/mainboard/emulation/imgvp-pistachio/devicetree.cb
deleted file mode 100644
index a328b9d..0000000
--- a/src/mainboard/emulation/imgvp-pistachio/devicetree.cb
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# This file is part of the coreboot project.
-#
-# Copyright (C) 2014 Imagination Technologies
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; version 2 of
-# the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301 USA
-#
-
-chip soc/imgtec/pistachio
- chip drivers/generic/generic # I2C0 controller
- device i2c 6 on end # Fake component for testing
- end
-end
diff --git a/src/mainboard/emulation/imgvp-pistachio/mainboard.c b/src/mainboard/emulation/imgvp-pistachio/mainboard.c
deleted file mode 100644
index fdae940..0000000
--- a/src/mainboard/emulation/imgvp-pistachio/mainboard.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2014 Imagination Technologies
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; version 2 of
- * the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#include <console/console.h>
-#include <device/device.h>
-
-static void mainboard_enable(device_t dev)
-{
- printk(BIOS_INFO, "Enable imgvp-pistachio device...\n");
-}
-
-struct chip_operations mainboard_ops = {
- .enable_dev = mainboard_enable,
-};
-
diff --git a/src/mainboard/emulation/imgvp-pistachio/romstage.c b/src/mainboard/emulation/imgvp-pistachio/romstage.c
deleted file mode 100644
index 3fcf23d..0000000
--- a/src/mainboard/emulation/imgvp-pistachio/romstage.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2014 Imagination Technologies
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; version 2 of
- * the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- * MA 02110-1301 USA
- */
-
-#include <program_loading.h>
-#include <console/console.h>
-
-void main(void)
-{
- console_init();
- run_ramstage();
-}