Author: blueswirl Date: Thu May 27 22:12:26 2010 New Revision: 790 URL: http://tracker.coreboot.org/trac/openbios/changeset/790
Log: pci: assign relocatable address ranges
Signed-off-by: Igor V. Kovalenko igor.v.kovalenko@gmail.com Signed-off-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/drivers/pci.c
Modified: trunk/openbios-devel/drivers/pci.c ============================================================================== --- trunk/openbios-devel/drivers/pci.c Thu May 27 22:12:23 2010 (r789) +++ trunk/openbios-devel/drivers/pci.c Thu May 27 22:12:26 2010 (r790) @@ -546,24 +546,24 @@ static inline void pci_decode_pci_addr(pci_addr addr, int *flags, int *space_code, uint32_t *mask) { - if (addr & 0x01) { + *flags = 0;
+ if (addr & 0x01) { *space_code = IO_SPACE; - *flags = 0; *mask = 0x00000001; - - } else if (addr & 0x04) { - - *flags = IS_NOT_RELOCATABLE; - *space_code = MEMORY_SPACE_64; - *mask = 0x0000000F; - } else { + if (addr & 0x04) { + *space_code = MEMORY_SPACE_64; + *flags |= IS_NOT_RELOCATABLE; /* XXX: why not relocatable? */ + } else { + *space_code = MEMORY_SPACE_32; + } + + if (addr & 0x08) { + *flags |= IS_PREFETCHABLE; + }
- *space_code = MEMORY_SPACE_32; - *flags = IS_NOT_RELOCATABLE; - *mask = 0x0000000F; - + *mask = 0x0000000F; } }