aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc/bochsvga.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-09-18 21:41:48 -0400
committerKevin O'Connor <kevin@koconnor.net>2013-09-28 22:10:31 -0400
commit4ade523a9db32b2a0e3cdeec3413c52e463542c8 (patch)
tree83da55d3236672934dc003765578d52e48b737bb /vgasrc/bochsvga.c
parent7b9f29736aecd3ac35021a8fc24ee15fc01d2c5a (diff)
downloadseabios-4ade523a9db32b2a0e3cdeec3413c52e463542c8.tar.gz
Remove ioport.h; disperse its contents to other header files.
Move the inb(), insb(), etc. code from ioport.h to x86.h. Move the PORT_* definitions to their appropriate hardware files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/bochsvga.c')
-rw-r--r--vgasrc/bochsvga.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/vgasrc/bochsvga.c b/vgasrc/bochsvga.c
index 750624ac..9425a828 100644
--- a/vgasrc/bochsvga.c
+++ b/vgasrc/bochsvga.c
@@ -15,6 +15,7 @@
#include "std/vbe.h" // VBE_CAPABILITY_8BIT_DAC
#include "stdvga.h" // VGAREG_SEQU_ADDRESS
#include "vgabios.h" // struct vbe_modeinfo
+#include "x86.h" // outw
/****************************************************************
@@ -130,6 +131,17 @@ bochsvga_list_modes(u16 seg, u16 *dest, u16 *last)
* Helper functions
****************************************************************/
+static inline u16 dispi_read(u16 reg)
+{
+ outw(reg, VBE_DISPI_IOPORT_INDEX);
+ return inw(VBE_DISPI_IOPORT_DATA);
+}
+static inline void dispi_write(u16 reg, u16 val)
+{
+ outw(reg, VBE_DISPI_IOPORT_INDEX);
+ outw(val, VBE_DISPI_IOPORT_DATA);
+}
+
int
bochsvga_get_window(struct vgamode_s *vmode_g, int window)
{