Simplify POST entry code by moving reboot logic from post.c to resume.c.
authorKevin O'Connor <kevin@koconnor.net>
Mon, 11 Jul 2011 02:35:07 +0000 (22:35 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 11 Jul 2011 02:35:07 +0000 (22:35 -0400)
commit87b533bf71bb41e32319db0ed8f167f50171afc5
tree5fc0cbb83ab7419a734393e4baaf09e05409970a
parentffdcd3a8d72310efc55255fc93edf78c024bbafe
Simplify POST entry code by moving reboot logic from post.c to resume.c.

Detect a resume/reboot by inspecting HaveRunPost instead of inspecting
the cmos reset code.  Inspecting a global variable is both simpler and
safer.

Move the reboot logic from post.c to resume.c - this makes the code in
post.c simpler as it is now only called once on machine startup.  This
also makes it easier to ensure all POST initialization code resides in
the relocatable "init" sections.

Also, rename _start() to handle_post() so that it is more in keeping
with the entry_xxx() and handle_xxx() function naming.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/post.c
src/resume.c
src/romlayout.S
src/stacks.c
src/util.h