aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-10-21 15:15:44 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-10-27 11:01:26 -0400
commitf4b1dbc9ac47d24a644462c91c5fb1514da3829b (patch)
tree9bc0dc39df9903ddffbc934ac0f4371d6adc2e64 /vgasrc
parent7217ae7bea6d07bb0ea780d1a1710d2cce8fe1c1 (diff)
downloadseabios-f4b1dbc9ac47d24a644462c91c5fb1514da3829b.tar.gz
seabios-f4b1dbc9ac47d24a644462c91c5fb1514da3829b.tar.xz
seabios-f4b1dbc9ac47d24a644462c91c5fb1514da3829b.zip
vgabios: Rename vbe_flags to flags
Allow the custom bda field vbe_flags to be used for flags outside of vbe. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc')
-rw-r--r--vgasrc/vbe.c7
-rw-r--r--vgasrc/vgabios.h4
2 files changed, 7 insertions, 4 deletions
diff --git a/vgasrc/vbe.c b/vgasrc/vbe.c
index 06ec22e..e2aeced 100644
--- a/vgasrc/vbe.c
+++ b/vgasrc/vbe.c
@@ -381,11 +381,12 @@ vbe_104f10(struct bregs *regs)
case 0x00:
regs->bx = 0x0f30;
break;
- case 0x01:
- SET_BDA_EXT(vbe_flag, regs->bh);
+ case 0x01: ;
+ u8 flags = GET_BDA_EXT(flags);
+ SET_BDA_EXT(flags, (flags & ~BF_PM_MASK) | (regs->bh & BF_PM_MASK));
break;
case 0x02:
- regs->bh = GET_BDA_EXT(vbe_flag);
+ regs->bh = GET_BDA_EXT(flags) & BF_PM_MASK;
break;
default:
regs->ax = 0x014f;
diff --git a/vgasrc/vgabios.h b/vgasrc/vgabios.h
index fc8d45a..0ec4a8e 100644
--- a/vgasrc/vgabios.h
+++ b/vgasrc/vgabios.h
@@ -79,11 +79,13 @@ struct gfx_op {
#define VGA_CUSTOM_BDA 0xb9
struct vga_bda_s {
- u8 vbe_flag;
+ u8 flags;
u16 vbe_mode;
u16 vgamode_offset;
} PACKED;
+#define BF_PM_MASK 0x0f
+
#define GET_BDA_EXT(var) \
GET_FARVAR(SEG_BDA, ((struct vga_bda_s *)VGA_CUSTOM_BDA)->var)
#define SET_BDA_EXT(var, val) \