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>
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 @@
     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 @@
 #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) \