[coreboot] Patch merged into coreboot/master: 831243e Implement stack overflow checking for the BSP

gerrit at coreboot.org gerrit at coreboot.org
Tue Jul 24 23:30:00 CEST 2012


the following patch was just integrated into master:
commit 831243ee6459d48974caa0adc739eef740377122
Author: Ronald G. Minnich <rminnich at chromium.org>
Date:   Tue Jun 12 16:29:32 2012 -0700

    Implement stack overflow checking for the BSP
    
    Previous patches implemented stack overflow checking for the APs.
    This patch builds on the BSP stack poisoning patch to implement
    stack overflow checking for the BSP, and also prints out maximum
    stack usage. It reveals that our 32K stack is ridiculously oversized,
    especially now that the lzma decoder doesn't use a giant 16K on-stack
    array.
    
    Break the stack checking out into a separate function, which
    we will later use for the APs.
    
    CPU0: stack from 00180000 to 00188000:Lowest stack address 00187ad8
    
    To test failure, change the DEADBEEF stack poison value in c_start.S
    to something else. Then we should get an error like this:
    Stack overrun on BSP.Increase stack from current 32768 bytes
    CPU0: stack from 00180000 to 00188000:Lowest stack address 00180000
    
    Separate the act of loading from the act of starting the payload. This
    allows us better error management and reporting of stack use. Now we
    see:
    CPU0: stack from 00180000 to 00188000:Lowest stack address 00187ad8
    
    Tested for both success and failure on Link. At the same time, feel free
    to carefully check my manipulation of _estack.
    
    Change-Id: Ibb09738b15ec6a5510ac81e45dd82756bfa5aac2
    Signed-off-by: Ronald G. Minnich <rminnich at chromium.org>

Build-Tested: build bot (Jenkins) at Tue Jul 24 06:00:15 2012, giving +1
Reviewed-By: Ronald G. Minnich <rminnich at gmail.com> at Tue Jul 24 23:29:11 2012, giving +2
See http://review.coreboot.org/1286 for details.

-gerrit




More information about the coreboot mailing list