Blame SOURCES/0009-biosdecode-Decode-Intel-Multiprocessor-entry-point.patch

94a757
From adbd050d70b6173dd6880b21fd6f995af5ea79d2 Mon Sep 17 00:00:00 2001
94a757
From: Jean Delvare <jdelvare@suse.de>
94a757
Date: Fri, 20 Jan 2017 17:26:02 +0100
94a757
Subject: [PATCH 9/9] biosdecode: Decode Intel Multiprocessor entry point
94a757
94a757
Decode the entry point defined in the Intel Multiprocessor
94a757
specification.
94a757
---
94a757
 CHANGELOG    |  5 +++++
94a757
 biosdecode.c | 34 +++++++++++++++++++++++++++++++++-
94a757
 2 files changed, 38 insertions(+), 1 deletion(-)
94a757
94a757
diff --git a/CHANGELOG b/CHANGELOG
94a757
index 67aef99..26a8f35 100644
94a757
--- a/CHANGELOG
94a757
+++ b/CHANGELOG
94a757
@@ -1,5 +1,10 @@
94a757
 2017-01-20  Jean Delvare  <jdelvare@suse.de>
94a757
94a757
+	* biosdecode.c: Decode the entry point defined in the Intel
94a757
+	  Multiprocessor specification.
94a757
+
94a757
+2017-01-20  Jean Delvare  <jdelvare@suse.de>
94a757
+
94a757
	* dmidecode.c: Only decode one DMI table.
94a757
	  This fixes Savannah bug #50022:
94a757
	  https://savannah.nongnu.org/bugs/?50022
94a757
diff --git a/biosdecode.c b/biosdecode.c
94a757
index 3bbfe28..ad3d4bc 100644
94a757
--- a/biosdecode.c
94a757
+++ b/biosdecode.c
94a757
@@ -2,7 +2,7 @@
94a757
  * BIOS Decode
94a757
  *
94a757
  *   Copyright (C) 2000-2002 Alan Cox <alan@redhat.com>
94a757
- *   Copyright (C) 2002-2015 Jean Delvare <jdelvare@suse.de>
94a757
+ *   Copyright (C) 2002-2017 Jean Delvare <jdelvare@suse.de>
94a757
  *
94a757
  *   This program is free software; you can redistribute it and/or modify
94a757
  *   it under the terms of the GNU General Public License as published by
94a757
@@ -52,6 +52,9 @@
94a757
  *  - Fujitsu application panel technical details
94a757
  *    As of July 23rd, 2004
94a757
  *    http://apanel.sourceforge.net/tech.php
94a757
+ *  - Intel Multiprocessor Specification
94a757
+ *    Version 1.4
94a757
+ *    http://www.intel.com/design/archives/processors/pro/docs/242016.htm
94a757
  */
94a757
94a757
 #include <stdio.h>
94a757
@@ -546,6 +549,34 @@ static int fjkeyinf_decode(const u8 *p, size_t len)
94a757
 }
94a757
94a757
 /*
94a757
+ * Intel Multiprocessor
94a757
+ */
94a757
+
94a757
+static size_t mp_length(const u8 *p)
94a757
+{
94a757
+	return 16 * p[8];
94a757
+}
94a757
+
94a757
+static int mp_decode(const u8 *p, size_t len)
94a757
+{
94a757
+	if (!checksum(p, len))
94a757
+		return 0;
94a757
+
94a757
+	printf("Intel Multiprocessor present.\n");
94a757
+	printf("\tSpecification Revision: %s\n",
94a757
+		p[9] == 0x01 ? "1.1" : p[9] == 0x04 ? "1.4" : "Invalid");
94a757
+	if (p[11])
94a757
+		printf("\tDefault Configuration: #%d\n", p[11]);
94a757
+	else
94a757
+		printf("\tConfiguration Table Address: 0x%08X\n",
94a757
+			DWORD(p + 4));
94a757
+	printf("\tMode: %s\n", p[12] & (1 << 7) ?
94a757
+		"IMCR and PIC" : "Virtual Wire");
94a757
+
94a757
+	return 1;
94a757
+}
94a757
+
94a757
+/*
94a757
  * Main
94a757
  */
94a757
94a757
@@ -562,6 +593,7 @@ static struct bios_entry bios_entries[] = {
94a757
	{ "32OS", 0, 0xE0000, 0xFFFFF, compaq_length, compaq_decode },
94a757
	{ "\252\125VPD", 0, 0xF0000, 0xFFFFF, vpd_length, vpd_decode },
94a757
	{ "FJKEYINF", 0, 0xF0000, 0xFFFFF, fjkeyinf_length, fjkeyinf_decode },
94a757
+	{ "_MP_", 0, 0xE0000, 0xFFFFF, mp_length, mp_decode },
94a757
	{ NULL, 0, 0, 0, NULL, NULL }
94a757
 };
94a757
94a757
--
94a757
2.10.2