Add support for RAM-less multi-processor init
For a hyper-threading processor, enabling cache requires that both the BSP and AP CPU clear CR0.CD (Cache Disable) bit. For a Cache-As-Ram implementation, partial multi-processor initialisation precedes raminit and AP CPUs' 16bit entry must be run from ROM. The AP CPU can only start execute real-mode code at a 4kB aligned address below 1MB. The protected mode entry code for AP is identical with the BSP code, which is already located at the top of bootblock. This patch takes the simplest approach and aligns the bootblock 16 bit entry at highest possible 4kB boundary below 1MB. The symbol ap_sipi_vector is tested to match CONFIG_AP_SIPI_VECTOR used by the CAR code in romstage. Adress is not expected to ever change, but if it does, link will fail. Change-Id: I82e4edbf208c9ba863f51a64e50cd92871c528ef Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/454 Tested-by: build bot (Jenkins) Reviewed-by: Idwer Vollering <vidwer@gmail.com> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
parent
f9d1a42d98
commit
7dfe32c540
|
@ -29,17 +29,18 @@ MEMORY {
|
||||||
TARGET(binary)
|
TARGET(binary)
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
/* Align .rom to next 4 byte boundary so no pad byte appears
|
/* Symbol ap_sipi_vector must be aligned to 4kB to start AP CPUs
|
||||||
* between _rom and _start.
|
* with Startup IPI message without RAM.
|
||||||
*/
|
*/
|
||||||
.bogus ROMLOC_MIN : {
|
.bogus ROMLOC_MIN : {
|
||||||
. = ALIGN(4);
|
. = ALIGN(4096);
|
||||||
ROMLOC = .;
|
ROMLOC = .;
|
||||||
} >rom = 0xff
|
} >rom = 0xff
|
||||||
|
|
||||||
/* This section might be better named .setup */
|
/* This section might be better named .setup */
|
||||||
.rom ROMLOC : {
|
.rom ROMLOC : {
|
||||||
_rom = .;
|
_rom = .;
|
||||||
|
ap_sipi_vector = .;
|
||||||
*(.rom.text);
|
*(.rom.text);
|
||||||
*(.rom.data);
|
*(.rom.data);
|
||||||
*(.rom.data.*);
|
*(.rom.data.*);
|
||||||
|
@ -51,7 +52,11 @@ SECTIONS
|
||||||
* may cause the total size of a section to change when the start
|
* may cause the total size of a section to change when the start
|
||||||
* address gets applied.
|
* address gets applied.
|
||||||
*/
|
*/
|
||||||
ROMLOC_MIN = 0xffffff00 - (_erom - _rom + 16);
|
ROMLOC_MIN = 0xffffff00 - (_erom - _rom + 16) - 4096;
|
||||||
|
|
||||||
|
/* Post-check proper SIPI vector. */
|
||||||
|
_bogus = ASSERT(((ap_sipi_vector & 0x0fff) == 0x0), "Bad SIPI vector alignment");
|
||||||
|
_bogus = ASSERT((ap_sipi_vector == CONFIG_AP_SIPI_VECTOR), "Address mismatch on AP_SIPI_VECTOR");
|
||||||
|
|
||||||
/DISCARD/ : {
|
/DISCARD/ : {
|
||||||
*(.comment)
|
*(.comment)
|
||||||
|
|
|
@ -31,6 +31,12 @@ config SMP
|
||||||
This option is used to enable certain functions to make coreboot
|
This option is used to enable certain functions to make coreboot
|
||||||
work correctly on symmetric multi processor (SMP) systems.
|
work correctly on symmetric multi processor (SMP) systems.
|
||||||
|
|
||||||
|
config AP_SIPI_VECTOR
|
||||||
|
hex
|
||||||
|
default 0xfffff000
|
||||||
|
help
|
||||||
|
This must equal address of ap_sipi_vector from bootblock build.
|
||||||
|
|
||||||
config MMX
|
config MMX
|
||||||
bool
|
bool
|
||||||
help
|
help
|
||||||
|
|
Loading…
Reference in New Issue