pci_device: Extend PCI domain limit to 64-bit

This change updates the resource limit for PCI domain to allow
resource allocation above 4G boundary. The resource limit is set to
the highest physical address for the CPU.

BUG=b:149186922

Signed-off-by: Furquan Shaikh <furquan@google.com>
Change-Id: Idfcc9a390d309886ee2b7880b29502c740e6578e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39488
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index 9036f53..2c08ebc 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -9,6 +9,7 @@
 #include <device/pci_ops.h>
 #include <bootmode.h>
 #include <console/console.h>
+#include <cpu/cpu.h>
 #include <stdlib.h>
 #include <stdint.h>
 #include <string.h>
@@ -433,7 +434,7 @@
 
 	/* Initialize the system-wide memory resources constraints. */
 	res = new_resource(dev, IOINDEX_SUBTRACTIVE(1, 0));
-	res->limit = 0xffffffffULL;
+	res->limit = (1ULL << cpu_phys_address_size()) - 1;
 	res->flags = IORESOURCE_MEM | IORESOURCE_SUBTRACTIVE |
 		     IORESOURCE_ASSIGNED;
 }