I know that the base address register (BAR) in PCI configuration space defines the start location of a PCI address, but how does the size of this region get established?
"To determine the amount of address space needed by a PCI device, you must save the original value of the BAR, write a value of all 1's to the register, then read it back."