mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
pci: assign relocatable address ranges
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@790 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
committed by
Blue Swirl
parent
33eabc0730
commit
1e5c4a8173
@@ -546,24 +546,24 @@ int eth_config_cb (const pci_config_t *config)
|
|||||||
static inline void pci_decode_pci_addr(pci_addr addr, int *flags,
|
static inline void pci_decode_pci_addr(pci_addr addr, int *flags,
|
||||||
int *space_code, uint32_t *mask)
|
int *space_code, uint32_t *mask)
|
||||||
{
|
{
|
||||||
|
*flags = 0;
|
||||||
|
|
||||||
if (addr & 0x01) {
|
if (addr & 0x01) {
|
||||||
|
|
||||||
*space_code = IO_SPACE;
|
*space_code = IO_SPACE;
|
||||||
*flags = 0;
|
|
||||||
*mask = 0x00000001;
|
*mask = 0x00000001;
|
||||||
|
|
||||||
} else if (addr & 0x04) {
|
|
||||||
|
|
||||||
*flags = IS_NOT_RELOCATABLE;
|
|
||||||
*space_code = MEMORY_SPACE_64;
|
|
||||||
*mask = 0x0000000F;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
if (addr & 0x04) {
|
||||||
|
*space_code = MEMORY_SPACE_64;
|
||||||
|
*flags |= IS_NOT_RELOCATABLE; /* XXX: why not relocatable? */
|
||||||
|
} else {
|
||||||
|
*space_code = MEMORY_SPACE_32;
|
||||||
|
}
|
||||||
|
|
||||||
*space_code = MEMORY_SPACE_32;
|
if (addr & 0x08) {
|
||||||
*flags = IS_NOT_RELOCATABLE;
|
*flags |= IS_PREFETCHABLE;
|
||||||
*mask = 0x0000000F;
|
}
|
||||||
|
|
||||||
|
*mask = 0x0000000F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user