summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-12-21 07:01:31 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-12-26 08:11:30 +0000
commite6b313da365e801decd18db4b5a5c97cbdd31e47 (patch)
treedb705d1ed57f608198d3dc5ac4f58b50276ee020 /src
parent2bdc05d89b25f17a041f0c95362b9013fbc91bae (diff)
downloadcoreboot-e6b313da365e801decd18db4b5a5c97cbdd31e47.tar.gz
cpu/intel/car/p4-netburst: Add assert for SIPI_VECTOR_IN_ROM
Location of _start16bit in entry16.inc is about to see some changes, lets make sure they don't break the alignment requirement here. Change-Id: Id8a0964982387e5321e8c89254922e1242cf85ee Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37894 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Diffstat (limited to 'src')
-rw-r--r--src/cpu/x86/16bit/entry16.ld26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/cpu/x86/16bit/entry16.ld b/src/cpu/x86/16bit/entry16.ld
index 66bfbd58ca..b5c1592691 100644
--- a/src/cpu/x86/16bit/entry16.ld
+++ b/src/cpu/x86/16bit/entry16.ld
@@ -1,3 +1,23 @@
- gdtptr16_offset = gdtptr16 & 0xffff;
- nullidt_offset = nullidt & 0xffff;
- ap_sipi_vector_in_rom = (_start16bit >> 12) & 0xff;
+/*
+ * This file is part of the coreboot project.
+ *
+ * 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.
+ */
+
+gdtptr16_offset = gdtptr16 & 0xffff;
+nullidt_offset = nullidt & 0xffff;
+
+/* Symbol _start16bit must be aligned to 4kB to start AP CPUs with
+ * Startup IPI message without RAM.
+ */
+#if CONFIG(SIPI_VECTOR_IN_ROM)
+_bogus = ASSERT((_start16bit & 0xfff) == 0, "Symbol _start16bit is not at 4 KiB boundary");
+ap_sipi_vector_in_rom = (_start16bit >> 12) & 0xff;
+#endif