diff options
author | Ronald G. Minnich <rminnich@chromium.org> | 2012-06-06 13:00:24 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2012-11-13 02:12:13 +0100 |
commit | 000bf83c934880490d6b1b4c16465cbe7f4f377c (patch) | |
tree | 952fd3ac7062c9eea95944e518d99c723b20240f /src/include | |
parent | 5b635795cc6b104e4d30218817c9b0dc80e4c1c3 (diff) | |
download | coreboot-000bf83c934880490d6b1b4c16465cbe7f4f377c.tar.xz |
Support better tracking of AP stack usage.
This change allows us to figure out how much of the AP stacks we are
using, as well as to catch any case of an AP overrunning its stack.
Also, the stack is poisoned, which is a good way to catch programming
errors -- code should never count on auto variables being zerod.
The stack bases are recorded in a new array, stacks. At the end,
when all APs are initialized, the stacks are walked and the
lowest level of the stack that is reached is printed.
Build and boot and look for output like this:
CPU1: stack allocated from 00148000 to 00148ff4:\
lowest stack address was 00148c4c
CPU2: stack allocated from 00147000 to 00147ff4:\
lowest stack address was 00147c4c
CPU3: stack allocated from 00146000 to 00146ff4:\
lowest stack address was 00146c4c
Note that we used only about 1K of stack, even though in this
case we allocated 4K (and in the main branch, we allocate 32K!)
Change-Id: I99b7b9086848496feb3ecd207f64203fa69fadf5
Signed-off-by: Ronald G. Minnich <rminnich@chromium.org>
Reviewed-on: http://review.coreboot.org/1818
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/include')
0 files changed, 0 insertions, 0 deletions