On i386-ieee1275 we run in paged mode. So we need to explicitly map

the devices before accessing them.
This commit is contained in:
Vladimir Serbinenko 2013-11-18 04:32:33 +01:00
parent 04f39f6df8
commit 6f1bc8bc0f
4 changed files with 64 additions and 0 deletions

View file

@ -70,6 +70,8 @@ grub_pci_write_byte (grub_pci_address_t addr, grub_uint8_t data)
grub_outb (data, GRUB_PCI_DATA_REG + (addr & 3));
}
#ifndef GRUB_MACHINE_IEEE1275
static inline volatile void *
grub_pci_device_map_range (grub_pci_device_t dev __attribute__ ((unused)),
grub_addr_t base,
@ -85,5 +87,19 @@ grub_pci_device_unmap_range (grub_pci_device_t dev __attribute__ ((unused)),
{
}
#else
volatile void *
grub_pci_device_map_range (grub_pci_device_t dev,
grub_addr_t base,
grub_size_t size);
void
grub_pci_device_unmap_range (grub_pci_device_t dev,
volatile void *mem,
grub_size_t size);
#endif
#endif /* GRUB_CPU_PCI_H */