aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc/vgaentry.S
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-10-17 22:15:42 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-11-12 12:17:57 -0500
commitb4eb6fc5cc051e18d07f9483c093c9c32cece2f7 (patch)
tree0eb793ef2481b9b2dcaa8e501078708858146ec1 /vgasrc/vgaentry.S
parent6fed307251e2590e9a999af64cf29ff739b034f9 (diff)
downloadseabios-b4eb6fc5cc051e18d07f9483c093c9c32cece2f7.tar.gz
vgabios: Add software cursor capability
Add mechanism for drawing a cursor to the framebuffer to implement a cursor in software. The timer interrupt is "hooked" so that the cursor can blink. This can be useful for "coreboot native vga". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/vgaentry.S')
-rw-r--r--vgasrc/vgaentry.S30
1 files changed, 30 insertions, 0 deletions
diff --git a/vgasrc/vgaentry.S b/vgasrc/vgaentry.S
index 5d453808..c05502d8 100644
--- a/vgasrc/vgaentry.S
+++ b/vgasrc/vgaentry.S
@@ -133,3 +133,33 @@ entry_10_extrastack:
pushl BREGS_code(%eax)
RESTOREBREGS_DSEAX
iretw
+
+ // Timer irq handling
+ DECLFUNC entry_timer_hook
+entry_timer_hook:
+ ENTRY handle_timer_hook
+ ljmpw *%cs:Timer_Hook_Resume
+
+ // Timer irq handling on extra stack
+ DECLFUNC entry_timer_hook_extrastack
+entry_timer_hook_extrastack:
+ cli
+ cld
+ pushw %ds // Set %ds:%eax to space on ExtraStack
+ pushl %eax
+ movw %cs:ExtraStackSeg, %ds
+ movl $(CONFIG_VGA_EXTRA_STACK_SIZE-BREGS_size-8), %eax
+ SAVEBREGS_POP_DSEAX
+ movl %esp, BREGS_size(%eax)
+ movw %ss, BREGS_size+4(%eax)
+
+ movw %ds, %dx // Setup %ss/%esp and call function
+ movw %dx, %ss
+ movl %eax, %esp
+ calll handle_timer_hook
+
+ movl %esp, %eax // Restore registers and return
+ movw BREGS_size+4(%eax), %ss
+ movl BREGS_size(%eax), %esp
+ RESTOREBREGS_DSEAX
+ ljmpw *%cs:Timer_Hook_Resume