[Skiboot] [PATCH] asm/head.S: fix hang in multi-threaded mambo

Stewart Smith stewart at linux.vnet.ibm.com
Tue Mar 1 13:38:19 AEDT 2016


Oliver O'Halloran <oohall at gmail.com> writes:
> In very early boot, skiboot places secondary threads in holding loop
> until the primary thread has finished relocating skiboot. The secondary
> threads wait until a flag at INITAL_OFFSET + offsetof(boot_flag) is set
> to one before continuing. After relocating the skiboot image and
> applying ELF relocations the sets this flag and continues booting.
>
> To avoid having to copy skiboot at runtime within the simulation e605691e
> introduced a change to have the skiboot.tcl mambo script load skiboot at
> it's preferred location of 0x30000000 rather than 0x00000000.
> Unfortunately, the relocation code path is also responsible for saving the
> inital offset pointer (into r15). When not taken this results in the main
> thread writing to r15 + offsetof(boot_flag) instead, which leaves the
> secondary threads stuck waiting for boot_flag and the main thread stuck
> when trying to call-in the secondary threads during CPU initialisation.
>
> This patch fixes the bug by saving the inital offset before checking if
> relocation is necessary and adds a few comments to better document the
> relocation process.

You know what'd be awesome? A multi-threaded mambo boot test :)

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list