The 8kB region may not be page aligned, hence requiring 3 pages to
be mapped through.
Signed-off-by: Keir Fraser <keir@xen.org>
enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt };
extern enum virtual_vga virtual_vga;
+
extern unsigned long igd_opregion_pgbase;
+#define IGD_OPREGION_PAGES 3
struct bios_config {
const char *name;
nr++;
e820[nr].addr = igd_opregion_base;
- e820[nr].size = 2 * PAGE_SIZE;
+ e820[nr].size = IGD_OPREGION_PAGES * PAGE_SIZE;
e820[nr].type = E820_NVS;
nr++;
- e820[nr].addr = igd_opregion_base + 2 * PAGE_SIZE;
+ e820[nr].addr = igd_opregion_base + IGD_OPREGION_PAGES * PAGE_SIZE;
e820[nr].size = (uint32_t)-e820[nr].addr;
e820[nr].type = E820_RESERVED;
nr++;
virtual_vga = VGA_pt;
if ( vendor_id == 0x8086 )
{
- igd_opregion_pgbase = mem_hole_alloc(2);
+ igd_opregion_pgbase = mem_hole_alloc(IGD_OPREGION_PAGES);
/*
* Write the the OpRegion offset to give the opregion
* address to the device model. The device model will trap