Clean up includes of biosvar.h.
Rename GET/SET_EBDA2 to GET/SET_EBDA - nearly all users use the
extended form now anyway.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
#include "acpi.h" // struct rsdp_descriptor
#include "util.h" // memcpy
#include "pci.h" // pci_find_init_device
-#include "biosvar.h" // GET_EBDA
#include "pci_ids.h" // PCI_VENDOR_ID_INTEL
#include "pci_regs.h" // PCI_INTERRUPT_LINE
+#include "ioport.h" // inl
#include "paravirt.h"
/****************************************************/
#include "types.h" // u8
#include "ioport.h" // inb
#include "util.h" // dprintf
-#include "biosvar.h" // GET_EBDA
+#include "biosvar.h" // GET_GLOBAL
#include "pci.h" // foreachpci
#include "pci_ids.h" // PCI_CLASS_STORAGE_OTHER
#include "pci_regs.h" // PCI_INTERRUPT_LINE
ASSERT32FLAT();
return MAKE_FLATPTR(get_ebda_seg(), 0);
}
-#define GET_EBDA2(eseg, var) \
+#define GET_EBDA(eseg, var) \
GET_FARVAR(eseg, ((struct extended_bios_data_area_s *)0)->var)
-#define SET_EBDA2(eseg, var, val) \
+#define SET_EBDA(eseg, var, val) \
SET_FARVAR(eseg, ((struct extended_bios_data_area_s *)0)->var, (val))
-#define GET_EBDA(var) \
- GET_EBDA2(get_ebda_seg(), var)
-#define SET_EBDA(var, val) \
- SET_EBDA2(get_ebda_seg(), var, (val))
/****************************************************************
#include "config.h" // CONFIG_*
#include "util.h" // dprintf
#include "jpeg.h" // splash
-#include "biosvar.h" // SET_EBDA
#include "paravirt.h" // romfile_find
#include "vbe.h" // struct vbe_info
#include "bmp.h"
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "memmap.h" // struct e820entry
+#include "config.h" // CONFIG_*
#include "util.h" // dprintf.h
-#include "biosvar.h" // SET_EBDA
/****************************************************************
static void
mouse_15c20001(struct bregs *regs)
{
- u8 mouse_flags_2 = GET_EBDA(mouse_flag2);
+ u16 ebda_seg = get_ebda_seg();
+ u8 mouse_flags_2 = GET_EBDA(ebda_seg, mouse_flag2);
if ((mouse_flags_2 & 0x80) == 0) {
set_code_invalid(regs, RET_ENOHANDLER);
return;
return;
}
u16 ebda_seg = get_ebda_seg();
- SET_EBDA2(ebda_seg, mouse_flag1, 0x00);
- SET_EBDA2(ebda_seg, mouse_flag2, regs->bh);
+ SET_EBDA(ebda_seg, mouse_flag1, 0x00);
+ SET_EBDA(ebda_seg, mouse_flag2, regs->bh);
// Reset Mouse
mouse_15c201(regs);
{
struct segoff_s farptr = SEGOFF(regs->es, regs->bx);
u16 ebda_seg = get_ebda_seg();
- u8 mouse_flags_2 = GET_EBDA2(ebda_seg, mouse_flag2);
+ u8 mouse_flags_2 = GET_EBDA(ebda_seg, mouse_flag2);
if (! farptr.segoff) {
/* remove handler */
if ((mouse_flags_2 & 0x80) != 0) {
/* install handler */
mouse_flags_2 |= 0x80;
}
- SET_EBDA2(ebda_seg, mouse_flag2, mouse_flags_2);
- SET_EBDA2(ebda_seg, far_call_pointer, farptr);
+ SET_EBDA(ebda_seg, mouse_flag2, mouse_flags_2);
+ SET_EBDA(ebda_seg, far_call_pointer, farptr);
set_code_success(regs);
}
return;
u16 ebda_seg = get_ebda_seg();
- u8 mouse_flags_1 = GET_EBDA2(ebda_seg, mouse_flag1);
- u8 mouse_flags_2 = GET_EBDA2(ebda_seg, mouse_flag2);
+ u8 mouse_flags_1 = GET_EBDA(ebda_seg, mouse_flag1);
+ u8 mouse_flags_2 = GET_EBDA(ebda_seg, mouse_flag2);
if (! (mouse_flags_2 & 0x80))
// far call handler not installed
u8 package_count = mouse_flags_2 & 0x07;
u8 index = mouse_flags_1 & 0x07;
- SET_EBDA2(ebda_seg, mouse_data[index], data);
+ SET_EBDA(ebda_seg, mouse_data[index], data);
if ((index+1) < package_count) {
mouse_flags_1++;
- SET_EBDA2(ebda_seg, mouse_flag1, mouse_flags_1);
+ SET_EBDA(ebda_seg, mouse_flag1, mouse_flags_1);
return;
}
- u16 status = GET_EBDA2(ebda_seg, mouse_data[0]);
- u16 X = GET_EBDA2(ebda_seg, mouse_data[1]);
- u16 Y = GET_EBDA2(ebda_seg, mouse_data[2]);
- SET_EBDA2(ebda_seg, mouse_flag1, 0);
+ u16 status = GET_EBDA(ebda_seg, mouse_data[0]);
+ u16 X = GET_EBDA(ebda_seg, mouse_data[1]);
+ u16 Y = GET_EBDA(ebda_seg, mouse_data[2]);
+ SET_EBDA(ebda_seg, mouse_flag1, 0);
- struct segoff_s func = GET_EBDA2(ebda_seg, far_call_pointer);
+ struct segoff_s func = GET_EBDA(ebda_seg, far_call_pointer);
dprintf(16, "mouse farcall s=%04x x=%04x y=%04x func=%04x:%04x\n"
, status, X, Y, func.seg, func.offset);
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "util.h" // dprintf
-#include "biosvar.h" // GET_EBDA
+#include "config.h" // CONFIG_*
#include "xen.h" // usingXen
#define MSR_MTRRcap 0x000000fe
#include "util.h" // handle_1ab1
#include "pci.h" // pci_config_readl
#include "bregs.h" // struct bregs
-#include "biosvar.h" // GET_EBDA
+#include "biosvar.h" // GET_GLOBAL
#include "pci_regs.h" // PCI_VENDOR_ID
// romlayout.S
#include "util.h" // dprintf
#include "pci.h" // pci_config_readl
-#include "biosvar.h" // GET_EBDA
#include "pci_ids.h" // PCI_VENDOR_ID_INTEL
#include "pci_regs.h" // PCI_COMMAND
+#include "ioport.h" // PORT_ATA1_CMD_BASE
+#include "config.h" // CONFIG_*
#include "xen.h" // usingXen
#define PCI_DEVICE_MEM_MIN 0x1000
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "pci.h" // struct pir_header
+#include "config.h" // CONFIG_*
#include "util.h" // checksum
-#include "biosvar.h" // SET_EBDA
u16 PirOffset VAR16VISIBLE;
memset(ebda, 0, sizeof(*ebda));
ebda->size = esize;
- add_e820((u32)MAKE_FLATPTR(ebda_seg, 0), GET_EBDA2(ebda_seg, size) * 1024
+ add_e820((u32)MAKE_FLATPTR(ebda_seg, 0), GET_EBDA(ebda_seg, size) * 1024
, E820_RESERVED);
}
// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "util.h" // dprintf
-#include "biosvar.h" // GET_EBDA
#include "paravirt.h" // qemu_cfg_smbios_load_field
#include "smbios.h" // struct smbios_entry_point
#ifndef __XEN_H
#define __XEN_H
-#include "util.h"
+#include "config.h" // CONFIG_*
+#include "types.h" // u32
extern u32 xen_cpuid_base;