summaryrefslogtreecommitdiff
path: root/host/arch/x86/lib/crossystem_arch.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2015-11-06 14:22:32 -0800
committerchrome-bot <chrome-bot@chromium.org>2015-11-09 12:49:18 -0800
commitc62f42b5c3ece037001bf6791d3de538421b705b (patch)
tree81425017d57485ca7d65f50c47201e137b53bff5 /host/arch/x86/lib/crossystem_arch.c
parente85f6948f0ae8a147ec4d51421ca1bc63f557261 (diff)
downloadvboot-c62f42b5c3ece037001bf6791d3de538421b705b.tar.gz
crossystem: Remove platform_family field
This field doesn't seem to be used for anyone and it keeps adding work for people trying to bring up new platforms. If we ever needed something like this again, we'd probably prefer to have it in mosys now anyway. Let's get rid of it. BRANCH=None BUG=chromium:551715 TEST=Built for Falco and Jerry. Change-Id: I6b96e255968fdd22a345d4a75bfdc1e79d3f5896 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/311345 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Diffstat (limited to 'host/arch/x86/lib/crossystem_arch.c')
-rw-r--r--host/arch/x86/lib/crossystem_arch.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c
index 8819f5f1..8de9edc4 100644
--- a/host/arch/x86/lib/crossystem_arch.c
+++ b/host/arch/x86/lib/crossystem_arch.c
@@ -92,36 +92,11 @@
#define PCI_VENDOR_ID_PATH "/sys/bus/pci/devices/0000:00:00.0/vendor"
#define PCI_DEVICE_ID_PATH "/sys/bus/pci/devices/0000:00:00.0/device"
-typedef struct PlatformFamily {
- unsigned int vendor; /* Vendor id value */
- unsigned int device; /* Device id value */
- const char* platform_string; /* String to return */
-} PlatformFamily;
-
typedef struct {
unsigned int base;
unsigned int uid;
} Basemapping;
-/* Array of platform family names, terminated with a NULL entry */
-const PlatformFamily platform_family_array[] = {
- {0x8086, 0xA010, "PineTrail"},
- {0x8086, 0x3406, "Westmere"},
- {0x8086, 0x0104, "SandyBridge"}, /* mobile */
- {0x8086, 0x0100, "SandyBridge"}, /* desktop */
- {0x8086, 0x0154, "IvyBridge"}, /* mobile */
- {0x8086, 0x0150, "IvyBridge"}, /* desktop */
- {0x8086, 0x0a04, "Haswell"}, /* ult */
- {0x8086, 0x0c04, "Haswell"}, /* mobile */
- {0x8086, 0x0f00, "BayTrail"}, /* mobile */
- {0x8086, 0x1604, "Broadwell"}, /* ult */
- {0x8086, 0x2280, "Braswell"}, /* ult */
- {0x8086, 0x1904, "Skylake"}, /* skylake-u */
- {0x8086, 0x190c, "Skylake"}, /* skylake-y */
- /* Terminate with NULL entry */
- {0, 0, 0}
-};
-
static void VbFixCmosChecksum(FILE* file) {
int fd = fileno(file);
ioctl(fd, NVRAM_SETCKS);
@@ -474,40 +449,6 @@ static int VbGetRecoveryReason(void) {
}
}
-/* Determine the platform family and return it in the dest string.
- * This uses the PCI Bus 0, Device 0, Function 0 vendor and device id values
- * taken from sysfs to determine the platform family. This assumes there will
- * be a unique pair of values here for any given platform.
- */
-static char* ReadPlatformFamilyString(char* dest, int size) {
- FILE* f;
- const PlatformFamily* p;
- unsigned int v = 0xFFFF;
- unsigned int d = 0xFFFF;
-
- f = fopen(PCI_VENDOR_ID_PATH, "rt");
- if (!f)
- return NULL;
- if(fscanf(f, "0x%4x", &v) != 1)
- return NULL;
- fclose(f);
-
- f = fopen(PCI_DEVICE_ID_PATH, "rt");
- if (!f)
- return NULL;
- if(fscanf(f, "0x%4x", &d) != 1)
- return NULL;
- fclose(f);
-
- for (p = platform_family_array; p->vendor; p++) {
- if((v == p->vendor) && (d == p->device))
- return StrCopy(dest, p->platform_string, size);
- }
-
- /* No recognized platform family was found */
- return NULL;
-}
-
/* Physical GPIO number <N> may be accessed through /sys/class/gpio/gpio<M>/,
* but <N> and <M> may differ by some offset <O>. To determine that constant,
* we look for a directory named /sys/class/gpio/gpiochip<O>/. If there's not
@@ -904,8 +845,6 @@ const char* VbGetArchPropertyString(const char* name, char* dest,
default:
return NULL;
}
- } else if (!strcasecmp(name,"platform_family")) {
- return ReadPlatformFamilyString(dest, size);
}
return NULL;