aboutsummaryrefslogtreecommitdiffstats
path: root/src/misc.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-04-19 12:22:22 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-05-06 12:10:36 -0400
commit6c68e7adfa6255268a80522ea39dfef4aa20ca70 (patch)
treefe7f741029166626daf5d21930d1f499ac37dcda /src/misc.c
parentd85c22e44ee4e24f2be19d579ea8fa0066a85fbb (diff)
downloadseabios-6c68e7adfa6255268a80522ea39dfef4aa20ca70.tar.gz
If an int 1587 call is made from an option rom, stay in bigreal mode.
Modify the int 1587 handler to check if the POST phase is still running. If it is, use bigreal mode segment limits so that the caller remains in bigreal mode when the 1587 handler completes. This helps with SeaVGABIOS' use of "direct" framebuffer accesses (an option rom may attempt to display text during its option rom execution which can cause SeaVGABIOS to make the int 1587 calls). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/misc.c b/src/misc.c
index 191e7070..67123557 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -14,6 +14,15 @@
#define PORT_MATH_CLEAR 0x00f0
+// Indicator if POST phase has been started (and if it has completed).
+int HaveRunPost VARFSEG;
+
+int
+in_post(void)
+{
+ return GET_GLOBAL(HaveRunPost) == 1;
+}
+
/****************************************************************
* Misc 16bit ISRs