@@ -10,6 +10,7 @@
#include "biosvar.h" // GET_EBDA
#include "pci_ids.h" // PCI_VENDOR_ID_INTEL
#include "pci_regs.h" // PCI_COMMAND
+#include "memmap.h" // PAGE_SIZE
#include "dev-i440fx.h"
#define PCI_ROM_SLOT 6
@@ -90,6 +91,8 @@ static int pci_bios_allocate_region(u16 bdf, int region_num)
type = "prefmem";
msg = "decrease BUILD_PCIMEM_SIZE and recompile. size %x";
} else {
+ if (size < PAGE_SIZE)
+ size = PAGE_SIZE;
r = &pci_bios_mem_region;
type = "mem";
msg = "increase BUILD_PCIMEM_SIZE and recompile.";