From a9e632c2ac29c60872e7e4f9314263b34ce5031d Mon Sep 17 00:00:00 2001 From: Eric Biederman Date: Thu, 18 Nov 2004 22:38:08 +0000 Subject: - First stab at getting the ppc ports building and working. - The sandpointx3+altimus has been consolidated into one directory for now. - Added support for having different versions of the pci access functions on a per bus basis if needed. Hopefully I have not broken something inadvertently. git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1786 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/devices/device_util.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/devices/device_util.c') diff --git a/src/devices/device_util.c b/src/devices/device_util.c index fd8fdcf9b8..6af2d3786f 100644 --- a/src/devices/device_util.c +++ b/src/devices/device_util.c @@ -114,9 +114,6 @@ const char *dev_path(device_t dev) case DEVICE_PATH_ROOT: memcpy(buffer, "Root Device", 12); break; - case DEVICE_PATH_DEFAULT_CPU: - memcpy(buffer, "Default CPU", 12); - break; case DEVICE_PATH_PCI: sprintf(buffer, "PCI: %02x:%02x.%01x", dev->bus->secondary, @@ -142,6 +139,12 @@ const char *dev_path(device_t dev) sprintf(buffer, "APIC_CLUSTER: %01x", dev->path.u.apic_cluster.cluster); break; + case DEVICE_PATH_CPU: + sprintf(buffer, "CPU: %02x", dev->path.u.cpu.id); + break; + case DEVICE_PATH_CPU_BUS: + sprintf(buffer, "CPU_BUS: %02x", dev->path.u.cpu_bus.id); + break; default: printk_err("Unknown device path type: %d\n", dev->path.type); break; @@ -160,9 +163,6 @@ int path_eq(struct device_path *path1, struct device_path *path2) case DEVICE_PATH_ROOT: equal = 1; break; - case DEVICE_PATH_DEFAULT_CPU: - equal = 1; - break; case DEVICE_PATH_PCI: equal = (path1->u.pci.devfn == path2->u.pci.devfn); break; @@ -182,6 +182,12 @@ int path_eq(struct device_path *path1, struct device_path *path2) case DEVICE_PATH_APIC_CLUSTER: equal = (path1->u.apic_cluster.cluster == path2->u.apic_cluster.cluster); break; + case DEVICE_PATH_CPU: + equal = (path1->u.cpu.id == path2->u.cpu.id); + break; + case DEVICE_PATH_CPU_BUS: + equal = (path1->u.cpu_bus.id == path2->u.cpu_bus.id); + break; default: printk_err("Uknown device type: %d\n", path1->type); break; -- cgit v1.2.3