Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6969
-gerrit
commit aa0f62b8eadbc3b9892a2e3903301c987bfa32c6
Author: Isaac Christensen <isaac.christensen(a)se-eng.com>
Date: Wed Sep 24 14:59:32 2014 -0600
x86: fixup MTRR setup
This is a follow up to:
7756fe7 x86: Minimize work done with the caches disabled in mtrr functions.
Fix some typo's and enable the MTRR's before enabling caching.
Change-Id: If751b815f9dab781fc38c898cf692f0940c57695
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
src/cpu/x86/mtrr/mtrr.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/cpu/x86/mtrr/mtrr.c b/src/cpu/x86/mtrr/mtrr.c
index e0392f7..69cd2d2 100644
--- a/src/cpu/x86/mtrr/mtrr.c
+++ b/src/cpu/x86/mtrr/mtrr.c
@@ -51,8 +51,8 @@
#define OS_MTRRS 2
#define MTRRS (BIOS_MTRRS + OS_MTRRS)
/*
- * Static storage size for variable MTRRs. Its sized sufficiently large to
- * handle different types of CPUs. Empiricially, 16 variable MTRRs has not
+ * Static storage size for variable MTRRs. It's sized sufficiently large to
+ * handle different types of CPUs. Empirically, 16 variable MTRRs has not
* yet been observed.
*/
#define NUM_MTRR_STATIC_STORAGE 16
@@ -769,7 +769,7 @@ static void commit_var_mtrrs(const struct var_mtrr_solution *sol)
{
int i;
- /* Write out the variable MTTRs. */
+ /* Write out the variable MTRRs. */
disable_cache();
for (i = 0; i < sol->num_used; i++) {
wrmsr(MTRRphysBase_MSR(i), sol->regs[i].base);
@@ -778,6 +778,7 @@ static void commit_var_mtrrs(const struct var_mtrr_solution *sol)
/* Clear the ones that are unused. */
for (; i < total_mtrrs; i++)
clear_var_mtrr(i);
+ enable_var_mtrr(sol->mtrr_default_type);
enable_cache();
}
@@ -800,7 +801,6 @@ void x86_setup_var_mtrrs(unsigned int address_bits, unsigned int above4gb)
}
commit_var_mtrrs(sol);
- enable_var_mtrr(sol->mtrr_default_type);
}
void x86_setup_mtrrs(void)
Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6968
-gerrit
commit b16af3165bcd3eee77b4564b6c4a8bc56d6550de
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Tue Apr 22 10:48:29 2014 -0700
baytrail: Move HDA verb table to Intel SOC common directory
This is common code for Intel SOC that can be shared.
Change-Id: Ic703f36f56a8238d5cc1248b353d8c3a49827a9a
Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/196264
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
(cherry picked from commit 3a9057b9616c54a8404eee55511743d2492dbc28)
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
src/soc/intel/baytrail/Makefile.inc | 1 -
src/soc/intel/baytrail/baytrail/hda_verb.h | 39 -----
src/soc/intel/baytrail/hda.c | 2 +-
src/soc/intel/baytrail/hda_verb.c | 253 -----------------------------
src/soc/intel/common/Makefile.inc | 1 +
src/soc/intel/common/hda_verb.c | 253 +++++++++++++++++++++++++++++
src/soc/intel/common/hda_verb.h | 39 +++++
7 files changed, 294 insertions(+), 294 deletions(-)
diff --git a/src/soc/intel/baytrail/Makefile.inc b/src/soc/intel/baytrail/Makefile.inc
index f5c4c9f..94f3241 100644
--- a/src/soc/intel/baytrail/Makefile.inc
+++ b/src/soc/intel/baytrail/Makefile.inc
@@ -48,7 +48,6 @@ ramstage-y += stage_cache.c
romstage-y += stage_cache.c
ramstage-$(CONFIG_ELOG) += elog.c
ramstage-y += hda.c
-ramstage-y += hda_verb.c
# Remove as ramstage gets fleshed out
ramstage-y += placeholders.c
diff --git a/src/soc/intel/baytrail/baytrail/hda_verb.h b/src/soc/intel/baytrail/baytrail/hda_verb.h
deleted file mode 100644
index 9c505d6..0000000
--- a/src/soc/intel/baytrail/baytrail/hda_verb.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2013 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef BAYTRAIL_HDA_VERB_H
-#define BAYTRAIL_HDA_VERB_H
-
-#include <stdint.h>
-
-#define HDA_GCAP_REG 0x00
-#define HDA_GCTL_REG 0x08
-#define HDA_GCTL_CRST (1 << 0)
-#define HDA_STATESTS_REG 0x0e
-#define HDA_IC_REG 0x60
-#define HDA_IR_REG 0x64
-#define HDA_ICII_REG 0x68
-#define HDA_ICII_BUSY (1 << 0)
-#define HDA_ICII_VALID (1 << 1)
-
-int hda_codec_detect(u32 base);
-int hda_codec_write(u32 base, u32 size, const u32 *data);
-int hda_codec_init(u32 base, int addr, int verb_size, const u32 *verb_data);
-
-#endif
diff --git a/src/soc/intel/baytrail/hda.c b/src/soc/intel/baytrail/hda.c
index a99e743..c5de654 100644
--- a/src/soc/intel/baytrail/hda.c
+++ b/src/soc/intel/baytrail/hda.c
@@ -24,7 +24,7 @@
#include <device/pci_ids.h>
#include <reg_script.h>
-#include <baytrail/hda_verb.h>
+#include <soc/intel/common/hda_verb.h>
#include <baytrail/iomap.h>
#include <baytrail/iosf.h>
#include <baytrail/pci_devs.h>
diff --git a/src/soc/intel/baytrail/hda_verb.c b/src/soc/intel/baytrail/hda_verb.c
deleted file mode 100644
index ae71b89..0000000
--- a/src/soc/intel/baytrail/hda_verb.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2008 Advanced Micro Devices, Inc.
- * Copyright (C) 2008-2009 coresystems GmbH
- * Copyright (C) 2011 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <console/console.h>
-#include <arch/io.h>
-#include <delay.h>
-#include <baytrail/hda_verb.h>
-
-/**
- * Set bits in a register and wait for status
- */
-static int set_bits(u32 port, u32 mask, u32 val)
-{
- u32 reg32;
- int count;
-
- /* Write (val & mask) to port */
- val &= mask;
- reg32 = read32(port);
- reg32 &= ~mask;
- reg32 |= val;
- write32(port, reg32);
-
- /* Wait for readback of register to
- * match what was just written to it
- */
- count = 50;
- do {
- /* Wait 1ms based on BKDG wait time */
- mdelay(1);
- reg32 = read32(port);
- reg32 &= mask;
- } while ((reg32 != val) && --count);
-
- /* Timeout occurred */
- if (!count)
- return -1;
- return 0;
-}
-
-/**
- * Probe for supported codecs
- */
-int hda_codec_detect(u32 base)
-{
- u8 reg8;
-
- /* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
- if (set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, HDA_GCTL_CRST) < 0)
- goto no_codec;
-
- /* Write back the value once reset bit is set. */
- write16(base + HDA_GCAP_REG, read16(base + HDA_GCAP_REG));
-
- /* Read in Codec location (BAR + 0xe)[2..0]*/
- reg8 = read8(base + HDA_STATESTS_REG);
- reg8 &= 0x0f;
- if (!reg8)
- goto no_codec;
-
- return reg8;
-
-no_codec:
- /* Codec Not found */
- /* Put HDA back in reset (BAR + 0x8) [0] */
- set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, 0);
- printk(BIOS_DEBUG, "HDA: No codec!\n");
- return 0;
-}
-
-/**
- * Wait 50usec for the codec to indicate it is ready
- * no response would imply that the codec is non-operative
- */
-static int hda_wait_for_ready(u32 base)
-{
- /* Use a 50 usec timeout - the Linux kernel uses the
- * same duration */
-
- int timeout = 50;
-
- while(timeout--) {
- u32 reg32 = read32(base + HDA_ICII_REG);
- if (!(reg32 & HDA_ICII_BUSY))
- return 0;
- udelay(1);
- }
-
- return -1;
-}
-
-/**
- * Wait 50usec for the codec to indicate that it accepted
- * the previous command. No response would imply that the code
- * is non-operative
- */
-static int hda_wait_for_valid(u32 base)
-{
- u32 reg32;
-
- /* Send the verb to the codec */
- reg32 = read32(base + HDA_ICII_REG);
- reg32 |= HDA_ICII_BUSY | HDA_ICII_VALID;
- write32(base + HDA_ICII_REG, reg32);
-
- /* Use a 50 usec timeout - the Linux kernel uses the
- * same duration */
-
- int timeout = 50;
- while(timeout--) {
- reg32 = read32(base + HDA_ICII_REG);
- if ((reg32 & (HDA_ICII_VALID | HDA_ICII_BUSY)) ==
- HDA_ICII_VALID)
- return 0;
- udelay(1);
- }
-
- return -1;
-}
-
-/**
- * Find a specific entry within a verb table
- *
- * @verb_table_bytes: verb table size in bytes
- * @verb_table_data: verb table data
- * @viddid: vendor/device to search for
- * @verb_out: pointer to entry within table
- *
- * Returns size of the entry within the verb table,
- * Returns 0 if the entry is not found
- *
- * The HDA verb table is composed of dwords. A set of 4 dwords is
- * grouped together to form a "jack" descriptor.
- * Bits 31:28 - Codec Address
- * Bits 27:20 - NID
- * Bits 19:8 - Verb ID
- * Bits 7:0 - Payload
- *
- * coreboot groups different codec verb tables into a single table
- * and prefixes each with a specific header consisting of 3
- * dword entries:
- * 1 - Codec Vendor/Device ID
- * 2 - Subsystem ID
- * 3 - Number of jacks (groups of 4 dwords) for this codec
- */
-static u32 hda_find_verb(u32 verb_table_bytes,
- const u32 *verb_table_data,
- u32 viddid, const u32 ** verb)
-{
- int idx=0;
-
- while (idx < (verb_table_bytes / sizeof(u32))) {
- u32 verb_size = 4 * verb_table_data[idx+2]; // in u32
- if (verb_table_data[idx] != viddid) {
- idx += verb_size + 3; // skip verb + header
- continue;
- }
- *verb = &verb_table_data[idx+3];
- return verb_size;
- }
-
- /* Not all codecs need to load another verb */
- return 0;
-}
-
-/**
- * Write a supplied verb table
- */
-int hda_codec_write(u32 base, u32 size, const u32 *data)
-{
- int i;
-
- for (i = 0; i < size; i++) {
- if (hda_wait_for_ready(base) < 0)
- return -1;
-
- write32(base + HDA_IC_REG, data[i]);
-
- if (hda_wait_for_valid(base) < 0)
- return -1;
- }
-
- return 0;
-}
-
-/**
- * Initialize codec, then find the verb table and write it
- */
-int hda_codec_init(u32 base, int addr, int verb_size, const u32 *verb_data)
-{
- const u32 *verb;
- u32 reg32, size;
- int rc;
-
- printk(BIOS_DEBUG, "HDA: Initializing codec #%d\n", addr);
-
- if (!verb_size || !verb_data) {
- printk(BIOS_DEBUG, "HDA: No verb list!\n");
- return -1;
- }
-
- /* 1 */
- if (hda_wait_for_ready(base) < 0) {
- printk(BIOS_DEBUG, " codec not ready.\n");
- return -1;
- }
-
- reg32 = (addr << 28) | 0x000f0000;
- write32(base + HDA_IC_REG, reg32);
-
- if (hda_wait_for_valid(base) < 0) {
- printk(BIOS_DEBUG, " codec not valid.\n");
- return -1;
- }
-
- /* 2 */
- reg32 = read32(base + HDA_IR_REG);
- printk(BIOS_DEBUG, "HDA: codec viddid: %08x\n", reg32);
-
- size = hda_find_verb(verb_size, verb_data, reg32, &verb);
- if (!size) {
- printk(BIOS_DEBUG, "HDA: No verb table entry found\n");
- return -1;
- }
-
- /* 3 */
- rc = hda_codec_write(base, size, verb);
-
- if (rc < 0)
- printk(BIOS_DEBUG, "HDA: verb not loaded\n");
- else
- printk(BIOS_DEBUG, "HDA: verb loaded.\n");
-
- return rc;
-}
diff --git a/src/soc/intel/common/Makefile.inc b/src/soc/intel/common/Makefile.inc
index b32255a..0c39d80 100644
--- a/src/soc/intel/common/Makefile.inc
+++ b/src/soc/intel/common/Makefile.inc
@@ -1,3 +1,4 @@
+ramstage-y += hda_verb.c
ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += nvm.c
ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c
romstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c
diff --git a/src/soc/intel/common/hda_verb.c b/src/soc/intel/common/hda_verb.c
new file mode 100644
index 0000000..6404ee2
--- /dev/null
+++ b/src/soc/intel/common/hda_verb.c
@@ -0,0 +1,253 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008 Advanced Micro Devices, Inc.
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2011 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <arch/io.h>
+#include <delay.h>
+#include "hda_verb.h"
+
+/**
+ * Set bits in a register and wait for status
+ */
+static int set_bits(u32 port, u32 mask, u32 val)
+{
+ u32 reg32;
+ int count;
+
+ /* Write (val & mask) to port */
+ val &= mask;
+ reg32 = read32(port);
+ reg32 &= ~mask;
+ reg32 |= val;
+ write32(port, reg32);
+
+ /* Wait for readback of register to
+ * match what was just written to it
+ */
+ count = 50;
+ do {
+ /* Wait 1ms based on BKDG wait time */
+ mdelay(1);
+ reg32 = read32(port);
+ reg32 &= mask;
+ } while ((reg32 != val) && --count);
+
+ /* Timeout occurred */
+ if (!count)
+ return -1;
+ return 0;
+}
+
+/**
+ * Probe for supported codecs
+ */
+int hda_codec_detect(u32 base)
+{
+ u8 reg8;
+
+ /* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
+ if (set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, HDA_GCTL_CRST) < 0)
+ goto no_codec;
+
+ /* Write back the value once reset bit is set. */
+ write16(base + HDA_GCAP_REG, read16(base + HDA_GCAP_REG));
+
+ /* Read in Codec location (BAR + 0xe)[2..0]*/
+ reg8 = read8(base + HDA_STATESTS_REG);
+ reg8 &= 0x0f;
+ if (!reg8)
+ goto no_codec;
+
+ return reg8;
+
+no_codec:
+ /* Codec Not found */
+ /* Put HDA back in reset (BAR + 0x8) [0] */
+ set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, 0);
+ printk(BIOS_DEBUG, "HDA: No codec!\n");
+ return 0;
+}
+
+/**
+ * Wait 50usec for the codec to indicate it is ready
+ * no response would imply that the codec is non-operative
+ */
+static int hda_wait_for_ready(u32 base)
+{
+ /* Use a 50 usec timeout - the Linux kernel uses the
+ * same duration */
+
+ int timeout = 50;
+
+ while(timeout--) {
+ u32 reg32 = read32(base + HDA_ICII_REG);
+ if (!(reg32 & HDA_ICII_BUSY))
+ return 0;
+ udelay(1);
+ }
+
+ return -1;
+}
+
+/**
+ * Wait 50usec for the codec to indicate that it accepted
+ * the previous command. No response would imply that the code
+ * is non-operative
+ */
+static int hda_wait_for_valid(u32 base)
+{
+ u32 reg32;
+
+ /* Send the verb to the codec */
+ reg32 = read32(base + HDA_ICII_REG);
+ reg32 |= HDA_ICII_BUSY | HDA_ICII_VALID;
+ write32(base + HDA_ICII_REG, reg32);
+
+ /* Use a 50 usec timeout - the Linux kernel uses the
+ * same duration */
+
+ int timeout = 50;
+ while(timeout--) {
+ reg32 = read32(base + HDA_ICII_REG);
+ if ((reg32 & (HDA_ICII_VALID | HDA_ICII_BUSY)) ==
+ HDA_ICII_VALID)
+ return 0;
+ udelay(1);
+ }
+
+ return -1;
+}
+
+/**
+ * Find a specific entry within a verb table
+ *
+ * @verb_table_bytes: verb table size in bytes
+ * @verb_table_data: verb table data
+ * @viddid: vendor/device to search for
+ * @verb_out: pointer to entry within table
+ *
+ * Returns size of the entry within the verb table,
+ * Returns 0 if the entry is not found
+ *
+ * The HDA verb table is composed of dwords. A set of 4 dwords is
+ * grouped together to form a "jack" descriptor.
+ * Bits 31:28 - Codec Address
+ * Bits 27:20 - NID
+ * Bits 19:8 - Verb ID
+ * Bits 7:0 - Payload
+ *
+ * coreboot groups different codec verb tables into a single table
+ * and prefixes each with a specific header consisting of 3
+ * dword entries:
+ * 1 - Codec Vendor/Device ID
+ * 2 - Subsystem ID
+ * 3 - Number of jacks (groups of 4 dwords) for this codec
+ */
+static u32 hda_find_verb(u32 verb_table_bytes,
+ const u32 *verb_table_data,
+ u32 viddid, const u32 ** verb)
+{
+ int idx=0;
+
+ while (idx < (verb_table_bytes / sizeof(u32))) {
+ u32 verb_size = 4 * verb_table_data[idx+2]; // in u32
+ if (verb_table_data[idx] != viddid) {
+ idx += verb_size + 3; // skip verb + header
+ continue;
+ }
+ *verb = &verb_table_data[idx+3];
+ return verb_size;
+ }
+
+ /* Not all codecs need to load another verb */
+ return 0;
+}
+
+/**
+ * Write a supplied verb table
+ */
+int hda_codec_write(u32 base, u32 size, const u32 *data)
+{
+ int i;
+
+ for (i = 0; i < size; i++) {
+ if (hda_wait_for_ready(base) < 0)
+ return -1;
+
+ write32(base + HDA_IC_REG, data[i]);
+
+ if (hda_wait_for_valid(base) < 0)
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * Initialize codec, then find the verb table and write it
+ */
+int hda_codec_init(u32 base, int addr, int verb_size, const u32 *verb_data)
+{
+ const u32 *verb;
+ u32 reg32, size;
+ int rc;
+
+ printk(BIOS_DEBUG, "HDA: Initializing codec #%d\n", addr);
+
+ if (!verb_size || !verb_data) {
+ printk(BIOS_DEBUG, "HDA: No verb list!\n");
+ return -1;
+ }
+
+ /* 1 */
+ if (hda_wait_for_ready(base) < 0) {
+ printk(BIOS_DEBUG, " codec not ready.\n");
+ return -1;
+ }
+
+ reg32 = (addr << 28) | 0x000f0000;
+ write32(base + HDA_IC_REG, reg32);
+
+ if (hda_wait_for_valid(base) < 0) {
+ printk(BIOS_DEBUG, " codec not valid.\n");
+ return -1;
+ }
+
+ /* 2 */
+ reg32 = read32(base + HDA_IR_REG);
+ printk(BIOS_DEBUG, "HDA: codec viddid: %08x\n", reg32);
+
+ size = hda_find_verb(verb_size, verb_data, reg32, &verb);
+ if (!size) {
+ printk(BIOS_DEBUG, "HDA: No verb table entry found\n");
+ return -1;
+ }
+
+ /* 3 */
+ rc = hda_codec_write(base, size, verb);
+
+ if (rc < 0)
+ printk(BIOS_DEBUG, "HDA: verb not loaded\n");
+ else
+ printk(BIOS_DEBUG, "HDA: verb loaded.\n");
+
+ return rc;
+}
diff --git a/src/soc/intel/common/hda_verb.h b/src/soc/intel/common/hda_verb.h
new file mode 100644
index 0000000..a9c93c6
--- /dev/null
+++ b/src/soc/intel/common/hda_verb.h
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _COMMON_HDA_VERB_H_
+#define _COMMON_HDA_VERB_H_
+
+#include <stdint.h>
+
+#define HDA_GCAP_REG 0x00
+#define HDA_GCTL_REG 0x08
+#define HDA_GCTL_CRST (1 << 0)
+#define HDA_STATESTS_REG 0x0e
+#define HDA_IC_REG 0x60
+#define HDA_IR_REG 0x64
+#define HDA_ICII_REG 0x68
+#define HDA_ICII_BUSY (1 << 0)
+#define HDA_ICII_VALID (1 << 1)
+
+int hda_codec_detect(u32 base);
+int hda_codec_write(u32 base, u32 size, const u32 *data);
+int hda_codec_init(u32 base, int addr, int verb_size, const u32 *verb_data);
+
+#endif /* _COMMON_HDA_VERB_H_ */
Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6967
-gerrit
commit be796a928219d613fbe96bcbac704dcf08e2cbc2
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Tue Apr 22 10:46:06 2014 -0700
baytrail: Move MRC cache code to a common directory
This common code can be shared across Intel SOCs.
Change-Id: Id9ec4ccd3fc81cbab19a7d7e13bfa3975d9802d0
Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/196263
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
(cherry picked from commit f9919e2551b02056b83918d2e7b515b25541c583)
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
src/soc/intel/Kconfig | 1 +
src/soc/intel/baytrail/Kconfig | 16 --
src/soc/intel/baytrail/Makefile.inc | 4 +-
src/soc/intel/baytrail/baytrail/mrc_cache.h | 40 ----
src/soc/intel/baytrail/baytrail/nvm.h | 34 ---
src/soc/intel/baytrail/mrc_cache.c | 300 ---------------------------
src/soc/intel/baytrail/nvm.c | 82 --------
src/soc/intel/baytrail/romstage/raminit.c | 2 +-
src/soc/intel/common/Kconfig | 19 ++
src/soc/intel/common/Makefile.inc | 3 +
src/soc/intel/common/mrc_cache.c | 311 ++++++++++++++++++++++++++++
src/soc/intel/common/mrc_cache.h | 41 ++++
src/soc/intel/common/nvm.c | 82 ++++++++
src/soc/intel/common/nvm.h | 34 +++
14 files changed, 493 insertions(+), 476 deletions(-)
diff --git a/src/soc/intel/Kconfig b/src/soc/intel/Kconfig
index 3ddbf28..d8a5011 100644
--- a/src/soc/intel/Kconfig
+++ b/src/soc/intel/Kconfig
@@ -1,2 +1,3 @@
source src/soc/intel/baytrail/Kconfig
source src/soc/intel/fsp_baytrail/Kconfig
+source src/soc/intel/common/Kconfig
diff --git a/src/soc/intel/baytrail/Kconfig b/src/soc/intel/baytrail/Kconfig
index f36394e..da568b1 100644
--- a/src/soc/intel/baytrail/Kconfig
+++ b/src/soc/intel/baytrail/Kconfig
@@ -86,22 +86,6 @@ config MRC_RMT
bool "Enable MRC RMT training + debug prints"
default n
-config CACHE_MRC_SETTINGS
- bool "Save cached MRC settings"
- default n
-
-if CACHE_MRC_SETTINGS
-
-config MRC_SETTINGS_CACHE_BASE
- hex
- default 0xffb00000
-
-config MRC_SETTINGS_CACHE_SIZE
- hex
- default 0x10000
-
-endif # CACHE_MRC_SETTINGS
-
endif # HAVE_MRC
# Cache As RAM region layout:
diff --git a/src/soc/intel/baytrail/Makefile.inc b/src/soc/intel/baytrail/Makefile.inc
index ce1f243..f5c4c9f 100644
--- a/src/soc/intel/baytrail/Makefile.inc
+++ b/src/soc/intel/baytrail/Makefile.inc
@@ -1,6 +1,7 @@
subdirs-y += bootblock
subdirs-y += microcode
subdirs-y += romstage
+subdirs-y += ../common
subdirs-y += ../../../cpu/x86/lapic
subdirs-y += ../../../cpu/x86/mtrr
subdirs-y += ../../../cpu/x86/smm
@@ -13,9 +14,6 @@ romstage-y += memmap.c
ramstage-y += tsc_freq.c
romstage-y += tsc_freq.c
smm-y += tsc_freq.c
-ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += nvm.c
-ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c
-romstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c
ramstage-y += spi.c
smm-y += spi.c
ramstage-y += chip.c
diff --git a/src/soc/intel/baytrail/baytrail/mrc_cache.h b/src/soc/intel/baytrail/baytrail/mrc_cache.h
deleted file mode 100644
index 6791ec4..0000000
--- a/src/soc/intel/baytrail/baytrail/mrc_cache.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2013 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef _MRC_CACHE_H_
-#define _MRC_CACHE_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-/* Wrapper object to save MRC information. */
-struct mrc_saved_data {
- uint32_t signature;
- uint32_t size;
- uint32_t checksum;
- uint32_t reserved;
- uint8_t data[0];
-} __attribute__((packed));
-
-/* Locate the most recently saved MRC data. */
-int mrc_cache_get_current(const struct mrc_saved_data **cache);
-
-/* Stash the resulting MRC data to be saved in non-volatile storage later. */
-int mrc_cache_stash_data(void *data, size_t size);
-#endif /* _MRC_CACHE_H_ */
diff --git a/src/soc/intel/baytrail/baytrail/nvm.h b/src/soc/intel/baytrail/baytrail/nvm.h
deleted file mode 100644
index d0cbf7b..0000000
--- a/src/soc/intel/baytrail/baytrail/nvm.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2013 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef _NVM_H_
-#define _NVM_H_
-
-#include <stddef.h>
-
-/* Determine if area is erased. returns 1 if erased. 0 otherwise. */
-int nvm_is_erased(const void *start, size_t size);
-
-/* Erase region according to start and size. Returns < 0 on error else 0. */
-int nvm_erase(void *start, size_t size);
-
-/* Write data to NVM. Returns 0 on success < 0 on error. */
-int nvm_write(void *start, const void *data, size_t size);
-
-#endif /* _NVM_H_ */
diff --git a/src/soc/intel/baytrail/mrc_cache.c b/src/soc/intel/baytrail/mrc_cache.c
deleted file mode 100644
index f12f3ef..0000000
--- a/src/soc/intel/baytrail/mrc_cache.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2013 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <string.h>
-#include <console/console.h>
-#include <cbmem.h>
-#include <ip_checksum.h>
-#if CONFIG_CHROMEOS
-#include <vendorcode/google/chromeos/fmap.h>
-#endif
-#include <baytrail/mrc_cache.h>
-
-#define MRC_DATA_ALIGN 0x1000
-#define MRC_DATA_SIGNATURE (('M'<<0)|('R'<<8)|('C'<<16)|('D'<<24))
-
-/* The mrc_data_region describes the larger non-volatile area to store
- * mrc_saved_data objects.*/
-struct mrc_data_region {
- void *base;
- uint32_t size;
-};
-
-/* common code */
-static int mrc_cache_get_region(struct mrc_data_region *region)
-{
-#if CONFIG_CHROMEOS
- int ret;
- ret = find_fmap_entry("RW_MRC_CACHE", ®ion->base);
- if (ret >= 0) {
- region->size = ret;
- return 0;
- }
-#endif
- region->base = (void *)CONFIG_MRC_SETTINGS_CACHE_BASE;
- region->size = CONFIG_MRC_SETTINGS_CACHE_SIZE;
- return 0;
-}
-
-static int mrc_cache_in_region(const struct mrc_data_region *region,
- const struct mrc_saved_data *cache)
-{
- uintptr_t region_end;
- uintptr_t cache_end;
-
- if ((uintptr_t)cache < (uintptr_t)region->base)
- return 0;
-
- region_end = (uintptr_t)region->base;
- region_end += region->size;
-
- if ((uintptr_t)cache >= region_end)
- return 0;
-
- if ((sizeof(*cache) + (uintptr_t)cache) >= region_end)
- return 0;
-
- cache_end = (uintptr_t)cache;
- cache_end += cache->size + sizeof(*cache);
-
- if (cache_end > region_end)
- return 0;
-
- return 1;
-}
-
-static int mrc_cache_valid(const struct mrc_data_region *region,
- const struct mrc_saved_data *cache)
-{
- uint32_t checksum;
-
- if (cache->signature != MRC_DATA_SIGNATURE)
- return 0;
-
- if (cache->size > region->size)
- return 0;
-
- if (cache->reserved != 0)
- return 0;
-
- checksum = compute_ip_checksum((void *)&cache->data[0], cache->size);
-
- if (cache->checksum != checksum)
- return 0;
-
- return 1;
-}
-
-static const struct mrc_saved_data *
-next_cache_block(const struct mrc_saved_data *cache)
-{
- uintptr_t next = (uintptr_t)cache;
-
- next += ALIGN(cache->size + sizeof(*cache), MRC_DATA_ALIGN);
-
- return (const struct mrc_saved_data *)next;
-}
-
-/* Locate the most recently saved MRC data. */
-static int __mrc_cache_get_current(const struct mrc_data_region *region,
- const struct mrc_saved_data **cache)
-{
- const struct mrc_saved_data *msd;
- const struct mrc_saved_data *verified_cache;
-
- msd = region->base;
-
- verified_cache = NULL;
-
- while (mrc_cache_in_region(region, msd) &&
- mrc_cache_valid(region, msd)) {
- verified_cache = msd;
- msd = next_cache_block(msd);
- }
-
- if (verified_cache == NULL)
- return -1;
-
- *cache = verified_cache;
- return 0;
-}
-
-int mrc_cache_get_current(const struct mrc_saved_data **cache)
-{
- struct mrc_data_region region;
-
- if (mrc_cache_get_region(®ion) < 0)
- return -1;
-
- return __mrc_cache_get_current(®ion, cache);
-}
-
-#if defined(__PRE_RAM__)
-/* romstage code */
-
-/* Fill in mrc_saved_data structure with payload. */
-static void mrc_cache_fill(struct mrc_saved_data *cache, void *data,
- size_t size)
-{
- cache->signature = MRC_DATA_SIGNATURE;
- cache->size = size;
- cache->reserved = 0;
- memcpy(&cache->data[0], data, size);
- cache->checksum = compute_ip_checksum((void *)&cache->data[0],
- cache->size);
-}
-
-int mrc_cache_stash_data(void *data, size_t size)
-{
- int cbmem_size;
- struct mrc_saved_data *cache;
-
- cbmem_size = sizeof(*cache) + ALIGN(size, 16);
-
- cache = cbmem_add(CBMEM_ID_MRCDATA, cbmem_size);
-
- if (cache == NULL) {
- printk(BIOS_ERR, "No space in cbmem for MRC data.\n");
- return -1;
- }
-
- /* Clear alignment padding bytes at end of data. */
- memset(&cache->data[size], 0, cbmem_size - size - sizeof(*cache));
-
- printk(BIOS_DEBUG, "Relocate MRC DATA from %p to %p (%zu bytes)\n",
- data, cache, size);
-
- mrc_cache_fill(cache, data, size);
-
- return 0;
-}
-
-#else
-/* ramstage code */
-#include <bootstate.h>
-#include <baytrail/nvm.h>
-
-static int mrc_slot_valid(const struct mrc_data_region *region,
- const struct mrc_saved_data *slot,
- const struct mrc_saved_data *to_save)
-{
- uintptr_t region_begin;
- uintptr_t region_end;
- uintptr_t slot_end;
- uintptr_t slot_begin;
- uint32_t size;
-
- region_begin = (uintptr_t)region->base;
- region_end = region_begin + region->size;
- slot_begin = (uintptr_t)slot;
- size = to_save->size + sizeof(*to_save);
- slot_end = slot_begin + size;
-
- if (slot_begin < region_begin || slot_begin >= region_end)
- return 0;
-
- if (size > region->size)
- return 0;
-
- if (slot_end > region_end || slot_end < region_begin)
- return 0;
-
- if (!nvm_is_erased(slot, size))
- return 0;
-
- return 1;
-}
-
-static const struct mrc_saved_data *
-mrc_cache_next_slot(const struct mrc_data_region *region,
- const struct mrc_saved_data *current_slot)
-{
- const struct mrc_saved_data *next_slot;
-
- if (current_slot == NULL) {
- next_slot = region->base;
- } else {
- next_slot = next_cache_block(current_slot);
- }
-
- return next_slot;
-}
-
-static void update_mrc_cache(void *unused)
-{
- const struct mrc_saved_data *current_boot;
- const struct mrc_saved_data *current_saved;
- const struct mrc_saved_data *next_slot;
- struct mrc_data_region region;
-
- printk(BIOS_DEBUG, "Updating MRC cache data.\n");
-
- current_boot = cbmem_find(CBMEM_ID_MRCDATA);
- if (!current_boot) {
- printk(BIOS_ERR, "No MRC cache in cbmem.\n");
- return;
- }
-
- if (mrc_cache_get_region(®ion)) {
- printk(BIOS_ERR, "Could not obtain MRC cache region.\n");
- return;
- }
-
- if (!mrc_cache_valid(®ion, current_boot)) {
- printk(BIOS_ERR, "MRC cache data in cbmem invalid.\n");
- return;
- }
-
- current_saved = NULL;
-
- if (!__mrc_cache_get_current(®ion, ¤t_saved)) {
- if (current_saved->size == current_boot->size &&
- !memcmp(¤t_saved->data[0], ¤t_boot->data[0],
- current_saved->size)) {
- printk(BIOS_DEBUG, "MRC cache up to date.\n");
- return;
- }
- }
-
- next_slot = mrc_cache_next_slot(®ion, current_saved);
-
- if (!mrc_slot_valid(®ion, next_slot, current_boot)) {
- printk(BIOS_DEBUG, "Slot @ %p is invalid.\n", next_slot);
- if (!nvm_is_erased(region.base, region.size)) {
- if (nvm_erase(region.base, region.size) < 0) {
- printk(BIOS_DEBUG, "Failure erasing region.\n");
- return;
- }
- }
- next_slot = region.base;
- }
-
- if (nvm_write((void *)next_slot, current_boot,
- current_boot->size + sizeof(*current_boot))) {
- printk(BIOS_DEBUG, "Failure writing MRC cache to %p.\n",
- next_slot);
- }
-}
-
-BOOT_STATE_INIT_ENTRIES(mrc_cache_update) = {
- BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_ENTRY,
- update_mrc_cache, NULL),
-};
-
-#endif /* defined(__PRE_RAM__) */
diff --git a/src/soc/intel/baytrail/nvm.c b/src/soc/intel/baytrail/nvm.c
deleted file mode 100644
index 0cd42cc..0000000
--- a/src/soc/intel/baytrail/nvm.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2013 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <stdint.h>
-#include <stddef.h>
-#include <console/console.h>
-#include <string.h>
-#include <spi-generic.h>
-#include <spi_flash.h>
-#include <baytrail/nvm.h>
-
-/* This module assumes the flash is memory mapped just below 4GiB in the
- * address space for reading. Also this module assumes an area it erased
- * when all bytes read as all 0xff's. */
-
-static struct spi_flash *flash;
-
-static int nvm_init(void)
-{
- if (flash != NULL)
- return 0;
-
- spi_init();
- flash = spi_flash_probe(0, 0);
- if (!flash) {
- printk(BIOS_DEBUG, "Could not find SPI device\n");
- return -1;
- }
-
- return 0;
-}
-
-/* Convert memory mapped pointer to flash offset. */
-static inline uint32_t to_flash_offset(void *p)
-{
- return CONFIG_ROM_SIZE + (uintptr_t)p;
-}
-
-int nvm_is_erased(const void *start, size_t size)
-{
- const uint8_t *cur = start;
- const uint8_t erased_value = 0xff;
-
- while (size > 0) {
- if (*cur != erased_value)
- return 0;
- cur++;
- size--;
- }
- return 1;
-}
-
-int nvm_erase(void *start, size_t size)
-{
- if (nvm_init() < 0)
- return -1;
- return flash->erase(flash, to_flash_offset(start), size);
-}
-
-/* Write data to NVM. Returns 0 on success < 0 on error. */
-int nvm_write(void *start, const void *data, size_t size)
-{
- if (nvm_init() < 0)
- return -1;
- return flash->write(flash, to_flash_offset(start), size, data);
-}
diff --git a/src/soc/intel/baytrail/romstage/raminit.c b/src/soc/intel/baytrail/romstage/raminit.c
index a18f312..d5ee031 100644
--- a/src/soc/intel/baytrail/romstage/raminit.c
+++ b/src/soc/intel/baytrail/romstage/raminit.c
@@ -26,7 +26,7 @@
#include <console/console.h>
#include <device/pci_def.h>
#include <baytrail/gpio.h>
-#include <baytrail/mrc_cache.h>
+#include <soc/intel/common/mrc_cache.h>
#include <baytrail/iomap.h>
#include <baytrail/iosf.h>
#include <baytrail/pci_devs.h>
diff --git a/src/soc/intel/common/Kconfig b/src/soc/intel/common/Kconfig
new file mode 100644
index 0000000..8b02a4a
--- /dev/null
+++ b/src/soc/intel/common/Kconfig
@@ -0,0 +1,19 @@
+if HAVE_MRC
+
+config CACHE_MRC_SETTINGS
+ bool "Save cached MRC settings"
+ default n
+
+if CACHE_MRC_SETTINGS
+
+config MRC_SETTINGS_CACHE_BASE
+ hex
+ default 0xffb00000
+
+config MRC_SETTINGS_CACHE_SIZE
+ hex
+ default 0x10000
+
+endif # CACHE_MRC_SETTINGS
+
+endif # HAVE_MRC
diff --git a/src/soc/intel/common/Makefile.inc b/src/soc/intel/common/Makefile.inc
new file mode 100644
index 0000000..b32255a
--- /dev/null
+++ b/src/soc/intel/common/Makefile.inc
@@ -0,0 +1,3 @@
+ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += nvm.c
+ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c
+romstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c
diff --git a/src/soc/intel/common/mrc_cache.c b/src/soc/intel/common/mrc_cache.c
new file mode 100644
index 0000000..8f0d18f
--- /dev/null
+++ b/src/soc/intel/common/mrc_cache.c
@@ -0,0 +1,311 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <string.h>
+#include <console/console.h>
+#include <cbmem.h>
+#include <ip_checksum.h>
+#if CONFIG_CHROMEOS
+#include <vendorcode/google/chromeos/fmap.h>
+#endif
+#include "mrc_cache.h"
+
+#define MRC_DATA_ALIGN 0x1000
+#define MRC_DATA_SIGNATURE (('M'<<0)|('R'<<8)|('C'<<16)|('D'<<24))
+
+/* The mrc_data_region describes the larger non-volatile area to store
+ * mrc_saved_data objects.*/
+struct mrc_data_region {
+ void *base;
+ uint32_t size;
+};
+
+/* common code */
+static int mrc_cache_get_region(struct mrc_data_region *region)
+{
+#if CONFIG_CHROMEOS
+ int ret;
+ ret = find_fmap_entry("RW_MRC_CACHE", ®ion->base);
+ if (ret >= 0) {
+ region->size = ret;
+ return 0;
+ }
+#endif
+ region->base = (void *)CONFIG_MRC_SETTINGS_CACHE_BASE;
+ region->size = CONFIG_MRC_SETTINGS_CACHE_SIZE;
+ return 0;
+}
+
+static int mrc_cache_in_region(const struct mrc_data_region *region,
+ const struct mrc_saved_data *cache)
+{
+ uintptr_t region_end;
+ uintptr_t cache_end;
+
+ if ((uintptr_t)cache < (uintptr_t)region->base)
+ return 0;
+
+ region_end = (uintptr_t)region->base;
+ region_end += region->size;
+
+ if ((uintptr_t)cache >= region_end)
+ return 0;
+
+ if ((sizeof(*cache) + (uintptr_t)cache) >= region_end)
+ return 0;
+
+ cache_end = (uintptr_t)cache;
+ cache_end += cache->size + sizeof(*cache);
+
+ if (cache_end > region_end)
+ return 0;
+
+ return 1;
+}
+
+static int mrc_cache_valid(const struct mrc_data_region *region,
+ const struct mrc_saved_data *cache)
+{
+ uint32_t checksum;
+
+ if (cache->signature != MRC_DATA_SIGNATURE)
+ return 0;
+
+ if (cache->size > region->size)
+ return 0;
+
+ if (cache->reserved != 0)
+ return 0;
+
+ checksum = compute_ip_checksum((void *)&cache->data[0], cache->size);
+
+ if (cache->checksum != checksum)
+ return 0;
+
+ return 1;
+}
+
+static const struct mrc_saved_data *
+next_cache_block(const struct mrc_saved_data *cache)
+{
+ uintptr_t next = (uintptr_t)cache;
+
+ next += ALIGN(cache->size + sizeof(*cache), MRC_DATA_ALIGN);
+
+ return (const struct mrc_saved_data *)next;
+}
+
+/* Locate the most recently saved MRC data. */
+static int __mrc_cache_get_current(const struct mrc_data_region *region,
+ const struct mrc_saved_data **cache)
+{
+ const struct mrc_saved_data *msd;
+ const struct mrc_saved_data *verified_cache;
+ int slot = 0;
+
+ msd = region->base;
+
+ verified_cache = NULL;
+
+ while (mrc_cache_in_region(region, msd) &&
+ mrc_cache_valid(region, msd)) {
+ verified_cache = msd;
+ msd = next_cache_block(msd);
+ slot++;
+ }
+
+ if (verified_cache == NULL)
+ return -1;
+
+ *cache = verified_cache;
+ printk(BIOS_DEBUG, "MRC cache slot %d @ %p\n", slot-1, verified_cache);
+
+ return 0;
+}
+
+int mrc_cache_get_current(const struct mrc_saved_data **cache)
+{
+ struct mrc_data_region region;
+
+ if (mrc_cache_get_region(®ion) < 0)
+ return -1;
+
+ return __mrc_cache_get_current(®ion, cache);
+}
+
+#if defined(__PRE_RAM__)
+
+/*
+ * romstage code
+ */
+
+/* Fill in mrc_saved_data structure with payload. */
+static void mrc_cache_fill(struct mrc_saved_data *cache, void *data,
+ size_t size)
+{
+ cache->signature = MRC_DATA_SIGNATURE;
+ cache->size = size;
+ cache->reserved = 0;
+ memcpy(&cache->data[0], data, size);
+ cache->checksum = compute_ip_checksum((void *)&cache->data[0],
+ cache->size);
+}
+
+int mrc_cache_stash_data(void *data, size_t size)
+{
+ int cbmem_size;
+ struct mrc_saved_data *cache;
+
+ cbmem_size = sizeof(*cache) + ALIGN(size, 16);
+
+ cache = cbmem_add(CBMEM_ID_MRCDATA, cbmem_size);
+
+ if (cache == NULL) {
+ printk(BIOS_ERR, "No space in cbmem for MRC data.\n");
+ return -1;
+ }
+
+ /* Clear alignment padding bytes at end of data. */
+ memset(&cache->data[size], 0, cbmem_size - size - sizeof(*cache));
+
+ printk(BIOS_DEBUG, "Relocate MRC DATA from %p to %p (%zu bytes)\n",
+ data, cache, size);
+
+ mrc_cache_fill(cache, data, size);
+
+ return 0;
+}
+
+#else
+
+/*
+ * ramstage code
+ */
+
+#include <bootstate.h>
+#include "nvm.h"
+
+static int mrc_slot_valid(const struct mrc_data_region *region,
+ const struct mrc_saved_data *slot,
+ const struct mrc_saved_data *to_save)
+{
+ uintptr_t region_begin;
+ uintptr_t region_end;
+ uintptr_t slot_end;
+ uintptr_t slot_begin;
+ uint32_t size;
+
+ region_begin = (uintptr_t)region->base;
+ region_end = region_begin + region->size;
+ slot_begin = (uintptr_t)slot;
+ size = to_save->size + sizeof(*to_save);
+ slot_end = slot_begin + size;
+
+ if (slot_begin < region_begin || slot_begin >= region_end)
+ return 0;
+
+ if (size > region->size)
+ return 0;
+
+ if (slot_end > region_end || slot_end < region_begin)
+ return 0;
+
+ if (!nvm_is_erased(slot, size))
+ return 0;
+
+ return 1;
+}
+
+static const struct mrc_saved_data *
+mrc_cache_next_slot(const struct mrc_data_region *region,
+ const struct mrc_saved_data *current_slot)
+{
+ const struct mrc_saved_data *next_slot;
+
+ if (current_slot == NULL) {
+ next_slot = region->base;
+ } else {
+ next_slot = next_cache_block(current_slot);
+ }
+
+ return next_slot;
+}
+
+static void update_mrc_cache(void *unused)
+{
+ const struct mrc_saved_data *current_boot;
+ const struct mrc_saved_data *current_saved;
+ const struct mrc_saved_data *next_slot;
+ struct mrc_data_region region;
+
+ printk(BIOS_DEBUG, "Updating MRC cache data.\n");
+
+ current_boot = cbmem_find(CBMEM_ID_MRCDATA);
+ if (!current_boot) {
+ printk(BIOS_ERR, "No MRC cache in cbmem.\n");
+ return;
+ }
+
+ if (mrc_cache_get_region(®ion)) {
+ printk(BIOS_ERR, "Could not obtain MRC cache region.\n");
+ return;
+ }
+
+ if (!mrc_cache_valid(®ion, current_boot)) {
+ printk(BIOS_ERR, "MRC cache data in cbmem invalid.\n");
+ return;
+ }
+
+ current_saved = NULL;
+
+ if (!__mrc_cache_get_current(®ion, ¤t_saved)) {
+ if (current_saved->size == current_boot->size &&
+ !memcmp(¤t_saved->data[0], ¤t_boot->data[0],
+ current_saved->size)) {
+ printk(BIOS_DEBUG, "MRC cache up to date.\n");
+ return;
+ }
+ }
+
+ next_slot = mrc_cache_next_slot(®ion, current_saved);
+
+ if (!mrc_slot_valid(®ion, next_slot, current_boot)) {
+ printk(BIOS_DEBUG, "Slot @ %p is invalid.\n", next_slot);
+ if (!nvm_is_erased(region.base, region.size)) {
+ if (nvm_erase(region.base, region.size) < 0) {
+ printk(BIOS_DEBUG, "Failure erasing region.\n");
+ return;
+ }
+ }
+ next_slot = region.base;
+ }
+
+ if (nvm_write((void *)next_slot, current_boot,
+ current_boot->size + sizeof(*current_boot))) {
+ printk(BIOS_DEBUG, "Failure writing MRC cache to %p.\n",
+ next_slot);
+ }
+}
+
+BOOT_STATE_INIT_ENTRIES(mrc_cache_update) = {
+ BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_ENTRY,
+ update_mrc_cache, NULL),
+};
+
+#endif /* defined(__PRE_RAM__) */
diff --git a/src/soc/intel/common/mrc_cache.h b/src/soc/intel/common/mrc_cache.h
new file mode 100644
index 0000000..14767e5
--- /dev/null
+++ b/src/soc/intel/common/mrc_cache.h
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _COMMON_MRC_CACHE_H_
+#define _COMMON_MRC_CACHE_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+/* Wrapper object to save MRC information. */
+struct mrc_saved_data {
+ uint32_t signature;
+ uint32_t size;
+ uint32_t checksum;
+ uint32_t reserved;
+ uint8_t data[0];
+} __attribute__((packed));
+
+/* Locate the most recently saved MRC data. */
+int mrc_cache_get_current(const struct mrc_saved_data **cache);
+
+/* Stash the resulting MRC data to be saved in non-volatile storage later. */
+int mrc_cache_stash_data(void *data, size_t size);
+
+#endif /* _COMMON_MRC_CACHE_H_ */
diff --git a/src/soc/intel/common/nvm.c b/src/soc/intel/common/nvm.c
new file mode 100644
index 0000000..791422f
--- /dev/null
+++ b/src/soc/intel/common/nvm.c
@@ -0,0 +1,82 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdint.h>
+#include <stddef.h>
+#include <console/console.h>
+#include <string.h>
+#include <spi-generic.h>
+#include <spi_flash.h>
+#include "nvm.h"
+
+/* This module assumes the flash is memory mapped just below 4GiB in the
+ * address space for reading. Also this module assumes an area it erased
+ * when all bytes read as all 0xff's. */
+
+static struct spi_flash *flash;
+
+static int nvm_init(void)
+{
+ if (flash != NULL)
+ return 0;
+
+ spi_init();
+ flash = spi_flash_probe(0, 0);
+ if (!flash) {
+ printk(BIOS_DEBUG, "Could not find SPI device\n");
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Convert memory mapped pointer to flash offset. */
+static inline uint32_t to_flash_offset(void *p)
+{
+ return CONFIG_ROM_SIZE + (uintptr_t)p;
+}
+
+int nvm_is_erased(const void *start, size_t size)
+{
+ const uint8_t *cur = start;
+ const uint8_t erased_value = 0xff;
+
+ while (size > 0) {
+ if (*cur != erased_value)
+ return 0;
+ cur++;
+ size--;
+ }
+ return 1;
+}
+
+int nvm_erase(void *start, size_t size)
+{
+ if (nvm_init() < 0)
+ return -1;
+ return flash->erase(flash, to_flash_offset(start), size);
+}
+
+/* Write data to NVM. Returns 0 on success < 0 on error. */
+int nvm_write(void *start, const void *data, size_t size)
+{
+ if (nvm_init() < 0)
+ return -1;
+ return flash->write(flash, to_flash_offset(start), size, data);
+}
diff --git a/src/soc/intel/common/nvm.h b/src/soc/intel/common/nvm.h
new file mode 100644
index 0000000..d332d83
--- /dev/null
+++ b/src/soc/intel/common/nvm.h
@@ -0,0 +1,34 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _COMMON_NVM_H_
+#define _COMMON_NVM_H_
+
+#include <stddef.h>
+
+/* Determine if area is erased. returns 1 if erased. 0 otherwise. */
+int nvm_is_erased(const void *start, size_t size);
+
+/* Erase region according to start and size. Returns < 0 on error else 0. */
+int nvm_erase(void *start, size_t size);
+
+/* Write data to NVM. Returns 0 on success < 0 on error. */
+int nvm_write(void *start, const void *data, size_t size);
+
+#endif /* _COMMON_NVM_H_ */
the following patch was just integrated into master:
commit 7756fe70eb568e1429e244306be9401357cefa43
Author: Gabe Black <gabeblack(a)google.com>
Date: Tue Feb 25 01:40:34 2014 -0800
x86: Minimize work done with the caches disabled in mtrr functions.
The code in src/cpu/x86/mtrr/mtrr.c disables caching in a few places when
changing mtrr settings. While I can't find anything that says that's actually
required, I can believe it's necessary. With that said, other code around the
wrmsr instructions which actually modify the settings should be able to run
with caching enabled with no ill effects.
This is particularly true for two calls to printk, one in the fixed mtrr code
and one in the variable, which could result in an arbitrary amount of work
being done without caching. When changing the implementation of the cbmem
console, these two printks caused a significant regression in boot performance
on link of about 70ms which is about 10% of total firmware boot time. When the
window where the cache is disabled is minimized, both this and the new
implementation were about 30ms faster than the original boot time.
For the variable MTRRs, we now store what we want to set the MSRs to and then
write them all at once at the end of commit_var_mtrrs(). This way we don't
have some set and some not, but we still minimize the time we spend with the
caches disabled.
Change-Id: I5139b262bd2d13f79afd88e2e2c0f514fb3e27c9
Signed-off-by: Gabe Black <gabeblack(a)google.com>
Reviewed-on: https://chromium-review.googlesource.com/187811
Reviewed-by: Ronald Minnich <rminnich(a)chromium.org>
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Commit-Queue: Gabe Black <gabeblack(a)chromium.org>
Tested-by: Gabe Black <gabeblack(a)chromium.org>
(cherry picked from commit 31529d6d965676c6cedeb62137eabc26819956fc)
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
Reviewed-on: http://review.coreboot.org/6952
Tested-by: build bot (Jenkins)
Reviewed-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
See http://review.coreboot.org/6952 for details.
-gerrit
Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6966
-gerrit
commit 058849ecca03a04d8b6244fcd239e670464ba1c7
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Thu May 1 09:07:53 2014 -0700
broadwell: Update D0 microcode to FFFF000E
New microcode released this week.
Change-Id: I426d0e00d1c03650049cbe033b53a909a7d944c9
Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/198896
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
(cherry picked from commit 63ec6438b566d14a2b878474ca068cf70d9aa9d6)
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
.../microcode/microcode-MC0306D3_FFFF000D.h | 960 ------------------
.../microcode/microcode-MC0306D3_FFFF000E.h | 1024 ++++++++++++++++++++
src/soc/intel/broadwell/microcode/microcode_blob.h | 2 +-
3 files changed, 1025 insertions(+), 961 deletions(-)
diff --git a/src/soc/intel/broadwell/microcode/microcode-MC0306D3_FFFF000D.h b/src/soc/intel/broadwell/microcode/microcode-MC0306D3_FFFF000D.h
deleted file mode 100644
index 8f41a6b..0000000
--- a/src/soc/intel/broadwell/microcode/microcode-MC0306D3_FFFF000D.h
+++ /dev/null
@@ -1,960 +0,0 @@
- 0x00000001, 0xffff000d, 0x04102014, 0x000306d3,
- 0xd5751e1f, 0x00000001, 0x000000c0, 0x00003bd0,
- 0x00003c00, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x000000a1, 0x00020001, 0xffff000d,
- 0x00000000, 0x00000ed1, 0x20140410, 0x00000ed1,
- 0x00000001, 0x000306d3, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
- 0xfd619f8d, 0x1f3ddfc9, 0x1a220633, 0x74f80c15,
- 0x34ad7ecf, 0x1631677e, 0x87f10b8f, 0x3d6b9b79,
- 0xe1d4113f, 0xc3085503, 0x1367060c, 0x9bf7efea,
- 0x2b756eb6, 0x2ee07b69, 0x7cfd1dc4, 0x9811c8b2,
- 0x86cf4036, 0x20534caf, 0x37046580, 0x432b4e6c,
- 0x6a3a2e54, 0x88a74dfc, 0x81a503f6, 0x67736b51,
- 0xbc2b11b7, 0xbcf3adc9, 0x96c8eefe, 0x688bcc49,
- 0x16c4f996, 0xe0175cd2, 0x454d7a58, 0xa67afd13,
- 0x098d9e42, 0xf86d2ec2, 0x738a67a6, 0x26c4ad17,
- 0x08666776, 0x050d971d, 0x68998a7c, 0x21ac9cf9,
- 0x29e27b61, 0xd61cfd7d, 0x3500ff83, 0xd4123687,
- 0x27b72496, 0xe9b867f6, 0x62920d71, 0xe159dd34,
- 0x3991c6ba, 0x367a5719, 0x7af5e9df, 0x5cb9fd11,
- 0xf5988469, 0x4153f210, 0x24b194a9, 0x8c563988,
- 0xac5bfd38, 0xd271e693, 0x16e9b292, 0x0c6583d0,
- 0xd2501a4f, 0x9896af00, 0x6665aa9f, 0x0f3a8de9,
- 0xc8f0db5f, 0x60b7a546, 0xe3a52963, 0x0ea3eb39,
- 0x0d8c08ab, 0x2f5faa26, 0x1d3cbd56, 0xa8596256,
- 0x00000011, 0x7dcc88cf, 0x0902af39, 0xb44d1c1f,
- 0x3e1049a9, 0x7588d51b, 0x796eaabe, 0x3db19fce,
- 0xa1369590, 0xfc8484c3, 0x829d6097, 0x6238d557,
- 0x9c8911f6, 0x61aa5434, 0x4412f8de, 0xcd8fb89a,
- 0xcd4b8bc2, 0xba545c64, 0xc8ae7f5e, 0x66e242b1,
- 0xa298e161, 0x5b95e50b, 0x3b9c99ce, 0x0b5ba78b,
- 0xd405126d, 0x93f08120, 0x16b6253e, 0xd40c1a84,
- 0xf544baa9, 0x710082ad, 0x9bdd9150, 0xf38930d4,
- 0xeae555a4, 0x647330a3, 0x3ad7eadd, 0x7ffc7de4,
- 0xc2c533e7, 0x516771b6, 0x2831d2e9, 0x32fa23b4,
- 0x5bd3ae89, 0x7471b30c, 0x5295c4dc, 0x3a9df604,
- 0x6a70ce22, 0xa6484ac0, 0xd1e48a26, 0xabd97c27,
- 0x82ccdb5c, 0x634016ec, 0x4822c821, 0x92f06cdd,
- 0xed869dea, 0x00f3be65, 0xb4501303, 0x981480f2,
- 0xd20656ee, 0x004e9c3d, 0xe7df1021, 0x719549a8,
- 0xe7915318, 0x09a27ded, 0x7f485d31, 0xa5358273,
- 0x295f9aad, 0xd5d835e3, 0xf9ef8f73, 0xa80be2e1,
- 0x04a973c9, 0xb99f47f1, 0x99496ec7, 0x509e05df,
- 0xc25ae410, 0x3c55e466, 0xa466514a, 0xbaf50114,
- 0x02516eec, 0x55429251, 0x35d6e978, 0xf4b084e0,
- 0xef522588, 0x1566a573, 0xdab30ba3, 0xd62c460d,
- 0x3229bc4d, 0xee82bb0a, 0x579b99b9, 0xfbf0df96,
- 0x24d71eb5, 0xb4726d43, 0xe149157a, 0x695dee99,
- 0x2c4f77a0, 0xa9b742fe, 0xff5e5076, 0x6ca7129f,
- 0xde05773d, 0x0ecffbd6, 0x44d088f3, 0xa7355824,
- 0xc7f2d772, 0xa6f31b8b, 0x1fc0d02b, 0x5b1cffba,
- 0x86722ce0, 0xf4a73732, 0x4cd04c54, 0xe8a1f6a2,
- 0xe57ce1f2, 0x1c677824, 0xf4150acc, 0xe7c5f5fa,
- 0x70f2878b, 0x28f9a79e, 0x2a2e696b, 0xd322245d,
- 0xcb60d03a, 0xff3d24e7, 0xabb4f5be, 0x97b3b5e0,
- 0x88a9477f, 0x7ad05ee1, 0x09b230de, 0x920d449c,
- 0x444632ee, 0x486a4841, 0x8f5074e9, 0xbb955bcf,
- 0x43e4a7d3, 0x11b42f83, 0x5f483210, 0xa8137a9f,
- 0x562c7dc7, 0xee2d0684, 0xd4551d26, 0x1dcc1ab4,
- 0x96331950, 0x4ea6432b, 0x0a42623e, 0x935c725f,
- 0xc41157b7, 0x84c26c12, 0x54fc81fa, 0xe7326a17,
- 0x8b788933, 0xb8065c43, 0xdae2908f, 0x6731ef6c,
- 0xa33ecfee, 0x00b24e73, 0x8024238c, 0x49ddba31,
- 0x6b78464c, 0x413f6ad8, 0xfa3987be, 0x5ce4ecee,
- 0x734755b8, 0x8b803a79, 0xab288eea, 0xf74c5e72,
- 0xf073c91a, 0x7b92c729, 0xf79310d2, 0x7fd7b30b,
- 0x09c13d06, 0x844ffd6b, 0x873df05f, 0xe8ac1364,
- 0x463ee0e0, 0xe24863ec, 0x437d6e1f, 0x968d2745,
- 0x47d98e46, 0x70e67de0, 0x78c881d6, 0x2e4d2e38,
- 0xef59e42d, 0x67caeb12, 0xd6571589, 0xc946d5f6,
- 0x803fd9b8, 0xab37f7c5, 0x2034ddaa, 0x4c204b3e,
- 0x8d97f636, 0xf07ed23e, 0xea40f609, 0x73b87e7f,
- 0x66cf66e6, 0x2c4749a0, 0x830c290a, 0xf0c498eb,
- 0x8dd8818c, 0xb0963fc4, 0x291bea1b, 0x477a28b0,
- 0x73bcb859, 0x528f4cad, 0xfdb6dbb5, 0x4ed7bf52,
- 0xa8e1251d, 0x62372447, 0xd81e1b75, 0xfe1072f3,
- 0xfffe5f59, 0x44621d40, 0x2fb05129, 0x773bd11a,
- 0x687ef365, 0x5bef55a3, 0x051cddd5, 0x9c974bea,
- 0x1571d467, 0x374f7254, 0xcdb57cdc, 0x1085ae3d,
- 0xf7e9e722, 0xfe1425c3, 0xe86408a2, 0x8bf5dc05,
- 0x43604eee, 0xb4785cb3, 0x4cf7c290, 0x0d1853ef,
- 0xfe57262c, 0xfbfdc84e, 0x14fdb978, 0x0669fcc6,
- 0xb5572dd7, 0x7fe29a7d, 0xe85f0170, 0x871105cb,
- 0x2344c983, 0xcec2cb20, 0xfca6f137, 0x03d089fa,
- 0x9ebb8224, 0xc6a2b9a7, 0x1fc3679c, 0x43058d9f,
- 0x828d82a9, 0xf319005b, 0x526050eb, 0x1cdf8e3a,
- 0x8209a908, 0x018d74fa, 0x13d5900d, 0x225b29d1,
- 0x278dac2d, 0x676b9b2c, 0x026faaf6, 0x8edb67b5,
- 0xd75a96ab, 0x224acb96, 0x22411678, 0x38aa9438,
- 0xf4aac722, 0xc518af44, 0x7a9506f9, 0xd15ed925,
- 0xfb06733c, 0xbc06c224, 0x440aeca7, 0x4071fabb,
- 0x0bca306a, 0x7e83e9f5, 0x42e911cc, 0x10db8534,
- 0x01bff3b4, 0xdef6f9d9, 0xa6d71329, 0x3e1001f2,
- 0x1e4770c9, 0x8dbdd2fe, 0x2022b0ed, 0x0a974f60,
- 0x20367bf5, 0x431bf25c, 0xde8ac82b, 0x361ac2c1,
- 0x9c6ef7a7, 0x967fdc78, 0xb7479e62, 0xe9b9e084,
- 0x4ab210cc, 0xd95df191, 0xfcfb4f09, 0x01e06598,
- 0x61d4ca0a, 0x77e0d081, 0x3b754aa2, 0x146eacb1,
- 0x4f60bec5, 0x7f1bb75c, 0xef21650e, 0x13f17206,
- 0xb8e1b745, 0x29ce216e, 0x2e2c645b, 0x3cae2663,
- 0xe007c5fe, 0xcf9430cf, 0x1a60f850, 0x9832594e,
- 0x3533c5cf, 0xf13bbf1b, 0x8e8d7d5a, 0x53541e26,
- 0x67c06674, 0x303baf34, 0xa62fded7, 0x819d882f,
- 0x5453c1fe, 0x8e55c62b, 0x2c17dc91, 0x14359946,
- 0x5e2984f7, 0x4eab33cc, 0x5e824341, 0x60fca1f3,
- 0xf18b9645, 0xb4c41f48, 0x4bab106c, 0xc8860d88,
- 0xca3b8251, 0xefe41524, 0x871a26f7, 0x0b03ede7,
- 0x51cdcfaf, 0x62275acb, 0xe72462d0, 0x0aa21d45,
- 0x5425e3e9, 0x7789c661, 0x90953bb3, 0xa96e73c4,
- 0x11c83c20, 0x68391fdc, 0xd6d495ce, 0x8a0da5cb,
- 0xe257d89c, 0x882aa651, 0x246f0d2e, 0x54ce1362,
- 0x0d2afd9f, 0xf01b8ef9, 0x54872d82, 0x176401be,
- 0xdbcea6ba, 0xa11b6d6d, 0x881c5466, 0x4b04064c,
- 0x375d883a, 0x844048fe, 0xa8ec8798, 0x9d375b11,
- 0xc534b413, 0x68139ae1, 0x17da46cd, 0x1518c41d,
- 0xa5920e4b, 0xb79bdd73, 0x7348b0b9, 0x3148fa55,
- 0xb09a5d05, 0xa36fd001, 0x6711047b, 0x04a68f65,
- 0x583b218e, 0xe611d3e6, 0xa9116f2a, 0xcd640ee3,
- 0x5db70abd, 0x115c31c8, 0xbe8c45c8, 0x996d5280,
- 0xe1415219, 0x98b6bbf8, 0x22a317a5, 0x5c89d84b,
- 0xf893b417, 0x08f50cba, 0x0cdef7b2, 0x3f455101,
- 0x9a8941bc, 0xa59aee26, 0x6a157d44, 0xa0fdc84f,
- 0xe988c48c, 0xbaa6d132, 0xcba0d365, 0xd8d60a8d,
- 0xb71b4533, 0x9a03a05f, 0x7b8c773e, 0x0c74ff06,
- 0xfa4fc0b8, 0x189bbde3, 0x73717458, 0xe0938394,
- 0x096fd2df, 0x1d2ab06b, 0x4051d80f, 0xfa9b5a46,
- 0x131859b0, 0x85d2d964, 0x210c5c40, 0xd8dae214,
- 0xd1a9dc1f, 0x3b55f05b, 0xfcddc3d8, 0x1ee84a11,
- 0x5f30471c, 0xd4124f85, 0xd486601e, 0xb096ff4a,
- 0xed3de43a, 0x14fa8e84, 0xd48d26e3, 0x0dc2e658,
- 0xe310e62c, 0xbb4b6e22, 0xefa33558, 0x0cf000a3,
- 0x7bd152d7, 0x53ac70e3, 0xd86b6548, 0x1adbb94d,
- 0x8168ec3d, 0x3d65e16a, 0x49677322, 0xc2807ce4,
- 0x8f5c249b, 0x9d2b8f5e, 0x82ef7b07, 0xfd48508d,
- 0x2653f52d, 0xc96cc386, 0xcd9febbc, 0x87d03cd5,
- 0x163496aa, 0xbec3e624, 0x2da86568, 0xb6988408,
- 0x313b707d, 0x9543b838, 0xe5b4f5dc, 0x216a2878,
- 0x5cc72af4, 0xba4ad3f8, 0xe61d4433, 0xf6931c30,
- 0x69958b32, 0x7f806611, 0x5c3bcb71, 0x9dc197ab,
- 0x83a19e8f, 0x010ec11a, 0x3abb1545, 0xccb32eb9,
- 0x973ae017, 0xe2d099a1, 0x8b8cced3, 0x0a1dfdd6,
- 0xf0ff6da7, 0xfc4d7c2a, 0x0f49539a, 0xc1af3de0,
- 0xbff45038, 0xc380bbd8, 0x925280df, 0x9242dff8,
- 0x2d9aa5d3, 0x098fff37, 0x59cce683, 0x42aa1c4a,
- 0xc6626616, 0x717ed9df, 0x06803d69, 0x7212ede7,
- 0x80212e78, 0x3b2448e5, 0x6b5387d5, 0xa5561eeb,
- 0xaa777b73, 0x8ab89d57, 0x7ee070d2, 0xaccafd8e,
- 0x7b3102c5, 0x910ea05f, 0x23b2ddce, 0x16866131,
- 0x80e0b89d, 0x3579ff4c, 0x60b35402, 0xe2336e9d,
- 0xa13a43a6, 0x37c88845, 0xcf1f4c66, 0x09cf7fd9,
- 0x700a3c0b, 0x01799ebb, 0x819a1fb9, 0x27f0a5d1,
- 0x071d6e4e, 0xc4ee5bc0, 0x39c1cf0a, 0xfb1bf4a0,
- 0x92c83ef7, 0xd98933d0, 0xb7e5a53b, 0x4b04b2dd,
- 0xeeb18ddb, 0x388af8d8, 0x508eeff3, 0xdb70cb66,
- 0x2f3ff305, 0x52476dab, 0x1d8a075d, 0xb2745306,
- 0x3e7a90e1, 0x3cefc46c, 0x43928619, 0xdc05b9f6,
- 0x12de4379, 0x9d05278b, 0x1b1e3a30, 0x5fa1bb6e,
- 0x679c5dd7, 0x4399903c, 0x1e320aac, 0xe7c257da,
- 0x0fb9919b, 0x9dd38866, 0xeb7b568a, 0xf1d33179,
- 0x32c8229a, 0x012fd9b7, 0x38949a78, 0xe4a5d0ce,
- 0x9b6ef347, 0x450009e2, 0x3e10eb63, 0x6258c4f0,
- 0x06afb6d6, 0x95891323, 0x4993a4fe, 0xc8ebda7e,
- 0xa15e1b57, 0x43498d08, 0x36426a8b, 0x0f7b1c45,
- 0x2e6df8f1, 0x2ab10e1a, 0x10ab87b0, 0x9330c916,
- 0x220736c6, 0x9e49e377, 0xf7e6b0e8, 0xcab4dbf4,
- 0x6cc23e9c, 0x7928e4c3, 0x0a41ccc0, 0xb3b1f461,
- 0xcafb0f57, 0xdea9c22f, 0x3a9e49b1, 0x4a53d13a,
- 0x2c5b8dd6, 0xc2d0ed85, 0x03b88042, 0x284fdba7,
- 0x0da0f22d, 0x90a26f17, 0xea99b35e, 0x36c656a8,
- 0x6b124e5d, 0xfbcf87db, 0x317113a6, 0x8b4797bf,
- 0xa5128368, 0x153344d3, 0x98773507, 0x28fb4dc4,
- 0xb0203d53, 0x0bb56ec2, 0xc9dd32a9, 0x06da0808,
- 0xd218d1f5, 0xb57dfd19, 0x7bbf7b88, 0x6ac8fb21,
- 0x645939a8, 0x7814b519, 0xe7a6a885, 0x36e8def9,
- 0xc2e60691, 0xa6815de3, 0x2a205898, 0xf6450c8f,
- 0x51460efa, 0xbc49cf37, 0x35f08578, 0xbf593030,
- 0x6e07aa9f, 0x7787220b, 0x1ae867d2, 0x2ee30393,
- 0x0b8c717a, 0x9b751b3f, 0x7d7af8ac, 0x783f759b,
- 0x09c83dbe, 0x86c48d99, 0x833db151, 0x4b037c5a,
- 0x0c6689e4, 0x9a1ebd94, 0xcf67fbe6, 0xfd7c4ae6,
- 0x3233c8b8, 0x36feb9d0, 0x7a370303, 0x609ced5f,
- 0x7cb9864a, 0xbbd4b8b7, 0x0334c20c, 0x45611166,
- 0xfb4d5fc2, 0xee5e59f4, 0x2c68985d, 0xcf584586,
- 0xac738dda, 0x7c527aad, 0x7c754a55, 0x696b62d0,
- 0xe06f72c9, 0xa27687cd, 0xd78521a6, 0x92444313,
- 0xd566660c, 0x611b15ea, 0x9d6979d8, 0x79d89931,
- 0xd9c4eb82, 0x5ca461cf, 0xa9115461, 0x36f959dd,
- 0x17abc641, 0x2d511903, 0xf26989de, 0x9a256018,
- 0x03776dd4, 0xede335c7, 0x8cc26b51, 0xb5afffea,
- 0xdc14fbd0, 0x7eed020f, 0x08008eff, 0x0484485a,
- 0x86ab07d6, 0x3f326254, 0x40125834, 0xff3ff59b,
- 0x5596bc88, 0x7ace9672, 0x381c2058, 0x7d64f830,
- 0x86b24e38, 0x05335027, 0x1eb1ab58, 0x6ed1ae70,
- 0xba27adde, 0x0502849a, 0x616b8085, 0x0bd7ec05,
- 0x9fe29e67, 0x98349d3d, 0xa4efc395, 0xf016d5e2,
- 0xc5c51d86, 0xde01d6ce, 0xbf61d966, 0x672a84ba,
- 0x4fe93690, 0x1fcd43ce, 0x770ce960, 0x90d67639,
- 0x3e9170b2, 0x6b85f000, 0x14b65bc8, 0x294f8af2,
- 0x18d84942, 0xddbc8103, 0xbb247f8e, 0xe9fb6370,
- 0x0f4b6a28, 0xc5e1c7b9, 0xbbc84a13, 0xa24de5a0,
- 0xf8afcb0e, 0x7fb0e02e, 0xdef6e6be, 0xc4399a03,
- 0x5f7ac9f1, 0xbe4bcfb8, 0x2ce1f60c, 0x99fd27ee,
- 0xffea343f, 0x5d068b34, 0xc04e0ce0, 0xeeb505d1,
- 0xfc329233, 0x3e92617a, 0xbc5620d6, 0x305d18b9,
- 0xed5d8f90, 0x0db5408b, 0x681cfb3a, 0x7714f728,
- 0xfe208a8f, 0xe9902ffd, 0x2421578c, 0x1982d7cf,
- 0xfdda6794, 0x8c000fb2, 0x4a025941, 0x1f2fb303,
- 0xbb8cfcb9, 0x4d55e5d5, 0xe7a14fcd, 0x583edc5e,
- 0xd71433c0, 0x541804e3, 0xc61facae, 0xcfa53ee7,
- 0xa5fab138, 0x90348e99, 0x19448389, 0x69f1d7b3,
- 0xccb89223, 0xd1d141b0, 0x81524952, 0x82e447c7,
- 0x6c9f22fb, 0x5b656dad, 0xdff96438, 0xdeb4aecf,
- 0x4f841edc, 0x67f94b17, 0xfad0500d, 0x8c0cd87e,
- 0x78715b0c, 0x9ee02e12, 0xfb9fdc79, 0x437ba1e4,
- 0xc64c1077, 0xaecd1853, 0x8fa914bf, 0x99dc698f,
- 0x081f9e7f, 0x5cde0688, 0x43b92fa8, 0x870b880f,
- 0xf510fc2c, 0xaa991f4f, 0x8f6e8658, 0x983cc679,
- 0x63695e92, 0x7eff4f44, 0x75d6ba85, 0x4bd2a0d7,
- 0x4e0279e3, 0x40b93083, 0xdc45388a, 0xf7437d8d,
- 0x14931a49, 0xc4b28342, 0x8bbb71c6, 0xc25ae909,
- 0x7d6f906e, 0xcb37fca4, 0xc3e0f81a, 0x6b72fad2,
- 0x4566877d, 0xb8daf531, 0x1b8f32a3, 0xa46105b0,
- 0x0b613b3b, 0x57a94846, 0x633f3c19, 0x00297f0e,
- 0x2f0c3619, 0x03eaafa7, 0x02805dcd, 0xbd24d253,
- 0xd14bac50, 0x12f9755e, 0xbaf4f7b0, 0x28b0d7ed,
- 0x35d55e1c, 0x65129fbe, 0x463c81de, 0x01a70079,
- 0xe2dca472, 0xf4c54db7, 0x35d2f975, 0xb59536bd,
- 0xcc9edf4d, 0x742f67a7, 0xc6231839, 0x91701688,
- 0x77f42430, 0x1eb81443, 0xc22b546a, 0x4e2cdc6b,
- 0x368d513a, 0xd91340b0, 0x293dd0fa, 0x7df31dbf,
- 0x8d99b096, 0x42b2e2dd, 0x9499fca6, 0x21b23844,
- 0x2b983657, 0x624b3e1c, 0x4a098e28, 0xabc70a66,
- 0xb5598204, 0xc0a505f2, 0xc7398dbb, 0x982e9434,
- 0xce246d96, 0x97bee704, 0xcf3ae3cd, 0x6f8235b6,
- 0xafb750a5, 0x1b617dec, 0x659abf86, 0x05b53a85,
- 0xc1948aec, 0xfa3e25a1, 0x0b44f568, 0x215a7128,
- 0xa9c33a8c, 0xb7ae6828, 0x9913d557, 0x4bf0d46f,
- 0x93c2085b, 0x0162b5ed, 0x6b58ed78, 0x78dad6a7,
- 0xee112cfd, 0xc68eb5b3, 0x9fb06612, 0x85df72b3,
- 0x2300f0e4, 0x0d29d3b8, 0x8db8ffc6, 0xcad414ca,
- 0xa8c070a3, 0xd6254be9, 0xfcb764a2, 0x083ad716,
- 0xa6189f4a, 0x15dead52, 0x84d0f550, 0x0757d89b,
- 0x2c55a527, 0xf66eb3c8, 0x3ac77655, 0xb2b619a9,
- 0x89dd2bd6, 0x3f9f3093, 0x4191ee41, 0x7d1e29d8,
- 0xf07d226c, 0x9a32975d, 0xec9dd0d5, 0x199104b1,
- 0x82f890f5, 0xbf4d6e82, 0xb39ee9b9, 0x5c66a749,
- 0xb6839d37, 0x152b186f, 0x742e9777, 0x458bde94,
- 0x4bd4f5bb, 0xf6fb70e1, 0xfb5a83e6, 0xb689b939,
- 0xac99e124, 0x8b18ea51, 0xc9c5ac33, 0x0b61a2e4,
- 0x22aabc42, 0x884f38c9, 0xe17acec9, 0x96339daf,
- 0xba6641c0, 0x821dfab5, 0x0dd79f4d, 0xd7f6fceb,
- 0xc7cf358a, 0xb153e2d5, 0x9f733315, 0x1d7eb0ed,
- 0x054f9cfa, 0xb0f5a285, 0xf6122750, 0x4b098863,
- 0xd2ef7681, 0x54f9bfd4, 0x321d431d, 0xff848cae,
- 0x72a9bdc8, 0x3ae4fae0, 0xff31660e, 0xf3f889c9,
- 0x024b635e, 0xa093b278, 0xb697197c, 0x81d4eb25,
- 0xed43d477, 0xb190526b, 0x061ea57c, 0x03aa279a,
- 0xdc122178, 0xec601daa, 0x29168f1f, 0x95f8e1e2,
- 0x6b843a11, 0x28653c43, 0x9fe693d7, 0x3a92021f,
- 0xa916177f, 0x007fa394, 0xef32f471, 0x7cecc309,
- 0xf862cc7b, 0xa86b8e1f, 0x4a1a9c17, 0x4fc278a2,
- 0x3b0c7cd2, 0xcf68a7d5, 0xda89d3eb, 0xff0a595a,
- 0x36df2e0f, 0x204d6a06, 0x6d0c3391, 0xd258381c,
- 0xeb073990, 0xa7f23495, 0xb413be50, 0xbfc35987,
- 0x0c485644, 0x28ea9014, 0xb99dd066, 0x2b314274,
- 0xc7d9df96, 0x114b943d, 0xb61038fc, 0x22c401cd,
- 0xf104089d, 0x051f2184, 0xe65d0ca0, 0xd50cfe8a,
- 0x4df74650, 0x576ed432, 0x6bfeb328, 0xab1e45cc,
- 0xf7fae6f1, 0x5d0d5726, 0xf41f0ed4, 0x384cf4ed,
- 0x83a9d945, 0xa2cdcb13, 0xbcca0901, 0x7999efda,
- 0xfb7514d1, 0x4a92f3f8, 0xe18765c8, 0xa3f9e35b,
- 0x31e3b2d8, 0x8df542df, 0xfb837a1f, 0xebd47118,
- 0x4bdd1f2b, 0xf5eecc0d, 0x10d4fc3c, 0x978df50f,
- 0xc41696df, 0x787b512f, 0xd0585e5a, 0xd543b13e,
- 0x940316f1, 0xfc243416, 0x555f742c, 0xac1a08e6,
- 0x2dcf0d37, 0xb10524ae, 0x088e26ef, 0x2564af0c,
- 0x0c048106, 0x948f8db9, 0xcbb73ea5, 0x1e8a482a,
- 0x9deda1d5, 0x96ede29a, 0x4b18653b, 0x49cb25af,
- 0x6780a2c5, 0x565e3197, 0x1fb0bb2a, 0x6e5cb25b,
- 0xacd40161, 0x230b24d8, 0x99c0848c, 0xf422b976,
- 0x58841d4e, 0x5d42e0a6, 0x7afed81a, 0x908f4969,
- 0x037be350, 0x189e5969, 0x7a18ea6c, 0x84526f3e,
- 0xad33fe78, 0x01ac2c9a, 0x4482da38, 0x4ff58651,
- 0x9831ac67, 0xaa976763, 0x1137fa5d, 0x216ed51b,
- 0xf49f36e4, 0x307536ad, 0x7b912ab6, 0xe7d4992b,
- 0x6cb839e2, 0xe738fd0e, 0x4d83850f, 0x19bea1ad,
- 0xcf13e511, 0xa87302fb, 0xdf728dd6, 0xc555225e,
- 0x8b218a67, 0xe9033106, 0xc6ac27e6, 0x8a1c0228,
- 0x690f3de0, 0x021dff12, 0x07611de6, 0x9464b011,
- 0x7d52b05b, 0x4a84d692, 0xb5f00f53, 0x0e6fd0a6,
- 0x9acddbd4, 0xb06fac11, 0xb7e983c6, 0x32136dce,
- 0xfa7046f2, 0x13efb5be, 0x0bdffd27, 0xebd6929c,
- 0x40b0359f, 0x31d2c0aa, 0xdd40ca75, 0x4c841480,
- 0x5b4ea178, 0x1430bd55, 0x2d498aef, 0x3e4e94ae,
- 0x86bc8a28, 0x763d9f06, 0x6c39d7c9, 0x1703945d,
- 0x6473c9bf, 0x84d1acae, 0x0ec39cfc, 0xb74c0a01,
- 0xd5494e70, 0x30a312c2, 0x4d71a954, 0x34994ab4,
- 0x2d78e0ac, 0x7df31ad1, 0x59a311b3, 0x80d1b149,
- 0xaea1d7aa, 0x344040b5, 0xd0b332e9, 0xd2d67887,
- 0x540eab63, 0x6efe98a1, 0x7a2db758, 0x1f9952b3,
- 0x0fe071c1, 0x6e8c120e, 0x393108ad, 0xfd85ba75,
- 0x6392f0c2, 0xf9828e55, 0x10d1a53d, 0xbc1845d2,
- 0xd2f371f4, 0x2843f3c8, 0x436926f6, 0x29fbf67f,
- 0xa7419504, 0x82d63361, 0x33e40f06, 0x188d6a5a,
- 0x0b93d329, 0xb2f04fb1, 0x11960d32, 0xbcfb3e3f,
- 0xde96ae09, 0xcbb2e1a7, 0xb4e8715b, 0x88aa07d8,
- 0xeedae5ac, 0x2359d910, 0xfac3cf81, 0x5de4d46a,
- 0x16c2e0ba, 0x47f689d4, 0xb01ce43a, 0xe0632778,
- 0x84df3976, 0x34a6d754, 0x97099c03, 0x265434d6,
- 0x5680c37c, 0x14e98fea, 0x11afc869, 0xf753394a,
- 0x1288aacd, 0x85c9a6ab, 0x6f1d74d6, 0xd3188519,
- 0x0004e2c2, 0x9501fc01, 0x75d87368, 0x3f32a716,
- 0x883b2bfc, 0x8d2e23d1, 0x26ea2cc9, 0x812b50c6,
- 0x7e0699dd, 0xa2609dd7, 0x7d817f65, 0x1dcbb547,
- 0x05627651, 0x5a8faab1, 0x6d3dd639, 0x69a50b6c,
- 0xa715c39b, 0xa30447ec, 0xae24866d, 0x98ecb7c4,
- 0xf67e9007, 0xd98bb525, 0x9ddc9a5e, 0x3aec4de1,
- 0x3716ae5c, 0x18acca92, 0xdee13e59, 0x0c416743,
- 0x816a872b, 0xdfcb07d6, 0xa0d9070a, 0x80958768,
- 0x8d0a140b, 0xd70bc001, 0x97765bc4, 0x1647488c,
- 0x1c98a1be, 0xfa22f2c7, 0xf89e2abf, 0x4f386ac7,
- 0xac0bb70a, 0x6143fe48, 0xdd92f0a3, 0x2394eb52,
- 0x44deb2c4, 0x6774bf77, 0xf33504b5, 0x229832df,
- 0x25b5ccaa, 0x61c0ded4, 0x0e321dd0, 0x23526bba,
- 0xc0cebde5, 0x3e05b81c, 0x9d02d7b7, 0x70970828,
- 0x2e82eebd, 0x619e469f, 0xe111889c, 0x308ecf3d,
- 0xff894187, 0xc621c30d, 0x758a6d90, 0x833eea4a,
- 0xb3b20b61, 0xf015d72f, 0x1a76dfb0, 0xdf6d1a9f,
- 0x426c1398, 0xc03b134a, 0x8d194762, 0x48045527,
- 0x06c073fd, 0xbf5eedb6, 0x3459e42b, 0x3139195a,
- 0x84ee4264, 0x333b082a, 0x32ff34c0, 0xa3dd3d9c,
- 0x4084514e, 0x22c3349b, 0x2d9ab2a3, 0xb7ced20f,
- 0xeb0e3142, 0x4e93557f, 0x7a6b53bf, 0xaa58363c,
- 0xf4bd30d9, 0x0eefabc9, 0x2287fdc5, 0x67eb74f1,
- 0x9d49a23a, 0xf831a00f, 0xce4216f0, 0xc5490499,
- 0x971676f1, 0x47d0f868, 0xe5c54a68, 0x758deede,
- 0x6127f344, 0x59cf592d, 0xbf0235a6, 0xd9d8b4cd,
- 0x5b8ca035, 0x20688e52, 0x6335de11, 0x12560799,
- 0xadd7979d, 0x40fed60b, 0x2fe37d49, 0x9ab5458d,
- 0x7fdf90ec, 0xf6416301, 0xa4d7e8d4, 0x92d37e1e,
- 0x99b5e81a, 0xf6335b7d, 0x3255cb10, 0x0999efa3,
- 0xb98a28d4, 0x8750ea40, 0x3a54a6df, 0x6ec3d326,
- 0x42f11600, 0x920a70cb, 0xa195d10a, 0x61d24edf,
- 0x1e9a1543, 0x5bdf3ff7, 0x4c99a268, 0xc0ea61bf,
- 0xe8e48611, 0x91c5798b, 0x2088f117, 0xfb079202,
- 0x41912fde, 0x68d3c803, 0xf817ee7d, 0x41cbc832,
- 0x131a5aa6, 0xf1e39d9d, 0xf1bdc2ac, 0x9eaf1463,
- 0x6d22c66e, 0x883435cf, 0xb3bdf13d, 0xae8f59eb,
- 0x1c5cdc70, 0x89cafb03, 0xe7c298c0, 0xdd6db24b,
- 0x14796342, 0x75c21e82, 0x5ee6ff42, 0x7a80dac0,
- 0xc04748a7, 0x7a6fe22c, 0x8aab3f27, 0xf4344a57,
- 0x107e3770, 0x8389b238, 0xc32befee, 0x392479f8,
- 0xa9709f09, 0x035e52e1, 0x53c7b796, 0x880cae3f,
- 0x849dd94d, 0x96125558, 0xfd748bfc, 0x4da1f887,
- 0xb4d64669, 0x9a617ef1, 0x3445bc62, 0xc1ba9b93,
- 0xdee84ca0, 0x375a169d, 0xa6523724, 0xbeb8c86e,
- 0x8ad25792, 0xd5dcc89f, 0xa8d9e2d6, 0xf52dc014,
- 0xee6e769d, 0xd911fb08, 0x380474e8, 0xcf1562e2,
- 0x614e97ea, 0x08966410, 0x4a6cb5a9, 0xc2f71ee9,
- 0xd748b1a6, 0xba672cb5, 0x8c81de66, 0xdb50636e,
- 0x603f622f, 0xdb3ea6b4, 0xceec5102, 0xc1f8fdef,
- 0x5fd3c8f3, 0xb469fca5, 0x9740a37e, 0xfad1d586,
- 0x8b9deb4c, 0x1f032fdb, 0x407f9cfd, 0xa2c0b3db,
- 0x56397e65, 0x32d27df8, 0xf499b010, 0x98534f3d,
- 0x994cdf90, 0xfb64b5b8, 0xfe63c204, 0xe219dfb6,
- 0x80750a6e, 0x70ab1b84, 0xd3bcbea3, 0x8f43391d,
- 0x6ed74ee0, 0x646235fe, 0x54448922, 0x9f76a7d0,
- 0x3a7853d3, 0x41354906, 0x3ac85df0, 0x046c8f34,
- 0x3d9f7a78, 0xbcd6329c, 0x218eaf53, 0x4dd9dd33,
- 0x8f6c22fd, 0x7ec91842, 0x648d1dc2, 0x2a76f2af,
- 0xf4be5517, 0xedee1bd0, 0xff663a4c, 0x450fa927,
- 0x6da31c8b, 0x75149104, 0x532e712e, 0x18c7af2f,
- 0xa5eab25b, 0x5a63dbb6, 0x9fa59ff3, 0x45d27103,
- 0x5b5afcad, 0x77d96118, 0x13e7be62, 0xc0405d8e,
- 0xcbc7edfe, 0x1be5b0dc, 0x82f2c7d3, 0x7aaecc18,
- 0x3cd9daea, 0x7564c1ec, 0x86022818, 0x0e19dddb,
- 0x13ea0b99, 0x0791ff8e, 0xb761a69e, 0x9e311da9,
- 0xca49f61a, 0xac9f2d85, 0x5165e706, 0x5532cec5,
- 0xeb6566ca, 0xaff9be6a, 0xee64bdd4, 0x362dca4e,
- 0x7b29f959, 0xf48571d8, 0xba80de1b, 0x893ce0b5,
- 0x1bad2f24, 0xc83d3cd7, 0x2cacf46e, 0x5b565715,
- 0x9c100f12, 0xb7485c73, 0x08a7c844, 0xd8553fe0,
- 0x3b52ae4d, 0x187ad207, 0x0fb8210b, 0xaf600874,
- 0x95957490, 0xeccd9cf8, 0xa7a0a100, 0x08a9fa3a,
- 0xe1b01968, 0x90eb8ef3, 0x9e0ad6d2, 0x74111e46,
- 0x5879bfc6, 0xa0023e1c, 0x928cc4e5, 0x7d213704,
- 0xa331dc4a, 0x11bc031b, 0x27d69823, 0x8caf750e,
- 0x31d46a45, 0x5afba998, 0xe28a716d, 0xb62ff14d,
- 0x7c1c9b52, 0x0c3826e9, 0x500aedef, 0xca08a104,
- 0x9be613c6, 0x6a96e0fd, 0x6ca1d218, 0x7d3599fe,
- 0xc09292b3, 0xa155b810, 0xe0e579c0, 0x78ffd475,
- 0xf69cf4c8, 0x4aa572b5, 0x619938ad, 0x25dfa8d4,
- 0x5629ab2c, 0x8057cef7, 0xa72a4c02, 0x2995d6c3,
- 0x14943982, 0x0a413d0a, 0x540ed42b, 0x29cae2e1,
- 0x537972ee, 0x2dcb6f3a, 0x4e3bbb25, 0x968057e4,
- 0x768f0b84, 0xacaa51dd, 0xf459a482, 0x615c1795,
- 0xb1fe8bb8, 0x6448865f, 0xe51c208b, 0x7a0efa0d,
- 0x65bf8371, 0x6827afce, 0xc57f30cd, 0xba4399b7,
- 0x1d0f3e2e, 0x6a5a323a, 0x5aa04b45, 0x5e1dae14,
- 0x12e753c5, 0xde0f9041, 0x56818890, 0xf2b954e4,
- 0xd09c4683, 0x20f21962, 0x458394e0, 0x1a16e6db,
- 0xd076c686, 0x67fe28cb, 0x6bd468cb, 0xff5d9876,
- 0xc052edd0, 0x6a5c528f, 0x17afc2d0, 0xf1d2eef3,
- 0x79edf0b4, 0xf3be8055, 0x9fa97abb, 0x613b988a,
- 0x189a39a6, 0x6f6141c4, 0xe8133b93, 0xb2be7bfa,
- 0xe8cc4fc2, 0x78dd8839, 0xf043e7bd, 0x90f44bed,
- 0xe12bacc9, 0xf4a71643, 0x62ad1964, 0x3c64aa98,
- 0x74a5e3bd, 0xc95f800d, 0xd88691ae, 0x58984ebb,
- 0xe8cc2a44, 0xb6a0b73d, 0xe5e605ae, 0x83b5b867,
- 0x7498bd7b, 0x6077679f, 0x7861e1da, 0xef47eb79,
- 0xfd42b4eb, 0xb20325ac, 0x1f36fd0f, 0x76aba6f8,
- 0x270b8167, 0x773eb556, 0xe1854ea0, 0x43b840eb,
- 0xbe7cdd89, 0x4bc092cd, 0x7bf0a8ac, 0xefb71e73,
- 0xf24d23b5, 0xbfda8947, 0x6948e597, 0xde2900ce,
- 0x2ae7cee1, 0x720c213a, 0x8e6d2cf9, 0x365fc2a1,
- 0x0c913312, 0x783f56fe, 0x73b79dc6, 0x13bd5bab,
- 0xdde6c1f2, 0xedaab069, 0x11a5cec8, 0x9cfed5e1,
- 0x81c24b3a, 0x7b4468ee, 0xc0adc564, 0x43a875c5,
- 0x34d0c0e3, 0xd5c7f55b, 0x0a1ea002, 0xecd93c12,
- 0x2abdba19, 0xe510eca3, 0xd8b3ff67, 0x84e1188a,
- 0xe01195f6, 0x848bfac4, 0x4f9d924f, 0xe78630a5,
- 0x4dccefda, 0x253e4964, 0x5cd1cbf5, 0x23c06c98,
- 0xe70ddb31, 0xc1d1fc22, 0x78e3d775, 0xc1385cd3,
- 0x0ce45394, 0xd9a1ad0d, 0xc33ffe0a, 0x54f5c14c,
- 0x60810c42, 0x41ba2159, 0x0f276cee, 0x2df6aedf,
- 0x4ba323cd, 0x081dab5d, 0x5fb7281d, 0x53dfdadc,
- 0x198b15bb, 0x1004ed99, 0x3545e049, 0x8612752b,
- 0x7367c31d, 0xf7260473, 0x2eb23be1, 0x5b06dcad,
- 0x6e99f3cd, 0x18d685ee, 0x3c26277c, 0x45541aac,
- 0x7d51f65b, 0x993f72b2, 0xad1f58e9, 0x5c8e81e8,
- 0x520a79db, 0xb812f0b3, 0x18f048d0, 0x15b8ec8e,
- 0x76c397ce, 0x7cc5d0e0, 0x39c208b8, 0x5888b908,
- 0x0314d78f, 0x308a2127, 0xf7dd7640, 0x972dbaff,
- 0x1f63a1e2, 0x183d334a, 0x20ecac69, 0x42b14535,
- 0x1c041cd4, 0xefc5280e, 0xa6fd3cd6, 0x7a58e164,
- 0xfa10df45, 0x68664339, 0x78f9d6f2, 0x555336d5,
- 0xd56ff3ba, 0x81255c10, 0x51c2e872, 0x08bb765e,
- 0x7384d59e, 0xbe2ce7e8, 0xe36a0125, 0x098c061e,
- 0x38e53853, 0x8559dfc2, 0xc383c6ab, 0x8751d637,
- 0xa31b6c4b, 0x2ef24623, 0xb2d98a7a, 0x4d681fac,
- 0xee5f2a2e, 0xbcbd0755, 0xe51f248b, 0x643f8517,
- 0x998012b9, 0x457c8094, 0x748089e5, 0xb0fb4386,
- 0x1d500930, 0x6ce14697, 0x04604d27, 0xbe4eaab6,
- 0xecf0dc8f, 0x31a7a93c, 0xb30f0882, 0x0fe952ca,
- 0x4b82a4dd, 0x3f7fe035, 0x265ed6e2, 0xe3cfb953,
- 0xf43e3885, 0x86008caa, 0x93161e4e, 0x1f1711cb,
- 0x0b06cc13, 0x81fbbd31, 0x69781ff6, 0xbf8891a6,
- 0x4811c80c, 0x5c89737f, 0x4316c701, 0x46c85d92,
- 0xec10fa68, 0xdacd2d73, 0x914f4f8d, 0xc7cb1a33,
- 0x205b254e, 0xa7c0f927, 0xd71b5e85, 0x0390e164,
- 0xd9c6883f, 0xd7111847, 0x1586114d, 0x0e673f37,
- 0xa5ab37bf, 0xf552da74, 0xac2407ca, 0xaed5c4b6,
- 0xb7e85ee8, 0x886eae8f, 0xe9eb88ef, 0x29ebe604,
- 0xd44daea8, 0x22915310, 0x5f8549d1, 0x68e658da,
- 0xc75cad23, 0xc57e8540, 0xafc42214, 0x3270df20,
- 0x1bc21ad8, 0xa0ce5cdc, 0x18979ff1, 0xc4230844,
- 0xa4871239, 0x1c1360a4, 0x22f00edd, 0x4c5711f5,
- 0x94061516, 0x449158e9, 0xb0172bab, 0x3db64637,
- 0xfd1467c8, 0xe99e4477, 0x2745c62c, 0x738d61d1,
- 0x96d3074c, 0x4b7f4318, 0x7ec65bd0, 0xaf527569,
- 0x5843ebf9, 0xe6944090, 0x78d3f0ce, 0x03f4583b,
- 0xe9c2de38, 0xdec06404, 0x4dbe8a2b, 0x19312217,
- 0xc8f5af3f, 0x42d76b0f, 0xd7358d26, 0x2f098718,
- 0x29de0797, 0x33a318ac, 0xe2fd4fc8, 0xa2088d38,
- 0xc1d467de, 0x7c78a97c, 0x7db9fb62, 0xaedae2e0,
- 0xdcdaeb3a, 0x8eb882d8, 0x1ab28e3f, 0x4d3906cc,
- 0x77fc8e79, 0xd415f3a6, 0xc4aef7ca, 0xb06cda4c,
- 0x09466b2b, 0x6e725cc2, 0x4368c1f1, 0x5d3e5666,
- 0xa902a872, 0xea9d9d72, 0x33c486fa, 0x81126e2d,
- 0x861d0114, 0x983a6640, 0x3c97ef93, 0x7d3bff8b,
- 0x9e48258c, 0xe970e97d, 0x7775cf4a, 0x6353c83a,
- 0x1eaf7a11, 0x7bf23127, 0x5e3e026b, 0x45ab8b5f,
- 0x977e8048, 0xd7801c80, 0x13b57de5, 0x61c0ccae,
- 0x32ccb558, 0xc2d989e5, 0x535a36b6, 0xa4107fa2,
- 0x38c154c5, 0x93d3d56e, 0xd08695a2, 0x9a825a22,
- 0xb7855464, 0xb649621d, 0x50e4e3a2, 0xdc164c7f,
- 0x90ea2d14, 0xc9ff13a8, 0xfd381e76, 0x0bbb585e,
- 0x010f3067, 0x59acb73f, 0xa9770350, 0x634a6a8c,
- 0xdeb65d3e, 0x3ba4bd98, 0x6f069d65, 0x43518658,
- 0xa35e5614, 0xfa3bd68c, 0x9e49fdda, 0x5052dad9,
- 0x18ccdb6b, 0x4eabab0e, 0x781975fe, 0x9cc938cf,
- 0xad306b65, 0xe5b0a79c, 0x723ecfa4, 0x55a021a2,
- 0x46601420, 0x59878c74, 0xa7081530, 0xcd5a3d7e,
- 0xd7dea9fe, 0x402f0989, 0x1c5ded66, 0xfef17b6c,
- 0x4b02847b, 0x86b26c82, 0xd487ef67, 0xd1352624,
- 0x859bbb2c, 0x5bf20174, 0x7799ed57, 0x45de1f01,
- 0x95f7acbc, 0xb1ebf7fd, 0xf856d947, 0xb563314b,
- 0x0cb4ac11, 0xeb972fa1, 0xe09223ae, 0x5dd8b9b4,
- 0x11ea6385, 0xcc369590, 0xf14743c3, 0x841756f3,
- 0x9aec5c4d, 0x860e3108, 0x4998a2cf, 0xfef581c4,
- 0xab54b700, 0x513e5448, 0x917b6beb, 0x4b15fc19,
- 0x9100bc35, 0x30032eb9, 0x55ef7ec5, 0xf2529cf6,
- 0xdf074354, 0x9e682fb3, 0xb0aee821, 0x2d51b279,
- 0xbcc1fdc7, 0xfdc76de7, 0x61ee5cda, 0x6ab71474,
- 0x114f8c6b, 0x0e3767a1, 0x4cc40a6c, 0x0af9bb29,
- 0xfebf314f, 0xb02b71f2, 0xbadc325f, 0x2dee96ec,
- 0x58f07f6c, 0x0f28feb7, 0x14077ae3, 0x6d912f92,
- 0x6c3d8c31, 0x6e0d6ba9, 0x92ca43ee, 0xb2ef3e0a,
- 0x400ecb2a, 0xe826eec2, 0xace8d208, 0xd7d4b9b6,
- 0xaaa020d6, 0x5de84d5c, 0x3d3e4375, 0x8901f8d5,
- 0xe3098df3, 0x4dd44138, 0x54b96fbb, 0x7b7ba02e,
- 0x2cb14e4a, 0xb0e45681, 0xb4cbc8b3, 0x550fc1d1,
- 0xb8c4220c, 0x2c9a8aec, 0x499cdc47, 0x8550c4cb,
- 0xff37169d, 0xa51f7697, 0x69cd8fed, 0x4c6b6f68,
- 0x0a90f4b5, 0x66f9a399, 0xa27de0f7, 0xe26bb59a,
- 0x2ad731ba, 0x6713f143, 0x2bf90508, 0x6d3c7688,
- 0x680c4002, 0x2650caa1, 0xb7dd3acc, 0xde1d383a,
- 0x826a14f5, 0xe6873345, 0x1ec3e6db, 0x98f1cd0c,
- 0x318e25b0, 0x66b4befe, 0xaaabfe6c, 0x42b6efe0,
- 0xbebc2b31, 0x08ee8e6f, 0x0d6de4fe, 0x2eeb217f,
- 0x2be8825b, 0x4215fe6b, 0x650f384f, 0x46c4bc13,
- 0xb32a30b6, 0x2ebb4fa5, 0x7dceefdb, 0x81926756,
- 0x66bc0c5f, 0xc1a82c82, 0x5ce8db64, 0xb7d03097,
- 0xcd9664b9, 0x31c6433d, 0x8954438f, 0xc6cf1868,
- 0xbd94227d, 0x85b74e82, 0x822672d7, 0x2e9a9e3d,
- 0xa13db18d, 0xf93db5d3, 0x720e4f8d, 0xf3631ba7,
- 0x274d1942, 0x99d23da3, 0x8e969e11, 0xaef394c0,
- 0xf79a8263, 0x277739c3, 0x9d07ec40, 0xd063af8b,
- 0xe1c2508f, 0x0ac4b49b, 0x74ff8ec6, 0xbe9ecca0,
- 0x9d4ff3e6, 0x2c9ecf44, 0x310633bf, 0x8467904e,
- 0x5b4c6812, 0x824678db, 0xcc8e5fa8, 0x14341767,
- 0x29167620, 0x5e659953, 0x791f7a45, 0x476e0727,
- 0x64722ed4, 0x32450f39, 0xadfc1254, 0xb1af8704,
- 0x535a5c5e, 0xfff54d08, 0x758c07ff, 0x65375a76,
- 0x0ed5f170, 0xcb1bd90f, 0x80f13b61, 0x6702fd15,
- 0x9d4c14e0, 0xb39e54b6, 0xb944955b, 0xb7fd1a32,
- 0xbfc45d6d, 0x01a2703d, 0x7b2b964d, 0x6847433c,
- 0x37d20394, 0x82590b4b, 0x11419213, 0xa0256fd4,
- 0x90359e0f, 0xce086abb, 0x48241e07, 0x0ca2f950,
- 0x69e83c42, 0xe8fad553, 0x20d083fa, 0xc70f09da,
- 0x1f56a896, 0xa0930d1a, 0xa6223ef8, 0x5fa0224d,
- 0x7d0bdc29, 0x947eb487, 0x9279eba3, 0xadb2c854,
- 0xcc987d85, 0x642312da, 0x4e22c2e5, 0x5b08812d,
- 0x101d3cf6, 0x0940557c, 0xeaa90e60, 0xb23f68d6,
- 0x2c2baf7d, 0xaa164b5c, 0xac9aeff3, 0xe1498fd5,
- 0x9d4fc3cc, 0x8edf37ff, 0x9e005b03, 0xa60d281c,
- 0xff8e4b10, 0x07960b50, 0xbd4f65fc, 0xf1c1192a,
- 0x5ea77779, 0xf59e60b7, 0x30c2236a, 0x8e212249,
- 0x86378149, 0x9d77192c, 0x24b0bd7e, 0x59711d09,
- 0xf5dbe1a1, 0x432399f5, 0xf84686de, 0xb07b26bb,
- 0xf9d3d2b3, 0x2bc6c921, 0x778f57ce, 0x3002790d,
- 0x0cc84cc3, 0x90371b37, 0x5c65688a, 0xfb5c9aaf,
- 0x875671e9, 0x7a58838e, 0xd8c542b6, 0xc6dd1d37,
- 0x88a8d9fc, 0x83ebc24e, 0x4a8468c1, 0x3a93afaf,
- 0xf6f493df, 0x53773406, 0x6ebd35f1, 0x545814bc,
- 0x2df50375, 0xa4b61d31, 0x1a39dee6, 0x6f572e35,
- 0x86d63ff0, 0x7c8a4ef2, 0xe0c0d07a, 0x06860631,
- 0x38736cd1, 0x83605613, 0x927b4473, 0x08fbb7f2,
- 0x3c8f9c53, 0x0b386ce7, 0xa10b3cea, 0x69808283,
- 0x8d7d8179, 0x636d5076, 0x30570655, 0x1516c013,
- 0x02052701, 0x70921316, 0x59ccf40f, 0x7434aa35,
- 0xf23e7585, 0x16b4f774, 0x5afdea3e, 0x7ae7e117,
- 0x18258ce7, 0x7bdc03f3, 0x0bb0e87f, 0x1c19d3f2,
- 0x7714b0e2, 0x12827cb2, 0x210fc1cc, 0x2f63d58a,
- 0x6f63ce81, 0x3e02b0d5, 0x6171d5fc, 0xaf57297b,
- 0x7635f615, 0xe0dcb69f, 0xa25c93b6, 0xf61fd97f,
- 0x31fa1e43, 0xd63c6b53, 0xf999eb72, 0x6e66865b,
- 0x57502eb7, 0x5709355e, 0x382de69f, 0xa887e7fa,
- 0xab5cb1cd, 0xac4d93d0, 0x71ff3b14, 0x079651d1,
- 0xf562f181, 0xc3b19d8c, 0xf84a374d, 0x1f08120b,
- 0xdae40659, 0xbe13fb85, 0x6f73d537, 0x59b0ae47,
- 0x33b7610c, 0x5eb0ee71, 0x9dad6f42, 0x00c7cead,
- 0xfc5bb288, 0x3dfa08d2, 0x71a10523, 0x9c47fd94,
- 0x06402eda, 0xddda20fb, 0x0bbffdcf, 0xf4732d27,
- 0x952e898a, 0x06ae838f, 0x59dbb23f, 0xc551a56c,
- 0x404cd8ac, 0xaeee3e31, 0xc7ce5d65, 0xe6a1385d,
- 0x2f3d819b, 0xb1a20788, 0x04a4c43a, 0x00522758,
- 0xedd29ec7, 0x625b4b7c, 0xd2bc8984, 0x7847e80f,
- 0xad281af9, 0x75d98391, 0x4866cbf4, 0xfe8d596b,
- 0xa72eed1d, 0x6ce082be, 0xef7fcd9d, 0x760df468,
- 0xe66cde2e, 0x71d5e574, 0x25b6d653, 0xb4ad6cdc,
- 0xa9b958cd, 0x894aae63, 0x30b9c3a7, 0x7b245164,
- 0xf74711ed, 0x8cd46730, 0xeb7fbd7b, 0xd325ec95,
- 0xa5b39497, 0x2c99aa20, 0xf8499df3, 0x99ee6b13,
- 0x043755ac, 0x31a19f4e, 0x1c115423, 0x3939a900,
- 0xf472fe41, 0x33a528ec, 0x013248e3, 0x0e99668c,
- 0xdff128cd, 0x793c601d, 0xcdc92d2f, 0xcff133e4,
- 0x17e8231a, 0x18880710, 0xda2ca8e6, 0x02783d3b,
- 0x7904d279, 0xb4b24eab, 0x5a7b4b94, 0x00066175,
- 0x0478afdc, 0x74027171, 0x0a2ab928, 0xb830b8e8,
- 0xc484bebe, 0xebcddeb9, 0x0bcbf579, 0x150266d0,
- 0x816889ef, 0xe2fdf079, 0xa100729b, 0x5e83bab4,
- 0x135a825a, 0x7e2aa571, 0x8579a179, 0x712d4a50,
- 0x8246cdb4, 0xb0d3766a, 0x7d09f18e, 0x0e994508,
- 0xcce7e62d, 0x109badf9, 0xb6efb156, 0x5850da7c,
- 0xf62ed484, 0x7f20a5f0, 0x11cc2e7f, 0xa62eac0c,
- 0xae394940, 0xd5a8f0ae, 0xe6323e8b, 0x7129531c,
- 0x830137e4, 0x7033f471, 0x2696add1, 0x528f7df1,
- 0xe7e8124a, 0xd42f86cf, 0x04cf385f, 0xed813cf5,
- 0xcd1c2b77, 0x43143b93, 0x8f95050a, 0x0dd81f3c,
- 0xf7279742, 0x7d1af038, 0x66067924, 0x5ea07b30,
- 0x82faf2c0, 0xf54df0e6, 0x0f2e73c5, 0xdd793a4d,
- 0x0629310c, 0xb5184717, 0x4b857506, 0x1f16c741,
- 0xe3eea26d, 0x74a1c05c, 0x3c182ee5, 0x6fba03c7,
- 0xec23f214, 0x717156aa, 0x82182fd2, 0xab6c81f6,
- 0x6a6e640d, 0x1c1f36ba, 0xa159f43b, 0x814d5a34,
- 0x2bc4c806, 0x42015304, 0x300365a9, 0xfb08510c,
- 0x46b953cc, 0x6311bbf9, 0xb0445da7, 0x2c297c0c,
- 0x58fd0492, 0x839a4f8a, 0xc447eb0f, 0xbe4240e2,
- 0x51d82a3f, 0x1accd708, 0xccd437b0, 0x846c8d0c,
- 0x63bf7c1a, 0x74eefbb9, 0x19945107, 0xf14a86db,
- 0x780ea619, 0xfeeaa89a, 0xc990b35d, 0x1161b843,
- 0x07da06ad, 0x5128d436, 0xe9310071, 0x4110e14b,
- 0xcb0a7975, 0x25c167a0, 0xdc5a8f28, 0xe4084cdb,
- 0xe6aed49d, 0x6c331afe, 0xf11d06ff, 0xe62a3ca0,
- 0xa9ff7fa1, 0xd2db46d0, 0xb495e01e, 0x3a670d19,
- 0xa0b6eed4, 0x30418359, 0xddd7bb00, 0xafcd85b0,
- 0xabe12164, 0x1c8416e8, 0x3c809167, 0x4bfe5437,
- 0x6086566d, 0x6e710983, 0xaf310d02, 0x7bdff002,
- 0x7e0b3be4, 0xac566edf, 0x6bf7c0b6, 0x0ff57c23,
- 0xda734e9c, 0xa869b285, 0x14bcb348, 0x07c41ba8,
- 0x19455136, 0xef1313ae, 0x23c2ad1b, 0xd0f32243,
- 0x92efefc4, 0xf15ae24e, 0xd15582b2, 0x3fc8c6e3,
- 0x7ae972e3, 0x035c7b4f, 0x0d76252a, 0xf7753574,
- 0x9113fd49, 0x3030594f, 0xea0908bd, 0xe39b466c,
- 0xa5ba9434, 0xfd2968c3, 0x1ee4e46b, 0x60335567,
- 0x32ae6e52, 0x8f224623, 0x8c9147c4, 0x2cf9a99d,
- 0x7bb5507a, 0xa950df84, 0xde970a7b, 0xe22a20ba,
- 0xba842593, 0x01b64148, 0x1970b848, 0xa4446941,
- 0xafedfd1e, 0xb414bd13, 0x43df4559, 0x86ef4431,
- 0x3eeedc18, 0xa8dcf3ac, 0x09899793, 0xb9781bdb,
- 0x88be94b3, 0x0dbe648c, 0x0aebc10e, 0x477ea54a,
- 0x36691e37, 0x290aa2b0, 0xd0d7e4d8, 0xbc426f43,
- 0xcda9708f, 0xc0a83bc2, 0x201ecc21, 0xf70e22dc,
- 0x964ed4f6, 0x59ca6847, 0x26f4605f, 0x0c9c01b4,
- 0x1b266424, 0x693f37b1, 0x5b5a268d, 0x5f164776,
- 0xfd8a78a6, 0xc2586266, 0x503ec9a1, 0x7b004e83,
- 0xacaa9245, 0x64330576, 0x407438b0, 0x4684b70f,
- 0x957a1131, 0x4b3024a9, 0x001d618d, 0xe91251d9,
- 0xa56276ac, 0x71ab8637, 0x1b22d969, 0xd8b7b4b4,
- 0x56d4ca50, 0xbffe4b4e, 0x9781ce53, 0xd898d2bd,
- 0x8f896ff1, 0x2ce7c1ae, 0x8fc2aa62, 0x1dc4a026,
- 0x261605e4, 0x484a9c99, 0xbe180435, 0xd5f9b147,
- 0x1fba5361, 0x473e5aca, 0xf73cdca1, 0x4f5debc5,
- 0x75508812, 0xdf3de403, 0x7ee2444e, 0x6daa916b,
- 0xeaa32b74, 0x04d00ebe, 0xb3aec823, 0x448d7291,
- 0x7efe5ef8, 0xfeb1b154, 0x72c7922b, 0x31fcc99e,
- 0xbdf3f21c, 0x974a2b83, 0xc4876af1, 0xead3764b,
- 0x77fd45e9, 0x8e6d3fd0, 0x5e9d5a44, 0x6c07e6bf,
- 0x524917a5, 0x1e2d4b7b, 0x0ff5947f, 0xebab6cf5,
- 0xef9fa9e9, 0xeb4dccfe, 0x91b1874d, 0xb65f533d,
- 0x6114858b, 0x1dfb91ec, 0x64bc1885, 0x240142ed,
- 0x1af872e3, 0xe912bd28, 0x1ea71791, 0xfb810585,
- 0xf9f101cc, 0xe41fbd1f, 0xcb84c1bb, 0xfea084a5,
- 0x18af0309, 0xff2da585, 0x8766e65f, 0x599f77a2,
- 0x24f42390, 0x56a970fb, 0xefb4bbb3, 0x3786fb64,
- 0x72f5456e, 0xf4305205, 0xf6596aee, 0xdcdb7218,
- 0x58b76596, 0xe55929ef, 0x94d1d1a6, 0xe28eb56d,
- 0xb9378086, 0x3c7bf722, 0xe4e048c4, 0xa5cc9dd2,
- 0x73f57e62, 0x5814ef5c, 0xf71b8adb, 0x6ad8d467,
- 0x0f983fb5, 0x87d273c8, 0xd9673604, 0x5a890223,
- 0x48f16ada, 0x4039a9db, 0x0817705e, 0x00dc054c,
- 0x9774d27d, 0x50666e78, 0x2599a963, 0xbd9ce049,
- 0xf9ea8308, 0x32afae45, 0x4c79ed36, 0x671ae018,
- 0x2be8b761, 0x57f3a0a3, 0x2534fd06, 0xe7f3a312,
- 0x80f3dbeb, 0xb4f9923c, 0x273870e5, 0xad2c8da2,
- 0x298c70dc, 0xb43aaf4f, 0xaab12c16, 0xb3d91988,
- 0xb77b828c, 0x5ec9680c, 0x8fecd15c, 0x40ed5c2a,
- 0xc63a4df7, 0xf4c176be, 0x2d9e13eb, 0xd634b762,
- 0x2a3d276d, 0x34efed23, 0xda424c0a, 0xdc4e19b7,
- 0xeb1ed713, 0xce39cb04, 0xe7e83936, 0xe4ca1e69,
- 0x71cae859, 0x5996507b, 0x0c4bd960, 0x279d0678,
- 0xa7f2ebe3, 0xbaf43fde, 0x06283487, 0xbac38dbe,
- 0x05bfa8fe, 0xee232f80, 0x1d7f0b9d, 0xd2bb77cf,
- 0x574bc488, 0x86a9466d, 0x24e74dcb, 0x93d8b185,
- 0xef761788, 0xcb20e8ab, 0x079bf819, 0x810db08b,
- 0xbe08aa4e, 0xd34a902e, 0x6fa74fc7, 0x80c8b5ea,
- 0x812393b2, 0x54718e0d, 0x84ad6a45, 0xd17acdfa,
- 0x9ec14467, 0xcd9204ce, 0x75ee14d8, 0x87c483da,
- 0x13dfae2d, 0xa3d546f9, 0x3a5ff114, 0xfde3d600,
- 0x4dc6634c, 0x8f8677cb, 0x7221efcf, 0xf5e44250,
- 0xf92c1ce8, 0x1391f7ca, 0x9e6392d6, 0x7c9242c0,
- 0x51a00eb1, 0x2a3c6e7f, 0x184086ad, 0xbb253371,
- 0x1c643fa0, 0x941984ba, 0x9553df5c, 0x059aef7f,
- 0x75da71a0, 0x207d221b, 0x02f81b21, 0x0b4a2af5,
- 0xf1634f15, 0x35272791, 0x1cefda58, 0x468bf621,
- 0xc18a9014, 0x606794e1, 0xb9249e52, 0x776e1ed9,
- 0x1b650aa4, 0xd3594576, 0xdd9e73b6, 0xca2922ab,
- 0x7df5c7ca, 0x44577765, 0x8707d8c1, 0xa126dfbf,
- 0xc3b20bff, 0x934a56fc, 0x168a8d9e, 0x85b1f081,
- 0xef1a4fe4, 0x5c0ddb87, 0x9db352a4, 0x39705f67,
- 0xe95d82b9, 0xbe94a745, 0x6fef59eb, 0xd71398ee,
- 0xeb99b4a2, 0x5f323310, 0x5370b06b, 0xb8ce274b,
- 0xa9c4765f, 0x6ca93643, 0x6f67de35, 0x39cbf66a,
- 0x0e21e2a2, 0xa0f8dd57, 0x92f4c319, 0x7aef37f9,
- 0xcf40caf1, 0xb9e0a462, 0x894084b7, 0x1f6868de,
- 0x82c448e2, 0xc7d18543, 0xab9dbe93, 0xfa1c5863,
- 0xe09bb300, 0x89ca6894, 0xce8e2f18, 0xaabd3ffe,
- 0xd2a323cd, 0x14f64d84, 0xb9f583bf, 0x501f4769,
- 0x4e1ee7f4, 0x3e15cfa3, 0xfe38c1a4, 0x52885324,
- 0xa13f64ca, 0xa4cf90a6, 0xa208d236, 0x9701ab9c,
- 0x1b5969f9, 0x549764a1, 0x14d1456f, 0x645be44d,
- 0x1171c2e1, 0xe5f9e266, 0xa8bc78a1, 0x05216d19,
- 0x108028ed, 0x518c22a5, 0x581fe7a8, 0x07cd9720,
- 0x0ab93b59, 0xb887ee7c, 0x762400ed, 0xd2ef9fac,
- 0xa1d30e57, 0xb7eea0f9, 0xed99e0ea, 0x59a73db4,
- 0x7c8d3a01, 0x1a9bc9fd, 0x2c9c5415, 0xb6a4585b,
- 0xad135fb6, 0xc3fcc9dd, 0x3f028526, 0x4400eea2,
- 0x7515ce24, 0xcaffcd58, 0x3c0ff735, 0xe95ecdce,
- 0xf2f065b5, 0xef13ec63, 0xdafcee4b, 0x5c3e1fb2,
- 0x16ba90e8, 0xcac20da6, 0x052eb63d, 0x1a528b5a,
- 0x3f2590ee, 0x1ff396e1, 0x09563f70, 0xe97ed613,
- 0xad032d48, 0x04b5851d, 0x0fdb91e8, 0x86e9166f,
- 0x6d4561a0, 0xe0311d4a, 0xc6b2011d, 0x32781edd,
- 0xd9d2265f, 0x7b70c422, 0x3c31b7b0, 0x4437e63a,
- 0xccb6ce70, 0x6f77546f, 0xc0140afe, 0xb47aee63,
- 0x7dc54822, 0x57f55f93, 0xafa3efd6, 0xc6e98616,
- 0x5e9a52d7, 0x8ff63366, 0xa24f7551, 0xd5b7bd2b,
- 0xd3fcfdb7, 0x0ea95c38, 0x0ea224be, 0x4292c2fd,
- 0x4c9cfa2f, 0x862dbdb6, 0x08e28299, 0x3dfe9f49,
- 0x5c553611, 0x8488d3dd, 0xa0e268bc, 0x39ad41fe,
- 0xd4b39bd6, 0x40fc7809, 0x638c1464, 0xb7dab796,
- 0xcb1c895c, 0xb8e2b8b2, 0xd3c35e5f, 0xc458516d,
- 0x532b6d94, 0x8b62a506, 0xdaeb3ce2, 0x98ea960f,
- 0x346cad70, 0x9e0d4a26, 0xdbebe48b, 0x4016fcf5,
- 0x201f8b23, 0x7134d426, 0xeee3d183, 0xf481d91c,
- 0x02d131c0, 0x3f0c06c3, 0x47d86074, 0xbfae4cfc,
- 0x6e7394ee, 0x0d857b1d, 0x571ad1ed, 0xbe9f25e7,
- 0x2892cdbd, 0xfcaca0b4, 0xfc2e9a4f, 0xeae2b5e3,
- 0x263335b0, 0xf749f811, 0xed1ab509, 0x54f94255,
- 0x66b5688a, 0x6c9dc695, 0xaec8aabc, 0xdfb4c65d,
- 0x505b7bf2, 0x1ac9fcee, 0x8f3e0574, 0xfb35652b,
- 0x27cb27c9, 0x258f0c1d, 0x9edd63de, 0x0c64f545,
- 0x0c6652d2, 0xf63a9b36, 0xcd1b3fe9, 0xabd04f93,
- 0x2d1baad8, 0xf064bfea, 0x068d4817, 0xb5cdd2ea,
- 0xcd4fe633, 0x97f6b9c5, 0x2feb03ab, 0x8b88487f,
- 0xf9b670d4, 0x3a04bc9e, 0x8c1ad2d0, 0xa8edd189,
- 0xd5a53d78, 0xabc784e6, 0x16341395, 0x54c257c6,
- 0x50103c7e, 0x64a11850, 0x228efea2, 0x9d0e61f5,
- 0xb2d2c64c, 0x401365a1, 0x7605affa, 0x95e05eba,
- 0xef3df857, 0x84ff300f, 0xd615eb03, 0x37e011a0,
- 0x5cdfb8b6, 0x60121de2, 0xd0939da3, 0x33970d90,
- 0xc8702165, 0x80c49887, 0x74d8a293, 0xbd204ffd,
- 0x4e4545d7, 0x242c6279, 0x2b6e8807, 0x84d88cbd,
- 0x02bc378e, 0xc40a8a50, 0x638ff7af, 0xa3568fc5,
- 0x0417c94d, 0xc693decf, 0x15c451f3, 0xe5b9ecf9,
- 0x30291491, 0xe563af2d, 0xe29aaeff, 0x72c3480b,
- 0x04ed6ac9, 0x412aab0a, 0xb5214cdf, 0xdd3d233f,
- 0xdb0cc4ae, 0xb84f3dde, 0x601c3fc3, 0xc436c24f,
- 0xbaf43703, 0x976e740d, 0x849c9b3b, 0xdb39aa37,
- 0x3602986e, 0x5ccfd857, 0xc8c75a82, 0x3a2e21fd,
- 0x289380dc, 0xee5ac4b7, 0x9999bea2, 0xdffc0fe3,
- 0xb4615380, 0x33256e38, 0xc14c0797, 0xde74d640,
- 0x01192ee5, 0x336eddaf, 0x7965b89d, 0xbc6be382,
- 0xc8b06b70, 0xbf59e3a6, 0xe1285c45, 0x119a60a0,
- 0xb15e8de1, 0x48f941f4, 0xca4ecc1b, 0x38e390ad,
- 0x254568f8, 0xa7f4a54c, 0x54f4e1ae, 0xcdcf2e77,
- 0x3da82752, 0xd63fa8e1, 0x3dc6bdea, 0xd6d3d0bb,
- 0x94f8bdbb, 0x31bae4ad, 0x6f0d285c, 0x6b8ea60b,
- 0x93f14e91, 0xbb33520c, 0x1a8734e6, 0xc4c820fb,
- 0x149ce77f, 0xb8521586, 0xcfe438fd, 0xa90b303c,
- 0x19f5c7fc, 0x8c2b6f72, 0x9fcf3fb7, 0x2ac6e6c5,
- 0xf00b9aa4, 0xe5904430, 0x2fa65ae5, 0x9b1febe8,
- 0x16f83027, 0x68099b3f, 0xfc277f32, 0x93e3f154,
- 0xde6d60b7, 0x61f4c9b5, 0xbe21c580, 0xf9d59432,
- 0xa8e5b9b7, 0x13fefa47, 0xa0ff5b0e, 0x7f8481ae,
- 0x2d347a70, 0xb6182d4d, 0x57525668, 0xb1ecf7ca,
- 0x2cc60e33, 0x08c1ffc1, 0xe66249f0, 0x16b8cd8d,
- 0x87ec062e, 0xc03f84bf, 0x405156cb, 0xeb9e17fe,
- 0x4af57fd2, 0xc47d0917, 0xc2be80b3, 0x6548d767,
- 0x9aeb2bf6, 0x3305e040, 0x7846572c, 0xd1902940,
- 0x381dafbe, 0x25fc51ad, 0x1edc3187, 0xa3cba5e4,
- 0x6e89d176, 0x0199acdf, 0x75cdcc3f, 0xded2d291,
- 0xc12dc81c, 0x7c4b3884, 0x47becbae, 0x3e22c228,
- 0x8550e559, 0x3a466929, 0xc43ce29f, 0xc9788cff,
- 0xc4277795, 0xe724019a, 0xfe918df0, 0x2c6abfbd,
- 0x7fd46dd5, 0x1173931e, 0xc70b0a5f, 0xa6bb739e,
- 0x532aaba2, 0x9a8daa32, 0x5377c4ea, 0x023362ad,
- 0xfd2a13e8, 0x21ca1840, 0x018d0b65, 0xd48d0238,
- 0xee2eec42, 0xd8a094e3, 0xaf3440ed, 0xf2978c98,
- 0x78677e8c, 0xe0892ff1, 0x6a7b0908, 0x48e8af87,
- 0x2f7cc714, 0x0955da2f, 0x8b3e394d, 0xf840a07c,
- 0x303afc53, 0x3c5e8540, 0x773ab507, 0x3957863b,
- 0x4c79fd2a, 0x7f4b061d, 0x4b5dcc77, 0xffc8486e,
- 0x9f2b41a1, 0x0b9acba3, 0x933e99bf, 0xb8dc56b4,
- 0xfd1cef1b, 0x2c1cc2fc, 0x5406f187, 0x621624a4,
- 0x36f04a05, 0x0b480751, 0x92a6ad1f, 0xa6f501de,
- 0xb084d798, 0xee59d723, 0x142e94e3, 0x078cb4e2,
- 0x6774027c, 0x76d2a25f, 0x0339be31, 0x49a5ddac,
- 0x902ebd98, 0x4a728038, 0xc2878025, 0x95921373,
- 0xdfc756fc, 0x8ed90103, 0xc600305d, 0xb8ed2922,
- 0x54ec5f5c, 0xe2df9456, 0x24d2fd98, 0x3f53b5e4,
- 0xd9e625fb, 0x5e40c264, 0xc6ff440e, 0xf5c0b1bd,
- 0x6dcc8367, 0x8d0e66ba, 0x0f079314, 0xfca849bf,
- 0x3a742c47, 0x3181071b, 0x1289cc30, 0x8867d976,
- 0x5c3b9c85, 0xcf545291, 0xf23bf26e, 0x1ddab70f,
- 0xb161bc53, 0xe00b5225, 0xeb5facd3, 0x2f96b099,
- 0xad9bd959, 0x9fbd9635, 0xb411a275, 0x761fea3c,
- 0x1d24e4d3, 0x01ce799c, 0x263cdaa1, 0xc45d1d82,
- 0x5f47ce3b, 0x35390b7e, 0x8ea3c6b4, 0x19f538e9,
- 0x8e53a982, 0xf97a87bf, 0x62255b4a, 0x194f20da,
- 0x1b204209, 0xd9d7d195, 0x71839726, 0xeacc1b72,
- 0x58dfbe91, 0x6bf2cff8, 0x4bca0864, 0xa93c0dcc,
- 0xfcf731c8, 0xcbb05fd4, 0xeddc9d10, 0x3786774d,
- 0xab89c6a8, 0x526d854e, 0x9da98f0e, 0x3ab13b32,
- 0x855de1eb, 0x4798de80, 0x8891bf49, 0x8ac4674b,
- 0xbca6b6d1, 0xe8005d76, 0x970e661b, 0x3f27a6c2,
- 0x2d0d980e, 0xbaaab7c0, 0x09eff43d, 0x2d628f05,
- 0x4fed0c71, 0x5f04d381, 0xa5b8ae36, 0x01b9e370,
- 0x8eb62956, 0xd4be5760, 0x915a6790, 0xd82ba4d9,
- 0x8e597ba0, 0x70dd7546, 0x293f4b5e, 0x9429f10e,
- 0x38d23258, 0x4ec7e258, 0xff6d50d8, 0x461b97a7,
- 0xc97c89bc, 0x8be38744, 0x810b6988, 0xfa6ac616,
- 0x8e7e077d, 0x54d01139, 0x1170979a, 0xfb693b50,
- 0xe1ecc0dd, 0xfb4d248e, 0xb83230f8, 0x2c2709ee,
- 0x91f4795f, 0x9d7a1b55, 0x7f16af2a, 0x1f86acc3,
- 0x4940e906, 0xe713b1e0, 0x574c3ffa, 0x50c918ba,
- 0xae9042e6, 0x43470460, 0x9e99c336, 0xa74da7d2,
- 0xc67e0682, 0xa1e8e4e2, 0xd3cad19e, 0xd5ba8efa,
- 0x6cab7f82, 0xf696495a, 0x463383c7, 0xb379e7a3,
- 0x973cce82, 0x9ae3a0a6, 0x7bad9106, 0x3889cc68,
- 0xa5ce5306, 0x153d7346, 0x1483cf98, 0x77abe050,
- 0xab7c1290, 0xbe290421, 0xc415efbd, 0xbcd8a4fd,
- 0x1793f315, 0xf75e64b1, 0x8c04571b, 0x9972f58d,
- 0xe7711e83, 0xf3f5c1b5, 0x7b1d71b9, 0xca206cd5,
- 0x69cf448e, 0x2cf6071d, 0xe850d34b, 0x33a96494,
- 0x2a3fe814, 0xc11023a1, 0xbb11230e, 0xd304b81b,
- 0xb6a9dfc0, 0x4068b472, 0xf85bed8f, 0x03bb2e1f,
- 0x9e7b3cfb, 0x472516fa, 0x228da936, 0xfc61d107,
- 0xb6540f05, 0x7a629ce5, 0xca7d1270, 0x4c0f6252,
- 0x0bb5e656, 0x9de79324, 0x39944d8a, 0x36e744fd,
- 0xfcf6f8de, 0x0d8a0c30, 0xfa1e1af4, 0x40665448,
- 0x28b90a7d, 0x1b57cf74, 0xf7a2ff20, 0xd05f0a8d,
- 0x19087bb5, 0xddc47201, 0xcbc3f88e, 0xeabc21bd,
- 0x24add3d2, 0xf2809ca3, 0xb16d4ec8, 0x0de17a29,
- 0xfc709ef0, 0x658fe45f, 0x5248265b, 0x3a182f23,
- 0x01462119, 0xde454c30, 0x65c1f7d9, 0x9e9f3e96,
- 0xf2a6153d, 0xe57a3487, 0x93dabef9, 0x3c4945c4,
- 0x5fa3a54e, 0xb0633694, 0x435ccad9, 0x77f81678,
- 0xfced6b28, 0x527bc7e9, 0x420e5136, 0x7a1ec85e,
- 0xb989aff2, 0x16f84d65, 0x6eedb0d9, 0x0a6d3632,
- 0x15da7ddf, 0xe3c1372a, 0x68369fc5, 0x89841fcc,
- 0xead4f084, 0x208bb162, 0xa646031b, 0x6f4a8621,
- 0xa202f470, 0x83b33140, 0x3f5e1e90, 0x66f8096c,
- 0xac529236, 0x98f294b3, 0x92facc63, 0x95d065f0,
- 0x9267721a, 0x16d49767, 0xc6da6f9f, 0x5af873d1,
- 0x879fa294, 0xe254b2f1, 0xbee6cd9b, 0x95507f8f,
- 0xcf8f7874, 0x27a6dfea, 0x7dcc5e88, 0xcbd3efde,
- 0xe1185367, 0xd943882d, 0x491bc418, 0xa0bc954f,
- 0x6b4dd4d2, 0x576322d8, 0xf182116d, 0xe1331764,
- 0xac279fc3, 0xa1373af6, 0x945c84bb, 0x5bffd717,
- 0x1a0d11e3, 0x9f93aa15, 0x30ce3d84, 0x6357769f,
- 0xb8d04350, 0x305a834c, 0x621099c8, 0x1983393c,
- 0x28de7fb3, 0xcdf2902e, 0xd59e4aad, 0xa55a2b27,
- 0x85787263, 0xca97d1ce, 0x68b3356e, 0xff6ee05e,
- 0xe65ffef7, 0x5a0e6e3d, 0x99a7035a, 0x8fcfd982,
- 0x2f7ae752, 0x0c1a2908, 0xad363223, 0xcc0177ad,
- 0x711b94fe, 0xb7239481, 0xc19a8ac3, 0x50817d66,
- 0x78882a19, 0xa66636e2, 0x1a18d180, 0x00da9eee,
- 0x034f487d, 0x45b8e0a6, 0xffd4b3ba, 0x323f19c1,
- 0x7e3e48ef, 0xeb831103, 0x09fbc414, 0x487be711,
- 0x1fc1db81, 0x8217df9f, 0xe4abc57e, 0xc7f20bc8,
- 0xdf35659b, 0x0093653f, 0x46b11f7a, 0x971e4cd2,
- 0xc1050d9f, 0x72c6531b, 0x0e0e83ea, 0xeb2409cc,
- 0xc69c2d7d, 0x355bd4b5, 0xe7346e94, 0xa7773e69,
- 0xcee8514e, 0xceaef088, 0xd1d53863, 0x2c730e7b,
- 0x417d137e, 0x9b8dc4be, 0x3d4d85a9, 0xf303cb94,
- 0x15a222ec, 0x59a47f5e, 0x7fdd01f5, 0xedd28a1b,
- 0x7f9a8c55, 0xd156ee8a, 0x87b2df46, 0xcb5c45b5,
- 0x5f2a5f93, 0x0a9d516e, 0xeb6eb6a8, 0x8ac779b1,
- 0xf8f00d55, 0x8d7266fd, 0x24a7b721, 0x9f193e0b,
- 0xe6cf919d, 0x14a8ea29, 0x7fad28d1, 0xb1be27f2,
- 0x221d72ef, 0x5ee3e088, 0xaa9ebd02, 0x81da0def,
- 0xc10dc766, 0xaafd42d1, 0x0b0fb49f, 0x6b6bf26f,
- 0x261a66e0, 0xbff6247a, 0x705ba10d, 0x07ee0461,
- 0x0e5e60ec, 0x45b0b7dc, 0x95d384c7, 0x9e22215c,
- 0xb8e536c1, 0x16cd182b, 0x310281aa, 0xb145c344,
- 0xb65ebf94, 0x7e7a44b9, 0x48b9749e, 0x177392e4,
- 0x04152095, 0x21d5b6d4, 0xc7d28ba4, 0xe4616102,
- 0x7dc780d2, 0x42ed815e, 0x7b3cbe4b, 0xf78be42e,
- 0xe7de6c47, 0xca5bdf5c, 0xbcab5322, 0x145be905,
- 0x23516790, 0xed4f3a20, 0xf066de18, 0x36830cb7,
- 0x834a5f15, 0x9618d294, 0x7206f2ae, 0x4feb2f08,
- 0xa34042ec, 0x28e6ae40, 0x6d98e42f, 0x49f99f70,
- 0x2f229dc9, 0xe782d396, 0x1ed636bc, 0x9e9ce45e,
- 0x77f34517, 0x51a7bc32, 0x43805add, 0xd778a9aa,
- 0x9f5bd5c6, 0xedba1377, 0x17f0e2dc, 0x4d84d371,
- 0x6e422058, 0x64d7982e, 0xf046a2e9, 0x433f0351,
- 0x3b3e1e0d, 0xf81f0b74, 0x20c09528, 0xca17c06d,
- 0x831da66c, 0xe527f162, 0x96972110, 0xa8a7be13,
- 0x2f0d9c70, 0xeee698ab, 0xad1c6abc, 0x7c96fc24,
- 0xd399a69f, 0xac7fc485, 0x26156837, 0x27dc269a,
- 0xe44b4cdd, 0x869e7ab3, 0x379c685c, 0x063d4c22,
- 0x22e65723, 0xc64ea353, 0x5c256aee, 0x8a7935ba,
- 0xbf3c8aab, 0x2e9abd9e, 0xbb3943c1, 0x2837df3d,
- 0x0f19f7d3, 0x65938891, 0x15fde105, 0x38e8bcbb,
- 0x5f4e5997, 0x287385ad, 0x4eaf5516, 0xc3700128,
- 0x0b50a691, 0x11ec0611, 0x408be3fc, 0xe7638169,
- 0xb994d9ed, 0xa8d9356f, 0x53eefe5f, 0x8a111522,
- 0x6b068b63, 0xceced4b9, 0xafd4faee, 0x3884d599,
- 0x34b5985b, 0x0c82e13f, 0x59215ff7, 0x911043ed,
- 0x5e5dae2e, 0xe5843435, 0xd9474869, 0x350281aa,
- 0x2ad158e8, 0x7123896f, 0x3eaf8c9e, 0x99b90f09,
- 0x802740c3, 0xb8e665c9, 0xd0f5f529, 0x126b23b6,
- 0xe208365d, 0x38cce937, 0x8a129e3d, 0x78db76ca,
- 0xf5d20736, 0x2ef6ade8, 0xdd6d9dde, 0x372baa43,
- 0x9bcd10dd, 0xd1b7f48a, 0x8431e624, 0xd5979b17,
- 0x7bc2642d, 0xd2186b5d, 0x5a098368, 0x1866ce66,
- 0x0149a8be, 0x0b63f195, 0x8f95369f, 0x4d362586,
- 0x444718d4, 0x93a18a6b, 0x94cbb34d, 0xff0c20a5,
- 0xb8d9ac40, 0x26969e98, 0x2f0d60ac, 0xe8ef3b88,
- 0xd20c7233, 0xb1c5f1f4, 0x48706a33, 0xa1b5909d,
- 0xec661a87, 0x7ff36756, 0x95bdbc8f, 0xfee2dfdc,
- 0x0460ef1e, 0xb387245c, 0x55a2d182, 0x2dcd0940,
- 0xe99e299e, 0xd4199d96, 0xc62203e7, 0x90212850,
- 0xf6da62e8, 0x7ce9e934, 0x54697942, 0x7fc087aa,
- 0x9843f4ec, 0x7deb5baf, 0x6b41c6fc, 0x560113a9,
- 0xe05a9fbc, 0x49671f9a, 0x5f0be32f, 0xfc8a0e56,
- 0x9927e6df, 0x8b167f8e, 0xf3b23d5a, 0x3c2318fa,
- 0x56f6c4f8, 0xcf8eff18, 0xede6d2b9, 0x55592c6e,
- 0x303a8416, 0x316ad298, 0x3d1542df, 0x8435ce0b,
- 0xaa62a01f, 0x345228c6, 0xd5865248, 0x271309a6,
- 0x69f8da64, 0x2fff484e, 0x018403bb, 0x38691ddb,
- 0x60c8a4d8, 0xa2d72465, 0x6fb13785, 0xb99b42bd,
- 0x6569d143, 0xb00c8530, 0xd71a09f7, 0x6ca0b9b2,
- 0x1eb0d532, 0x0264b2f6, 0x65c01500, 0xb0be8d1a,
- 0x5f4fdbb0, 0x7ac7c3cc, 0x51898d11, 0x113d34bd,
- 0xbec078d3, 0x49129c93, 0xf6700c54, 0x58a50d36,
- 0x75d68e5a, 0x5333f695, 0x2de57dfb, 0xde95df62,
- 0x1d9f0ae2, 0xb012d517, 0x9e34af7f, 0xf7261039,
- 0xa895801a, 0x28e352fb, 0x307fbd98, 0xbe8d83c3,
- 0x562e93dd, 0xa697a7d1, 0x7b43888e, 0x8a408cac,
- 0x88ea6024, 0x8c682d37, 0xdf2b33ca, 0xa2f78ebe,
- 0x23af66b8, 0xed2c06ab, 0x940e4940, 0xa0bb4961,
- 0x5747158e, 0x30a677a2, 0xc6ef5fb5, 0xc45ac482,
- 0x11c25a06, 0x7c06a237, 0x49689182, 0x4a176923,
- 0x77eedc4f, 0xcc65ee49, 0xcd26f5d9, 0x8eef5b7c,
- 0xbaed281f, 0xe915c21a, 0x8da83c90, 0x18d11598,
- 0x8859c9f3, 0x29b349f9, 0x45928152, 0x6dc7e5c4,
- 0x4f545aee, 0x74e05a96, 0x1eeedf71, 0xb6f457d9,
- 0xce3e49ad, 0xb06a2649, 0xc5293ecb, 0x2dc38789,
- 0xa7481c6c, 0x54837608, 0x76f73b66, 0xdf80af5e,
- 0xb90b8110, 0x3d4df647, 0xbe99edf4, 0x8042b279,
- 0x6b4b5b32, 0x7bcb5237, 0xdc105c89, 0x5d99b6eb,
- 0x215173e5, 0x68e59fec, 0xc3dc41e5, 0x996b24fd,
- 0x79bbe803, 0xe99dd835, 0x2cf1fab9, 0x1d55b165,
- 0xfdd11eb9, 0x7776e5a3, 0xc5a66fe0, 0x3862f8cc,
- 0x0fbe6d6d, 0x184fde91, 0x4e0f282c, 0xebac791d,
- 0x8d472645, 0xa9607139, 0x51b9c29d, 0xf1a6d11d,
- 0x8bb50e54, 0x368eb3c1, 0x420493c0, 0x26923095,
- 0xcb11ce4a, 0x4c445228, 0xd4da6bc8, 0x719786cd,
- 0x40989b28, 0x91e912a2, 0x6b236aaa, 0x34199deb,
- 0x45e69fab, 0x9bf9270e, 0x40b8de21, 0xf0e76fa2,
- 0xb5b3e5d5, 0x081b7fb0, 0x752f31ef, 0xf4cbdc77,
- 0xb7c80e7d, 0x402434ee, 0xedb7f032, 0x14681967,
- 0x8a49da97, 0x03884246, 0xfa470e63, 0x2e420b0f,
- 0x88c21717, 0xd0c470e4, 0x0dbb4f50, 0x36d1daa2,
- 0x00cbf19f, 0xd202f093, 0x630a7ff1, 0x1ab4b80a,
- 0x0f9af8b4, 0x1702eb74, 0xab0e81a3, 0x97e53ab5,
- 0x5ea0cf39, 0x31173bfb, 0xa0e8af3e, 0x3b58b1ba,
- 0x2ed8866c, 0xb01e2bd1, 0xf0a21578, 0xaa1f3543,
- 0x7a15fd47, 0xb40b6a2d, 0xd06c0c89, 0x8569c8d3,
- 0x69e6d786, 0x251eb918, 0x22379ae7, 0x743e04af,
- 0xa3fc49a3, 0x45dac6eb, 0x4985eda6, 0x6c76a2dd,
- 0xbb903235, 0x192cf45a, 0x0a3ee53b, 0xac85dde1,
- 0xc71afaf0, 0xa2c4f5d8, 0xdd578d0c, 0x9e415976,
- 0xd31df518, 0x179c47a9, 0x82b86f95, 0xde5551d3,
- 0xa8453d3b, 0x19e52874, 0x3f436f24, 0xbd260e57,
diff --git a/src/soc/intel/broadwell/microcode/microcode-MC0306D3_FFFF000E.h b/src/soc/intel/broadwell/microcode/microcode-MC0306D3_FFFF000E.h
new file mode 100644
index 0000000..c54d6d2
--- /dev/null
+++ b/src/soc/intel/broadwell/microcode/microcode-MC0306D3_FFFF000E.h
@@ -0,0 +1,1024 @@
+ 0x00000001, 0xffff000e, 0x04222014, 0x000306d3,
+ 0x4118e82b, 0x00000001, 0x000000c0, 0x00003fd0,
+ 0x00004000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x000000a1, 0x00020001, 0xffff000e,
+ 0x00000000, 0x00000f81, 0x20140422, 0x00000f81,
+ 0x00000001, 0x000306d3, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0xd77e8043, 0x053fd007, 0x247a2669, 0x6e31597a,
+ 0x7b16d8c3, 0x0c5091dc, 0xa761c0f4, 0xc8d62b69,
+ 0xe1d4113f, 0xc3085503, 0x1367060c, 0x9bf7efea,
+ 0x2b756eb6, 0x2ee07b69, 0x7cfd1dc4, 0x9811c8b2,
+ 0x86cf4036, 0x20534caf, 0x37046580, 0x432b4e6c,
+ 0x6a3a2e54, 0x88a74dfc, 0x81a503f6, 0x67736b51,
+ 0xbc2b11b7, 0xbcf3adc9, 0x96c8eefe, 0x688bcc49,
+ 0x16c4f996, 0xe0175cd2, 0x454d7a58, 0xa67afd13,
+ 0x098d9e42, 0xf86d2ec2, 0x738a67a6, 0x26c4ad17,
+ 0x08666776, 0x050d971d, 0x68998a7c, 0x21ac9cf9,
+ 0x29e27b61, 0xd61cfd7d, 0x3500ff83, 0xd4123687,
+ 0x27b72496, 0xe9b867f6, 0x62920d71, 0xe159dd34,
+ 0x3991c6ba, 0x367a5719, 0x7af5e9df, 0x5cb9fd11,
+ 0xf5988469, 0x4153f210, 0x24b194a9, 0x8c563988,
+ 0xac5bfd38, 0xd271e693, 0x16e9b292, 0x0c6583d0,
+ 0xd2501a4f, 0x9896af00, 0x6665aa9f, 0x0f3a8de9,
+ 0xc8f0db5f, 0x60b7a546, 0xe3a52963, 0x0ea3eb39,
+ 0x0d8c08ab, 0x2f5faa26, 0x1d3cbd56, 0xa8596256,
+ 0x00000011, 0x105ff943, 0x9182aa14, 0x901f6abb,
+ 0xc36c887b, 0x5edd51e2, 0xcc06b81c, 0x6a7dca63,
+ 0x9fd185b8, 0x43814f9a, 0xc2fc901f, 0x6e5ba738,
+ 0x62fb4945, 0xb41bc1fb, 0x3fccae81, 0xafd88130,
+ 0x39e25c3f, 0xb78d0bf6, 0x15bba93e, 0x687686b7,
+ 0x99dc5397, 0x4629e37d, 0xeee1857d, 0x37f2bdd5,
+ 0xf5f6186d, 0x74ad07f7, 0x27c12b4f, 0xee125d3f,
+ 0x721f4f6b, 0x70e12df5, 0xb7477f41, 0x0e7c06d6,
+ 0x3fe523ac, 0x540689dc, 0xd8c7e134, 0x9302e446,
+ 0x0e820888, 0x8f46dadb, 0x567e67e2, 0x45f29239,
+ 0x6da711f2, 0x6599858d, 0x13bd849f, 0x14c32740,
+ 0x731a15f8, 0xab24e116, 0xa6b70b1e, 0x88d33094,
+ 0xcb26137e, 0x3e515be1, 0xb1e36bf7, 0x68623e8b,
+ 0x6c593fa5, 0x1b86e2c5, 0xfddff903, 0xb61bbdcd,
+ 0xb2781f16, 0x9c0ceb7c, 0x9ae116d3, 0x4238c937,
+ 0x792d2caa, 0xb1b5d199, 0xc5879f09, 0x60385c18,
+ 0x0881848b, 0x28281137, 0xe5f46d6f, 0x9227291b,
+ 0xbccba8dc, 0x8a55eb2d, 0xd9a17257, 0xba386a9c,
+ 0x47d69964, 0xe48e05bb, 0x5c82ecbb, 0x8770c09f,
+ 0xb619e8a8, 0xefd2affb, 0x37614a34, 0xb01d2df2,
+ 0x309b9c55, 0x2175ce65, 0x1cef0824, 0x88aeb747,
+ 0xec1c7832, 0x26cb6339, 0x12489f93, 0xb06a2315,
+ 0x98483f1d, 0x3626f6e8, 0xc94ff9b1, 0x65e5063f,
+ 0x7dddc3d8, 0x010e81c6, 0x822a5ac4, 0x8694f510,
+ 0xc3260ba7, 0xdb9baffa, 0xf479b559, 0xd0138421,
+ 0x62f6220c, 0x465caf01, 0xbe62343c, 0x14559067,
+ 0x2340f8fc, 0x96f38c08, 0x04f94a88, 0x357e6b0a,
+ 0x3dd7cf18, 0x0f5f00d4, 0x810db7b7, 0x9e9781c1,
+ 0xbbec1ccc, 0x192ac2d0, 0x1e09205a, 0x0a658e77,
+ 0x24be9085, 0x39d76589, 0xd2fcb193, 0xad1db077,
+ 0x4d5ae0c4, 0xbdd33f0c, 0xb120d1ee, 0xa3f7bffe,
+ 0xbe5905ed, 0x9db56deb, 0x466b1a86, 0x72660ee9,
+ 0x92acd52d, 0xe65760b7, 0x35ce19c3, 0xb8ba7a84,
+ 0x94bfbd07, 0xf5e9d2e4, 0x40d8e274, 0x0b65d05f,
+ 0x63a75f90, 0x20908cb9, 0x348119cf, 0x70490167,
+ 0x878a0e1e, 0x259c9b35, 0x33ce4241, 0x5b22a7bb,
+ 0x0961e535, 0x030eb87a, 0x0089d290, 0xd20e76b9,
+ 0x5a392700, 0x539933c5, 0xa0946781, 0x617ac81c,
+ 0xd05cf49e, 0xd32ee144, 0x39497fad, 0x2a5ff211,
+ 0x85db8c3d, 0x22e77c76, 0x2e7dcde4, 0xc73506ac,
+ 0x42fb7257, 0xbb84262b, 0x9e7f18f1, 0xc478d3e7,
+ 0xd7d7a774, 0x71499dde, 0x7746d952, 0x7f3d2cc4,
+ 0x463f5fdd, 0xef9db199, 0x28a51ec8, 0x4ee7a3f5,
+ 0x7f864ebb, 0x32b34247, 0x6c2bec8e, 0x5fe593ca,
+ 0x4fcce94c, 0x93c0ba6a, 0x69378519, 0x92f75205,
+ 0xfac55fbe, 0x7a14ccbe, 0x8ed658c4, 0x1eb33e7e,
+ 0xc0d92107, 0xed65fedc, 0xf6086fdc, 0x0d71b380,
+ 0x63c50531, 0xb3fab58a, 0xed87c22e, 0xd45e16f9,
+ 0x599dd274, 0xac9280cd, 0x5ebc8c75, 0x926ab086,
+ 0xb953b832, 0x6442a262, 0xe85c67fd, 0x72bc197c,
+ 0x8ee0c776, 0x942b5e5e, 0x7dec9521, 0xd8a15c27,
+ 0xf727ff71, 0x2c4b7f8f, 0x1d7ae92e, 0xe6003401,
+ 0x7a83c8e8, 0xa2742a1d, 0x7c7fdd23, 0xb099d7f2,
+ 0xae2bd9d2, 0x8be79c7e, 0x679ba725, 0x0c9d14f1,
+ 0x05a86ca8, 0xcd6561e5, 0x468b1cbc, 0xc8283fc6,
+ 0x75ccd28d, 0x8d3dc62f, 0x21421d14, 0xa4a976d1,
+ 0x33a7fe4b, 0x94ac2f1d, 0x4e145726, 0x63016222,
+ 0x7c2b2a1c, 0xaa84569d, 0x12f27fde, 0x47f473f7,
+ 0xacefe725, 0x03d6df3a, 0x8d7229a8, 0x139d30bf,
+ 0x8ecfc0c9, 0xf2762096, 0x5b9ad10f, 0xe074bdf8,
+ 0xbe4e3ad0, 0xbd801176, 0x6e5b5958, 0x58dd0963,
+ 0xe24c7dd2, 0x707ddf75, 0x86e3f97d, 0x5cfd2ce6,
+ 0x6168a956, 0xa10cbf3f, 0x3ed04c6f, 0x8c380c59,
+ 0x1d776275, 0x36b5c51b, 0xb617ee26, 0xa9179c01,
+ 0x2c8f4fe4, 0x4e5eea43, 0x565496de, 0xbe1d166c,
+ 0xc2339070, 0xec7a2245, 0x370e4d95, 0xea98693b,
+ 0x6dfc5148, 0xa535409d, 0x03fd080f, 0xaff6a56f,
+ 0x3aab38a4, 0x6e13e40b, 0x45b1c415, 0x964c9394,
+ 0x5eb5a230, 0xc602ddb3, 0xaec00636, 0xe59c566f,
+ 0xc911b9c4, 0xb79bcbd1, 0x012c4c17, 0xe8ea0e9c,
+ 0xe99485a3, 0xdcf0f652, 0x94e3bde3, 0xc5c6f667,
+ 0xfbfcb018, 0xa5e4cd88, 0x3597eb46, 0x594f1355,
+ 0x859f6024, 0x3f6e360b, 0x6b4620a5, 0x552c3be1,
+ 0x0b1111df, 0x0d4022f0, 0xb4c65fa5, 0x38db4b0f,
+ 0x9cbf1b20, 0x1c4d666b, 0x41a4cd62, 0xa9694ee6,
+ 0xb57ba945, 0xbeaab0ab, 0xbfac15eb, 0x156663c2,
+ 0xf08e0243, 0xa19562ed, 0xc093b73d, 0xc8838206,
+ 0x174e93ba, 0xf8f6aef5, 0x56f43640, 0x92a9a64e,
+ 0xa6e9dea7, 0x4517891c, 0xea596fa2, 0x3d5940d2,
+ 0x4494db6c, 0x21523db0, 0x98eda256, 0x20164a55,
+ 0xa5bc26f7, 0x8a4b873c, 0x2d072595, 0x5f64b189,
+ 0xe7e2d18f, 0x41b1e197, 0x6cb36a35, 0xdeb1828e,
+ 0x5b99c56a, 0xd71d573b, 0x32ad4dc8, 0xf436bcfe,
+ 0x3d3d27ce, 0xe8786076, 0xeeb35fd6, 0x8f00945c,
+ 0x2c1dcf0a, 0x5158fcfc, 0xc443c5d8, 0xc6e3dc9a,
+ 0x98e3853b, 0x7e6e0312, 0xad6af289, 0x6bbdaefa,
+ 0x9888692a, 0x57dc840d, 0xcaadd563, 0xa75056df,
+ 0x246b09ce, 0x4b68cc2f, 0x1617015a, 0xf0936f91,
+ 0x061d61d4, 0x0aedd0d1, 0x59de837c, 0x4d365b51,
+ 0x1b09358a, 0xe4562292, 0x5d607d00, 0x0ba82d12,
+ 0x71310321, 0x0029b248, 0xf0250e60, 0x667fef29,
+ 0x24007821, 0xc5673359, 0xae7bfcb8, 0x87613c3e,
+ 0x9a8487a2, 0xb8b7a45e, 0x54180131, 0xa71200ab,
+ 0xa71a0f95, 0x277be3f3, 0xe46aeb53, 0xb5c2a7a5,
+ 0xc2cbf7cc, 0x767b3954, 0x64ec4319, 0xc0d2bced,
+ 0x1bd48c1f, 0x185ffa3b, 0x5a01464c, 0x3423d06e,
+ 0x141f1fc4, 0x83d9f47f, 0xfdca62dc, 0x620a29d6,
+ 0xadfa19f2, 0x97f95a93, 0xd3826ded, 0x3873edb5,
+ 0xfb61d74e, 0x81e15a27, 0x2254452b, 0x1e27311c,
+ 0x3ddb7a72, 0x708500c2, 0x8805ef4d, 0xd71aa33d,
+ 0x45815bb3, 0xcb98a170, 0x9a4d2e7a, 0x86d294ec,
+ 0x911b41bc, 0x845d6024, 0x7f26eb22, 0xdd753bc8,
+ 0x31a62f7f, 0x2266e2bc, 0x37fbf0a1, 0xa4362ee9,
+ 0x6479f7ac, 0x6fcad91d, 0xeded2311, 0x6191a27b,
+ 0x008bc95f, 0x158b43ad, 0x7a2c2222, 0x493cec34,
+ 0x0896b41c, 0x5070a2fc, 0x0dae1266, 0xc8cadc12,
+ 0xdae3512e, 0x6f2f65e3, 0x6b082113, 0x8da5b706,
+ 0xeaa4f9d0, 0xefab0b72, 0x9f8f0d8c, 0x622d9262,
+ 0x7d2465a8, 0xa160e5ef, 0x88d091fd, 0x82fd1dc5,
+ 0x3049cc87, 0xcad60dd8, 0x108f7960, 0x6926b88c,
+ 0x84be8dd1, 0x247de766, 0x7f00f77b, 0xf1f69ca3,
+ 0xa816c6a7, 0xd0fb0f53, 0x1851af6f, 0x75de8704,
+ 0x2a15a2a5, 0x20e513a2, 0xd24485a1, 0x75b7f240,
+ 0xef3ffa4e, 0x679852e2, 0x80cc8393, 0x37527a80,
+ 0x7f54a20f, 0x02308caa, 0x48596549, 0x984d08fb,
+ 0x99724f36, 0x1d176b85, 0xec6f6bfe, 0xb344c170,
+ 0x8fefc02e, 0xe8671023, 0x911e0c22, 0x4ee8532c,
+ 0x7cfe6e59, 0xf7d2498e, 0xb24de054, 0xbe685e13,
+ 0xb3bc20c6, 0xe85e985a, 0xdb8fa36e, 0xb7a64474,
+ 0x1d4bf309, 0x91906737, 0xa87c19d9, 0x56df1aa6,
+ 0x5cea67c2, 0x910fea17, 0xbae0f0a2, 0x7f5012b7,
+ 0xdc889781, 0x08d1fef1, 0x672a494e, 0x4deb94b4,
+ 0x6ef934f7, 0x5b3c6837, 0x224701f4, 0xd4a786d8,
+ 0x219c76fb, 0xc662e001, 0x9842f0e9, 0x40b57059,
+ 0x39d4f08a, 0x5fadd60c, 0x7c929db9, 0x765ac104,
+ 0x8868349f, 0xad9141d0, 0x3484a16a, 0xe3f3e024,
+ 0x7eabd8d1, 0x7485b03a, 0xd2858a41, 0x7dc5e38c,
+ 0x82285dc6, 0xbe91fd22, 0xb47b5f3f, 0x70bebb6a,
+ 0xb462d3af, 0x7799b038, 0x3c521d23, 0x9ec6b5b0,
+ 0xbb993e5e, 0xfcb5a883, 0xd4305551, 0x1d5c162a,
+ 0xcc0cadfc, 0xe0eb0fea, 0x30d4e750, 0x2d458455,
+ 0x3efa6ed2, 0xd6bac448, 0x7f90f4bd, 0xe13e878b,
+ 0xe27843eb, 0x6e249d6e, 0x73c81037, 0xd5017109,
+ 0xbc66763f, 0xed02d360, 0xcc5b9b05, 0xc434d37f,
+ 0xd0207471, 0x8f5447e0, 0xc17bbf0f, 0xe4265896,
+ 0xfdcad0d3, 0xd6a36bb8, 0xc6998e33, 0xef4815f8,
+ 0x7cbfb08e, 0x8ecee297, 0xf6ecec11, 0x5b5211bf,
+ 0x83a3fb16, 0x248d194a, 0x7a13fb95, 0x940eece1,
+ 0x3d71c702, 0x352d6a23, 0x26872f73, 0x0cd74df1,
+ 0xdb0de310, 0x57f121fe, 0x75e035ad, 0x7e39a052,
+ 0xb2c22c3d, 0xea180eca, 0x04d926d4, 0x17111875,
+ 0xdd40e0c1, 0x22d78c8c, 0x2fd8aca8, 0xe681c07c,
+ 0xaf0e1c51, 0x3cf95b46, 0xb4286f83, 0x7cee29eb,
+ 0x2f2dc87b, 0x9535d699, 0xed9b5f3a, 0x5a2a060b,
+ 0x9f8e1866, 0x2b9b6b56, 0xc7102b7f, 0x83bef130,
+ 0x0a14babc, 0x1bdca791, 0x3833f287, 0x6e3eeaf7,
+ 0xc7a27833, 0x4033a94a, 0xd91d6c47, 0x2a77f7f5,
+ 0xebaaebdb, 0x4c9a4744, 0x3532d7a4, 0x94a8d49f,
+ 0x37731a2d, 0x4a6a477a, 0xfc9f2970, 0xd6d6de71,
+ 0xf705f80d, 0x2dfc8e5d, 0xd7c54ccd, 0x967c6bc7,
+ 0x170233ca, 0xe7df0749, 0xa0bb4e5e, 0x425a1423,
+ 0xee8ed00b, 0x922d2552, 0x7c20830e, 0xe40e1e79,
+ 0xce5d7adc, 0x8d8f6635, 0x31222a1f, 0xf3a7f9e5,
+ 0x9ee8b192, 0x0768d8a7, 0x52ce9385, 0x1d187467,
+ 0x7c109798, 0x06f7ceb0, 0x4e0df940, 0xa1211ee3,
+ 0xb8b97228, 0x66e1c242, 0x07fa2b26, 0xd0f54d49,
+ 0xb41d5885, 0xf07153fe, 0x5177c9f0, 0xde524b61,
+ 0x92c8b8df, 0xcbad4280, 0xbd556b4a, 0x2fbb34f3,
+ 0x78377e46, 0x946fe674, 0xdd6f688d, 0x5daee5d4,
+ 0x6cba1643, 0xfd32872d, 0x65c5b43a, 0x701f8030,
+ 0x1123712b, 0x205f1c44, 0xf967729b, 0xc09e5ad0,
+ 0xdbcfe532, 0xaa1d28c0, 0x9354fccd, 0xb1c34dfb,
+ 0xf4653abf, 0x6a247712, 0xc89ad0ab, 0x9b1d072d,
+ 0x672df306, 0x443d5601, 0xb7ef54fb, 0x2a209f4e,
+ 0x0c583d3e, 0xdbb1c4c6, 0xaed0e240, 0xa474575f,
+ 0x4787773f, 0x0d50e56e, 0x020602e9, 0xabf8124a,
+ 0xafb7e637, 0x75006802, 0x1f554f43, 0x3ae07d7a,
+ 0x7966af96, 0x01817a52, 0xc97a62da, 0x20240d3e,
+ 0x6e47543d, 0x44d0b7a7, 0x62774d75, 0xaa3244f5,
+ 0xf4872309, 0x6bb84100, 0x1e9676c2, 0xca5fa0b9,
+ 0x1a712139, 0x65430475, 0xc89ef0bf, 0x0d0cfcd1,
+ 0x7d74e4cb, 0x579ae5a7, 0x89047ce1, 0x3f0079e6,
+ 0x58e94b5a, 0x3d982b5a, 0xf6f9e611, 0xd810b86f,
+ 0xaca224ec, 0xcd4afc56, 0x4a97242a, 0x49c95c9d,
+ 0xdafc4596, 0x7c468801, 0x72a5b3df, 0x787c213a,
+ 0xb441a45d, 0xc3b30c8b, 0x56d2e598, 0x28cebbb7,
+ 0xa505ca78, 0xdce1fd86, 0x25a1ad8a, 0x5c125fbf,
+ 0x466e0821, 0xfe282a9a, 0xefc805ac, 0x52c55323,
+ 0x45516f7b, 0xe85dfb3b, 0xf2bbb2c7, 0xca9cd386,
+ 0x4e718dd1, 0xb89876f0, 0xef1ae7d3, 0x6c50d538,
+ 0xf27121f1, 0xcdbabad1, 0x939695d7, 0x5d862eec,
+ 0x0f1235d3, 0x8d3ac278, 0x89be74d7, 0x641d024c,
+ 0xd8347fd7, 0xe59f3de3, 0x68bf59d7, 0xd216a8f7,
+ 0x5c51f988, 0x542d3529, 0xde06a186, 0x003856ec,
+ 0x876e9d1e, 0x9c807d0f, 0xd24dbf8c, 0xf1c4de50,
+ 0x734db856, 0x1c864489, 0x283221ba, 0xe7861aee,
+ 0xf52a0329, 0xade9337b, 0x3dbcf5e6, 0xb4ab6ea6,
+ 0x57f87aff, 0x056f5e82, 0x74293021, 0x4ee93be4,
+ 0x3c5ed811, 0xb66b13db, 0xe7416b8a, 0xbcda0c61,
+ 0x1270f4a0, 0xe94f7476, 0x12d6f613, 0x5c7e043e,
+ 0xbce59bfd, 0x4c774000, 0x66c8b2f3, 0xe797d43c,
+ 0xf9a9e753, 0x86b2cec8, 0xc3961095, 0xbb4d33a3,
+ 0x74f040f2, 0x478f5273, 0xd2d06170, 0xca387a08,
+ 0xb352c976, 0x54032702, 0xbe7910e0, 0xc6b01af9,
+ 0x6f64543e, 0x6d4fa922, 0x2855f200, 0x31621813,
+ 0xe3d73c08, 0xcec90da4, 0xc6137dba, 0xfad5463b,
+ 0x6f3fed86, 0xca7599f4, 0x38e96dd5, 0xb3905788,
+ 0xb61e4212, 0xc530ef9b, 0x103a581f, 0x9d3c6367,
+ 0xdb0ad577, 0x9adfe9a3, 0x9fa17128, 0x8e1614ad,
+ 0x874b695c, 0x7ca03b01, 0x97bdb683, 0xc4389860,
+ 0x7911ab58, 0x45993521, 0xd0d1f0f6, 0xe94225a5,
+ 0x556fe3c2, 0xef7b656d, 0x650f05ac, 0x1fe097d0,
+ 0xd69a11d8, 0x936de127, 0x92118894, 0xc8b03dc2,
+ 0x8fe7e35a, 0xfd64c96b, 0xe30eef03, 0xf75bba0a,
+ 0xc6c7ec25, 0xdfd112b3, 0x93e10ccb, 0xedf44f49,
+ 0xa03f20ec, 0x8a0b646b, 0x15eee626, 0x29c2fbdf,
+ 0xcc3a8912, 0x2f78a059, 0xfb9e3363, 0x6237f024,
+ 0x8c636002, 0x199cdb8a, 0x34b0673a, 0xc506c164,
+ 0x047fe1c1, 0xe14d84f1, 0x735ad9b2, 0x3ec11786,
+ 0xed200f18, 0x1a0182b4, 0xd05ca2f1, 0xb6b4a89b,
+ 0xa612786b, 0x1a0d44fb, 0xad3eda4f, 0xbbc1f0b1,
+ 0x27d1cf90, 0xf7842b68, 0xbfacad67, 0x995776bf,
+ 0x83b40ab3, 0x2d148962, 0x50264264, 0x485229c6,
+ 0xcedb695c, 0x648fd567, 0x11cdeaf3, 0xdaeda127,
+ 0xbf24ec38, 0x6fc8dee2, 0x5e5f6ceb, 0xaaffd16d,
+ 0x3e2adad0, 0x505313fc, 0xcb9eb00e, 0xefaafe50,
+ 0x31a1ad4a, 0x9dd1c3ab, 0x95990897, 0x0fbbcee5,
+ 0xf37278f1, 0xc159cef3, 0x4110dd1b, 0xd1df3c6e,
+ 0x5110cdf8, 0x748b7210, 0x3142b7fa, 0x8c3e7644,
+ 0xa67242de, 0x794e52e7, 0xd2f8c0d2, 0xd33bbd7a,
+ 0xc5d746f0, 0x10f75923, 0x91ae806c, 0x6ff16f16,
+ 0x29f230b5, 0x290239f7, 0x38b76eb4, 0x7ad85121,
+ 0xf967d0f3, 0x050e89c4, 0x70030d62, 0x8e36638f,
+ 0x2cfb0ab6, 0xdaa9617f, 0x0c5411da, 0xa88c826c,
+ 0x57ead121, 0x68844d67, 0xc2cbea32, 0xed1a0b2e,
+ 0xc3fa70a9, 0xaf6eb029, 0xd448de2c, 0x295abb52,
+ 0xa0d0150b, 0x6de71f23, 0x79299da2, 0x239014b8,
+ 0x8c192cd0, 0xbf066e2c, 0x0ef391ed, 0x390bbf0f,
+ 0x96bcd05f, 0xfb71ed23, 0xf15f5bcc, 0x46b91098,
+ 0x1293dcbe, 0xb46b38e3, 0x8bb6b9df, 0x2e0cba1e,
+ 0x865eaa86, 0x48ecfe40, 0x458befc9, 0x1719c125,
+ 0xf66497f6, 0x64e82d55, 0xcd8d4f23, 0x4a18e7de,
+ 0x6814f1d7, 0x65661d00, 0xe62d55bf, 0xe7283a9c,
+ 0x88aa8408, 0xc0d7d790, 0x44644393, 0xa45e7876,
+ 0x66af63b9, 0x4f393cef, 0x048328a6, 0x5703a215,
+ 0xad422118, 0x64e0d380, 0x59153140, 0x5c9f5a06,
+ 0x35f6a6c4, 0xf925619e, 0xe84ed188, 0x14fd3081,
+ 0xfb7dddd7, 0xbb30cdd1, 0x9d2066a1, 0xe450974e,
+ 0xb884119e, 0x22a1c215, 0x37f1eeac, 0xb9af19db,
+ 0x52156c0d, 0x39f30d64, 0x8ad45b18, 0x00883e36,
+ 0x92f7a051, 0x445182a7, 0x2a6b28e4, 0x018c6d21,
+ 0x61f7106a, 0x200f0ccd, 0xaa3abaa9, 0xb4b37e28,
+ 0xf93a3526, 0xb570bda9, 0xf8f3ab09, 0xc756b193,
+ 0x1468709a, 0x04ac1b0c, 0x3d21b618, 0x06ac29f2,
+ 0xd0194aba, 0xff5867c2, 0x9e8ae92f, 0xea2222c4,
+ 0x185dcee4, 0x8110fbfe, 0xc741ac4c, 0x4dcd8a2c,
+ 0xebcfb01e, 0x834f3b0c, 0xfc00b2b0, 0xd14d6acb,
+ 0xe5c5e836, 0x0d87f5b6, 0x1d574d70, 0x93136e26,
+ 0x12da582f, 0x7cc55618, 0x9d2e250c, 0xc362083e,
+ 0x765d01ca, 0x84253508, 0x92ef6dbf, 0x5d30b31a,
+ 0x7a23b95b, 0xbe2113cb, 0xab7151b1, 0xd7236da1,
+ 0x4ba99fe7, 0x3007342a, 0x33e1c274, 0xf61ba790,
+ 0xec198fce, 0xf6793d30, 0x3e5e0f33, 0xf1e39ca6,
+ 0xe4c49a79, 0x77a3e674, 0x1eb39397, 0x01d195f0,
+ 0xf4774ea7, 0xcf558285, 0xa7842d68, 0x3dbbd844,
+ 0xa11213c0, 0xad95c16e, 0x14e416b0, 0xf7361047,
+ 0x9ea3384c, 0x09e8d457, 0x544aa13c, 0xce05ebca,
+ 0xa7261a40, 0x0b3882e0, 0x3bcd5e6c, 0x31596329,
+ 0x009971a6, 0x09f971b1, 0x9955d00c, 0xbdec014e,
+ 0xe7cb997d, 0xceda7174, 0xd4835775, 0x0f3eb4dd,
+ 0xbe8c529b, 0x9632b771, 0x4a68754b, 0x29ce7e4d,
+ 0xa62226d9, 0x03119a3d, 0xe9c02851, 0x4f0225b8,
+ 0x9ef1c47c, 0x96f1ee73, 0xea4e16ae, 0x073ac508,
+ 0x43f41ded, 0x51e3c9ff, 0x64344586, 0xfc58becf,
+ 0x17c3a224, 0x1264b50b, 0x5413dd97, 0x3c72079d,
+ 0x3b09ed64, 0xc89cf924, 0xfcd78955, 0xd834ba33,
+ 0x1940b1c5, 0x2ac9322f, 0x33da8f80, 0x6a5b2d54,
+ 0xbe581700, 0x245f41f8, 0x40b43b3a, 0x8c543aad,
+ 0x119879ca, 0x0365909a, 0x6cb95a03, 0x2c0551a9,
+ 0x2b9b7a60, 0xe9682652, 0xbb29b279, 0xc57b94d5,
+ 0xe0434780, 0x249360a2, 0xcff1f363, 0x94f5c316,
+ 0x0a1750e5, 0xa7bbf13d, 0xc9a81a2b, 0xf580a611,
+ 0x5a53f5f9, 0x97271163, 0x594ae7ba, 0x612acdfd,
+ 0x7dbaae96, 0x419b114b, 0x15308f51, 0x1c93e17a,
+ 0x47f75fd1, 0x1d4305c3, 0xdb34b973, 0x9396192a,
+ 0xa1716753, 0x1faaf5be, 0x4e4dc628, 0x7bfc995d,
+ 0x4818b7cc, 0x858af691, 0x7f9a2008, 0x966a0f93,
+ 0xfdf9da3b, 0x3bcce436, 0xa0e098c3, 0xaad86ba8,
+ 0xf79eb3d0, 0x3a802e7f, 0xbd604613, 0xbeaaf3be,
+ 0x6b424f0b, 0x7db188c6, 0xfaa611a2, 0x8d2f9559,
+ 0x3a946edf, 0xbebfe236, 0x5668fa71, 0xf22619b9,
+ 0xf92a4c1e, 0x79a8a4a4, 0xef30b562, 0xddc83425,
+ 0xcc391594, 0xdcadd3a3, 0x079ff95c, 0x04c8490c,
+ 0x88558612, 0xa6fd4cef, 0xce1ae2c7, 0xe2932da4,
+ 0x1266e6da, 0xe86987b0, 0x13a8c027, 0x2468df6c,
+ 0x853787ab, 0xdfaed90d, 0xe8ad09f2, 0xdf61ac18,
+ 0x8563f139, 0x52fb748f, 0x364b000e, 0x71e678c8,
+ 0xeea4754d, 0x35c11cbf, 0xd5a006af, 0xe603c756,
+ 0x3f50e579, 0x316a9724, 0x4848b9db, 0xf5e6f6d4,
+ 0x083189cb, 0xd3e9c9ea, 0xb01f54c4, 0xaad9f9ec,
+ 0xecbcd50d, 0xecc6aa39, 0x8fab2842, 0xafd7a17e,
+ 0x0ffd517a, 0x11604f40, 0xa990edd3, 0xef451036,
+ 0xa4f8cae6, 0x758d001d, 0x7b0023f9, 0xeadddc6e,
+ 0x5bf1ff8e, 0x113f036f, 0x106f81ca, 0x7182ee0b,
+ 0xe8d7de92, 0x5d0e3a4e, 0xc53286cd, 0xa9c078c6,
+ 0x0d7f7eca, 0x39485c07, 0x5c5a3e39, 0xedd5e1eb,
+ 0xf9cbc79a, 0x55a35a1d, 0x7b87c26f, 0x152a784d,
+ 0xe647984f, 0x88f5dbcc, 0xb8636113, 0xa715be90,
+ 0xb51e4be7, 0x029d44db, 0x43fb044c, 0xee2448cd,
+ 0x2df87aef, 0xb5f66a01, 0xc252e02a, 0x8664de8d,
+ 0xa47b0e2d, 0xbe98f79c, 0x33f514b0, 0xb1ae4a8e,
+ 0xfd5a1017, 0x5ff8a17f, 0xdd30fc5b, 0x262d1fa2,
+ 0xcb91672c, 0xda7dc0f5, 0x762c7c89, 0xf9adbc8b,
+ 0x61b21656, 0x7374d37a, 0x477066f2, 0xe0fc6b55,
+ 0xe722c25a, 0x4ed1d61b, 0x981a6e5c, 0xc7c13b7e,
+ 0x3d467dec, 0x983bb830, 0x16161d34, 0x162912be,
+ 0xc7a3dc3e, 0x84d0a382, 0x4af04fb8, 0xf9e7be97,
+ 0x418a4449, 0x2b03e743, 0xc0365d90, 0x5665d848,
+ 0xdf625296, 0x59b86497, 0x520bc57a, 0x604c9bfa,
+ 0x9b1e8f0d, 0xb3e7d7fc, 0xa033b3e5, 0xfad56de4,
+ 0x942a5375, 0xa78316e0, 0x403d917c, 0xdf2ebff1,
+ 0x6cb5c325, 0x061dbefd, 0x6811d095, 0x3253c081,
+ 0x9d0508b6, 0x385fae4d, 0xabfa990a, 0x036e9311,
+ 0x048de592, 0x724c5ba0, 0xb88c1419, 0xcda28fb2,
+ 0xfb748595, 0x541e7529, 0x1e43c3ae, 0xd2a99cce,
+ 0xa2bae737, 0xf1adf19c, 0x26fdc951, 0xc8153334,
+ 0xb60eb405, 0x3fbcc40b, 0x46cb9e79, 0xb78805f1,
+ 0x7c9b2446, 0xb89992ed, 0x00fefb81, 0x2c8ce1c8,
+ 0xe1d465ae, 0xc1b0a69f, 0x99c57463, 0x21db7662,
+ 0x5ac8742b, 0xa420d17e, 0x040d51b0, 0x0838b38c,
+ 0xef2e841a, 0x19d54221, 0x11d20008, 0xf52090e3,
+ 0x1acd09e5, 0x206d4ea0, 0x00b27b01, 0x1fbd8757,
+ 0xcc641947, 0xf2d51acb, 0x2249e457, 0xa5130dfe,
+ 0xfc58c08e, 0xa50c9076, 0x35005e2d, 0xd090c73d,
+ 0x071fe862, 0x6c4c22fb, 0x327da816, 0x9e0c27d2,
+ 0x52401ac8, 0x373bdfae, 0xadfa9972, 0x270a2921,
+ 0xa6186c3d, 0x56ac0bcf, 0x848dae4c, 0x3911bf38,
+ 0x6a9ff422, 0x33fcca2b, 0x1fc265fb, 0x536dd283,
+ 0x5a1ac389, 0xcbba4166, 0x4a052fe2, 0x31f7dee9,
+ 0x19a16520, 0xa90f5be5, 0xbb2c8493, 0xf2dd3fe1,
+ 0x5668370b, 0x87b8f32b, 0x2ce895ac, 0xb60be087,
+ 0x35045495, 0xcc837810, 0x5ce91e71, 0xf1c50e09,
+ 0xe9b86d52, 0x2acee97c, 0x0d792abf, 0x7f2ef729,
+ 0x3ec5c792, 0xa4dc07b0, 0xb6682fb4, 0xbf41caec,
+ 0x77504de5, 0xefe1133e, 0x5dd06fc2, 0xdc008f45,
+ 0x3c4468cb, 0x66c5982d, 0x21eb6a81, 0xb47b2ec5,
+ 0x51a0f668, 0xa7a8f346, 0xaed140fd, 0xb3ae9c84,
+ 0x235f42ff, 0x568d3e0f, 0x3904fc4d, 0x33e57950,
+ 0x0da7ff89, 0x4ffa0e98, 0x61d2dc95, 0xb3a1ac64,
+ 0xc200463d, 0x2cd0360a, 0x439a2aef, 0x873976d9,
+ 0x2a6cafeb, 0x7ba4721f, 0x483636e7, 0x8a650ba0,
+ 0x533b6ce9, 0xf08f3681, 0x43641814, 0x9c1e649a,
+ 0x491676fc, 0xb73f11b7, 0x59bcae42, 0x80ccbeb6,
+ 0xaaa2a8ff, 0x856e80b5, 0xf8c19e22, 0x94bb5bc2,
+ 0x19c08c34, 0xa37a686e, 0x5ae8bffc, 0x7a68e4d9,
+ 0x2223b592, 0x10835777, 0x3a038c51, 0x6ab64e1c,
+ 0xe2aa95a9, 0x7f3c74a5, 0xe46520da, 0xe0da39d6,
+ 0xb166363e, 0x279eaa9e, 0x01be4b15, 0x151172a3,
+ 0x4da213e1, 0x33f97c13, 0x64d7cd65, 0x28964d1c,
+ 0x50d452aa, 0x87a9e1e3, 0xd307fd9f, 0x2af96432,
+ 0x0ddf5bc5, 0xee6241db, 0x45bfd247, 0xce609188,
+ 0x83201952, 0x8d5ace92, 0xce09895a, 0x54bc618a,
+ 0xb21d5739, 0xf53e51da, 0xd3860cc7, 0x22d9a3f7,
+ 0x17292e5a, 0x0936d110, 0xef54f2f4, 0xff02819a,
+ 0x3943ca86, 0x76ec3dac, 0xf617a1e7, 0xb1643549,
+ 0x734314e0, 0x6e93499f, 0xdb715dff, 0x0346d868,
+ 0x0cf58b34, 0xad73c635, 0x177a1bd2, 0x28afc16f,
+ 0xa232693c, 0x67aa3bcf, 0x0078c7e6, 0x19a60e70,
+ 0x75d944cc, 0xc416a961, 0xb81a1fac, 0x53b43b82,
+ 0xe92a7175, 0xb79764c8, 0xfc085d4c, 0x0038e23a,
+ 0xa5c74092, 0x3afa3bbe, 0xf3749a9c, 0x87d45ab9,
+ 0x62fe8344, 0xf6e3291c, 0x43a668f4, 0x02d0a433,
+ 0x57340697, 0x601097cd, 0xefd8db83, 0xabe11b12,
+ 0x29f42453, 0xab9f56e8, 0x8f79ee79, 0x37c935e3,
+ 0x8a63cff3, 0x007c179d, 0x0af3275f, 0xf3cd5464,
+ 0x098b809e, 0x95fec8f3, 0x8afb59b1, 0x4530b0a8,
+ 0x681d2cf5, 0x2a98b911, 0x424986c2, 0x06971d03,
+ 0x391c493d, 0x5a9183d6, 0x743715fc, 0xc585aea9,
+ 0x654c24c7, 0x028a742a, 0x4cac2421, 0x62b654bc,
+ 0x4a21fff0, 0xa1476f70, 0x94c761e2, 0x8281a22e,
+ 0xe312aab6, 0xc28d7caf, 0x5459020e, 0x5ea6df2f,
+ 0x1922a396, 0x6c7be8b3, 0x8e0dcd50, 0xe90c3850,
+ 0x885bf51b, 0x10d28aee, 0x47f04785, 0x81dcbf0a,
+ 0x30e0d46c, 0x2344253b, 0xb305dcde, 0x3d431192,
+ 0x2a8a4843, 0x02ddee30, 0xdc05e52f, 0xafbde172,
+ 0x325ed2c6, 0x1aa25461, 0x40c7c866, 0x3f060d33,
+ 0x45c315a9, 0xb84261cf, 0x099d2453, 0x1dd0ba3b,
+ 0x906b718e, 0x0cabd2f6, 0xa485db56, 0x623aa422,
+ 0xc7beb736, 0xc9b9e647, 0x09e87748, 0x3e03920d,
+ 0x35ccc86f, 0x284dd094, 0xaf903b68, 0xf4a0c84b,
+ 0xab1edc85, 0x429f10c7, 0x844376df, 0x712cd88d,
+ 0xe449e9ea, 0x750a41b4, 0x33107e61, 0x953c638a,
+ 0x95689874, 0xc2c57fa2, 0x41063d8c, 0xe9d9624c,
+ 0xee5a35f7, 0xa3703d75, 0xf80626f2, 0x886da378,
+ 0xdb996204, 0xee16b353, 0xa676b342, 0xad3d50c9,
+ 0x8ef7cbef, 0x6d0ccec2, 0x03e9c478, 0x307c4db3,
+ 0xb9b812fa, 0x0ddf0b8c, 0xbd24e160, 0xf274215c,
+ 0x6d788df0, 0xf7876ebc, 0x42f3ab60, 0x5ab58113,
+ 0x49826778, 0x56f816a8, 0xe80a92bb, 0x5bce84eb,
+ 0xa8543bef, 0xdeb83607, 0x3bad0df5, 0xaf3c62a2,
+ 0xf82c0dd8, 0x1c7e7b91, 0x19095338, 0xa0fec424,
+ 0x8700358a, 0x20c42042, 0x511a3d88, 0x25ced920,
+ 0xb8854b98, 0xc7db6a3c, 0x303f6c0c, 0x56416d0e,
+ 0xff391eee, 0x7aa52e90, 0x82b2483e, 0x6641e58d,
+ 0xfe23dddc, 0x664ad80d, 0x7cd3a3e7, 0x7db9a7c5,
+ 0x5a60999d, 0x5b737594, 0x2fb8e16b, 0x72d7c0d0,
+ 0x54fd1074, 0xc47422a1, 0x7229426c, 0x437ab06e,
+ 0x13ccd0fa, 0x9397dbbf, 0x84cb611b, 0x4511a2a0,
+ 0x53ab2432, 0xe8a33c13, 0xba986a30, 0xa681860d,
+ 0x00ae37af, 0xa9f21016, 0x4844741a, 0xb681c7cf,
+ 0x1c62cc6a, 0x762bcbac, 0xce217dd5, 0xd1617aea,
+ 0xb51b51fb, 0xfb4397ed, 0x58a932e5, 0x8a725310,
+ 0xcc0102fe, 0xa3ea9b89, 0xb20161bb, 0x64d5e807,
+ 0x03a4ef0c, 0x1e2a8483, 0x6f7684b5, 0x849953b7,
+ 0xf1595763, 0x12e6837f, 0x2776d5a9, 0x335ba895,
+ 0x7653f97f, 0xa7efa396, 0x9e2de657, 0x18b083ce,
+ 0x7192fa42, 0xba7ff3be, 0x998e0754, 0x00d89dbe,
+ 0xd0e709ed, 0x30ecbe05, 0x8134d23c, 0x550a7a24,
+ 0x8e62f307, 0x1b13d2ec, 0x7d6647b5, 0xe04363bc,
+ 0xf0d27ab2, 0x95b74bd6, 0x25071b4c, 0x26d6ab09,
+ 0x2018306a, 0x4117b3ef, 0x33b5c729, 0xa366bd88,
+ 0xea5b3537, 0xcfe7db44, 0xe4c6207f, 0x1811150f,
+ 0x1aab13fc, 0x8105e52b, 0x8c3fa642, 0xcee6b0d2,
+ 0xbff5eee2, 0x75e5eda1, 0xb1551cc5, 0x1e40dc3a,
+ 0xe4edd8fa, 0x1435e94c, 0x2b1197b0, 0x0cfaa581,
+ 0x37ca7e78, 0xa4d48b5f, 0xf0a935c5, 0x0ea1b18f,
+ 0x1316ef59, 0x55768650, 0x8b55783b, 0x9e8db1e3,
+ 0x38bc25f1, 0x0d8a6a93, 0x91830404, 0x86a26d9e,
+ 0x0125c0b1, 0xc47ee0b6, 0x961b3049, 0xe2497d66,
+ 0x5f9aa085, 0x93261705, 0x4043c7a8, 0x62e0523e,
+ 0xe6112175, 0x1f5e48b0, 0x739e1600, 0xa8fb3d62,
+ 0x477a65e4, 0x6118db5e, 0xe55989a3, 0xa816ec1a,
+ 0x68bdf09b, 0x035425fa, 0xba8cc563, 0xd9162bd0,
+ 0xf20fca1f, 0xf58eaa47, 0xbda45677, 0x7d998bc0,
+ 0x82dbb15a, 0x29c20bec, 0x2cd537cd, 0x38011656,
+ 0xf79f1f9f, 0x5e4d0d39, 0xc4b016b4, 0xc642c116,
+ 0x58b16f1e, 0x22e53396, 0xcf7ee844, 0xf079cd61,
+ 0xb426e3db, 0xf8600ba9, 0x135c22dd, 0x71e39c6a,
+ 0x03103d9c, 0x708f6b6a, 0xdf3419ea, 0xfc5be3f2,
+ 0x8960ef5d, 0x735d5037, 0x703adc1c, 0xc3d3a793,
+ 0x7d30f957, 0x79c9c52b, 0x29ba893a, 0x08606f23,
+ 0x282fb090, 0xceb513c5, 0x37983a9c, 0x9bec877b,
+ 0xccb2e9bd, 0x4b99c648, 0xda15e6e0, 0xf191d577,
+ 0x785caa9d, 0x92ebaff6, 0x08b5e3eb, 0x72282f0f,
+ 0x31d33c42, 0x59ab0291, 0x8bba76b3, 0x9d3ece78,
+ 0x68da315d, 0x6f309d4a, 0xdb224c93, 0x8c139cd0,
+ 0xcc5086f8, 0x03626764, 0x8398c309, 0x0cc2fbcf,
+ 0x6a6e846e, 0xaa6085b2, 0x6f2049bc, 0xca6a8a23,
+ 0x8909a0d0, 0xbd912b0e, 0x300abab4, 0x1c5f0fea,
+ 0x9982fa24, 0xbde419c6, 0x2657afa3, 0xc874385c,
+ 0x21e991a3, 0x6e6ec76a, 0x9e15124f, 0x55a4b265,
+ 0xabef574d, 0x74ebaa8e, 0x81d99fdd, 0xf238432b,
+ 0xc45b6bd0, 0xe89d11b9, 0xf6c0de4c, 0x1f5bf111,
+ 0x20a1a188, 0x2973e7fd, 0xf71e4d3e, 0xf5ddc1dc,
+ 0xeb9d569f, 0xe665443d, 0xbdbd6f09, 0x916a7a21,
+ 0x0994437b, 0xb0854cf9, 0x3d3faf8d, 0x920e491e,
+ 0xcc8d6960, 0x11b396a4, 0x8a28859c, 0x52fe9086,
+ 0xb68277dd, 0xceebbd68, 0xc62e1708, 0x89fbeb9e,
+ 0x5a7a3374, 0xe2fe1828, 0x881172c7, 0x4dd16614,
+ 0x72ccf756, 0xdf2dc685, 0x2712caff, 0x2c610833,
+ 0x196848a3, 0xf0a306d5, 0xd9114fe0, 0xdba23149,
+ 0x1bc52567, 0x9e2cd672, 0xa1b36c07, 0x9b42b1d5,
+ 0x97e1f7d8, 0xdf75e4e7, 0x4e2eaf70, 0x9a829578,
+ 0xcffe20fc, 0x10eb852a, 0x34c4c3be, 0x3422bf0c,
+ 0x2c75ef79, 0xe25e4365, 0xb2aa8ad1, 0xf9b7793b,
+ 0x3560830f, 0x076e8374, 0x97260dba, 0x0816c5c1,
+ 0xc5e2c5b5, 0xded4945d, 0x024b5b91, 0x206ff6d4,
+ 0x86a51ea8, 0x19fb239a, 0xa8a0958c, 0xb3d14ccc,
+ 0x5bf56422, 0x2237e175, 0x2fc07300, 0xf839d307,
+ 0xf3b55c19, 0xe539dc28, 0x081302ee, 0x28fd33fe,
+ 0x44a0923f, 0x3f2a744a, 0xf8fb4f50, 0x1c7cc367,
+ 0x7b84cffe, 0xd284e9ca, 0x4256f5d8, 0xdf989ddf,
+ 0x82a1b929, 0x4b528984, 0xd30b1add, 0x3021c37c,
+ 0x7a5cd08c, 0x2a5426e9, 0xf3f7c388, 0xc94cd417,
+ 0x5f3b177a, 0x5d12960c, 0xa95203c3, 0x7dacf2d4,
+ 0x33ba9638, 0xb8fbd549, 0x0487ab6d, 0xb97412f7,
+ 0xe1ae3fb8, 0xa030736e, 0x08f5dc2c, 0xdbf4d378,
+ 0xc82487bb, 0x22dd73c8, 0x7deb2f9c, 0x8cf501e9,
+ 0xaad38a4f, 0xe0bafd53, 0x232dcba4, 0x88e8e271,
+ 0x9c31e8bf, 0x2cb62ef0, 0xd1c2a6d3, 0x80239439,
+ 0xe3bd3d0e, 0x7945b995, 0xfb343a72, 0x76787e58,
+ 0x3605e0c7, 0xe683718a, 0x990052a8, 0x443cbdbe,
+ 0x56e4d228, 0x29513b4d, 0xa8288925, 0xfa2cdf85,
+ 0xa2349be2, 0x2766601d, 0x5370fd08, 0x4ecad402,
+ 0x9ff73c56, 0xe81d1eb0, 0xf3f3f77e, 0x7b1109c9,
+ 0x9eea6c46, 0x00745bb1, 0x71030170, 0x67686f05,
+ 0x366a8ee8, 0x5e7a73be, 0xa1eab90b, 0xdb26c4e9,
+ 0x7d875df7, 0x963c3367, 0x753407ef, 0x1dfb2fde,
+ 0x611cd787, 0xcd5692f0, 0x33cb0973, 0x2ee887bc,
+ 0x6b3cae13, 0x0d0ee251, 0x083352ce, 0x7f9a274b,
+ 0x1695e740, 0xce23038c, 0x934270b8, 0xb9c0ec95,
+ 0x34070a10, 0xa5f0e89b, 0x71d44032, 0x90d531cd,
+ 0x9ae76e60, 0x9135352b, 0x980bba83, 0x25523731,
+ 0xe681855b, 0x75412869, 0x030b73f1, 0x875aca67,
+ 0xdfbc5848, 0xdd06b651, 0xa6300012, 0x368be687,
+ 0xab3d081f, 0x8e676f5d, 0x924810e6, 0x078a17ba,
+ 0x21f14dc7, 0xa346061f, 0x40d4e254, 0x457903fb,
+ 0x6a7a636f, 0x8d11a5a5, 0x715d025a, 0x4d3e2c0c,
+ 0x64340605, 0x9744bce2, 0xc76b7ed3, 0x20e8da7b,
+ 0xd0eed3c8, 0x438be6bd, 0x5d041d00, 0x43639452,
+ 0x52407eb6, 0x4ad5699b, 0x0dff1641, 0xe3acdb10,
+ 0xd194415b, 0xc3f6fd6e, 0x1e6f0e57, 0xb336c2b0,
+ 0x80cab526, 0x93b92ec4, 0x4ba327e3, 0x9d5c7e7c,
+ 0xbeba5183, 0xdfee23d0, 0xc6633b0d, 0xfb8147b3,
+ 0x3ceea9f6, 0xbb730152, 0x6ed4061d, 0xc6b3ce73,
+ 0x517d9b41, 0x7e852b88, 0x15445b56, 0x9cb2d20e,
+ 0x9a0dcc31, 0x221a9b0a, 0x74232ec4, 0x4be8bb25,
+ 0xc8e73ffb, 0x1b88f06f, 0xb71c9e03, 0x20f2838e,
+ 0x396bb1f1, 0x9fd015bf, 0xfe00dac0, 0x3c163ffa,
+ 0x436f52b9, 0x04238612, 0xe33810ac, 0x01b34758,
+ 0x6e0358cd, 0xfe864610, 0x4646b197, 0x6f0cb346,
+ 0x4c0162fb, 0x796028d1, 0x929c3083, 0x000b9f35,
+ 0x05d7fb8d, 0x3c21ca3e, 0xbb1ac961, 0x71c91eb8,
+ 0xdf37d28d, 0x07e5793f, 0xd8e4759f, 0x8ca260a0,
+ 0x6cabff8e, 0xb6d382c7, 0xe5baaf71, 0xcf1987c0,
+ 0x5a1a4dc8, 0xad799b45, 0x8fc48e83, 0x38c72161,
+ 0x6cb52b5d, 0x2d84110c, 0x0cb0650a, 0xac30765e,
+ 0xd03eb2c7, 0x35703b27, 0x6e467645, 0xff126700,
+ 0x042c48e7, 0xeb86c89c, 0x2567cfae, 0x67ebfa7e,
+ 0x8ff93ed8, 0x6195233d, 0xeefc67f1, 0xfaa6b8a3,
+ 0xb5a05f0d, 0xcf606f1e, 0xb173230d, 0x4922e630,
+ 0x300fdf8b, 0x66e2ed21, 0xb39e0ae2, 0x677119a4,
+ 0x7429a383, 0xdfb055c2, 0x0aa8398d, 0x8dddfe9f,
+ 0x2065585b, 0xa2f8efc9, 0x6e010b04, 0x09215680,
+ 0xa7f123f3, 0xb81889cb, 0xe26af803, 0x1182b8c6,
+ 0x9e2de84d, 0x788c7339, 0x45876c8d, 0x8c229af4,
+ 0xbd665e3b, 0x70887f0e, 0x651cc4b3, 0x382fae0c,
+ 0x345a4268, 0x5a4186ed, 0xa81512d6, 0x502ee8b7,
+ 0x696735db, 0xb5db1917, 0x713541b7, 0x4f53f388,
+ 0xa71aa414, 0x9eef0087, 0xc457ece1, 0x74dd1d04,
+ 0xf8323b73, 0xa31c49f1, 0xfbdbd711, 0xf48536ef,
+ 0x5d56451e, 0xe62c64f2, 0x1791463b, 0x6ff5fcf3,
+ 0xff0ee4a4, 0xe08d29bd, 0xdd1d44af, 0xe83e89b8,
+ 0x5fe74a93, 0xb24f2970, 0xc01c259b, 0x7a301d21,
+ 0xfb6fdf0a, 0xb924a161, 0x077500f1, 0xca3c43fc,
+ 0xc9633158, 0xfaa6f386, 0xa9f395d2, 0x8efcbcd3,
+ 0x64e05beb, 0xed9d5976, 0x2fefbbd6, 0x7dfeec71,
+ 0xb91f968f, 0xbc94642e, 0x021707bd, 0x080572ac,
+ 0xefa2a44e, 0x90408473, 0x5d8d83fc, 0x60ce1576,
+ 0xfc087a38, 0x39cc4124, 0x2bc165a4, 0x52ef40bc,
+ 0x64ac3dce, 0x9468b796, 0xeb54d478, 0xb1069429,
+ 0x86a05c08, 0x630cc971, 0xc7a1d836, 0xf6c8bc3a,
+ 0x4f6111f4, 0x931eacd1, 0xdced878c, 0xc35c02b7,
+ 0xee603c9e, 0x72a73bc3, 0x4fe477d2, 0x9dee0c53,
+ 0x023eb40b, 0x0dd5b914, 0x63e42b33, 0xb2822ede,
+ 0x1cd0701f, 0xa4a76a5c, 0x6ef09fde, 0xb07c3591,
+ 0x83fb62f3, 0xb061e32f, 0xa33f2619, 0x1416387e,
+ 0x1f62c248, 0x19ba4e6c, 0xc9fcde2c, 0xa359dbe1,
+ 0x726e4b88, 0x1f731480, 0x476a819c, 0x375ad9bd,
+ 0xf2864e7a, 0x0a209ca3, 0x8e59d180, 0x0a1010aa,
+ 0xff1e3592, 0x5e8365d5, 0xee254510, 0x40509c12,
+ 0xd11e5cfc, 0xcc10d5e7, 0x789fcaa1, 0x45d7dea1,
+ 0x516b5603, 0x989e4aca, 0xe4ad517e, 0x0b2fc5c6,
+ 0xe30da428, 0xcef7c236, 0x667970f4, 0x8fd3112d,
+ 0x1badedcf, 0x2af18538, 0x21bc90d0, 0x6c4f7cc1,
+ 0x8f6b2693, 0xfeee3dce, 0x6cd01d15, 0x7d224de4,
+ 0x63d98fef, 0x3d6fe430, 0xf26d4114, 0xd2b64413,
+ 0x51262c42, 0xe9e4153e, 0x0ef4ce4a, 0xf1437640,
+ 0xde2db29b, 0xf49e20a9, 0xd5872fdd, 0x23d568aa,
+ 0xf0ec33e4, 0x0d567e08, 0x37ee9e83, 0xbdc50d7d,
+ 0x72d4cfa7, 0x38edaa77, 0xbbbb5399, 0x9354a5b1,
+ 0x53453f4c, 0x7a7f2167, 0x0e72dcc0, 0x175e7254,
+ 0xf57f3fc6, 0xe19c5d83, 0xc1256315, 0x8c247443,
+ 0x4795d80a, 0xf334133a, 0xdbf02061, 0xfea83b24,
+ 0x8cb7f47b, 0x35ef89fa, 0x86f33c18, 0x62c30abe,
+ 0x6388b61e, 0x8cc264a7, 0xd114ca39, 0x149b3a38,
+ 0x60097ff7, 0x69891487, 0x89a70fb6, 0x8dd4902a,
+ 0x971d2e76, 0x4e71b32d, 0x3b82d9ec, 0x26038137,
+ 0x0e51b8c6, 0x8d18e689, 0x8eb88dd9, 0x33b53c56,
+ 0x6465bdf3, 0x78c6ab60, 0xa35e4b53, 0x6b4bba50,
+ 0x2df52ed1, 0xbd635367, 0x28515c0e, 0x130da903,
+ 0x4fa35562, 0x5da5bc27, 0xfb4dac0a, 0xb0c81390,
+ 0xc3186741, 0xfc136d72, 0x6c2fd008, 0x6261d1c0,
+ 0xfb9bb687, 0x5181c691, 0xd9d8f022, 0xc2012763,
+ 0xf022732c, 0x1b0d746e, 0x9dd891c3, 0x698ec97f,
+ 0x7b9bdaf3, 0x1ff3efac, 0x4a1a33e7, 0xc2def777,
+ 0xf456f4ad, 0x0d30c61b, 0x01cf431f, 0xe298c0d7,
+ 0xef5389dd, 0xeffd7701, 0xa25c97d9, 0x13331c3a,
+ 0xaa2c8dc2, 0x33ab33d1, 0x981c8734, 0x2a156d2f,
+ 0xc1373875, 0x7f8d31dd, 0x11c6bcee, 0x4e158bca,
+ 0xbb72c7f4, 0x1ae4cb5f, 0x57c3fe3b, 0x3281071e,
+ 0x1adcba86, 0xdafc7db6, 0x5720aae4, 0x185f1dba,
+ 0xe9e128b7, 0x254bb346, 0xad3cc1fa, 0x2d8455e4,
+ 0x28e20bc7, 0x78cbe850, 0x70c142c4, 0xfbdbcbdd,
+ 0x5d02aaca, 0x16418791, 0x8e1241fc, 0x9f2d62ab,
+ 0x37263b43, 0x3794e117, 0xd12453f4, 0x667076f1,
+ 0x002266f1, 0xaf896077, 0x73b2118d, 0x58eaac57,
+ 0x3b52d892, 0x95b0d54c, 0x5c8df684, 0x666fea87,
+ 0xbe0c1afb, 0xdf2133de, 0x17bf0609, 0xc894f185,
+ 0x276b114d, 0xae0ac01c, 0xf5f77c7a, 0xf0e14cfc,
+ 0xe06ad44d, 0x985f1665, 0x2e946c4c, 0xffb79737,
+ 0xdab8dede, 0x9b22d793, 0x88088c0b, 0x6adadf39,
+ 0xf848bf69, 0xe3acffee, 0x282d62f2, 0x5783c8a6,
+ 0xd49a228e, 0xb4a7ac5b, 0x999f8d1e, 0x188349b1,
+ 0x77c7d389, 0x3d386abd, 0x7537c346, 0xeb0ee222,
+ 0x0b30ede0, 0xf5a94734, 0xc379c8f8, 0x0b0b65ed,
+ 0xb8ca4220, 0x691bbebd, 0xbcb3f359, 0x0a378375,
+ 0xae974895, 0xed3dd167, 0xea6ba212, 0xe3361548,
+ 0x912e54f8, 0xc5975b9f, 0x6e92a342, 0x166d945c,
+ 0xdd00c747, 0xb71a39a0, 0x838da3dd, 0x17b83fc9,
+ 0x6b7f4343, 0xd9dcf5dd, 0xb230a850, 0x00ee5ddf,
+ 0x50a84b3b, 0x4d09508f, 0x894bc593, 0x5be5c0fe,
+ 0x257cf9c7, 0x44aa0871, 0x8d0e3aa8, 0x8f717223,
+ 0x65323d70, 0xb1adf87f, 0xcd754e9f, 0x5f949fc9,
+ 0x74be6193, 0x219d10b9, 0x98e03240, 0xa95c4490,
+ 0xc52f69b3, 0x81a8b921, 0x7436958f, 0x3be58fed,
+ 0x2e02d549, 0xcb377ff3, 0x47e15874, 0xc53d6389,
+ 0xb43d7966, 0xa8ae6009, 0x06d9a51a, 0xf1954863,
+ 0x4c777909, 0x6e80c654, 0xe0bba2bd, 0xd4d9e120,
+ 0x1258e1dd, 0x3511ba51, 0x9319e7fb, 0xd5c2d2a4,
+ 0xd572926d, 0xbfaff9af, 0x3baf5e42, 0xc4a06f64,
+ 0x6609f43b, 0xa6de5497, 0xa0a5ff86, 0x81f63ab2,
+ 0x56976476, 0xdfc81546, 0x0653de39, 0xd751a613,
+ 0x4c91c107, 0x8b4255ed, 0x9f7fcf77, 0xc8fe05fb,
+ 0x83bbb90a, 0xc64d80bb, 0xb34d029b, 0x47da4715,
+ 0x9f89638c, 0x20a3fedf, 0x09a06f25, 0x4cee8223,
+ 0x876933b6, 0xe5703f87, 0xba550f33, 0x59c253ee,
+ 0x6a3f08c2, 0x80a4ae22, 0xb0ca5cad, 0x03c8afe1,
+ 0x5e1c25d0, 0x9e37c1ee, 0x53777e9d, 0x2afcfbc3,
+ 0xeb1d2d56, 0xe0efb297, 0x4ee1b9d2, 0x991ab244,
+ 0xda58a341, 0x66dbcd22, 0x05883d0c, 0x155a0a65,
+ 0xce351beb, 0x9a403a89, 0x223f7927, 0x8b33bd29,
+ 0xea4a7e29, 0x06d0fabd, 0x12da7aec, 0x73240f3e,
+ 0xe97147a7, 0x310e7417, 0x328e6acb, 0x261b373d,
+ 0xd1cd0a0d, 0xd26636c3, 0xc5e9b41e, 0xb7d38ebb,
+ 0x64d37459, 0x42b63f27, 0x40068f83, 0xbb9fb271,
+ 0xba6fe292, 0xdb06e053, 0x2f0cd14f, 0xd13dfc86,
+ 0x3252e237, 0xa9f4ce44, 0xd1e8257e, 0x70e14643,
+ 0x82af9e7b, 0xf598f5cb, 0xc5cf552e, 0x3babad78,
+ 0x9a549799, 0x49c394cc, 0x89577013, 0x7e628def,
+ 0xa735c045, 0x1a7b0d19, 0xb2c6c541, 0x0977b6f8,
+ 0x01ec1ba9, 0xb60c0440, 0x76eb955b, 0x4a2bceb0,
+ 0x61fc4b68, 0x5b544fdd, 0xf7c99440, 0xccaf540f,
+ 0x19ede4e2, 0x7d6374c7, 0x9305e3cd, 0x615b36d6,
+ 0x9221ccca, 0x65a4b6c9, 0xce10598d, 0x778f7e37,
+ 0x2ea083b6, 0x8dfed3a6, 0x649f85f8, 0x360c4f35,
+ 0x0f19b82b, 0xeb3c37a8, 0x714c3ceb, 0xf9c23116,
+ 0x11d8fd9e, 0x87245d09, 0x47a9a228, 0x010bdc12,
+ 0x1d612f8c, 0xea515c95, 0x58c1c5b3, 0xcddc7680,
+ 0xd1a7c96a, 0x0e095915, 0xa79c7a8c, 0x66ec6060,
+ 0x17c483bd, 0xfa8a8a6c, 0x948b2453, 0x88daef17,
+ 0x497dc529, 0x8c1bbb36, 0x5db6b40f, 0x8394da7e,
+ 0x8de0d512, 0x9999dfed, 0x556271e6, 0x9cd3d3c1,
+ 0x1c93998f, 0x05e82ee6, 0xf4fa962e, 0xe375f463,
+ 0xc4c4513a, 0x4b27c7b8, 0xf29f3bc6, 0xb2352396,
+ 0x61d4eed7, 0xe9c2d298, 0x92539ede, 0xf8302c2e,
+ 0x29d56fe3, 0xffcff9ba, 0x04bfdcd0, 0xd22b82c3,
+ 0xf3fc1cc7, 0x27ccdd7d, 0x7d9b3fde, 0xfc5871d0,
+ 0xdc978578, 0xeb53117e, 0xbeea1b69, 0x669875e3,
+ 0x6fc68871, 0x61e63cd0, 0x4034790f, 0xf0b8602b,
+ 0x2aa2f192, 0x6190aebe, 0x6f63177c, 0x3e4fcc89,
+ 0xce2b68e0, 0xb2c3041f, 0xa9544f42, 0x7621133f,
+ 0x2003bd1b, 0x99cb527f, 0xbac254f3, 0x6ac6f394,
+ 0x9cfd1726, 0x2d0172b9, 0xe8f1360d, 0xeac1a3ce,
+ 0xa23ba31c, 0x3038f3a6, 0x3ee90f78, 0x21ece1f1,
+ 0xe495defe, 0xbc061d93, 0xbe890b8b, 0xc3b157a4,
+ 0x7de19a76, 0x54fd6321, 0x84023610, 0x11b56ce5,
+ 0xcd201591, 0xb29fea9e, 0xb3e2cdfd, 0x103a0fcc,
+ 0x1588d317, 0x4691da5e, 0x3582b7f1, 0x521317e8,
+ 0x64b12945, 0x0011dc95, 0x045e8fc2, 0x9891f5fa,
+ 0xd9df3130, 0xde2893fe, 0x4ea7f37f, 0xeb784210,
+ 0xbd8da2dd, 0x79f299e3, 0x10918532, 0x987a7e6e,
+ 0xc7b38d42, 0x10b81f00, 0x6463b6a8, 0x9a80b4bb,
+ 0x7986dda6, 0xde74d341, 0x221feb37, 0x7398a4a9,
+ 0x7780dd45, 0x609b70d3, 0x056fb98c, 0x3a407045,
+ 0x71046a4b, 0x2d2c4f2b, 0xc669b19a, 0x2eb11587,
+ 0xacb2a30c, 0x03270c8d, 0x5db32e3a, 0x6ce01fda,
+ 0xf14a877c, 0xfdaaa420, 0x6ccc3a3c, 0x7d06f45d,
+ 0xc1df78fe, 0xc90b769c, 0xc30ea4b3, 0x4da5f317,
+ 0xa0f766d4, 0x22644157, 0xff1b42c7, 0x51c23179,
+ 0xbf6b9613, 0x12935bd1, 0x0ab1267d, 0x2b21c5d2,
+ 0xd40049d0, 0xc63759c8, 0x0f3dbbef, 0x5b31bb48,
+ 0x86769d33, 0x3e54277e, 0xa1e9fc77, 0xe48d4921,
+ 0x98c5ef4d, 0xfbd8de8e, 0x34721f06, 0xb2bba0b7,
+ 0x89630aba, 0xad78b63d, 0xa33101d0, 0xfa79f737,
+ 0xf06b9929, 0x48bf0236, 0xe0adb2f1, 0xc5231e25,
+ 0x059535df, 0xe48f2c6d, 0xb8a9cde1, 0x57cc50f1,
+ 0x82e5344f, 0xc874eaa1, 0x00dd9a0d, 0x15d07f40,
+ 0x900673c3, 0x2a3ca56c, 0x6e941240, 0xa38d0d4d,
+ 0xc3dff05d, 0xcbc253ee, 0xa31a3c9f, 0x77d350dc,
+ 0x561a27ef, 0xe4bf4937, 0x25d896b2, 0x4f964be8,
+ 0xf5141421, 0xae0ac77f, 0xc2348a38, 0xd12c8ce0,
+ 0x576e7f25, 0x67857645, 0x7e47be24, 0x94927e38,
+ 0x547c5719, 0x7f544a46, 0x00fb0876, 0xf8191c5f,
+ 0x235b6217, 0x69a89006, 0x1e89fec1, 0x70fdc80c,
+ 0xb6e9ddae, 0xbc9402bb, 0xd5e2daff, 0x2cf5a8a8,
+ 0x44ee90b6, 0x8c14818f, 0x22aa57d3, 0x51a09350,
+ 0x3c302376, 0x9b0131cb, 0xe0f7cdd6, 0x46974326,
+ 0xb18e3d76, 0xc02601bb, 0x7d8b7434, 0xadda3377,
+ 0x65ee2d49, 0x9b04f156, 0x2e4c10f2, 0x4f11ccfe,
+ 0x97eda6cc, 0x22dbd7ae, 0x70879d20, 0x7395a727,
+ 0x899d044c, 0xb2e46b49, 0xd9bc636e, 0xc4343147,
+ 0xdfcbd118, 0xef7af936, 0x53440c41, 0xaa8a8976,
+ 0x94a959e4, 0x6e686c26, 0x6b482f2f, 0xf6e0af73,
+ 0x5a65d816, 0x1eab334a, 0xb3c8fdaf, 0x1f0665f8,
+ 0x2b263d64, 0x6dc31234, 0xfd31f680, 0x31be11d7,
+ 0x4cd2509c, 0x2f517c32, 0x51d78d20, 0x5b3cf3e8,
+ 0x81490828, 0x02d99951, 0xa5352c4e, 0xe6fd330c,
+ 0xe326cf4a, 0x8f91a3f8, 0x3205bce0, 0xf704c965,
+ 0x1a92fb8a, 0x61ec21f5, 0x27924962, 0x4b918f36,
+ 0x568baf86, 0x15fa7d17, 0xad30b596, 0xde2256f4,
+ 0xb9a3fcb9, 0xd5fc9b71, 0x979f3f6a, 0xe53cf8f9,
+ 0x4a4f42ee, 0x52c0b83d, 0x78d0af43, 0xeeda8fe6,
+ 0xa4fe686a, 0xb07dbab4, 0x22f5bb5b, 0xac49b5b7,
+ 0x422b682b, 0xdce666c8, 0xffa997e8, 0x392ed30d,
+ 0x9cdd4cad, 0xadbf2b80, 0x6a7b738e, 0xb518ba7d,
+ 0x447c5dd4, 0xea669a5d, 0x674739d6, 0x6f5cded6,
+ 0x31674186, 0x33246925, 0x6b5c301f, 0x5db5d173,
+ 0xd3eb83a9, 0xeb2d136f, 0x1513c1a8, 0x4b8ab414,
+ 0x65376265, 0xe68eadee, 0xbbe426a5, 0x87279f34,
+ 0x7eedce24, 0x2c22a986, 0x8330a4ab, 0x78015d52,
+ 0xda75bd42, 0xbe526fd1, 0x47b0d5c3, 0xbcca25c2,
+ 0x9280acec, 0x5dd41a78, 0x15d66209, 0x8090eb30,
+ 0x75e4277b, 0x71089657, 0x7f7b48ad, 0xca70d8ae,
+ 0xef374387, 0x084848cf, 0x739bbba1, 0x65322422,
+ 0x46405383, 0x294a83a1, 0xf159be9d, 0x66195494,
+ 0xb1e57b36, 0x8c11cf26, 0x5c2822ea, 0xfeb36134,
+ 0x73588871, 0x30c02c52, 0x221a3a3a, 0xecd7b234,
+ 0xe6819478, 0x31f76e11, 0x9705bcd0, 0xa85d57e4,
+ 0xefeec193, 0x1c02f68d, 0x013a7ea5, 0x8af829a3,
+ 0x381936ac, 0x0133e22a, 0x6d4d0730, 0xe3d7d02c,
+ 0x16927958, 0x61e4d4c9, 0xc57605c1, 0xa058eef1,
+ 0xca2ef8e9, 0x02d9e1da, 0x651f0a83, 0x1c44cda0,
+ 0x652c7514, 0x7c08754f, 0x1e38587b, 0xd5591b6c,
+ 0x198ceff3, 0xc38dd360, 0x2cfced78, 0x6ec04550,
+ 0x053a4589, 0x6126740b, 0x8b809fa8, 0xad1e0017,
+ 0xb12b9aba, 0x9dfb27f0, 0xd7641c2f, 0xf98568ea,
+ 0x299b8cfb, 0xdcbb5c19, 0x55fc762d, 0x43c920b7,
+ 0xc450d329, 0xee715522, 0xc63de04f, 0x321a57f5,
+ 0x8666fce5, 0xc68532fa, 0xa6dfa880, 0x22d3bab0,
+ 0x8eaa7cf6, 0x18cbe99e, 0x0791d3bd, 0x851c4e05,
+ 0x071be30b, 0xe88614e1, 0x111f1c83, 0x14f9fd7f,
+ 0x5ccae728, 0xc09ec49a, 0xd3b34f67, 0x22fb21be,
+ 0x9a280066, 0x8447d4b4, 0xeddb530c, 0xfb9a3d35,
+ 0x4b5f8ef4, 0x37188e9b, 0x03342585, 0x8234b33a,
+ 0x6b1136af, 0xc9a2879d, 0xe996b310, 0x6d6cae70,
+ 0xfa9d0e85, 0x642895d7, 0x24b9bab4, 0x77785991,
+ 0xaf06226c, 0xa64def14, 0x2139f4dd, 0xa49d177e,
+ 0xb419f0ba, 0x3a98fc11, 0xbc99ba3f, 0x6668f80a,
+ 0x5d695c5a, 0xffb60f47, 0x411adee6, 0x55fc469a,
+ 0x3b831cc5, 0x894d2646, 0xbac69f10, 0x28ec4626,
+ 0x501beaa4, 0x67802b1c, 0xc1ee8146, 0x2a10af6b,
+ 0xf31705c9, 0x5ac136da, 0x9433b73a, 0x916d33a8,
+ 0x046d9a64, 0x7838e0b7, 0xfd84375d, 0x9acc577d,
+ 0x8fb83f55, 0x92e227e9, 0x86a044ea, 0x482d16da,
+ 0xf595770f, 0x7843a474, 0xd9d9be7c, 0x35ed37ab,
+ 0x9af3439f, 0x2e8c1cde, 0xa5196b0c, 0x4360bbd5,
+ 0xe56541c0, 0xa965ff10, 0xf23338da, 0x88c8eb01,
+ 0x0bb04b8b, 0x861dffe8, 0x158951ca, 0xdb2514d0,
+ 0x3e1be192, 0x9aef2a98, 0x5248c05d, 0x0654c5cb,
+ 0x1a08c8b8, 0x131a43ee, 0xb24b1ff6, 0xf658250b,
+ 0x49f9905c, 0x59f3eb20, 0x1ae13cb0, 0xfe7ce48f,
+ 0x646904e2, 0xbd399eb0, 0xedb183e4, 0x6fb43759,
+ 0xb6d42a0c, 0xd7bad331, 0x98a4e3ec, 0x395c997c,
+ 0xd79c4333, 0x6356035e, 0x1262e5a2, 0x9a0868ac,
+ 0x88b04543, 0x4b94d110, 0xd814eb5f, 0x476e332a,
+ 0xfba7ce75, 0x7c3114f8, 0xfb27732c, 0x366012fc,
+ 0xc07f43d6, 0x6be0a279, 0x7c2aa604, 0x787a9128,
+ 0x0401e203, 0xe5fc7368, 0x88dc5428, 0xd87401dd,
+ 0x43d71a0c, 0x48e3abd1, 0x34ea7938, 0x646148d5,
+ 0x4947585e, 0xbbe3e46f, 0x9ed4a1d2, 0x62f5fecd,
+ 0x818f8d43, 0x50d43c66, 0xcd4a2b2d, 0x7b96971e,
+ 0x55064049, 0xd389283d, 0xe2f6f952, 0xbd5c627c,
+ 0xcacefc38, 0xbbde5e9f, 0x0f8ee978, 0xdf01ccb8,
+ 0x34e3c98c, 0x82642357, 0x7e74643d, 0x51a53ba7,
+ 0x27ae31db, 0xbaa74361, 0x17186fdd, 0x11d2e56c,
+ 0xe02fc6db, 0xb43c24a1, 0x10ca5854, 0x93c50dda,
+ 0x1901f043, 0x18210751, 0x0a98d674, 0xd2b9f7d2,
+ 0x81cf1237, 0x4a55284c, 0x8211932c, 0x2b4b9b18,
+ 0x06f2557e, 0x4c25a077, 0xe65fa3cc, 0x709f4d3a,
+ 0xfd7ae2de, 0x67f87927, 0xce44e5fd, 0x8e5125ba,
+ 0x9fe9e503, 0xb37c0122, 0x31281776, 0x3cebb572,
+ 0x006b0d8c, 0x331da818, 0x31b934d5, 0xce9a88d7,
+ 0x982c1fe0, 0xfc6e24af, 0xb792ac05, 0x5a107033,
+ 0xf08abc1f, 0x1bbd0737, 0x0940dd73, 0x8be4e863,
+ 0xce4ac66d, 0xe84b3305, 0x3fd7143c, 0x879cd1b8,
+ 0x04c5859e, 0xb6c51484, 0xff1430f2, 0xb232058f,
+ 0xf2404e08, 0xc81d2137, 0xd364105b, 0x01906053,
+ 0x3830a820, 0xd210147b, 0xd272f0b0, 0x371cfeec,
+ 0x5a22268e, 0x79ff478d, 0x6cf9aff2, 0x15d05190,
+ 0xa358d8a1, 0x2aa2767c, 0x4754a35a, 0x75b1949a,
+ 0x3d09e74e, 0x2c5f52f9, 0x053930bc, 0x89003f9d,
+ 0x59912f21, 0x2a60ce13, 0x5120c92e, 0x19737f14,
+ 0x5a05d37a, 0x04332503, 0xd77e0ba3, 0x92400212,
+ 0xd2126989, 0x5eeaee30, 0xe69be3b7, 0x8ce9724b,
+ 0x29fc68a9, 0xfc0f6093, 0x97fb2459, 0xdbb45b1e,
+ 0x885daf42, 0xc269bb8d, 0x0a1dd7bc, 0xcf2c42be,
+ 0x63eb372c, 0x7177ff89, 0x1da73bb9, 0x8bca5f33,
+ 0x132e6d0b, 0x9f42fd86, 0x0635ee88, 0x7f631689,
+ 0x13e2a640, 0x56048999, 0xd92ee03f, 0x30ea0009,
+ 0x541dca5e, 0xf59864f8, 0xc566031f, 0x5d3b1973,
+ 0x52aa108f, 0x47deae6e, 0x9ce11881, 0x03000c6d,
+ 0xda10df04, 0x57f7685d, 0x428ecd18, 0x0034ac74,
+ 0x316a6431, 0xb4101ea1, 0x5c68200a, 0x80ae59e9,
+ 0xc746dde0, 0x5bdd56b6, 0x0c4dc378, 0xa80a433e,
+ 0xe5f5c9dd, 0xdafc8983, 0x4c34fbaf, 0x92fddb63,
+ 0x63fb89bd, 0x8e62e738, 0x8a288ce5, 0xbff83005,
+ 0x50b9ecd4, 0xfa9b80e1, 0x615e94de, 0xf5e8249b,
+ 0xaa85d9eb, 0xf6ee4962, 0x434a5fa1, 0xfaf70d10,
+ 0x72c9b345, 0x3a45905a, 0xabd7d921, 0xe2fcf189,
+ 0xd61c65a7, 0x795fbc2a, 0x22abe27f, 0x87aa6edc,
+ 0x913cef20, 0xb1d9fc67, 0x0e27b78b, 0xd177dd32,
+ 0xdf6a09d2, 0x22724c53, 0xde7dbd0e, 0xf517b7bc,
+ 0xfa4537a4, 0x1a0c823c, 0x26654eb6, 0x48c00a25,
+ 0x0cec6793, 0x8adc6b1b, 0x12095875, 0xe8d2438f,
+ 0xd086ec7f, 0x02c31161, 0xc8e05cf5, 0xd2f620ca,
+ 0x870bc3b0, 0x9ff925a7, 0x271dd455, 0xd01e29b7,
+ 0x61b3b0b7, 0x14e9d09f, 0x2dd802e0, 0x59725069,
+ 0x005ca3a2, 0x56e693eb, 0x26d8e8a7, 0x298bd520,
+ 0xa6012fa6, 0xc27074b0, 0x8c2a16bb, 0x1b4087c4,
+ 0x3984d146, 0xae56bc9b, 0xcf6fb2fa, 0xaf7bace2,
+ 0xde9ce8df, 0x0918622f, 0x01bdde6b, 0xed46517b,
+ 0x8ce2ac2d, 0x02a69317, 0x50e3f836, 0xe77bfebe,
+ 0x216a5793, 0xe0f6c9ed, 0x07cee9d3, 0x869b77ce,
+ 0x790471b1, 0xd1a14261, 0x384023a5, 0xadae24fc,
+ 0x6b710c1f, 0x586831dc, 0x9cc0637f, 0x5a5d4b94,
+ 0x65963df8, 0xf5281181, 0xe1427043, 0x2d39d859,
+ 0x8f530339, 0xff6ca3d5, 0xb28a3099, 0x77409692,
+ 0x6733e744, 0xac0aa841, 0x835ec947, 0x1e974315,
+ 0x112e81fe, 0xce7e0795, 0xb239375c, 0x93d4c0b8,
+ 0xbf4ad4a9, 0x6efb361b, 0x902773a5, 0x6489e872,
+ 0x6f5ed9bc, 0xd07d6855, 0x520c7313, 0x86c072b6,
+ 0x6a6f2e19, 0xa8b76d70, 0xf259efa3, 0xdacf6dba,
+ 0x46440ed4, 0x511b46d1, 0x9de98629, 0xad6792c3,
+ 0x8531491a, 0x7ee69f33, 0x68cf4384, 0xe0b03451,
+ 0x8142d34c, 0x6c75efcf, 0x284c34b5, 0x0c28960a,
+ 0xa8d5a9a0, 0x376294be, 0xf3c946a2, 0x4924876b,
+ 0xda990903, 0xffebc075, 0x695ba850, 0xbe8558bd,
+ 0x7036592d, 0x7f94db18, 0x111fc660, 0x3510ea89,
+ 0x0955ceac, 0xc2c937f9, 0xc81225f5, 0x3ec864d9,
+ 0xb4dd52c4, 0x42139951, 0x93d79251, 0xc45be798,
+ 0x89610033, 0xabf6b868, 0x667dfbb7, 0xea5a2c9b,
+ 0xe3c8ec28, 0x3a0c04dd, 0xfac81583, 0x383aa2c3,
+ 0xb2170187, 0x29f52b7e, 0xb5e74e98, 0x2852eba0,
+ 0x73818e0b, 0xd341fdbe, 0x14e46555, 0xb4d26777,
+ 0x8a76e105, 0xc98518a5, 0x59e3aa17, 0xe50f0768,
+ 0x1d20810a, 0x372da3f2, 0xb799736f, 0xb152abf3,
+ 0xfe44f6bb, 0x9033d1c3, 0x8541d353, 0x6a295a14,
+ 0x354ea012, 0x5aac5fc2, 0x277c29cc, 0x994ec746,
+ 0xe4dc4dc4, 0x0fde9951, 0xb3f74f90, 0x580eb6e2,
+ 0x810e7f46, 0x551cafc6, 0x4fdde958, 0xcac905eb,
+ 0x256ad766, 0x954f7295, 0xace781d3, 0xe90b8391,
+ 0x368a84dc, 0x94a2865d, 0xaeb9d1d8, 0xf97db561,
+ 0xd67fc414, 0x9db50b1a, 0x400e3b7b, 0x02a103de,
+ 0x625c08c4, 0xa82edcbb, 0xdf265920, 0x5bd2e464,
+ 0xcc98c297, 0x66ceeb19, 0x81b3632a, 0x815172c4,
+ 0xa4fe710c, 0x20c1f184, 0xe3c8e288, 0xae3bf4cb,
+ 0xea75ec2c, 0x055a5f87, 0xcb38d72d, 0x009477a7,
+ 0xc6649cfd, 0x58cac869, 0x9f72baa6, 0x3ebd36a0,
+ 0xe79441bf, 0xbdf97fe8, 0xefdb0bc8, 0x42fd9c71,
+ 0x1c89095e, 0x356d50a7, 0x7f8fc46e, 0xd5937357,
+ 0x4325f0a4, 0x0d67a892, 0x2398326f, 0x741ccf26,
+ 0x3386df03, 0xaf7bbbbc, 0xaf3142d4, 0xaae223bc,
+ 0x743393bc, 0xae45adb9, 0x4dd0a436, 0x54f34ee2,
+ 0x74a27f3b, 0x8c24cf4a, 0x3594d36f, 0x60a4a5d9,
+ 0x7ba23e50, 0x66465b70, 0x7fbc730c, 0x6021e4f6,
+ 0xf2612c7c, 0x962494fa, 0x7dc4e13b, 0x28c00d14,
+ 0x8d59e5ca, 0x6708201c, 0xc0f401ee, 0xe1f90d7d,
+ 0x35e84232, 0xd9b9206d, 0xf4bf0b8b, 0x992718fb,
+ 0xaf0a7772, 0x74e580e9, 0x2dee55c4, 0x21d674f4,
+ 0x9a608c5b, 0xf7e91a55, 0x04bd0754, 0x5f588568,
+ 0xc39661e5, 0x00804abd, 0xd898eafc, 0xead6c3f3,
+ 0x97f18b03, 0xd0b014a2, 0x45c48912, 0x007e6ebf,
+ 0x1cd7a9d4, 0xe508b3f8, 0x408626eb, 0x0c93e0eb,
+ 0x83dfa6a6, 0x8e7d5de6, 0x086af5d3, 0x0be5f2da,
+ 0xb65dd974, 0x6404ee8b, 0x9a48b29e, 0x893d2cd8,
+ 0x7f0a09be, 0xac9799aa, 0xfd81543d, 0x551340f9,
+ 0xeac6f6bc, 0x52047cb7, 0x3a152951, 0x74eeabf6,
+ 0x39aebc42, 0xdb183d97, 0xbebd2917, 0xafde081f,
+ 0xed1ff74b, 0xfa7b170f, 0x5a31749c, 0x0b6d116a,
+ 0x00b6eca6, 0x81f0cb02, 0x65f0bf1c, 0x8aa8e5e7,
+ 0x375c4613, 0xc1f50e8f, 0x28b11e59, 0x79b40dbe,
+ 0xe0d35824, 0xa14c8646, 0xd2853646, 0x977f1bef,
+ 0x7eaaa45e, 0x7faa7239, 0xc84b9958, 0xe4fce3c9,
+ 0x856d316c, 0x19e3369e, 0x82cadbdc, 0x9c8de6da,
+ 0xc2038403, 0xe8d5365c, 0x8d654474, 0xb73eef7d,
+ 0x702a49c6, 0x25cd877d, 0xbb2cb7d7, 0x14215c7b,
+ 0x0a3af48d, 0x09e2bc3e, 0xd0149754, 0xa36e590b,
+ 0x9be258f2, 0x28af4e62, 0x3b45311c, 0xdefe7606,
+ 0xa7233cb7, 0x823e50bd, 0x0cf8740d, 0xd192187c,
+ 0xe1944379, 0x6def623c, 0xc8b01d17, 0xe99177f8,
+ 0xd7f9df83, 0x46d5deff, 0xf4d8c2be, 0x8e16e68a,
+ 0x95de15ac, 0x7180273e, 0xc90d16c3, 0xd97b64a9,
+ 0x868b3160, 0x5fcb2b05, 0x8f97dd70, 0x2e8d5b6c,
+ 0x8492f5e0, 0xdde479f5, 0x310d0d4b, 0xb812d544,
+ 0xec039844, 0xb979abd9, 0x01ed160c, 0xcd3b5fb8,
+ 0x5e6b4bcf, 0x005ddc87, 0xac8ea0af, 0xa09e43c0,
+ 0xa7005c24, 0xfd40b1d6, 0xac1cbf77, 0x215fdb49,
+ 0x277a95e5, 0x794496a9, 0x6a46a5e1, 0x740f8395,
+ 0x9bf5d6e3, 0x70f0d7b3, 0xbc5310e5, 0x77724076,
+ 0x0430789c, 0x42c95014, 0x8661c88a, 0xc7a1a3f2,
+ 0x1877ff57, 0x2bcb6842, 0xa9bc8fca, 0x319c8f87,
+ 0x5b114602, 0x619918b4, 0x8c1464e7, 0x8cdf0a67,
+ 0x0fc27f9c, 0xb6adead9, 0x391441c2, 0x9b941c44,
+ 0xa1a65a5a, 0x624048dc, 0x06e8b34b, 0x8a41f0cd,
+ 0xc7a74e56, 0xe09eb8ff, 0xe7549cbd, 0xcf9d83d3,
+ 0x4a9611ac, 0x02874c2d, 0x99e92983, 0x8eace917,
+ 0x9d685d4b, 0x79200428, 0x4e26c8a2, 0xc2537b88,
+ 0xf3bf99b2, 0x2ffdd84f, 0x5495767d, 0x937f76b2,
+ 0xe9a09fc9, 0x26141048, 0xa1bf0fc8, 0xf0ff680f,
+ 0x5236b2c3, 0x0b1a369f, 0xb7acb665, 0xd6b5186f,
+ 0x6fcfef1a, 0xcda5e466, 0x5e25eb3a, 0x06da8853,
+ 0x135baa81, 0xd6170d28, 0x60856944, 0x2f075eec,
+ 0x06bd005c, 0xa3a4fe9a, 0x6518fdba, 0x6768e9e3,
+ 0x3ec5253f, 0x890c6760, 0x9399cb61, 0x1b338b71,
+ 0x0688d42d, 0x904aba4c, 0xc406d3a8, 0x5a719a66,
+ 0xe17618d4, 0xd84135c1, 0x0e94970c, 0x64862d1e,
+ 0xbb9cd72b, 0x1371f77c, 0x29c0ff4a, 0x15302621,
+ 0xfa5286fe, 0xd88ecad8, 0xf3c018fb, 0x6f7159fc,
+ 0x986c5151, 0x5a50e21f, 0x8e1e6e73, 0x15ca2d62,
+ 0xd1c5d57c, 0x1237e1c1, 0x7670434b, 0x52e40a2d,
+ 0xd89f1c47, 0x07b63333, 0x82758f91, 0xef733b03,
+ 0xf0d8aa31, 0xdff161b1, 0xffb74528, 0x038f4575,
+ 0x64e8be45, 0xd66607b6, 0x0e56b4cf, 0x8639d94d,
+ 0x45f3e846, 0xb6f1258b, 0xefad36e6, 0xe867206e,
+ 0x07959af9, 0x56583b35, 0x0c017417, 0xc235984d,
+ 0xbac49ecb, 0x5fa999a1, 0x5b27489b, 0xfb70ee78,
+ 0xe7b3877e, 0x7c9c2da0, 0x8320ec27, 0x2991a3da,
+ 0xa9f830da, 0x3557cdd6, 0x1eb94e2f, 0x85f0a252,
+ 0x391da175, 0x06f185b9, 0xbfed4c15, 0xe6ba74e2,
+ 0x9d3d0b07, 0x176d05e9, 0x9de5e6a8, 0x4ec3fab8,
+ 0xde16b1d0, 0xc434f96d, 0xaf541711, 0x82323c34,
+ 0x6543edf6, 0xd4e1da96, 0x5709cba2, 0x294076ab,
+ 0xd38d032d, 0xad084129, 0xc420969e, 0x4935bd6a,
+ 0xd1820af3, 0x8cac5206, 0x08d57515, 0xa16f19b5,
+ 0xf6359129, 0x400de16f, 0xa17e4d98, 0x7d8c259f,
+ 0xc11d98a5, 0x2980f3dd, 0x06212fe7, 0xd3b484b9,
+ 0x99ab6f5b, 0x7b3dd816, 0xac548b39, 0x5ce43d95,
+ 0xf75552f8, 0xaf622784, 0x07cf7e6d, 0x81307d0d,
+ 0xb073f87d, 0xf895119e, 0xeb0f5d15, 0x38fda3a8,
+ 0x1dfab931, 0xc366677b, 0xca9350a8, 0x89351fe1,
+ 0x0e1fe3e4, 0xc0c50178, 0xd7e01543, 0x4fdff951,
+ 0x8b325e09, 0x5bb365ab, 0xcaf07fc5, 0x49dbccd4,
+ 0xd95ba9d5, 0xb087ced2, 0xa5fb524a, 0xfbdbf23a,
+ 0x2afb0be2, 0x11990318, 0x2c77434c, 0xd7d476f2,
+ 0x15b9e557, 0xbe735cd2, 0x055dee07, 0x368e9566,
+ 0xfb5d331c, 0x25f62618, 0xf63e1f2e, 0x69142522,
+ 0xa0834f49, 0x284f6ccb, 0x678840bf, 0x2a001753,
+ 0x88fcd8a9, 0xde0b0561, 0xfefeaa62, 0x8b940c11,
+ 0x6767d596, 0x0adea56b, 0x0e090e28, 0x946e6069,
+ 0xb1db1893, 0x4fa71662, 0x166c5038, 0x8cea0f51,
+ 0xb68752c0, 0x67c47ddb, 0xb0a21b17, 0xaf0a8f35,
+ 0xd1ff94e2, 0x167d7d8f, 0xc102d329, 0x5bcc1e78,
+ 0x00c240af, 0xcc3330ac, 0x1c1ea52f, 0xb73f701c,
+ 0xeec159cf, 0x3b109c7e, 0x5614141a, 0xa85dcdb3,
+ 0xb5e27cdb, 0xbff28404, 0x52fd40e1, 0x01e81676,
+ 0xa93d8f1c, 0x2b471e22, 0x55f519cd, 0xdf4d000c,
+ 0xc8e97fc5, 0xf0bde7ab, 0x3d126ea1, 0x1d3ea2cc,
+ 0x8a2b5b05, 0x009ab7ff, 0xdcae2d6b, 0x77708b8f,
+ 0x1aae4df8, 0x013253e8, 0x1a25659d, 0x1fe93239,
+ 0x1538fc0c, 0x7093c7de, 0x73bbb7fb, 0x419abb29,
+ 0x441bab96, 0xe229cf89, 0x6d3cb4ba, 0x93d0a390,
+ 0x09882954, 0xa822037b, 0x37aaa861, 0x81cfe5d7,
+ 0x5568bfbd, 0x9655b860, 0xd3287f10, 0xaed29a9a,
+ 0x668cd3a5, 0xac51548f, 0xa2e45f35, 0xbe536716,
+ 0xe458f2d4, 0x1e883eee, 0xbdb5dd91, 0x999bbd1c,
+ 0x8656b23e, 0x943b5ebe, 0xbe21cff3, 0x691c0252,
+ 0x4dba2602, 0xd9702adc, 0xde0ebb64, 0x91c25649,
+ 0x77563fda, 0x90bcf90b, 0xdc8302ba, 0xf8b5c832,
+ 0xae247af3, 0xbca0cb5b, 0xb3abc46c, 0x0508c031,
+ 0xd5a77849, 0x8a1af2b7, 0x199fc5dc, 0xda6fe8f7,
+ 0x44e28cb6, 0x1b3d310a, 0xd7ebc1b2, 0xb1d233e4,
+ 0xaeae6f1e, 0x4872b41a, 0x36d21055, 0xe4716fbf,
+ 0x6c9efcd8, 0x65609062, 0xee891af2, 0x0cc31719,
+ 0x4c01b8da, 0x903a126e, 0xfaefad03, 0x11789a80,
+ 0x5d263adc, 0xe5918716, 0x32128abe, 0xd5f13dcd,
+ 0x272a40d2, 0xe37b3e78, 0xc17be2a8, 0x59f94881,
+ 0xbec5b5fb, 0x1bc08f32, 0xf0af60cb, 0x5ac19d37,
+ 0x5479c0b4, 0x4bda4cdf, 0x63480df4, 0x14e07991,
+ 0x49dda69c, 0xe369e5a3, 0x88d51396, 0x9b7c7bcf,
+ 0xd255c98d, 0xc7d0c7bf, 0xe243bd7c, 0xf45b9ad8,
+ 0x0c8292e0, 0x7312db2d, 0x4aaf8faa, 0x5ba3d60c,
+ 0x11e7ceb2, 0xd35ca926, 0x85d825c9, 0xf9f4b288,
+ 0x80b522f7, 0x9f517fac, 0x40ae070b, 0x2020e524,
+ 0x40409cad, 0x3929f12c, 0xa342215b, 0xe7122d54,
+ 0x5e54fa94, 0x8231aba0, 0x7e4b5b1a, 0x6ebbcf18,
+ 0xf12724be, 0x0aaabc9b, 0x95773129, 0x977224b1,
+ 0x401ed913, 0x5ea8c861, 0x19a7e363, 0xfd63a3c3,
+ 0xebc26d9e, 0x7ab4bd7f, 0x149ca1fd, 0x002446e1,
+ 0x5e0b7ac4, 0x50db1a37, 0x61beee5d, 0xb3ad55b2,
+ 0xfbbad0a6, 0x66f040ae, 0x4b668d08, 0x8fb44f97,
+ 0x1c82dc1f, 0x54ae2c4c, 0x7af9c269, 0x876add23,
+ 0x51b59811, 0x6075f1a7, 0x76ca216e, 0x1734e38c,
+ 0xcb906f57, 0x116a4096, 0x8cf73441, 0x2a6f5f64,
+ 0xbaeef9cf, 0x1bda4187, 0xb4058fe0, 0x6a3e4954,
+ 0x1015b4c3, 0xbdbbc5a0, 0x28d0443d, 0x30f64164,
+ 0x0cd3c2a7, 0xa6967d45, 0x388f50fe, 0x7707fda2,
+ 0xfb4e984c, 0xf359ed04, 0xf4f50512, 0x0f7e813f,
+ 0x5e2d5fd3, 0x9bbb2517, 0x87c0f5a0, 0x736df172,
+ 0x1a0dc42b, 0xec37d3ec, 0x7a428712, 0x2ce875ad,
+ 0x6b6ac9cc, 0x4cd5285e, 0x8c9ed942, 0xab5bf100,
+ 0xf75c5402, 0xa23d1ca4, 0xa7d44605, 0xec638ab6,
+ 0xe8e2f7fa, 0x0bcd2f10, 0x0ce48795, 0xed7eec7c,
+ 0xd79ac95f, 0x9ea34226, 0x22810aab, 0x4c2bd4ac,
+ 0x280ede46, 0x02eb59ac, 0x2a3ce630, 0xd3521b85,
+ 0xb10c62a1, 0x85d12eae, 0xb51070e4, 0xf61d9268,
+ 0xb4a93591, 0x47e620ad, 0xe6b1736a, 0x617f3469,
+ 0xa6dd353f, 0xace1de54, 0x7620837c, 0xdf25f7c9,
+ 0xced99013, 0x17083c88, 0xe14b2b58, 0xbd8d3025,
+ 0x8b98ac79, 0x45aa16a3, 0x78c61e94, 0xd276d977,
+ 0xe7367a92, 0x636dbf25, 0xbfebe3ea, 0xf5eb542c,
+ 0x30134d66, 0xee697c3d, 0x1cdd09b6, 0x859b12f1,
+ 0x81d6ab8e, 0x294bc7e3, 0xfb51312f, 0x19477af6,
+ 0x83cce168, 0xb1f58f7b, 0x5408fa8f, 0x1260bfd3,
+ 0x25418140, 0x2f587b1e, 0x025f22c0, 0x1a41d447,
+ 0xcbc06809, 0xc5895919, 0x706df142, 0xf386a16e,
+ 0x3a654f8d, 0x243d2636, 0xe9866b4a, 0x3c6c9648,
diff --git a/src/soc/intel/broadwell/microcode/microcode_blob.h b/src/soc/intel/broadwell/microcode/microcode_blob.h
index 28b4307..ced1523 100644
--- a/src/soc/intel/broadwell/microcode/microcode_blob.h
+++ b/src/soc/intel/broadwell/microcode/microcode_blob.h
@@ -19,7 +19,7 @@
#include "microcode-M7240651_00000017.h" /* Haswell ULT C0 or D0 */
#include "microcode-MF2306D2_FFFF0009.h" /* Broadwell C0 */
-#include "microcode-MC0306D3_FFFF000D.h" /* Broadwell D0 */
+#include "microcode-MC0306D3_FFFF000E.h" /* Broadwell D0 */
/* Dummy terminator */
0x0, 0x0, 0x0, 0x0,
Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6965
-gerrit
commit 3f389a6b27e8a969f2db3230365caea845c7d5c5
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Thu May 1 09:07:53 2014 -0700
broadwell: Update microcode for supported CPUs
This broadwell implementation will support Haswell ULT in
addition to broadwell CPUs. Add the latest available microcode
for the broadwell C0 and D0 parts as well as Haswell ULT.
Change-Id: I1beb71e0e28af3508e2260751b6fdfe47d53d90d
Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/198742
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
(cherry picked from commit 69d5b7c834a4f52656ab14562ea913477418e588)
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
src/soc/intel/broadwell/microcode/Makefile.inc | 1 +
.../microcode/microcode-M7240651_00000017.h | 1216 ++++++++++++++++++++
.../microcode/microcode-MC0306D3_FFFF000D.h | 960 ++++++++++++++++
.../microcode/microcode-MF2306D2_FFFF0009.h | 1088 ++++++++++++++++++
src/soc/intel/broadwell/microcode/microcode_blob.h | 13 +-
5 files changed, 3269 insertions(+), 9 deletions(-)
diff --git a/src/soc/intel/broadwell/microcode/Makefile.inc b/src/soc/intel/broadwell/microcode/Makefile.inc
new file mode 100644
index 0000000..bf9e345
--- /dev/null
+++ b/src/soc/intel/broadwell/microcode/Makefile.inc
@@ -0,0 +1 @@
+cpu_microcode-y += microcode_blob.c
diff --git a/src/soc/intel/broadwell/microcode/microcode-M7240651_00000017.h b/src/soc/intel/broadwell/microcode/microcode-M7240651_00000017.h
new file mode 100644
index 0000000..43e7c7b
--- /dev/null
+++ b/src/soc/intel/broadwell/microcode/microcode-M7240651_00000017.h
@@ -0,0 +1,1216 @@
+ 0x00000001, 0x00000017, 0x09142013, 0x00040651,
+ 0x6d9ec14c, 0x00000001, 0x00000072, 0x00004bd0,
+ 0x00004c00, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x000000a1, 0x00020001, 0x00000017,
+ 0x00000002, 0x00001291, 0x20130913, 0x00001291,
+ 0x00000001, 0x00040651, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x897ee6d6, 0x19e94656, 0x61499118, 0xef0e403c,
+ 0xc63996e3, 0x6a998782, 0x3083676c, 0x481e2e3c,
+ 0xa19308a3, 0x5b19c4b7, 0x4a1b425b, 0x7d6a74f6,
+ 0x81624193, 0x3a559605, 0x5475280b, 0xe7319d58,
+ 0x48624ca7, 0x507af030, 0x3b32d96a, 0x30164068,
+ 0x5284d2f5, 0x725b2915, 0xf63c9280, 0x44b7c142,
+ 0xe67ca7b3, 0xd6f163e7, 0xcdf51f3c, 0x41d180a1,
+ 0xcc3931b1, 0xf7a544a9, 0x7f6bf77d, 0xfc45a45f,
+ 0xf0985836, 0x652d7e2e, 0x0324b1f3, 0x24b9548c,
+ 0x7bcae7a5, 0xdcdebf79, 0x27015922, 0x0c83c606,
+ 0x3d2ceeb7, 0x61c5eec8, 0x6b6899c6, 0x3e500531,
+ 0xf08bfa44, 0xb304a8f4, 0xcee8f713, 0x2912c786,
+ 0xfae6c34c, 0xa5292960, 0x7d63e389, 0xaa257a01,
+ 0x1fb25054, 0x963fc676, 0x5bcb9fd3, 0x58f369a4,
+ 0xf6e3beb2, 0xa58b5eb0, 0x33c7eba4, 0x37fe8b66,
+ 0x00714403, 0xf0fd0c4e, 0xaa122996, 0x9a55b184,
+ 0x00201507, 0xc9fb6e3a, 0x11ab60c8, 0x80ff6e84,
+ 0xc37aabdd, 0x0fc23175, 0xb0b18c34, 0xf1ec806c,
+ 0x00000011, 0x5280f766, 0xd11b3a31, 0xad41ef13,
+ 0xefdf01b2, 0xa3c045e8, 0x4ad1abaf, 0x53602a21,
+ 0xf8a64e46, 0x39f7caf1, 0xa44e7788, 0xbe613ec0,
+ 0x917c7957, 0x487ed20c, 0xa2293ed0, 0x82abd28d,
+ 0x3707305b, 0x6bb0495c, 0xfa3e6f66, 0x67e53231,
+ 0xe2d3add6, 0x5573815f, 0x20a57a50, 0xb8f4324d,
+ 0x9e33af11, 0x56212d1d, 0x16e48cf9, 0x7ecb8611,
+ 0x534f63d4, 0xb4c9ac18, 0xaaa2f24b, 0x5f0ff330,
+ 0xf2537e37, 0x3ff85c59, 0x2622d8c2, 0x075b206c,
+ 0xc8219eb9, 0x8bad4f02, 0x3c835526, 0x6408346b,
+ 0xb39e611e, 0xfde245df, 0x098e0a88, 0xdb176a44,
+ 0x1204eec5, 0xdf2474eb, 0x82d29327, 0xa60347f0,
+ 0xca96c7ba, 0x3bf19bce, 0x6c230956, 0xf5f5013a,
+ 0xe0ce4621, 0x0806b33c, 0xc26c4280, 0x9aa3df3a,
+ 0x2b9de1dd, 0x4820b860, 0x042223c6, 0x89d90c3b,
+ 0x807e320c, 0x35e0ad47, 0xd078cb4c, 0x292a594d,
+ 0xe33606fe, 0xb3b1332f, 0x8271506b, 0x017b9f0d,
+ 0x1c67ad13, 0x7a150db2, 0x62b81b44, 0xe0f339ad,
+ 0x223056a5, 0xe35b4a2b, 0xad908931, 0x0e781e2c,
+ 0xd2b2fe3c, 0x333f7f42, 0xcdafc2cc, 0x2577636a,
+ 0x0a6ab53f, 0x9f0fc66c, 0x5fcdf689, 0x9bd443ed,
+ 0x6cc6d5f6, 0x620d9276, 0x61709c4d, 0x69c58fc9,
+ 0xccc708f8, 0x507e8555, 0x0f315ce4, 0x8f4968e3,
+ 0x8e808fa9, 0x423ad6ba, 0x2d72b296, 0x4d8534ff,
+ 0x9160455b, 0x474dc71d, 0xc4f2633d, 0x2e2340a8,
+ 0xd1cf2676, 0x7c93f9db, 0x2b7088a5, 0xeed54d10,
+ 0x72d42cff, 0x9c871b11, 0xe1daed8c, 0xc947ef30,
+ 0x63234a4e, 0x66d6374c, 0x6877bfca, 0x65461169,
+ 0xab8113df, 0x9e8ef29a, 0x9067c218, 0x865440ff,
+ 0x0c9152d4, 0xfecc9ecb, 0x4a39b3b8, 0xaea18550,
+ 0x8c0b7ae1, 0x1e1e2301, 0x0a6c4647, 0x8f023bd0,
+ 0xe89c08d0, 0x3ad31e9d, 0x24ce128d, 0x722465d8,
+ 0x8ce230ce, 0x4e549451, 0x19602cad, 0x3fd084d4,
+ 0x7b9b8b80, 0x9bbc42bc, 0xd2a8b34d, 0x7b644134,
+ 0x7dc66060, 0xf2c41502, 0xfebbf582, 0x79ed07c3,
+ 0x6b814d1d, 0xfdb21df9, 0x944b6843, 0x9796774b,
+ 0x00794599, 0x93a4410a, 0xcda577a4, 0x0e5cef0a,
+ 0x685ca624, 0x3fb17f8e, 0xdd145dc8, 0xaa423bfd,
+ 0xd472fd94, 0x7f88b40a, 0xf613aa43, 0x971e1e28,
+ 0x1f9fccdd, 0x85677306, 0xdb4a1d36, 0x7b99ff8b,
+ 0x9f776315, 0x8c28bb98, 0x133f9762, 0x4433b38c,
+ 0xa80de29a, 0xd25ad967, 0x6923f752, 0xed5c0659,
+ 0xfddfe3c5, 0xb1da9baf, 0x1082312e, 0xe116561e,
+ 0x0b5219c4, 0x0a640bbf, 0x25ce2c26, 0xe46cfdba,
+ 0x13fd5271, 0x2952857f, 0x135e7625, 0xfa1a509a,
+ 0x2bc20a0b, 0x76a84fad, 0x03da8fb5, 0x6dfc952d,
+ 0xb49f472e, 0x6e7116a6, 0x0e0b8857, 0x94be1e18,
+ 0x7ace119c, 0xff823785, 0x6d925f98, 0x57bf9ea8,
+ 0x5fadb57a, 0x9ca44ace, 0xf06f9c34, 0x46be7072,
+ 0x06d3a101, 0x9a1a0ff1, 0x06eba752, 0x60b8421d,
+ 0x40da7826, 0x3927a2a4, 0x8cb0180e, 0x23ca3126,
+ 0xb580ad5f, 0x719f3ce1, 0xd90e0154, 0x913c71e8,
+ 0xa1c54aa4, 0xc64e55aa, 0x2265973c, 0x0ac58056,
+ 0x0e455d09, 0x9fae9e68, 0x17083737, 0x1c242cf4,
+ 0x6dd04949, 0xdee97ec5, 0x59d51c50, 0xbda70c5f,
+ 0x23e4f39c, 0x10e2dae0, 0xca200114, 0x549eb9f7,
+ 0xacca8e98, 0x51d6b4cd, 0x4daa026a, 0x69316349,
+ 0x533e8bc2, 0x4984f50d, 0x38d50d71, 0x54c76609,
+ 0x6fa299d7, 0x7e42745a, 0x408a245e, 0xa9b06b40,
+ 0xe857b397, 0x9c7ce80d, 0xc5ac7306, 0x05f71e5d,
+ 0x3bd59cd8, 0x454d484e, 0xca20a066, 0xa843ec2e,
+ 0x6aeacbd7, 0x9ae430f0, 0xa1897243, 0x5daf49ff,
+ 0x66d018ad, 0xf2dbee64, 0x1121a1f7, 0x6270bed1,
+ 0x373553fc, 0x1024d939, 0x3282e931, 0x566638ec,
+ 0x2f7ef5c6, 0xf0f1d2ce, 0x3ee23413, 0x748d7255,
+ 0xb51bcc74, 0xe74efaa5, 0xe13829a8, 0x3e7922a0,
+ 0x86c90e22, 0xdd27e78c, 0xdbc957e9, 0xd434b292,
+ 0x6c57c0ea, 0xc6a706bc, 0xc8193c15, 0x4baa96a6,
+ 0xb2891b9d, 0x0cbe8fe8, 0xc2e1d7c5, 0x846c615a,
+ 0xe4fd7206, 0xec3d772f, 0x4a00a2f2, 0x61aa820f,
+ 0x9cd45dd3, 0x5586def8, 0x48b2d2ef, 0x9f007b51,
+ 0xbcc147b5, 0x0c7a514c, 0x90bbf1f3, 0x477a6462,
+ 0xa2ed9804, 0xbd1dfb86, 0xc45a9eeb, 0xc579f7ab,
+ 0x31b885c6, 0x2c50a80f, 0xf81fbe5c, 0x462d6b43,
+ 0x55f6c732, 0x03635b57, 0x79014527, 0x3e47f960,
+ 0x12444b10, 0x167e1c6d, 0x37079470, 0x3ae898bc,
+ 0x6775e69e, 0x88977ca6, 0x98f18b58, 0x89a4dceb,
+ 0x9ef60e8c, 0x13c4ca2b, 0x95779f59, 0xe5c34800,
+ 0x081a56a2, 0xc8bc8969, 0xeeb765df, 0x82e1d503,
+ 0x42f82ef7, 0xf337be1b, 0x13b448f6, 0x5c863ba7,
+ 0x70250ee0, 0xfa4a8003, 0xb5339060, 0x06aa5653,
+ 0xb7afae99, 0xb9451a61, 0x70a6b7af, 0x410b63ee,
+ 0xbc98a125, 0xcafa7164, 0xb051f8fb, 0x7c5d1d47,
+ 0xe0cf12ba, 0xba56897e, 0x298d9484, 0xbfbac94d,
+ 0x88b511d3, 0x2fd32e37, 0x46c28962, 0x4d0eb5b6,
+ 0xe47e1db5, 0x4e4146e1, 0x969db000, 0x73e9a941,
+ 0x3e1877e6, 0x50a4da2a, 0x60358fc2, 0xab510a75,
+ 0xb9bbe0cc, 0x9a19b7da, 0x82dbfe86, 0xf5b4c9e2,
+ 0x0e3c0263, 0xda2d1db5, 0xca5bdf0b, 0x0c40f1f0,
+ 0xcb0c6978, 0x57587fb3, 0x2a7466df, 0xc85aaab9,
+ 0x5cb2bca3, 0x80adcef6, 0xf80272ce, 0x391c6f3b,
+ 0xb5c4122f, 0x0f9a5f8a, 0x7e5629be, 0x8dfa434f,
+ 0xa74f56e0, 0x5f7b8a31, 0x43b28226, 0x5b309e06,
+ 0xb2b32aba, 0x799221c9, 0x05af250c, 0x2f007807,
+ 0x6a2f886b, 0xf9e555cd, 0x3356d37b, 0xbd52f4b6,
+ 0xd4793f34, 0x2a9432d5, 0xdf67ccbd, 0x4df8eeb1,
+ 0xb87df09d, 0x770cc738, 0xd946b89a, 0xe2d0ce59,
+ 0x66409892, 0x28384208, 0x98dd3447, 0x647d60c9,
+ 0x1d20ecb7, 0x30506512, 0xbfb08c84, 0x67cb0387,
+ 0x69c86b2d, 0x3eed0eae, 0xba345f5a, 0xd2587308,
+ 0x363618f1, 0x8e78acaa, 0xf3dec219, 0xec17fe42,
+ 0x5d0b39c8, 0xe8d856d2, 0x1f8bd433, 0x21e1c130,
+ 0x4dfe0c05, 0x5933c0a9, 0xa31415b7, 0x1f2e1e75,
+ 0x9cc588d2, 0x1eb512d7, 0x0e5d3abb, 0xe4fbfe3e,
+ 0x9834479b, 0xd61b8c7e, 0x437bcd6a, 0x03099b21,
+ 0xab5bf686, 0xc190f7ab, 0x9137365b, 0xf2d2a1ff,
+ 0xeddd9e0f, 0xee847465, 0xde523db2, 0xbba99c05,
+ 0xe79be198, 0x618c9fdb, 0x8c07e7a0, 0xd2f6b708,
+ 0x8bab5667, 0xdb533471, 0x97e2ccb0, 0xe97cd211,
+ 0xfd6f3add, 0x51cab0e6, 0x231735a6, 0xc42f1915,
+ 0x80daae0a, 0x5af0baec, 0x3858eaba, 0xc63b74f7,
+ 0xc44d73fc, 0x25ccec13, 0xd8ba8880, 0x0baebe50,
+ 0x9007a0f6, 0x06a5044f, 0x9957a6f5, 0x1285e9d1,
+ 0xa7172ac0, 0xabb82b84, 0xc94cd874, 0x724fff99,
+ 0x9df3a6d1, 0xf0da7b5c, 0x63441010, 0xf59c09bb,
+ 0x0f640849, 0x2b09fe4d, 0x72ba25d2, 0xb5cee88d,
+ 0x8fb252d0, 0x89cf966c, 0x271c9f40, 0x46e951c2,
+ 0xdcc8c752, 0x0d5dcc21, 0xaca06755, 0x36fa386f,
+ 0xf55e69fe, 0xb9ad488d, 0x17513980, 0xa4067346,
+ 0x651a5477, 0x627d7658, 0xdbdd2021, 0x95e207a6,
+ 0x6f1ae5a7, 0xde1480df, 0x4c1df64b, 0xe344a934,
+ 0xed3af68b, 0xf5838483, 0x1aaa3bae, 0x846047a7,
+ 0xf11fac99, 0x4fe521ec, 0x2acc2099, 0xebbb149b,
+ 0xe9bbec2c, 0x5df7949b, 0x3f2dc789, 0x71081d15,
+ 0xe9881e07, 0xd92dbe75, 0xf8de5aaa, 0xfc803d59,
+ 0x88c4f603, 0x3aa11b74, 0x3d74653a, 0x879a7760,
+ 0xf78c7a1e, 0x595bb354, 0x2ae37ab0, 0x14bb239a,
+ 0xefc2e575, 0xdc03a027, 0x97a7f193, 0x842d4927,
+ 0xdaac0d71, 0x728a6235, 0x5c5db728, 0xf3ec4aa7,
+ 0x66572622, 0xec167d43, 0x0de9a1b7, 0xbc5c1670,
+ 0xfb842057, 0x64b5da7a, 0xacebf269, 0x1a12ade3,
+ 0x9e917878, 0xa19bfb3c, 0x24c743bb, 0xc8e6f157,
+ 0x55af5ebb, 0x0630edc4, 0xd1bae04e, 0x6ec89357,
+ 0x3fa300dd, 0xaf35c503, 0x5d204fc2, 0x865373bc,
+ 0x77f8f33c, 0x33bd9480, 0xd49501ac, 0x85535872,
+ 0x06e714df, 0x96e2176d, 0xb0a6bb32, 0x0e0a0447,
+ 0x0ee20b2a, 0x13b28a36, 0xbc489211, 0x1326ca5b,
+ 0x463ad003, 0x4fc2a4b6, 0x96c1ae02, 0xca4f6af7,
+ 0x48fa03ac, 0xd910ea40, 0x1c484a65, 0x128702a1,
+ 0x3923e2b6, 0x781f1061, 0x60c3f752, 0xf4f362fd,
+ 0xa1151638, 0xdb4f30dc, 0xfa07d67c, 0xf7e99dcb,
+ 0xa97242f2, 0xa78cab5f, 0x610161a0, 0xd90b46e6,
+ 0x7188ea7a, 0x0358ff01, 0x25c9e018, 0xa79ec67a,
+ 0x5de9d773, 0xc8ce1607, 0xb30aefaf, 0x18a08ea7,
+ 0x6f4f79d9, 0xe2fdc682, 0x179ebf13, 0x13a9324e,
+ 0xc9d7cf72, 0x045bf2e3, 0x6b4ac8eb, 0x437fc738,
+ 0x9e63233a, 0x9b28ced3, 0xb6a6f8e2, 0x0232564f,
+ 0x910053d6, 0xcee9dcc7, 0x108414d6, 0xdc604cf5,
+ 0x20640c3c, 0x0746d40e, 0xb031d671, 0x6e5156cf,
+ 0x7e9cc72e, 0xe67231cf, 0x5c8a39f9, 0xc60eb1df,
+ 0xaad50694, 0x2467a937, 0xacf74dc1, 0x0e768fd4,
+ 0xcc5668e0, 0x5092513f, 0x74cfd72f, 0xe77ba093,
+ 0x9aff258a, 0x7528736a, 0x7b182c8e, 0x1d7faca2,
+ 0x28f9bf7c, 0x3320a493, 0x36ca774c, 0x49187adc,
+ 0xec515342, 0x6e8cdf34, 0xd334a7b5, 0x75973994,
+ 0xc9300c21, 0xd95517a0, 0x420f6836, 0xff40d2e7,
+ 0xed444882, 0x7f988c3e, 0xa393bd39, 0xbf71cbe3,
+ 0xd5c53d5f, 0x5ec000eb, 0x35759dc6, 0x01f126f8,
+ 0xf7f9fee3, 0x93f0b883, 0x7191848d, 0x9e60510f,
+ 0x54715562, 0x337348b8, 0xf1508efb, 0x588e13e4,
+ 0xfd2f042d, 0x6432799d, 0x401e36ab, 0x791bccf1,
+ 0x02b7bb68, 0xafdf7a2b, 0xedccb0ef, 0x88576e4e,
+ 0xea4512ac, 0xb75af934, 0x262aa544, 0xc6234a7e,
+ 0xfd63573e, 0xd7b39f98, 0xa36dd467, 0x86cec955,
+ 0x3c50c07e, 0xeb62be77, 0xa62cd132, 0xaa8d8e8f,
+ 0x78dc366c, 0xf18b059b, 0xe27fad64, 0x63002964,
+ 0x993efdf0, 0x2e5e6195, 0x412629e9, 0xc15f11ac,
+ 0xc2d5a758, 0xf86227d9, 0xef1c0c34, 0xbd34f7c1,
+ 0x89f94809, 0x46ef214c, 0x5b1e0fd2, 0x519445b1,
+ 0x463ddcd1, 0x5f384d0c, 0x58e9a3b4, 0x69c2d80c,
+ 0x29327641, 0xbb68dc93, 0x8c64e946, 0x01430b9f,
+ 0x14031c53, 0x4493df34, 0x223c1026, 0xad048ba3,
+ 0xafeba0a4, 0x407dea4d, 0xab48e55e, 0x57239728,
+ 0x99e5d50f, 0x2f61ed79, 0x33ff8ff0, 0xae4d5463,
+ 0x1f25fdcb, 0xc3953fcd, 0xe9bbda09, 0x4208910f,
+ 0x0eda4fba, 0x80a0f5cf, 0xf4fa3df9, 0x243d7f5c,
+ 0x86d62ae1, 0x7daf4ca2, 0x91883e6c, 0xe83cc151,
+ 0x742a142f, 0x783ed773, 0xf2fc74fd, 0x136bfc8b,
+ 0x8517fee2, 0x76d6d20d, 0xbaeeb719, 0xab2abdf5,
+ 0x4d31b4d4, 0x98129726, 0xafc6c765, 0x9e11f69c,
+ 0x1a35b38c, 0xda6a59af, 0x70705511, 0x8e6bfb2b,
+ 0x875d5f6e, 0x1c1ad947, 0x2dc0b35a, 0xb565cdfa,
+ 0xf8eb7ef7, 0x57316c75, 0x5a4f7d22, 0x1dba9988,
+ 0x6c6669dd, 0x6379f79f, 0xacd87cd4, 0x2e5227c5,
+ 0xe300f062, 0x8e265274, 0xda2406f0, 0x6d529c6a,
+ 0xaa108c8a, 0x422fc572, 0x61cd2a13, 0x200683ba,
+ 0x0ce01b18, 0xb323b294, 0xa6b4507d, 0x122f354e,
+ 0xa395c3ae, 0xd95a883b, 0xf6d7b368, 0xd2f51958,
+ 0x4f12ae12, 0xd0e564f9, 0xe1f3ecfc, 0x42360d92,
+ 0xd84d960f, 0xceff5c42, 0x08e757db, 0xf1d07ef5,
+ 0xc5c56913, 0x8d11080d, 0x6def36f0, 0xfdff708b,
+ 0xd7316fc8, 0xd0d708d0, 0x4030b3de, 0x2d7ca451,
+ 0x5a6c1213, 0x634383c6, 0xd066174d, 0x50d306b4,
+ 0x9982f4f0, 0x0d1a6b19, 0x19a0c80e, 0x7831a9cc,
+ 0x47cf760b, 0x6c2e4eba, 0xaa09621c, 0x18fe290d,
+ 0x76c1392b, 0x5bb3adc2, 0xd5cd3949, 0xdde3e7d1,
+ 0x7286b5ad, 0xd27e2ca3, 0xc9ba11b3, 0xd0fee73e,
+ 0xd5c3d4e0, 0x5e16b6e5, 0x83f6b29f, 0xa6d9609e,
+ 0xdff67670, 0x911f0aa0, 0xf2cfd9f9, 0xb083aa07,
+ 0x899e06d4, 0xae8845c7, 0x4c85df4c, 0x77d63c3b,
+ 0x8edea2d0, 0xad764d15, 0x5dc94cf2, 0x04c0ef38,
+ 0x593897a6, 0x14d2826b, 0x877e1555, 0xf8a024da,
+ 0x03bb4db9, 0x41829883, 0xeec5fc05, 0x47ba3735,
+ 0x2701b452, 0xa07c0b54, 0x7ef207e4, 0xa28077e6,
+ 0x70d7363f, 0x80ff8671, 0xf2df540a, 0x49ad767a,
+ 0x4050a5a3, 0xb1b7d0f9, 0x6b2e8472, 0x628498d0,
+ 0xb314f0c2, 0xb75c3493, 0xea7f7b2b, 0x407a47cb,
+ 0x2b88942a, 0xca8b46a4, 0xce8d9755, 0x4dc1154d,
+ 0x648ac694, 0x920f52eb, 0x739cab11, 0x39ea735d,
+ 0x971834b3, 0x8cbce0c6, 0x6234adec, 0xedf7ba24,
+ 0xef5e3e91, 0x1f91ff22, 0x84165c66, 0xa291f61c,
+ 0xe76f0c10, 0x2892b75d, 0x2fbf1aee, 0x3bf7b565,
+ 0x395008d5, 0xef7c1a4a, 0xbc410244, 0x7d7b0998,
+ 0xf090a2e3, 0xf6aebc29, 0xe8723694, 0x2c0815ef,
+ 0x8f84b2ee, 0x212fd6ae, 0xe65fd84f, 0xff193830,
+ 0x88972651, 0x3ff951fb, 0xb7dc28ab, 0x7c78ecc0,
+ 0x1ef0163b, 0x835bf44c, 0x53dbee2c, 0x0d7137a2,
+ 0x22c0e232, 0xb4fd7f5c, 0xc1d1ec96, 0x2def7a0f,
+ 0x9a8aac33, 0xd1b37ef8, 0x10952665, 0x937b346d,
+ 0x48f2ed63, 0xee2a3f85, 0x9f5fa4b1, 0x417e54c5,
+ 0xdde47d97, 0x98e8fdfe, 0x402fecac, 0xb938acaf,
+ 0xd3dd8db2, 0x2601c8c0, 0x228182d5, 0x262bfda2,
+ 0xbafbbc4f, 0xa11905f9, 0xbbe1764f, 0x70284748,
+ 0xee070cbb, 0x2849eab4, 0xed758e91, 0x5f16147c,
+ 0x21a0cc5e, 0x4a489d5b, 0x72faf819, 0x6b6edd1e,
+ 0xb0c2838b, 0xfc39525c, 0x48e12e42, 0xad9e0c56,
+ 0x298a1bb7, 0x0d4e98ef, 0x058d048a, 0x307fb17c,
+ 0x3fe73f8a, 0x72576e29, 0xf3740032, 0x9814f0d9,
+ 0xf1fbaa13, 0xa3334372, 0x01a738a6, 0xde86d61a,
+ 0x5e1cc5fd, 0xea00b338, 0xc2dcfb59, 0xbafa62da,
+ 0x1f6f86c3, 0xf7453d91, 0x6b9d10f9, 0x22032c5e,
+ 0xb913bfdb, 0x618ba075, 0xe3ea8984, 0xf14a0980,
+ 0x9eea7104, 0x36cf8067, 0x4d7c6be8, 0xe0ce59f5,
+ 0xdfbb6206, 0xd61e4123, 0xef1419c1, 0xfa0fd306,
+ 0xb8a26025, 0x6627f89b, 0x216c1e04, 0x077c8249,
+ 0x9fd89022, 0xea97d6b4, 0x15a64ab8, 0x1709eb6c,
+ 0x56f62095, 0xd4421aa6, 0x5f54a5b4, 0xe100113e,
+ 0xd83160c8, 0xad496d42, 0x49dc7b37, 0x00efee1b,
+ 0x5b270def, 0xc50e853e, 0x57752f23, 0x0c196baf,
+ 0xd2819d66, 0xd62ee2d9, 0x3ce1bdda, 0x47d5888e,
+ 0xdbc2d24e, 0x1ebbea17, 0x5edc7b1a, 0x5561bf23,
+ 0xd0901586, 0xf67359c5, 0xa5ac6041, 0x13ef5ccd,
+ 0x46827521, 0xebcd42cb, 0xa5093085, 0xb7424f27,
+ 0x274bd3ab, 0x788e58f0, 0x986b18d5, 0xa7c0dde5,
+ 0xa61706da, 0x49f239bf, 0x63350b22, 0x9d66258c,
+ 0xe75f1c6e, 0x70ef2e88, 0xb0b07079, 0x2f217765,
+ 0x84f11390, 0xbde48bac, 0x2014f862, 0x5aa38eb1,
+ 0xf64c7c4a, 0xe2cb65e9, 0x0b72f6f3, 0xff9d1bc5,
+ 0xf4837f71, 0x985eaf05, 0xc56a828d, 0x4c6ea980,
+ 0x91635a2d, 0xba834a13, 0x1cae85e4, 0xcea5b12c,
+ 0xba70dd01, 0xe2aa2f79, 0x8ce8bd19, 0x213b2f25,
+ 0x474d2d1a, 0x6017ef4b, 0xd024ee9b, 0x6b6990b1,
+ 0x1d5f68db, 0x5d67983b, 0x9b007e7a, 0x307ecc37,
+ 0x79f2a68c, 0x22ed3a85, 0x62880150, 0xa2bb0b28,
+ 0xe44209a3, 0x95204a75, 0x86aede8a, 0x964cedfd,
+ 0xab6f97b5, 0x30c49a32, 0xe33f7090, 0xdb5d760a,
+ 0x1695b78c, 0x06b58ed8, 0x51e34f2d, 0x1bb3e8f1,
+ 0x5053c228, 0x38f27193, 0xa385959d, 0xc674e879,
+ 0xa73fb381, 0xea9c707e, 0x514ceac9, 0xb014225d,
+ 0x12d5efc9, 0x0016495b, 0xd6fc3002, 0xd7d93f39,
+ 0x38057098, 0x2970f913, 0x774f07ff, 0xe28e9ba0,
+ 0xc28517f4, 0x08c22803, 0x3e84580a, 0x24c3558c,
+ 0xc395655a, 0xf28644d6, 0x21ae7050, 0x0b4ec727,
+ 0xfcb77b9f, 0xd1f7e576, 0xee244121, 0x2edb569f,
+ 0xdb0acf3f, 0x62701a18, 0xf608e826, 0x64dafb30,
+ 0x28812eef, 0x9e9cb1d9, 0x19fdd3cd, 0x0142e8e0,
+ 0xefd13273, 0x9839397c, 0xa7a00650, 0xae1fb06c,
+ 0x310f3f62, 0x37cf11cc, 0x0e388939, 0x7cc49778,
+ 0x58f4c9ee, 0xaa531988, 0x7a218492, 0x6009c6a3,
+ 0x5044d8b5, 0x5e3be9d2, 0x4ac60593, 0x5e40bc8f,
+ 0x6ac90e4c, 0x45cd8bed, 0x32e12bac, 0x385c882f,
+ 0xc0b35b44, 0x69d6191e, 0xeafcaff0, 0x123d91ec,
+ 0x0ac09b03, 0x1c2b74e5, 0x1a0abe83, 0xe3831730,
+ 0xdfe3a074, 0xf3c512c4, 0x0313f577, 0xcfe39dd3,
+ 0xd3e8a0e8, 0x68ca4093, 0xc1ad4278, 0x120473ca,
+ 0x3cc5daf2, 0x033ffba0, 0x67ab6c50, 0xf3afc2a6,
+ 0x6a718b06, 0xe628758f, 0x81479dda, 0x603f0d70,
+ 0xea154a9a, 0x09c8b382, 0x88339e8f, 0xccc4bfaa,
+ 0x9fc2f967, 0xbd039858, 0xa460e528, 0x857706bf,
+ 0x901dc227, 0x1e7cc80e, 0xc42387b6, 0x668400f9,
+ 0xf17c690e, 0xa0303fab, 0xce88e42c, 0xabcd073b,
+ 0x602940ac, 0xc2c0749d, 0x83099b9a, 0xab471a22,
+ 0x9faa81da, 0xf053fb3b, 0xe754c80f, 0x543e7fe9,
+ 0x4772d828, 0xabc96b7e, 0x599a15ba, 0xc3c93284,
+ 0xf0f46cca, 0x263d3394, 0x61c87736, 0xaa52b433,
+ 0xfaed6b2f, 0xedae594d, 0x26d2f027, 0x206015d2,
+ 0x4a223ff6, 0x0e61c2df, 0x5562434c, 0xcd9d3304,
+ 0x5433a8e3, 0xbbd387e3, 0xaa437dc6, 0x2167cac1,
+ 0x769f8ff2, 0xd58f2534, 0xd11cfe82, 0x0f319e71,
+ 0x3ceb7191, 0xca0aa41d, 0x6fb8e829, 0xeeab6396,
+ 0x28c0917d, 0xc7e848bf, 0x1ca25d98, 0x5c43d99e,
+ 0x7e3880ed, 0x5668080c, 0x3498f437, 0x1a3fee7c,
+ 0x5151c1f5, 0x798cc437, 0x947238c0, 0xd4abce7f,
+ 0xa91d446c, 0xe8795d69, 0xc5ea01d7, 0x5f636d81,
+ 0xdcdd84cb, 0xc1f97c9c, 0xf9a60b04, 0x9273ab66,
+ 0x22af1944, 0xf1359c6b, 0xf296349b, 0x6021ab8f,
+ 0x34f79826, 0x303fb159, 0x16084154, 0xf569ffbe,
+ 0xc9e5d74f, 0x8f09953a, 0x1bb567ec, 0x0d34d2fe,
+ 0x97c851c0, 0x48f162c4, 0x00811751, 0xf74a215c,
+ 0xd7158a42, 0x2ea0f114, 0x18566d7d, 0x2828d88e,
+ 0x2f73d3e9, 0xeb45e0db, 0x83828717, 0x9647f3cc,
+ 0x0ad0f7ee, 0xd488900c, 0x107e35ed, 0xb10fca38,
+ 0x362909e6, 0x3d8c8620, 0x15bae4f9, 0x870b209a,
+ 0x213f60a3, 0x0d6ec560, 0x2bc21ed7, 0x1678fa56,
+ 0xb3a01ef2, 0x950795d2, 0xfcc600e6, 0xddb66870,
+ 0xbd76e692, 0xa2e2b07f, 0x29ff7d60, 0xd4b48bc5,
+ 0x85232ade, 0x6f3f4b9a, 0xdafb89a9, 0xccc9208e,
+ 0x3fc80b3c, 0xb5fd6638, 0x870f3bc5, 0xac2d9368,
+ 0x80c2ed91, 0x97573086, 0xecc96c55, 0x620529b7,
+ 0xa5d01f13, 0x638c3c54, 0xff12e2bc, 0x9330e473,
+ 0x3b2c3778, 0xa2145bd6, 0xbbed37c2, 0x16c4635b,
+ 0xe2c49ce3, 0xcd976162, 0xb5b4b331, 0x2dc4e310,
+ 0x7621c61c, 0x1af5b082, 0x66ca3367, 0x7fe2c09b,
+ 0xbcdd4004, 0x1ab753ad, 0xc55a7c34, 0xf9c38826,
+ 0x13b9bfc1, 0xc3cfe6da, 0x4a9c03bf, 0x381f9e3c,
+ 0x37548570, 0x320ba637, 0xa899c568, 0xbb71653e,
+ 0xe49a0a4c, 0x61a516a6, 0xa47fa2e8, 0x7d9c5100,
+ 0xa38ceb1a, 0x174e6bcb, 0xa5e95b4c, 0xb3beaf37,
+ 0x9aff5130, 0x9b2cffbb, 0x5f36f659, 0x5c713636,
+ 0xd727338a, 0x229768ec, 0x20ff7e99, 0x3b134fc5,
+ 0x7bd94c04, 0xcd9d6b23, 0x54774c7e, 0x5211d0b4,
+ 0xf4e1f5ac, 0x278aaacd, 0xffcf2e74, 0xdfec47c5,
+ 0x08c47e14, 0x55550288, 0x04bfd201, 0x5bc178e9,
+ 0x35959af1, 0x95ef266a, 0xc42a1398, 0x56c5cd81,
+ 0x54fd0e04, 0x720e4f25, 0x60dad543, 0x32bf5585,
+ 0xc4866d66, 0x96dfae82, 0x91deb4ab, 0x0776b5da,
+ 0xc7fd0469, 0x981fc018, 0xdd33a496, 0x9c67481f,
+ 0x049347f0, 0x6e3e176e, 0x3671bda8, 0x052f5f03,
+ 0x7abb4c52, 0x81fb9fb2, 0x1c4afb77, 0xa217d10b,
+ 0xcc2b31e3, 0x30fcb052, 0x0519e7f1, 0x52243157,
+ 0x803cd3c9, 0x04308156, 0x62f40e20, 0xab87840f,
+ 0x19b8ff0d, 0x386d4a18, 0x2b5919ea, 0x0514b8b2,
+ 0x965d3947, 0xf5ae4509, 0x9af135aa, 0xa0f435a0,
+ 0xc34bfff4, 0x2e86c9f4, 0x2980f794, 0x13fc94df,
+ 0xe9e84fcf, 0x441f9ca4, 0x75daeea3, 0x4d44de7b,
+ 0x9b520cd4, 0x29ecea6f, 0xb580d706, 0xe0d5bf4e,
+ 0x87d8e69e, 0x122ce8a5, 0xf24797d8, 0x469ff7d4,
+ 0x1d259b97, 0xda9868b6, 0xf8f052b6, 0x1f1417df,
+ 0x70f3d0b3, 0x4592ec2d, 0xf7990028, 0x0c4a3c1b,
+ 0x5e78c074, 0x399ad65a, 0xe13aaf0e, 0xda5c7613,
+ 0x52efa62b, 0x6323d351, 0x0405d8c3, 0x0666a5e9,
+ 0xb407235c, 0xd6eadc1c, 0x6491088d, 0xc928fe5b,
+ 0x5c276479, 0x0492e5da, 0x517773f6, 0x4a988293,
+ 0x370aff95, 0xb6c086ad, 0x39bdc4c6, 0x72add12d,
+ 0xe3c87f62, 0x70bad73e, 0xada237d3, 0x3ef2daf8,
+ 0x8e4c12d3, 0x8f4c61d2, 0x1b489e1a, 0x486dc8ae,
+ 0x94fc60fd, 0x74655112, 0x754fc6d0, 0xa29f905c,
+ 0x24a85a23, 0x939446b8, 0xaff2d166, 0x15b4330b,
+ 0x74596ef1, 0xbf98460f, 0x43cb83d5, 0x940bf745,
+ 0xbfe6640c, 0xc207636b, 0x723c146d, 0x35fe5894,
+ 0x3047d9b9, 0xd6f36211, 0x971ade0d, 0x2aabf6e2,
+ 0xa073da0f, 0xb36a4538, 0x77708f7a, 0xb6829474,
+ 0xa200a78f, 0x356196e9, 0xe56961bc, 0x3f4fc8d1,
+ 0xf8e51990, 0x5b6e28a0, 0x6168469f, 0x1d527d06,
+ 0x82c190ec, 0x684ecc17, 0xd29fdd79, 0x82c85a5e,
+ 0xf6f34db4, 0x1f26ff69, 0x29749e8e, 0x46403a96,
+ 0x612763f0, 0xc86bff66, 0x3b755cfb, 0x7cd0462e,
+ 0x7ef54f3b, 0x9a0c869a, 0xb047147f, 0x12fcd986,
+ 0x1c69af4c, 0x23890ccc, 0x19e4d088, 0x8b3c947f,
+ 0x39cab4cc, 0xa12a099e, 0x30a256ae, 0x9cc04344,
+ 0x911f6cdd, 0xd943c2d4, 0xcafa1793, 0xf3cc2728,
+ 0xeaa24792, 0x496c3466, 0xf61fe80b, 0x0f04dfe5,
+ 0xf3e83d65, 0x7b47e199, 0x7315e43c, 0x64654c00,
+ 0x07b7cc81, 0xc69241f4, 0x4b9a3d68, 0x74f38c19,
+ 0xb99b86ab, 0xd5a4c076, 0xef9c1c25, 0xf8e6cc84,
+ 0xae23dbe4, 0x58adf735, 0xab9378cf, 0x2fcf0c37,
+ 0xd1fabe08, 0x30d5cb9a, 0x54c20e2f, 0x3cbec948,
+ 0xf1ca1861, 0x9cdb67fe, 0x6263809f, 0x6c0e3b88,
+ 0x2c781d8f, 0x9096a57e, 0xd4932af7, 0x42f34ac8,
+ 0x1cd62c99, 0xe529b7bd, 0x3898982c, 0x156a7c2a,
+ 0xe79114ef, 0x05381161, 0x0351f848, 0x7347c4d5,
+ 0xd89f1d6c, 0x7b4a9943, 0x42ddf17d, 0xf3511722,
+ 0x86f91a23, 0x3212b5c2, 0x8a6940eb, 0xca1b677f,
+ 0x3038e5ca, 0x5e69f686, 0x6f2f808d, 0x6caedc49,
+ 0xd60f31f2, 0x4f34dbfe, 0xbee60188, 0xe816de9b,
+ 0x375e51b5, 0x5812b72b, 0x7b61c882, 0xc47e7369,
+ 0x87769ec2, 0xdd64b842, 0x0d64d32c, 0x4ce81879,
+ 0x04ec193f, 0xffc4bd1d, 0x8955b90d, 0x46775d27,
+ 0xbe430a9c, 0xce4e2915, 0xf22f1a43, 0xedd77bbd,
+ 0xf8434df0, 0x4b39165e, 0xaee2597d, 0xb7ff1417,
+ 0xe3d2e9a8, 0x1738d242, 0x305c2089, 0x64295ceb,
+ 0x67737a91, 0x2f8a2ed1, 0xd4407f63, 0xd96ccf60,
+ 0xee68a003, 0x2a4130be, 0xca00a4e6, 0x52036665,
+ 0x69e784bf, 0x6c2fdfcb, 0x255abd0f, 0x24f7876b,
+ 0xa42a3035, 0x271ab144, 0x7ed4d9ce, 0x1a1dd459,
+ 0xc2500505, 0x2859fbf5, 0x1dc4aef5, 0x44077470,
+ 0x14c3f19e, 0xfbfa7f87, 0xe57a4c9b, 0x15d68cf9,
+ 0x7133fc82, 0x80388ca4, 0xf181e5ed, 0x5131a163,
+ 0xdea9b3dc, 0x5df94663, 0x9bdbed15, 0x2b84c79b,
+ 0x40ca9774, 0x4d11f82a, 0x608d2d26, 0x85dc4b9b,
+ 0x6248856e, 0x6ddcc0ea, 0xcc71034d, 0x6702d6b6,
+ 0x1052664d, 0x78e89e73, 0x603b6c7f, 0xc26dd7fb,
+ 0x6b09ec2c, 0x22669860, 0xf8ed917d, 0x5c74f5bf,
+ 0x95cef190, 0x0e735e4f, 0x00862a04, 0xcc7da2b3,
+ 0x8494d03a, 0x4b35b5db, 0x366a4e76, 0x1aeb51cb,
+ 0x0776eaac, 0x37cc9dba, 0x54be3af2, 0x4d733e32,
+ 0x7d4834a8, 0x80206bb3, 0xd859759a, 0xdf2c9602,
+ 0xd0051142, 0x88a60cde, 0xbf63fa59, 0x73d6d4d8,
+ 0x273c0b6a, 0xc196e821, 0x683a793c, 0xdd5df7ea,
+ 0x87acb856, 0xb24d885b, 0x088c0746, 0xfef178ca,
+ 0x69542649, 0xf6a56252, 0xe4247410, 0x9b25f024,
+ 0x314095aa, 0xec812554, 0x793583df, 0xc421f705,
+ 0xb6b49f73, 0xc92a8a4c, 0x263f01b3, 0x85c22322,
+ 0xbabad22c, 0x05b95333, 0x5992fb43, 0x201b089f,
+ 0x0c9cc807, 0x4a34aed2, 0x589f4237, 0x856af97a,
+ 0xca440c61, 0x3f7273e2, 0x693cd193, 0x07ad9acc,
+ 0x366f8266, 0xaba43992, 0x340a497e, 0x88e836ff,
+ 0x11bdb32f, 0xed7549ec, 0x1c725fc6, 0x6d094fad,
+ 0x7c46fc4e, 0x63fc0bf8, 0x4cc4a785, 0x8ad0c0ed,
+ 0x384ab6ba, 0xacedbfe1, 0x4daa6f26, 0x128b0106,
+ 0x9c562c7a, 0x57cf27ef, 0x3d32472b, 0x26c9dbd3,
+ 0x0ea320f4, 0xdba2c953, 0x584fe48e, 0x4e2cdf27,
+ 0x0d23f2e0, 0xa87eebd1, 0x66f473c0, 0xe8abd34b,
+ 0x4978d839, 0xb5c9d147, 0x194ac718, 0x0da627d4,
+ 0x89a9a3cb, 0x6afb09e5, 0x5750243e, 0xd00713c5,
+ 0x22fe1122, 0x60609f0b, 0x2f3664d6, 0xb773d10c,
+ 0x4e280b6a, 0x9421820f, 0x09de92e0, 0x9149a4ba,
+ 0x85829837, 0x3bb605b6, 0x053bb970, 0xf7f91a70,
+ 0x505f1b35, 0xab51c6c8, 0xe3fbc7c1, 0xfe883441,
+ 0xfa187a90, 0x9783597f, 0x64134315, 0xedc800f5,
+ 0x4dc95685, 0xadc5141f, 0x625b8898, 0xaedb9464,
+ 0x310e96df, 0xf63b9b90, 0x1c16bd8e, 0x605a468d,
+ 0xa27c902c, 0xfebc859f, 0x8d89baf1, 0xb8d8a785,
+ 0x9c014a52, 0x390d2502, 0x76be3e6c, 0xe7f44749,
+ 0xf651dab9, 0x47391058, 0x46caa49f, 0xdeaca8ce,
+ 0x21bc0548, 0x2f602541, 0x6ad0d3c1, 0x719d11db,
+ 0x8a9e195d, 0x28ed24ef, 0x5b39a19f, 0xb9cdcbb3,
+ 0xa051dcad, 0x4ccb267c, 0x0dfc8680, 0x481bae00,
+ 0xb1bb6ed4, 0x14130019, 0x53563876, 0x707f9f23,
+ 0xfa49dbf0, 0x18094207, 0xc7d2535d, 0x807e95eb,
+ 0xc09d4fe1, 0xbf1b10cb, 0x8dd7c08d, 0xe2899c72,
+ 0xa8adbf38, 0x754a99d5, 0x53d3697b, 0x018aceda,
+ 0x7a4b8b31, 0xb2f56364, 0x36fa07ed, 0x2c225fd5,
+ 0xdb40450f, 0x57257cd7, 0x107eb9a5, 0x5d10e3bc,
+ 0x585608b8, 0xac50286f, 0xf8c67d8d, 0x5a4e6e9f,
+ 0x9ab1c9d2, 0x6a993e59, 0x934cb0fe, 0xfa15018d,
+ 0x01597c61, 0x701b44d4, 0x5548dd75, 0x7188281c,
+ 0x87d7b732, 0x47742061, 0x950121f2, 0x3eb9ba51,
+ 0x15214aa4, 0x0c73f994, 0x6f99aedf, 0x67c3a587,
+ 0xc6401f5f, 0xefc7a90b, 0xb21db367, 0x8c2ae2d0,
+ 0x382a5573, 0x7f92eb09, 0xb551e4e6, 0x17d61ca7,
+ 0xb64e5491, 0x8ad861d5, 0x44f9092f, 0x8463723b,
+ 0x51be6d9e, 0xbac9ae81, 0x0c934d1b, 0x09301f45,
+ 0xb7a66e37, 0x11ed7bab, 0xf4d113c8, 0x969cf392,
+ 0x6bf17482, 0x37929633, 0xc4e639dc, 0xe01c36ae,
+ 0x609289b9, 0xa827210d, 0x4726ba46, 0x15e50f2f,
+ 0x7a506e11, 0x6fb114ee, 0xda2f3d54, 0x6b5c8fa4,
+ 0xb6f7cb92, 0x8cd54ff5, 0x58882ce2, 0x450c82b3,
+ 0x9e75d67c, 0x43ad039a, 0xc71a2b92, 0x90281f31,
+ 0x2435d35f, 0xefece8d9, 0xd363f571, 0x520ab320,
+ 0xcb118412, 0x99ba10f3, 0x522b77f6, 0x1eb5ab6b,
+ 0xbb050bcb, 0xc054d132, 0x70b0208a, 0xdeee5bdb,
+ 0xb8df9204, 0x9acd637a, 0xa7aa2ad6, 0xc6f13c95,
+ 0x453ebe41, 0xf95a9c22, 0xcb1fdd22, 0x947114ac,
+ 0x40a2ff85, 0x497cdd3c, 0x2e69f841, 0x30d950be,
+ 0xcfcb302a, 0x31f69874, 0xc97fe5c2, 0x952f4b4a,
+ 0xd82e1bf9, 0xa332838b, 0xee8e73e3, 0x88ecf657,
+ 0xb593c0f2, 0xf60fb1bf, 0xa8118d1a, 0xacf7fb05,
+ 0x580e6ab8, 0x82d35449, 0x81ebe68f, 0xbdecd310,
+ 0xf00373e8, 0x502d723b, 0xd490d483, 0x252bd78c,
+ 0xd5cd5898, 0x48e6f1a2, 0xccbaf54a, 0x7a2bcd1f,
+ 0x4179f5fa, 0xdaf5f240, 0x50862b47, 0x5c799fcc,
+ 0x4d501dcf, 0x575b8307, 0xdab4f322, 0x319a4bd4,
+ 0xbfecdcc7, 0x8c92b68a, 0x6681fccb, 0x09a8e54f,
+ 0xe533b064, 0x3960d250, 0x75201800, 0x25e93dc6,
+ 0xf3d2a6f9, 0xea2a0e7b, 0x0d147c70, 0x9b0f22cd,
+ 0xe4564d31, 0x57614a38, 0x801e4dee, 0x197072ea,
+ 0x83e05f64, 0xb6b792c6, 0x2bec3b2a, 0xa2e844bd,
+ 0x5381e44f, 0x00ebd8de, 0x7bc23d23, 0xdef3075a,
+ 0x4e730355, 0xe0646bf5, 0x2612a1a4, 0xbcdd2fd3,
+ 0x0cb687c2, 0x60bdb50c, 0xe28d94f1, 0x65807d1f,
+ 0xe9b9334d, 0x7afdda8a, 0x3d178434, 0xa6add73b,
+ 0x97314a98, 0x27237bff, 0xe298df2f, 0xa5305639,
+ 0xdfc75d8b, 0xb8fa54cc, 0xc22734a1, 0x3558a8a1,
+ 0xb70ac229, 0x66b28053, 0xc7bb8b77, 0x45e63bea,
+ 0x7aed2971, 0x38bd952c, 0x4716d6f0, 0x18ca64ae,
+ 0xc5793337, 0x88ca02f5, 0x0a88a475, 0x6b419bd7,
+ 0x6a5e51e1, 0x44d1043b, 0x59d567ba, 0xad602ec9,
+ 0x870b7837, 0x5a03100c, 0xc0a1bd56, 0x159db408,
+ 0xc12ad048, 0x55220fb4, 0x766218bf, 0x49b044f2,
+ 0xbca29a6b, 0x0e290dbd, 0x6e6e5d53, 0x74598f15,
+ 0x4ffce0ec, 0x617051d0, 0xa2752b75, 0xa496ebe8,
+ 0x1b9a46ab, 0xf945a60e, 0x6724c46b, 0xa842be65,
+ 0x1c624bcf, 0x48f462bb, 0xfe195da6, 0x2da31834,
+ 0xd47ad5bc, 0xbd851c92, 0xf2b0cabb, 0x7f958dcf,
+ 0xf1b8f54a, 0x1f1f44d4, 0x7ae3712b, 0xdabddbfc,
+ 0x364ba351, 0x69ce03ac, 0xc5c5ec48, 0x6e5c3865,
+ 0x3d0bc59c, 0x7c3ba63e, 0xcecd1f74, 0x901fc98d,
+ 0xcfd11a74, 0x009b99c4, 0x3f7c67c8, 0x76e2b7aa,
+ 0xb82e361f, 0x4f05a57b, 0x9082a84b, 0xe2ab2aa7,
+ 0xc246f748, 0x9d6f02b1, 0x395c0fd5, 0xe0cee328,
+ 0x30840c0e, 0x19054577, 0x9d266cbd, 0x0ad28723,
+ 0x1f7747ed, 0xeab3f479, 0x2992a66d, 0xeb508c11,
+ 0x6024f32b, 0xa10427be, 0x3d7f70a9, 0xa141e90d,
+ 0x107fab51, 0x8131ca16, 0x4a77047a, 0x9374f165,
+ 0xf5ea91ff, 0xc4299ce8, 0x707a5c10, 0x55067bc9,
+ 0x4737a508, 0xac755874, 0x2dd181bd, 0x6f7f67e4,
+ 0x1941776a, 0x5dcabd48, 0x08ed5ae3, 0x2addd7fd,
+ 0x6ab4c646, 0xb5434ce3, 0xc088a31a, 0x8c98be00,
+ 0x9190acbd, 0x45861ced, 0xc843fc04, 0x054c1218,
+ 0x0f45492e, 0x2acc648f, 0x482a6c9b, 0xdd76ca54,
+ 0x31d6ae7c, 0xc61bf271, 0x38e8bcd2, 0x80ab264e,
+ 0xe1c16928, 0x5bb9121b, 0x6002771a, 0xc05e81cf,
+ 0xc94d2178, 0x51c7329a, 0x16e485b0, 0x05ff97b7,
+ 0x09af16f8, 0xb8814d18, 0x72f01625, 0x3759d819,
+ 0xc667ddd9, 0x9bef5797, 0xceb309ae, 0xca698522,
+ 0xe5ab60f7, 0x63c4b796, 0x5294c8fa, 0xcae66c1c,
+ 0x9ddcd158, 0xcd451ceb, 0xf6921ac0, 0x4f1f0c41,
+ 0x82ac5d81, 0xd54b24ae, 0xfb18d83e, 0x0ab331f4,
+ 0x2dd25b0a, 0x2a4a6b59, 0x62192e29, 0xd9a577d0,
+ 0xe07f6e32, 0x2b459cc3, 0xe1e049ad, 0xbd2e5aea,
+ 0x2fea84e9, 0x06800b33, 0xd2f1950f, 0x1c91896d,
+ 0x531685e2, 0x26220d70, 0x90f0ddfc, 0x5e250de0,
+ 0x9135752e, 0xf58b9e74, 0xa7979573, 0x93d65369,
+ 0xe89707e4, 0xb1b8d7fa, 0x212075ee, 0x6d6f4d35,
+ 0xb9593685, 0x3abfd860, 0x9410a1ad, 0x2d4faa56,
+ 0x45f62b94, 0xd00533b6, 0x04a737f1, 0x2e06f168,
+ 0x3c6b4919, 0xa6a5569f, 0xc6cfaa96, 0x05c8c9a3,
+ 0x5450817b, 0xd4bf027a, 0x88d756f6, 0xfbcb2694,
+ 0x00e0a345, 0x1b4ecb0d, 0x35e0ba4c, 0xc5a2b799,
+ 0x9bdcdcaf, 0xc4fc925d, 0x5470ba8b, 0xf3a05a5a,
+ 0x1f7506c7, 0x8cb41382, 0xf3d7ee86, 0x16fab996,
+ 0x8c1854aa, 0xe5a5b596, 0x2bf70840, 0x0e192731,
+ 0xb3671984, 0xdb4ca69d, 0x401a6485, 0x4e132141,
+ 0xa59bbf4e, 0x32b0cfc8, 0x8e5dd8f6, 0xfc99afa2,
+ 0x683480d0, 0x8aa70a5a, 0x158c967d, 0x42a41b15,
+ 0x6be08016, 0x0c03bbeb, 0xedca00bd, 0x274b1136,
+ 0x22f4513e, 0xadf8d9b1, 0xb30329cd, 0x63c552ee,
+ 0x8fb90da7, 0x09d56cce, 0x23c619d6, 0x2de211a9,
+ 0xc450db13, 0x911a2a83, 0x6cd96029, 0x327e5a32,
+ 0xa643caf4, 0x99b85f2f, 0x8344e2ef, 0xfb4d30e8,
+ 0x913380a3, 0x684cba04, 0x78197607, 0xdfd8a581,
+ 0x48a77629, 0xa8fb7f92, 0xb19fc888, 0xedb9e591,
+ 0x6f6a4460, 0xb925bbc2, 0xc8e79796, 0xa6abd131,
+ 0x231fb9d2, 0xf79fc3a6, 0x2662776a, 0x0adf0d1d,
+ 0xbdaaf795, 0xf8909099, 0x916e6f38, 0xfc3cd92e,
+ 0x7b9d8c6e, 0x2cddbfe1, 0xc6a304d6, 0xacbbca2e,
+ 0x99a03f34, 0x047ac37b, 0xde114634, 0x8c415cb0,
+ 0x396a3a51, 0x5defd154, 0x0c29bfbd, 0x8cfbb6d1,
+ 0x8b9272a0, 0xceea63a2, 0xeecff7b4, 0xfca5205e,
+ 0x4d43d918, 0x582d1dc1, 0x9e353b70, 0xe368b0f5,
+ 0xeaeae775, 0x62553e4f, 0x15df450b, 0xfca7cc8c,
+ 0x8e4975c1, 0x467f09a7, 0xc8512ab1, 0x2ab6a904,
+ 0xd61ed625, 0xad2249d9, 0x3d56617a, 0xa8090323,
+ 0x52423864, 0x95364d97, 0x2b24504f, 0x45e6965c,
+ 0xce13b14b, 0x42a8d20a, 0x2de1d77b, 0x95b2d4bc,
+ 0xa9358bb2, 0x6eeedc9e, 0x856ff258, 0x1d142ced,
+ 0xc0787c11, 0xc8466b35, 0x28b2ad02, 0xc0924424,
+ 0x6b4a85cb, 0xd5a58f8f, 0xcd0751cf, 0x60076ef3,
+ 0x2733e1fe, 0x652dc2ad, 0x57e75e4d, 0x4cd76299,
+ 0xc28042e0, 0x5eadfccb, 0xdf3d759c, 0x21c9df23,
+ 0x0170747a, 0x0cdf7a3b, 0x1ea77ae4, 0xa4e7e83d,
+ 0xbdeb54da, 0x7516b023, 0xb1ba7719, 0xc2f3f738,
+ 0x93b4fc98, 0x94a3e772, 0xf163d244, 0x950831a7,
+ 0x01b2d816, 0xe255595e, 0x181a9b44, 0x83bfb7ae,
+ 0x76b5085c, 0xb0cdae6c, 0xf6ffd1dd, 0x48705f2c,
+ 0xa9300f13, 0x0e9c0a13, 0xd1c18131, 0x70afe46c,
+ 0x33c2351b, 0x5770cbdc, 0x18136f51, 0xa0360844,
+ 0x0e788345, 0x01445d5c, 0x726c5e6f, 0x5e39ed72,
+ 0x8992201c, 0x283559b5, 0x08349db3, 0xb16e2c1a,
+ 0x99c5ff61, 0x064bdb5c, 0x1e444618, 0x468d0df1,
+ 0xff7fdb1a, 0x0abeebb1, 0x69f9fa6c, 0x8db068e5,
+ 0x57baa534, 0x26383adc, 0x8451aeed, 0xebabd296,
+ 0xcef9f162, 0x52aae485, 0x09d964c6, 0xa0c9e623,
+ 0x99cda82e, 0x54d7fd6b, 0x2e432d52, 0x6ff26247,
+ 0x49a86e17, 0xcde9514d, 0xee51d593, 0xda7590b3,
+ 0x42b2c587, 0xa84dfa28, 0x63e34c3b, 0xfe6a930e,
+ 0x90d3033c, 0x1530ef36, 0xc50d936b, 0x6aff2ec5,
+ 0xfd98fd3b, 0x20dc20a8, 0xab006cda, 0x38b423f4,
+ 0x4cd2b811, 0x24bd20b6, 0x064e11e3, 0xdc0b2587,
+ 0x0b26e409, 0xdf6f250b, 0xd30e66f2, 0xceb3da27,
+ 0x10bfaea8, 0xf0f8f25c, 0xc9054271, 0xaeb4db25,
+ 0x497539cb, 0x4f71fb8b, 0x19e0afa1, 0x85263f07,
+ 0x981884fc, 0x4566d688, 0xae73239e, 0x3ace9d51,
+ 0x3123b63e, 0xc909abeb, 0x9344ac19, 0x37f823d1,
+ 0x98cc19d1, 0x6df043ac, 0x62d54a9f, 0xe3fbfd79,
+ 0x768c42a0, 0xf2804b41, 0x24e44d47, 0xf9b65594,
+ 0x801d24fc, 0x908c4615, 0xb3026016, 0xe80a115f,
+ 0x2d6a0843, 0xf53fbec3, 0xb7f2bb57, 0xc8585277,
+ 0x74ba16e3, 0xf30ddd20, 0xb29bf408, 0x32bc859b,
+ 0xa9106973, 0xc6cefc9c, 0x0a20bdf5, 0x61ed9f0d,
+ 0x636e3acf, 0x0fa8a383, 0x07994977, 0xc6275605,
+ 0x53c86561, 0x4b330801, 0x2d8c4d09, 0x820a2205,
+ 0x8ab61e58, 0x6419f6af, 0xda3ac1f4, 0xdd203b8e,
+ 0xf0f7d5e7, 0x9dcf9d20, 0xfd31d632, 0xe3d79260,
+ 0xe04709fc, 0x437983d1, 0x43d9594d, 0xfc1f0829,
+ 0x5e390bf6, 0x5ae30f85, 0x24d2ee30, 0x5b6deb29,
+ 0xbcfae265, 0xb9453286, 0x342b1fe8, 0x59837b1d,
+ 0x94f0ef08, 0x405a897c, 0xfc337ace, 0x9184f609,
+ 0x1d999b50, 0x1d62653a, 0x300a71ab, 0x1ca2a89c,
+ 0xb3f6e813, 0xbe69a2dd, 0xf8c9d548, 0x07071f11,
+ 0x63dd31eb, 0x1a23a71f, 0x6da80a34, 0x541a6ccd,
+ 0xfdcf17d7, 0xea256411, 0xb79a2bc6, 0xd98dd618,
+ 0x06b6e03c, 0x14b43963, 0xbbe86219, 0xe256c2f2,
+ 0x9d1a8e40, 0x1ccf7902, 0x11a64e49, 0xb5d2dc4c,
+ 0xbcdd69a1, 0x27d20704, 0x2f7927e7, 0x71302c7e,
+ 0x29c54383, 0x622b9054, 0xcee236cb, 0xc2f0dc81,
+ 0x9670b079, 0x6d2dea98, 0xc358ba43, 0x3533c6a3,
+ 0xeb489e65, 0xe05f5613, 0xe4773738, 0x5ec7a96d,
+ 0xb325a196, 0xfb5d7748, 0xa6217285, 0x5aead366,
+ 0x00139d87, 0xe33d99cc, 0x4d6a8ba4, 0xff47a136,
+ 0x0284ae94, 0x79007af1, 0x9240dfe8, 0x20bb33d7,
+ 0x3388075d, 0xd61f0fca, 0x8219c0c9, 0x5b314755,
+ 0x5d88d074, 0xe064d587, 0x0a29b9fd, 0x39855439,
+ 0x19fb95ff, 0x07226200, 0x6044073a, 0xa3b6cd08,
+ 0x0335fdea, 0x5142b967, 0x31e0cd66, 0x3d948b7c,
+ 0x6d0afcc5, 0xf0e6188e, 0xc36b3c0d, 0x46962c07,
+ 0x597fbb29, 0x0fef8c8a, 0x28e656b9, 0x2b4e9579,
+ 0x0f0e0da1, 0xbee28cdf, 0x4e04f9c3, 0xeb14dc6e,
+ 0x44dc4087, 0xa742e27f, 0xea251035, 0x0e329286,
+ 0x9ecb6aec, 0x71c7a6b2, 0x69a7ab4f, 0xf08cf9ee,
+ 0x34344aa3, 0x7869886a, 0xce509bda, 0x59dc8ae5,
+ 0xeee1cd54, 0x988de3fe, 0x36536907, 0xc6af1f51,
+ 0x2ef2c3fc, 0x3c9c329e, 0x403b5c5a, 0xb91007f9,
+ 0x81cc227b, 0xe0f93bac, 0x52371cf3, 0xb8212486,
+ 0x2a5b1f5d, 0x24518b0a, 0xce9ab947, 0x186f1d96,
+ 0xa44ba7ff, 0xbc788471, 0xfbc06f14, 0x8e42aedd,
+ 0x1523ecca, 0x73aae32c, 0xf4e05b0a, 0x2b64e7b8,
+ 0x193266d8, 0x335e4282, 0xba0ac03b, 0x011210b7,
+ 0xb3b1ce1b, 0x929072bf, 0xb000caf5, 0xd209589c,
+ 0x009f1a39, 0xa75e93e1, 0x21f81e92, 0x2c2cedc9,
+ 0x5aec2c58, 0x51d015f8, 0xcd0961bf, 0x24c94ee1,
+ 0xb861ba77, 0xcaa8f977, 0x51dd2da9, 0x6fb5df2c,
+ 0xb7ab2d09, 0x79fba39f, 0xb43e7715, 0xa9acc5ae,
+ 0x96bda97b, 0xc82199e9, 0x8ba45c40, 0x2f254376,
+ 0x94048a1c, 0x536a3949, 0xf956cf3c, 0xbdaed860,
+ 0x7a8482b5, 0xe1e37d60, 0xd71ed8c2, 0x7c9b14c4,
+ 0x2631c8eb, 0xe1a3c061, 0xbe4dc5c4, 0xe81396cf,
+ 0x26f84551, 0x9c2974f8, 0xab8bb747, 0x96f92a06,
+ 0xb43df337, 0xff52cf11, 0xe1e31d21, 0xa735b780,
+ 0xb34719d4, 0x9d0e323d, 0x16b2b9a9, 0x828e5ac0,
+ 0xc7093325, 0x1b3d0c76, 0x12b7df63, 0xce334685,
+ 0xd9f36bc2, 0x523e30e3, 0x5854c2d9, 0x29459327,
+ 0x3173b2ad, 0x602d4f29, 0xe7381ca0, 0xcc373c24,
+ 0x83c552bb, 0x31d0fcab, 0x83094480, 0x69485389,
+ 0x676007b6, 0xb77afa19, 0x2e18f99d, 0x1987c065,
+ 0xdc184f8f, 0x2ed03df0, 0x7e7e927b, 0xb2d1e011,
+ 0xc58788aa, 0xc86418cf, 0x015b4e98, 0x5d5c5376,
+ 0x562c10de, 0x05228097, 0x67fe1f1c, 0x07d4f21f,
+ 0xe1ec537c, 0x828c15d1, 0xc0fa451c, 0x29e23c55,
+ 0x2fb4c663, 0xe2e7feeb, 0x567b074e, 0x255ed3e6,
+ 0xce455f26, 0x413e20a2, 0x8277330c, 0xdd358591,
+ 0x11f164f5, 0xab2704d0, 0x8822cd2f, 0x43046c54,
+ 0x0257b2db, 0x089313d1, 0x4e3b7b4d, 0x86b07fa3,
+ 0xcd99a96c, 0x275228f8, 0xbaf73404, 0x131449ea,
+ 0xbeb8fc31, 0x966f7646, 0x1529e11f, 0xa1f41b3e,
+ 0xb7bdbb7a, 0x46c62a58, 0xccef52a1, 0x12d178b3,
+ 0x8555f27e, 0x6438d5e3, 0xad4483bb, 0xbc06beed,
+ 0xcd0c7314, 0x80e29d19, 0x44c47dfc, 0xcfdcf77a,
+ 0xb9b2e983, 0xb74209d2, 0x60cabd22, 0xd8450237,
+ 0xc2648826, 0xd6fadfdd, 0x4045fbf6, 0xadfb20a5,
+ 0x7adf4183, 0xda141ebf, 0xef5f6b76, 0xaf11ddac,
+ 0x1be5d276, 0xfdd351a3, 0x7b3cd06f, 0xa3e79ab7,
+ 0xeff2f087, 0xd7c6c161, 0xdd59f7b1, 0xb41c1c9d,
+ 0x129922ca, 0x649b771f, 0x8707e809, 0x3ef4a5dd,
+ 0xdf772f6c, 0x6f3fbb12, 0xe8ed0eb6, 0x049fff98,
+ 0x2d775411, 0xc481475f, 0x36dc6492, 0xb1009da2,
+ 0xd8f01b64, 0xd4481ef2, 0x179cbc5f, 0xa4c04b80,
+ 0x600e5f6a, 0x2b4c3cf7, 0x760f7b67, 0xa1f4742c,
+ 0x35584131, 0x6fd03ed3, 0xec62f693, 0x1125a0b3,
+ 0x52db2d7c, 0x26824332, 0x2b9b5cc6, 0x8e8b2ccd,
+ 0xbe72f4b9, 0x933bc11e, 0x7ac67d82, 0x01a64e6e,
+ 0x6a72254e, 0x9926ae00, 0xc0f5aa49, 0x5d973ec8,
+ 0x9ec4236c, 0xc3e0d348, 0x1442a19e, 0x6f16242b,
+ 0xcf6a46fd, 0xf84c9483, 0x853b62cb, 0x53db6c10,
+ 0x304694f7, 0xa7a4ef39, 0xe6ea3621, 0x45c968f2,
+ 0xc1afa690, 0xcd644078, 0x3c8f8afe, 0x448e9d6a,
+ 0x041bd356, 0x37c7e106, 0x8e3fe4b5, 0x56afd16a,
+ 0xd203cc2d, 0x00e4a8b4, 0x74f80bd4, 0x7f0ca678,
+ 0x98dbaadd, 0xfc53f3a3, 0x69530b33, 0x43639f3f,
+ 0xb9bcdee5, 0x31e31095, 0x98d73a19, 0x2b6db634,
+ 0x9ac7f819, 0x1be7a9b6, 0xde890d27, 0x2e062bab,
+ 0xb23bff4b, 0xcf5fcc9d, 0x07bc3bfe, 0x7daeb146,
+ 0xe7735492, 0x3f2aed67, 0xdf94dfcc, 0x35ef47d3,
+ 0x970fce84, 0xbcf96be3, 0x88925778, 0xbcb612af,
+ 0x27e75f02, 0x6b1bf7f9, 0xdd6d0d9d, 0x054b1162,
+ 0x89482b8f, 0x09a6017c, 0xa4d1100c, 0x638c586b,
+ 0x639e400c, 0xec3d4f78, 0xa1b48d79, 0x8b20377b,
+ 0x373f0d21, 0x6674f50b, 0xc895c59e, 0x44ff0c85,
+ 0x59faa1ef, 0xbde968d4, 0x190fccc6, 0xe73b8717,
+ 0xb653cb29, 0xdffdf4d3, 0xa247567f, 0x40b1b911,
+ 0x19dfa025, 0xe1cbc8c8, 0xf03da6ca, 0x37eb4e2f,
+ 0xa492afee, 0x3d1dec0a, 0x1312a38b, 0x516f06f4,
+ 0x0c743546, 0xc46bed4a, 0x0cf3d5e0, 0xd6e8fe3b,
+ 0x5e944f41, 0x5180ef76, 0x90d872d1, 0x02d9d114,
+ 0x7eec75b2, 0x219813d1, 0x4a375d44, 0x47bf9aab,
+ 0xe76b0c50, 0x169f281d, 0xfea7507d, 0xaa065a38,
+ 0x90070c21, 0x18aa1455, 0x151aba66, 0xba0fa406,
+ 0xace6f3d5, 0x2d578308, 0xc4c77575, 0x008283ad,
+ 0x0b71bea0, 0xb6c957a4, 0x5a6c6ba0, 0x4d8d078e,
+ 0xe13f609c, 0x1b19d41e, 0xeb5d0d2b, 0xe1360ac3,
+ 0x378c22ee, 0x16ef7807, 0x266c14fc, 0xe02473be,
+ 0x42f57ffa, 0xa45a32a8, 0x2741adf7, 0x1ce2467a,
+ 0x6ad2d04a, 0x0697a923, 0x7c32bb98, 0xf85f95ec,
+ 0x4ef499a3, 0xc3cea291, 0xb7863ff6, 0x8a090944,
+ 0x710a9813, 0xa9e9fd6c, 0x1def076b, 0xc63c533d,
+ 0x310d84f0, 0x6d6e3bb8, 0x5773ac99, 0x4eecdc05,
+ 0x978a7adf, 0x5a0bb927, 0x00c40ed1, 0x81cf99e4,
+ 0x4f117d2e, 0x2f5af9ed, 0x452e792f, 0xf776cb44,
+ 0x846c5d19, 0xe3c3169c, 0xb14e96d1, 0x4136829e,
+ 0x5061d84a, 0x763a0ae8, 0x90ec6be6, 0x18dc76bd,
+ 0x88b677c8, 0xed3961e3, 0xfcfb3801, 0x67111449,
+ 0xafadecd2, 0x6478ffae, 0x0b2c65e8, 0x9fcbcd55,
+ 0x27046055, 0xb4e7dc10, 0x3e5b2755, 0xe64717db,
+ 0x95d2f639, 0x63fb37c4, 0xfa20cd85, 0x1b7f122a,
+ 0xfce727f3, 0x80edf9dd, 0x460392e5, 0x3c72d5f5,
+ 0xa2b6e82c, 0xff14bd34, 0xaa64e38a, 0x4c2c25b6,
+ 0xd4d5846a, 0x99050ac5, 0xa0dd4257, 0x2ae702e4,
+ 0x6e810f69, 0xb0928544, 0x78bf6c58, 0xe7ab25bc,
+ 0xa2930c84, 0x06a52eb2, 0xd35feb46, 0x57a7e618,
+ 0x506c8097, 0xc221ae39, 0x1c35177c, 0xc362f512,
+ 0xad27f3b1, 0xfb985e4d, 0x7feada5f, 0x3b0345c6,
+ 0x06cf0c46, 0x39848c87, 0xdf810ca1, 0x815fef4e,
+ 0x8225d9df, 0xaeec02b6, 0xf1f34e5e, 0x45345ac3,
+ 0x2ccde16f, 0x84e15f77, 0x07c4cb32, 0xa086d14b,
+ 0x3311066c, 0x55994c8c, 0x2a8c1a82, 0x39917007,
+ 0x70fbc284, 0x2d39505c, 0x34c0462d, 0xb0cadcc0,
+ 0x752f1cf6, 0x4db349ec, 0x04e29c51, 0x90c746d6,
+ 0x42961df2, 0x074fdf41, 0xe9da6596, 0x5d8f48ca,
+ 0xf9dfdb95, 0x818b3741, 0x7486bffc, 0x803c6f99,
+ 0x9d101b34, 0x8f055a2b, 0x3ee40a2a, 0x651f7518,
+ 0x1fa14ce6, 0xbb89995b, 0xf5d1f741, 0xeca2fb02,
+ 0xe57569c5, 0x75171887, 0xd2d0b9fd, 0xb72cdf94,
+ 0xcc417c62, 0xf0229961, 0xc13b87d5, 0x552ee144,
+ 0x6e7c35b4, 0x6f14441d, 0x3771e92c, 0xb376bae9,
+ 0xadbba369, 0xb2e69a40, 0x203398af, 0xa7a69db4,
+ 0x53f64910, 0xc82997a1, 0xea72d9aa, 0x34cacd78,
+ 0x226885e3, 0xda13810d, 0xab74eb8c, 0x2f62d85c,
+ 0x9559bd79, 0x45cec8f9, 0xbff6e97f, 0x4e65a1a6,
+ 0x18230630, 0x2cd09594, 0x33a9be8e, 0xcdc13734,
+ 0xe81d0c8f, 0xec1c5a59, 0xe0afcf9a, 0xd4e8de88,
+ 0x9f8d6bf6, 0x981ea9a6, 0xd739a21b, 0x8d76d79d,
+ 0x188010e3, 0xe503c200, 0x28a01839, 0x59dab4d1,
+ 0x6a67a2ca, 0x087e6a7c, 0xfca90789, 0xe1415f8d,
+ 0x80bf067e, 0xcc70a7e2, 0xf68d0ad6, 0x43359ac6,
+ 0xbd02e43a, 0x1c9c8847, 0x3e47e7f1, 0xf8cf377d,
+ 0x3f1562ce, 0xc31aef37, 0x3ac819fe, 0x7d0cae5f,
+ 0x33d21d03, 0xf2d500c2, 0x6081ffc3, 0x083b4eba,
+ 0x10924841, 0xaedb5124, 0x41bcc112, 0x9b71b641,
+ 0x1dfdddf3, 0x66e0d7ed, 0xf5656c4e, 0x0e8222f4,
+ 0x96c5ca5a, 0xbc2bd25c, 0xe7774249, 0xc8e48627,
+ 0xe034e53f, 0x0ba1ed16, 0x26c1845a, 0x77467de0,
+ 0x08237ae9, 0x2118a1f4, 0xbbc09e16, 0x5fa63bb1,
+ 0x8d59aa69, 0x4eff5703, 0xdcd47267, 0x3a535b5d,
+ 0x19cd00b4, 0xeaf05d36, 0x8b116be0, 0x94bbcffb,
+ 0x91ba1857, 0xc21ee399, 0xadab2b40, 0xa3018f73,
+ 0x23767f40, 0x48a41c30, 0x7b83a2cb, 0xddf3bd64,
+ 0x4096ed99, 0xdb5db410, 0x3564a650, 0x12e6458d,
+ 0xd1531b3c, 0x06890502, 0x31c42101, 0xfd87114a,
+ 0x1e96822d, 0xabaf77f4, 0xc51889b1, 0xfc144e2f,
+ 0xa0e22d4b, 0x6c08e1e2, 0x857830e8, 0xd7554dae,
+ 0xc048232c, 0xc690a29f, 0x4c5262e1, 0xb14d79d4,
+ 0x43a6e79c, 0x5aa3c25f, 0x0a35c355, 0x348618a8,
+ 0x37bc925a, 0x1739b461, 0x58e88d34, 0x814171a1,
+ 0x2bc708d1, 0x1900c60b, 0xefc1176a, 0x9d096851,
+ 0x782199fa, 0x583f0a32, 0x9baeda79, 0x24c41b20,
+ 0xa3356e38, 0x98c2768e, 0xbf12642e, 0x1730e9a0,
+ 0x96d50bd5, 0x957c787a, 0x0518409a, 0x156737cf,
+ 0x0cbf6d82, 0x5bb5392b, 0xc37f39fe, 0x8d8060ba,
+ 0xb2f0e003, 0x63c9f6eb, 0xd586eeba, 0x8a9732a2,
+ 0xb1e74949, 0x0e498016, 0x58ac25cf, 0x85fba401,
+ 0xb07300f1, 0xcb45cc97, 0x62e2b40f, 0x920880b3,
+ 0x5bc60f86, 0xf3e73b81, 0x5293fb47, 0x89c77df1,
+ 0x82af0d99, 0x2c701e7e, 0xff85c083, 0xa9b66adf,
+ 0xf4f23fd5, 0x329a4a26, 0x531056c8, 0x35e6d2af,
+ 0xda81ef8e, 0xede30d57, 0xc0e79f68, 0x859842c5,
+ 0x40801c84, 0x3a3ea4a9, 0x5d300746, 0x7f0186ff,
+ 0x81ef5f3a, 0xc499d53f, 0x4461ca35, 0x2fe1965d,
+ 0x4f149548, 0x5ac22453, 0xedd4fd62, 0xb42e3d0c,
+ 0x115fa1a5, 0x45dcb166, 0x17631997, 0x3e647c3b,
+ 0x21314f1b, 0x5f3b1166, 0xd83f46ae, 0x1f832f48,
+ 0xcbe34450, 0xc1b5b814, 0xad4dc2dd, 0x84062abe,
+ 0x8c73345d, 0xb75f55f1, 0x8bb95f6a, 0x3a0d2fb3,
+ 0x942d2908, 0x4ee149e3, 0x6bd4b7cc, 0x143dd6c6,
+ 0xadf94e4b, 0x77d4d66c, 0x1c142b4b, 0x57aff637,
+ 0x52733d05, 0x90c2f00e, 0xa7a7de04, 0xf77dda93,
+ 0xe9f970ce, 0xa159ccef, 0xd8070470, 0x90319cbf,
+ 0x1088fc42, 0x7d27a1b4, 0x171e4d50, 0x39a4daa1,
+ 0xfc52a796, 0x1401e43e, 0x6ab7a67d, 0xddcd46d6,
+ 0xc5c03b6c, 0x2c566b4f, 0xfe7fdb85, 0x9fc45677,
+ 0xcfb84ee9, 0x0a999ad3, 0xf84c9697, 0x16c8be6c,
+ 0x80f4d30f, 0x782dd57b, 0xe4f84a8d, 0x046caa0b,
+ 0x0974409b, 0x571da7c8, 0xb015695b, 0x9c437c86,
+ 0x5488ea7f, 0x25fc490c, 0xc28af2c7, 0x5ba74b87,
+ 0x1854c8d1, 0xa284e209, 0xc4124270, 0x5774fa6d,
+ 0x8f740e74, 0x24c8bc76, 0x0090499b, 0x45b52374,
+ 0xb54304a4, 0x21f5c52e, 0x169ae45f, 0x297f9edf,
+ 0x0407c8cf, 0xb6d6f3bb, 0xf3288858, 0x31623a8a,
+ 0x0252f41a, 0x352366a4, 0x4fac870c, 0x46b899ab,
+ 0x660dc4e1, 0x2ab2c081, 0xcd028a31, 0x56aa2644,
+ 0xbc205026, 0x40720c58, 0xec80daa4, 0x35ff3822,
+ 0xa4eaea57, 0x1946bc63, 0x584b178f, 0x59d2f741,
+ 0xfc2872c2, 0x94654ba1, 0x9dca01f3, 0xee1a6d7f,
+ 0xac75845a, 0xbabc87f0, 0x8971f193, 0x214c465a,
+ 0x717eef22, 0x44855311, 0x7230df1a, 0xafbb19f5,
+ 0x9cdad9f5, 0x07175a1c, 0x5b7d5ba0, 0xeb1405a0,
+ 0xbf6bfac8, 0xcad7738c, 0x880b33c8, 0x33eb547e,
+ 0xffe8fffb, 0x1d7818eb, 0xbe969678, 0x730ffdc1,
+ 0xa4abcce1, 0x46d00ea6, 0x4fafb231, 0x7e98070f,
+ 0x58a9c661, 0x8a470830, 0x005d8531, 0x6e9292f0,
+ 0xa49fc885, 0x0543c492, 0xbd46ef3f, 0x8f487c09,
+ 0xa43c4448, 0xd3e1be27, 0xa2d1eba8, 0xca50eea2,
+ 0xe6d35c75, 0xe29ac8b4, 0xb53ccb4f, 0xd840e0a4,
+ 0x1765e695, 0x770c0220, 0xafeea149, 0x23220447,
+ 0x6e6b023a, 0x87e824b2, 0xcda36ed9, 0x4406558f,
+ 0x05c972f8, 0xd25c24e0, 0x15e76c97, 0xa046878d,
+ 0x38be5b2d, 0x07ad70ad, 0xff311e53, 0x8c7078ed,
+ 0x0188002d, 0xda1766bb, 0x6cd2a8c8, 0x5cfb1b67,
+ 0x2f1f75da, 0xbaf11224, 0xe2ed850e, 0xeb70a7fa,
+ 0xc8ce118b, 0xf60f244b, 0x9891809a, 0x4e7154c7,
+ 0xac4d3e29, 0xd48e4cd9, 0x73559727, 0x521882f6,
+ 0x6befac08, 0x6fcfbe0b, 0x4c69445d, 0x5f751aaa,
+ 0xc91ea66c, 0xf54f4114, 0x27470a2b, 0x967d6da8,
+ 0x2a3d7659, 0x68978a2f, 0x7d86198e, 0x93269e71,
+ 0xa46de016, 0x2b9ca58f, 0xc0132215, 0xe56676c5,
+ 0xa25d84ab, 0x80b264d6, 0x4fdf1a25, 0xfaddb983,
+ 0xf73fac1a, 0xe1e2cb7a, 0x9395fe01, 0xcb215b4d,
+ 0xff2e6a80, 0x381bdc51, 0x461ebc0d, 0xdb872b55,
+ 0x63896426, 0xcefede6a, 0x579e34b0, 0xf334106f,
+ 0x4fbee3a0, 0x1143babf, 0x346bbfdb, 0xfed1ff69,
+ 0x5864423f, 0xb53a5c6e, 0x54989b63, 0x963dc03e,
+ 0x56afde80, 0x292f20f0, 0x78ea28e1, 0xe849f2c5,
+ 0xd000c898, 0x273369b3, 0xf883c44d, 0x16cb3a77,
+ 0x975d43eb, 0x31c0250e, 0x39eb1740, 0xb01c8f3d,
+ 0x333c2849, 0xce48398f, 0xdb612ce5, 0xa689f675,
+ 0x388f54da, 0x12e89868, 0xade5c8f3, 0xb13c248a,
+ 0xc71a4cf8, 0x89b032a5, 0x42d09cf5, 0x205dbd42,
+ 0x56c6fec7, 0x268d720e, 0x98373a74, 0x68032605,
+ 0x513c187d, 0xeb97853d, 0x7e6c0b0e, 0x9e132ac8,
+ 0xd5cc36ff, 0xa149a0d1, 0x5938fd20, 0xc3efa8b0,
+ 0x7330b57c, 0x1fc46088, 0xe6400d30, 0xd7f30878,
+ 0x6998c723, 0x888314a9, 0x124f8e77, 0xaf6ba196,
+ 0x073375b5, 0xe1141141, 0x713a97c8, 0xc97d1350,
+ 0x883a1eda, 0xcc6e80c1, 0xaf2ea114, 0xf47865b4,
+ 0x7bc7905a, 0x7d925fc9, 0xd2e95cfb, 0x75529bf0,
+ 0x0cc81196, 0xd704cd27, 0xad7e4756, 0x8780a734,
+ 0xed432b85, 0xfd327c16, 0xeabad27f, 0xe17ace02,
+ 0x46a7e507, 0x07dfff28, 0x4f079de0, 0x407719bd,
+ 0xa2775748, 0xdbd3c523, 0xcacba034, 0x83c64c19,
+ 0x0676abf0, 0x1c1819f4, 0xb6c3a2ba, 0x7df6d73f,
+ 0xb728033a, 0xf13da3cd, 0x335537ef, 0x666c692b,
+ 0xb9a2ef8a, 0x6c14480f, 0x4c5bc1d7, 0xbb0ac606,
+ 0xf76064df, 0x12b13149, 0x61b5d601, 0x367c5460,
+ 0x60c79b44, 0xa0be361f, 0x096ff35a, 0xcbd21df2,
+ 0x413d77df, 0x44163cd1, 0x39011b45, 0xd0ff5863,
+ 0x3d925ed2, 0xdabbaf21, 0xf6353805, 0x38cf7606,
+ 0x521bbb45, 0x8e42be45, 0x696a30a3, 0xc71c1bd8,
+ 0xfc9cc2fb, 0x3cc02b52, 0x168ef0b9, 0x74cd65c8,
+ 0x124f6e1e, 0x4482a3c7, 0x8da102c7, 0x14ff699d,
+ 0x1f961a11, 0x9874baab, 0x89b87241, 0x01d4e99e,
+ 0x8375114f, 0x49d452b5, 0xd83bf520, 0xdeb206fc,
+ 0x93b4b46a, 0xa6218e86, 0x6f7b7c1e, 0xd1feaf9a,
+ 0xd7954bac, 0xf8fa675b, 0xbd2c181c, 0xc0dd0939,
+ 0xbc8f118a, 0xce598016, 0xdeb40a35, 0x61bf359e,
+ 0xdc4a73ab, 0xcec76daa, 0xbe8cb8da, 0x39f7a790,
+ 0xc920ce8f, 0x26ed88be, 0xbdcd5c2c, 0x42989f43,
+ 0x09fc59e6, 0x4d51b88d, 0xe79439f4, 0xbb6fa7d9,
+ 0xc9478f15, 0x975b4322, 0x6b5ba993, 0x704765dd,
+ 0x08787ae5, 0xcc4f879a, 0x1a5fb849, 0xf8ae745c,
+ 0x6652c3fb, 0xad9ba699, 0x868d7be3, 0xa62ea2f3,
+ 0x5efc04d1, 0x8eb26c60, 0xeb7c8024, 0xf38a2350,
+ 0xaf14b474, 0xe4cf7cdf, 0x70bcb3de, 0x3e7af928,
+ 0x98fb07e4, 0xd09b3dc6, 0x85ddb22e, 0xa7d92d2d,
+ 0x5e24a39f, 0xf101e325, 0x6c37203a, 0x3396e813,
+ 0xf8c8fb4c, 0x7c9d6a04, 0xc12f7c3d, 0xc766fa13,
+ 0x229e06e8, 0xda1d81f4, 0x8f8db7e9, 0x0a674e20,
+ 0xe1a1540b, 0xbfb9ed69, 0x14e47fe2, 0x7c5c4142,
+ 0xa63131c9, 0x76e86e34, 0xb9106480, 0x57cb6361,
+ 0x792fe64c, 0xe4473544, 0x9c286ca7, 0x88dcecf1,
+ 0x542a374c, 0x8b612b71, 0xe3562239, 0x78f3d725,
+ 0x5ca4e411, 0xb7bf026c, 0xbd42690c, 0x6e07e92d,
+ 0x88fcc06c, 0x52ce9d89, 0xb8684de2, 0x46cf680e,
+ 0x82c1f043, 0xdeb5ea91, 0x17d1e1c9, 0xe8a91edc,
+ 0x7c101532, 0x0b81a3fe, 0x29277a6b, 0xd6333f54,
+ 0xdb741e12, 0x8f6ea01f, 0x2263e458, 0x70e5a7e0,
+ 0xfd94b867, 0x0071e68e, 0x66dbc16c, 0x7c01fd6d,
+ 0x059fea93, 0xa2b1a730, 0x29273ef5, 0x0016608f,
+ 0x2b645f06, 0x3bb745f8, 0x15a5b9b0, 0xdc61aa81,
+ 0x87baff82, 0xab480660, 0x77abbe74, 0xc512b1a7,
+ 0x9396f142, 0xa5bd67e3, 0xd04ae2e6, 0x6656434e,
+ 0xed8283ec, 0xb35d3b72, 0xe3d84925, 0x94630341,
+ 0xf2beb4de, 0xdec6780c, 0x872cc027, 0xd224203c,
+ 0x4809faaf, 0xe8217666, 0xbf9ef51f, 0x0a65325f,
+ 0xc5b8a8b7, 0xfcce2671, 0xa0fcbaad, 0xd9d6c98c,
+ 0x3de60801, 0x6677604a, 0xa1867987, 0xe67aa7f4,
+ 0x633e6df8, 0xbedc60d5, 0x79e0aa27, 0x895fa027,
+ 0x2190d5c9, 0x1a8b860d, 0xcaa8e943, 0xa1f60cfb,
+ 0xfe5621af, 0x29dce9da, 0x4da89b5d, 0x512facbb,
+ 0x2fad2f47, 0x702edb28, 0xe01acb6a, 0x79c64a22,
+ 0x6303d0f5, 0xd11a93aa, 0x61c34daf, 0x6b069865,
+ 0x9f4a5a83, 0xa710b15a, 0xed7e1a0d, 0x558263e7,
+ 0x3818d128, 0x93132b01, 0x62dc9767, 0xf91b60ac,
+ 0xbe206e6b, 0xb0354fb1, 0x52b78878, 0x1e9f52a8,
+ 0xf3ba3c61, 0x71b37150, 0xadaf5bf3, 0x1f5aa683,
+ 0x6fa3fd5f, 0x25ee4f47, 0x19c8db26, 0xd460905a,
+ 0xd8e7795a, 0x6e891eee, 0xc4c42548, 0x0082e0ea,
+ 0x31255014, 0x6cbe9bfe, 0x1e0ec070, 0xae25ce1e,
+ 0xdc2ecef2, 0x2778daf6, 0x589f0636, 0x3860f595,
+ 0x27fe513d, 0x4403a256, 0x1a3e1408, 0x498f956f,
+ 0xc5c9ce5c, 0x3efa5be5, 0x5610b748, 0x96de0b08,
+ 0x4a45442b, 0x93dc0d73, 0x9a7a5072, 0x4a20be6e,
+ 0x4013e6c3, 0x2beb3426, 0x365ab4e9, 0xc554baa9,
+ 0xaf331061, 0xa69242d6, 0xfdd89c1f, 0x9c70b464,
+ 0x7453f9ce, 0xe500e76a, 0xd0ca005a, 0x38d8119f,
+ 0x7c9fc33b, 0x6a43051b, 0xee020680, 0x3fedc238,
+ 0xa5f262da, 0xc962fa2e, 0x46eba3e0, 0xe781ff31,
+ 0x3a3eb052, 0x78ab727f, 0x1762bfb4, 0x402c0328,
+ 0x22b53026, 0xe97f4ec0, 0xc1adf341, 0x1a0491f6,
+ 0xe8229809, 0xe1c2e033, 0x2c5bec06, 0x999e4c26,
+ 0xd3410469, 0x3acb4f92, 0x4ff8ce5e, 0x8b601f7f,
+ 0xafa41bca, 0x68687424, 0xad8d7cca, 0x2efc920f,
+ 0x7d683026, 0xb45c674c, 0x7b9d8ac6, 0x503904f3,
+ 0xc1ca7b4c, 0x84882db5, 0x3ff07221, 0x55ce2523,
+ 0x78d8bca8, 0x64c508b6, 0x02ca0351, 0xefb3b8bf,
+ 0x1b762481, 0xd0a420f1, 0x01472aef, 0x0fb44836,
+ 0xada484c7, 0x5aeb42ca, 0xd1709e37, 0x894d422d,
+ 0x7ecf09de, 0x3ab343a8, 0xdd0e2b51, 0xbfb99969,
+ 0xebbcc55f, 0xd3dbf1d5, 0xa72362b3, 0xf547e768,
+ 0x22c6abd9, 0x80179d4b, 0x623baffc, 0x92f78040,
+ 0xa5be350a, 0x4bd21926, 0xd842282b, 0x55d7b6f7,
+ 0xb164c218, 0x10cec004, 0x100ff7ce, 0xd665c7fe,
+ 0x3a707668, 0x76da7372, 0xcf34284a, 0x1cd2a30c,
+ 0x7e5e63fe, 0xc5ec5b99, 0x8e949bef, 0x775c8b9b,
+ 0x8010a4f8, 0xe8aeeb98, 0x77fb39d4, 0x95fddbb6,
+ 0xfe764be4, 0x8833c498, 0x8a5c01d7, 0xb104b953,
+ 0x54ccaf05, 0x2934e5d3, 0x772817e1, 0x07a08256,
+ 0x6dee5be6, 0x67cc73a1, 0x864af7c9, 0x137d2a55,
+ 0x25c7c25e, 0x71f2275d, 0x8946f0b0, 0x20f6e09e,
+ 0x91c2db84, 0x17696f2b, 0xa8dfdb54, 0x7910e571,
+ 0x2477d550, 0x10ace013, 0x5e079578, 0xaead1957,
+ 0xf0490f57, 0xfacacba2, 0xe5ccc48e, 0xa889a5e7,
+ 0xd593c76e, 0xec4a7c15, 0xab159c83, 0x87ec992e,
+ 0xce1fd094, 0x03858fe8, 0x4ceea424, 0xd9c39a73,
+ 0x76e91ace, 0xc36fc368, 0xc4947153, 0xf1b65fc9,
+ 0xa94e0266, 0x655b2e20, 0x3025eecb, 0xa5daccef,
+ 0xe2cfb6b2, 0x1be63c7f, 0x69ac5009, 0x76b10051,
+ 0x34e39e86, 0xb2de0952, 0xc287a0f0, 0x4e8c6f7f,
+ 0x98d04a99, 0xaafcc550, 0x30833fc7, 0xf304b1ed,
+ 0xcc47ec93, 0x2ed1a5e0, 0xbd530bf9, 0xc06a0595,
+ 0xa480663c, 0xe2e6c67c, 0xba788059, 0x0134d289,
+ 0xf66924b6, 0x7034714d, 0x1081ca69, 0x0ea4214f,
+ 0x6d524dbb, 0xa8dd38fb, 0xecbbfb5b, 0xfeb94b23,
+ 0x4fc2449a, 0xb0b2251c, 0xa249fdec, 0x4cc54507,
+ 0x264f10ef, 0x0d8ab38f, 0x040b1915, 0xf97528b9,
+ 0x928a53e3, 0xf3f2259d, 0x677ce115, 0x4e3463ba,
+ 0x8b989691, 0x60b627f1, 0xafd85ec5, 0x0b47cc86,
+ 0x80ee96c4, 0xaa7a3347, 0xc3bc3378, 0x1966178e,
+ 0x6094099a, 0x6ce574c1, 0xd17c7c97, 0x78e6c412,
+ 0xcca3b480, 0x8deb2d74, 0x6955ec3f, 0x02fa4d64,
+ 0x6feae44f, 0x1f8cef55, 0x256930ac, 0x42901dd7,
+ 0x9dfb0f32, 0xb0d78465, 0x30c4e908, 0xd6da313d,
+ 0xb1902919, 0x807b4015, 0xa853081c, 0xddf65af7,
+ 0x9c732690, 0x5c6e878d, 0x2a2c95a3, 0x33bcc73a,
+ 0x6703ec72, 0xc6d03974, 0xe5a17834, 0x052c6121,
+ 0x4aa1fc9e, 0x152bb560, 0x544f2a0e, 0x88f2898a,
+ 0x9945386d, 0xde656c7e, 0xa5deae09, 0xe591cec1,
+ 0xa01676fc, 0x9160d5c4, 0xea22df9b, 0x23b8740f,
+ 0xc96f205a, 0x7a31a1b9, 0xc604aa9a, 0x37364481,
+ 0xbba3906c, 0x843adee7, 0x693bc560, 0x2b51c884,
+ 0x685dbc4c, 0x977375f5, 0xf696e804, 0xb00ca9ef,
+ 0x14a42bb1, 0x610edc15, 0x5c5bb16d, 0xe3a71d73,
+ 0x5abf589a, 0x11556928, 0x159b7353, 0xd25867a0,
+ 0xb0541b85, 0x720649fc, 0xb53a9030, 0xf4630c28,
+ 0x90e660a4, 0xf2b4457f, 0xbaea68e5, 0x8cff17fa,
+ 0x53cc8b1a, 0xa21cc226, 0x9d39d6e2, 0x2d4e8514,
+ 0xfc59c838, 0x86dc3fad, 0xa488d180, 0x77a8c068,
+ 0x978b8025, 0xb01b08fb, 0xbe6929ce, 0x999d3451,
+ 0xd16cce88, 0x0c9b3bdd, 0x11a2f223, 0x64995a78,
+ 0x3a790e3b, 0x194c21f3, 0xe4e681e5, 0x9a5530f4,
+ 0xed231d53, 0x6da4794f, 0xc7b0585e, 0x079f0ac7,
+ 0x8825a7ce, 0x18c50d0c, 0xe54631f0, 0x8dbdcbbc,
+ 0x8bc55699, 0x5ebec122, 0x2c99f775, 0x8d5944d1,
+ 0x8a8eb774, 0xd70248fa, 0xc1c3ded5, 0xa2a6e6de,
+ 0xf633611c, 0xf49298c6, 0x1815a2ff, 0x28276470,
+ 0x319692f2, 0x9731d828, 0xba93bb51, 0x78a875aa,
+ 0x6f1e30a4, 0x51239ea6, 0x808178a4, 0x53e15832,
+ 0xa10679e3, 0x0ee314ca, 0x0ae4e597, 0x8305fb8b,
+ 0xed0a0270, 0x8a4a35e7, 0x013c291a, 0xf7a7f4a3,
+ 0x7a0bb8ee, 0x2e33165d, 0x1c18b60e, 0x03558852,
+ 0x40997711, 0x944793d1, 0x2479130c, 0x504497e9,
+ 0xede45446, 0x284deb52, 0x74bf2717, 0xe42be630,
+ 0x909a433c, 0x5813296b, 0xdfa0647a, 0x654c59ef,
+ 0x37c2792c, 0x8d098a09, 0x3cbc7646, 0xd7eb8005,
+ 0xdf229024, 0x5d82785e, 0x981a0893, 0x163c0a87,
+ 0xdf6f8fec, 0xb15f145c, 0xa872de42, 0xd455d30d,
+ 0xf2803fcf, 0x0ecf54a8, 0x4b3ecd1e, 0x9eaf588c,
+ 0x7ef28ede, 0xa308c55b, 0x7ba7e03d, 0x3264ab52,
+ 0x2eb00951, 0xd835f86e, 0x6d05cc1c, 0xd71f394f,
+ 0x8b41f387, 0xac8b61bf, 0xf1eabf79, 0x81a67d29,
+ 0x2fb18508, 0xe5c45215, 0x6aa45f59, 0xf0e01b4b,
+ 0x0a20e1c6, 0xd4429f5c, 0x296d83c5, 0x4176d417,
+ 0xf1190cd2, 0x8947a7a6, 0x71cfe641, 0x9438e3ca,
+ 0x9cc7c0c1, 0xf1c7b666, 0x1a100389, 0xd881baf1,
+ 0x055f5542, 0x059ff693, 0x5de3b98f, 0x26820e2f,
+ 0xfe98d324, 0x88731298, 0x15238ce4, 0x6cc4e33c,
+ 0x79028207, 0xb2763d20, 0x87814255, 0x93a075cb,
+ 0x32733f12, 0xb2a0f7f1, 0x6f731300, 0x6125a1d7,
+ 0xeb9a075b, 0xb6c56a35, 0x0384e0e0, 0xb0ff3669,
+ 0x63a59a88, 0x7cabbed7, 0xd0332499, 0x7f2b006f,
+ 0x9f24041b, 0xd39bd659, 0xdac0db1f, 0xcc685988,
+ 0xe9faa047, 0xafe4f5cf, 0x282ba7c4, 0xd79a3e56,
+ 0x13731f90, 0xe8bba200, 0x6588ec14, 0x1337094b,
+ 0x1cdad5ba, 0x01672e75, 0xabd184c2, 0x11153ab6,
+ 0xc9f7c7e9, 0x11b48036, 0xd140b128, 0xd9515663,
+ 0xc585ac69, 0xeccf2fcc, 0x10589671, 0xf2e6f33c,
+ 0x7845a90d, 0x537b98f3, 0x2c63ceda, 0x033db20b,
+ 0xd7b7ef65, 0x7a3746f0, 0x62e456d9, 0x4eb5f682,
+ 0xacc807e0, 0x34a2469b, 0x0fd2e0fd, 0x818a67fd,
+ 0x5a1d1fc7, 0xd1e3d34d, 0x84e92e89, 0x4392f1a4,
+ 0xff23b25a, 0xf6d145ed, 0xac45e3fe, 0x36aaf7e9,
+ 0xdf1cb7a4, 0x60feda2a, 0x2087a9b4, 0x4c6f95bb,
+ 0x9d0778c9, 0x507c9b98, 0x9047ac6b, 0x967887a4,
+ 0xc93b0515, 0x57589321, 0x00399732, 0xa8c9b636,
+ 0xa93f780c, 0x4f99e66b, 0x807d5065, 0x920070a4,
+ 0xed8ee58e, 0xa5a92e60, 0x78b1ca96, 0x6e9126c2,
+ 0x21f469a4, 0x7597af35, 0x2666ec41, 0xee55249d,
+ 0x4513d84d, 0xb331f4c2, 0x640b9218, 0xf27ce8be,
+ 0x914a864c, 0x0347ddaa, 0x27763fe6, 0x9ea2ae0c,
+ 0x46bcbaf5, 0x20365ece, 0xae5ce673, 0xc4f3f72b,
+ 0x98a00518, 0x5682c633, 0x32fe8e08, 0x30813bb1,
+ 0xa464fbf1, 0x73806409, 0x00bdd861, 0x45633dfe,
+ 0xe0fd2186, 0x1b44f47c, 0xb425d454, 0x18108d35,
+ 0xdfb10cb6, 0x4ad11e8b, 0xd2f97e1e, 0x0510bd1a,
+ 0x30a49732, 0xc9dd0587, 0x0c81d89c, 0xe65a9065,
+ 0x5d729392, 0x5cf2d538, 0x21a7056f, 0x67422ace,
+ 0xcb0e7b56, 0x93d4fac4, 0x22dfb8db, 0x4ed49953,
+ 0x4a30efaa, 0xf629e70d, 0x24073d71, 0x8f3abcce,
+ 0xb2a2029d, 0x5d241800, 0xfcb3e7a2, 0x95b3d309,
+ 0x10fb2740, 0xd9d86971, 0x931a583f, 0x2003ec3c,
+ 0xbf4187ea, 0x97f0ea1c, 0xf2faa1f4, 0x4203ee28,
+ 0xc358b3f1, 0x4099870a, 0xe99891a0, 0x9a789f15,
+ 0xf538fdc4, 0x91fea7ed, 0x09b7e47b, 0x217f10f7,
+ 0x607acfb4, 0x130694c4, 0xdbb896c9, 0x06dc050d,
+ 0x33e66ba9, 0x50fbf5c9, 0x1ae8ada9, 0x2ef3f2be,
+ 0x2961a98d, 0xdf456a10, 0x4b34d6a8, 0x22c75f41,
+ 0xd5be1856, 0xf02e6e78, 0x88b64b08, 0xef77297b,
+ 0x2f40f06e, 0xdb2ff25f, 0x59e2c49c, 0x3f6e3099,
+ 0x2f4bcb82, 0x1ddd1195, 0xbc5238f7, 0x1acd7510,
+ 0x1fb0cc4b, 0x4d1e03c9, 0x1602a9fd, 0x6acf3467,
+ 0x0e7a1805, 0x94152cec, 0x94e70e7b, 0xde49992f,
+ 0x6adb1e50, 0x00309578, 0x01b1e21e, 0x1fb17acb,
+ 0xe770c4b0, 0x1ce4596e, 0xe9b651bd, 0xd4fd7952,
+ 0xe743c312, 0x5a442414, 0xba2f6c66, 0x3d74b5a8,
+ 0x859e8f04, 0x731de424, 0x15b61b5d, 0xa6a54dbe,
+ 0x9e9dbe61, 0x74c176b7, 0xf20bdfe6, 0xa209d15a,
+ 0x5e04b0ec, 0x466438cb, 0xaf669d2d, 0xa2a7b2ed,
+ 0x4bacb5ef, 0xad31a34c, 0xd601c1c0, 0x37c404c7,
+ 0xa230f5b6, 0x8745a4ee, 0x5921db70, 0xa63c3529,
+ 0xad89c712, 0x0bfa1761, 0x482a43a2, 0x83c0149a,
+ 0x0c98f161, 0x543e253a, 0x3ae5a39f, 0x45ccb707,
+ 0x7e9fecee, 0xc2b7eb27, 0xc9751611, 0x41a8298e,
+ 0x6e583e18, 0xd13a7db1, 0xba6398fa, 0x8bece58e,
+ 0x6013069b, 0xe171b607, 0xfaeb27dd, 0x75def027,
+ 0x8499bf0b, 0x5908216c, 0x64668335, 0x9ca8971a,
+ 0x50ca5ab6, 0x8ea1c7bc, 0x28c4a6f6, 0x18b7adc8,
+ 0xf7612863, 0xf672f71e, 0x23f0dd42, 0xcbd3dcf1,
+ 0x83ce2e77, 0xb370fe87, 0x1adfa2e3, 0x616912cd,
+ 0x9b714400, 0x523aa554, 0x8112bc86, 0x17017d18,
+ 0x541d3f37, 0x97afeac2, 0x2ca8c9fa, 0x2a1b399d,
+ 0xaac9d2b5, 0xcbf0670c, 0xc95389c5, 0x8f98ef3b,
+ 0x56baa883, 0x7387c4fd, 0x807077ce, 0x88f017c6,
+ 0x03ff03ce, 0x70144385, 0xd7eca55c, 0xa7a3f591,
+ 0x866b5c49, 0x443a3404, 0xb4e841d5, 0x62690b58,
+ 0x934c9099, 0x90ed75ed, 0x7f039228, 0xb4b472d9,
+ 0x0418c592, 0x8be4af7d, 0x1e83877e, 0x33949f51,
+ 0xab62cda0, 0xa1b8fe92, 0x68c495fd, 0xc3b03139,
+ 0x1f73e507, 0x0798ea68, 0x76e28aad, 0xacaf9e9e,
+ 0x2fe94860, 0x519c429f, 0x04e30c84, 0xf4786718,
+ 0x92766ce7, 0x12c90828, 0x1a4de2b8, 0x6c502f83,
+ 0x32e155a0, 0x87b92a6c, 0x2a13eaaa, 0x5bcb0022,
+ 0x3b845bf3, 0x80378b9d, 0xc5e4703f, 0xb359f7c2,
+ 0x774d0234, 0xea4da3ec, 0x18a9d974, 0x82d9db20,
+ 0xe7d9d8be, 0x8f9edd30, 0x95d2b884, 0x5af551cd,
+ 0x99a9ddde, 0x8d9c6c3a, 0x91deb7e8, 0x6d554165,
+ 0xbb816586, 0x007b5a1d, 0x41232939, 0x61930e9f,
+ 0x7a1a88ad, 0xbd410d10, 0x5f7ec1c1, 0x7bd88df6,
+ 0x65f8eb8c, 0xbdb2b85e, 0x20bfde52, 0x52a1427b,
+ 0x3e5a56c6, 0x64a86bc8, 0xc63e6abc, 0x48c58663,
+ 0x2dc918a5, 0xff351952, 0xe8b3d128, 0xf8320e05,
+ 0xe8ed25d4, 0xd223e20a, 0xbf9ab553, 0x19000e33,
+ 0x514bde9d, 0x2e164899, 0x9128d846, 0x855e7537,
+ 0x8eaf26c7, 0xd44145ba, 0xd1d55d25, 0x67742800,
+ 0x6302e51c, 0x4ca8d4f6, 0x36526ac7, 0xa08b3484,
+ 0x71f3e2ff, 0xe2e6b03f, 0x89883af8, 0x890082cd,
+ 0xb8f1fcb0, 0xc8fccf93, 0x63708f31, 0xa57641b9,
+ 0x41d839bb, 0x7ffe8202, 0xaabe997f, 0x47e80a1c,
+ 0x9b05ccc0, 0x2a099f89, 0x96c2e447, 0x2bda353b,
+ 0xf908ca55, 0xfd11c7ef, 0x771f56c9, 0xb56ffc19,
+ 0x2f2a9f0b, 0xad36079b, 0x42766601, 0x15271fae,
+ 0x7188e43d, 0x957e3915, 0x9eea7527, 0x4184a94b,
+ 0x0118050c, 0x81465005, 0x09d308a6, 0x89e11549,
+ 0x3e0e7435, 0x089999e7, 0x2b82b302, 0xd77465a7,
+ 0xef71e19e, 0x964861e5, 0x93bb552e, 0xcfd776e8,
+ 0x8ff38413, 0xfdcb48db, 0xe3f99fed, 0xdc3c60eb,
+ 0x2fdd8d10, 0x84edaae5, 0xc24b019b, 0xafe94396,
+ 0x561549da, 0x12784162, 0x7f631143, 0x70d688a2,
+ 0x9b177087, 0x02b3be5b, 0xb359ea36, 0x724acc82,
+ 0x59234184, 0x20dfc8fd, 0x8c0d0f7b, 0x3333130d,
+ 0xa0c9dba7, 0x6687f8f1, 0xc4174d89, 0x13a1e211,
+ 0xf5e0b03c, 0xc4adffd3, 0x89195b89, 0xc0f209fb,
+ 0x7c5556a5, 0x6e3def11, 0x5fad0d7a, 0x9da70a35,
+ 0x42b4fabb, 0x2b2fb8c9, 0x8bf29b84, 0xea980165,
+ 0x2c2f82b1, 0x45c0dae1, 0xb2877e78, 0xafa1ac49,
+ 0x894db298, 0xf622541a, 0xde2a049f, 0x627b0d02,
+ 0xc54830e7, 0x79efee2f, 0x63a34589, 0x5f7aa6e3,
+ 0x59302685, 0x7a3a2a9e, 0x5a88a489, 0xb605b8ae,
+ 0x789ad986, 0x4dff3f4f, 0x58bd2d11, 0x387cbd96,
+ 0x085df633, 0x062ce9b7, 0x282151a0, 0xb4628f63,
+ 0x20c0f694, 0xc010c218, 0x507d295c, 0x285509f5,
+ 0x578ba62c, 0xe277f96d, 0x40e5753a, 0x7a3ac129,
+ 0x5fd9329d, 0xc09f622a, 0xc2345022, 0xc69ef56e,
+ 0x28391ef6, 0xefd65f69, 0x263103a8, 0xe601e7f6,
+ 0xb444992b, 0x4f5620ba, 0x3e78bdd8, 0xabc60ffc,
+ 0xdfab7e06, 0x51114587, 0x61ad1067, 0x28f753b3,
+ 0x998dc29f, 0x6826a864, 0xb7875a36, 0x26e4dd1e,
+ 0xac87b5ea, 0x26fe05a7, 0x57e1fd18, 0xbf337c68,
+ 0xca3864c2, 0xa32e0a26, 0x7a499f83, 0xc7131e0b,
+ 0x317ada8f, 0x7cf07c96, 0x18915187, 0x962972e2,
+ 0xafbea653, 0x1248f5b5, 0xa24cdc7a, 0xc8a927fb,
+ 0x78d4e07e, 0x5efa7359, 0xc2561b2f, 0xd54d682b,
+ 0x573ef352, 0x4b25ed72, 0xbd58ee1a, 0x4797ab21,
+ 0xda8f97a9, 0x2593e19f, 0xeb5cf6a8, 0xdf326bfb,
+ 0x52751fe5, 0xfc6ed720, 0x73e3a68d, 0x8b79ae70,
+ 0x86b88923, 0xe281f9f3, 0xb41c563b, 0xef05c5f4,
+ 0x6c38516f, 0xd4db8e42, 0x415c2d94, 0x0f11a33a,
+ 0xbc01fa2e, 0xf0e02caf, 0x3e214c95, 0x292185f3,
+ 0xd7f95cf6, 0x90c40bc8, 0x464d8ef6, 0xa1d47370,
+ 0x3bea0e9b, 0x07b8df90, 0x96401931, 0xcb87c7a7,
+ 0x8347f06a, 0x52b66840, 0x78751fc8, 0x670f8976,
+ 0x002f6ad5, 0x63c3d0ff, 0xfe9b4b05, 0xb532c7da,
+ 0xd83d62bd, 0xc1ab68e9, 0xef7e5c30, 0x0b1bde6f,
+ 0x2fb22ec1, 0x61b4d9f3, 0x59a49159, 0xd766a166,
+ 0x63d6f518, 0xfc486731, 0xf0d2e867, 0xdd562442,
+ 0x435f97c8, 0xf84551d1, 0x0807b82d, 0x1f5bc93f,
+ 0xb78b5c5c, 0x8a81f2da, 0x5d389830, 0x145ace49,
+ 0xbd9c1986, 0x2c4c65fd, 0x6257df23, 0x3bb100d9,
+ 0x883c9fa2, 0x89e0d5cc, 0x760e0912, 0x0dc6fb9e,
+ 0x5228b572, 0x53f33690, 0x6439e864, 0x21e7d53f,
+ 0xbaea2bf9, 0x650cba1b, 0xb186773c, 0xbcd0b5aa,
+ 0x1c0543af, 0xe0cc2536, 0xbb647bb4, 0x84f7eda2,
+ 0x6a9dff08, 0x24197603, 0x2f1923c0, 0xa955eb03,
+ 0xc36e9564, 0x14d53a8c, 0x2ee8e4c3, 0xc76d4634,
+ 0xc3f37aa0, 0xac50c1df, 0x16a3ca53, 0xe03bad03,
+ 0xa0a3ebf2, 0x76bf2752, 0x8b2dcf4c, 0xec67e42d,
+ 0xe39f6a5a, 0x560dffc4, 0x4153f716, 0x6ea191a9,
+ 0x391dcd2a, 0xac8a1d07, 0x7834de61, 0x4784454f,
+ 0x69dc53ab, 0x86d514c6, 0xecf0da62, 0x5b41570d,
+ 0xd916adaf, 0xa6371576, 0x2803ca60, 0xc1f4ede9,
+ 0x407ee7d7, 0x93df4757, 0x33905ffa, 0xd380e217,
+ 0x9c5ea595, 0xabf6cb05, 0xe5de306b, 0x13b0d340,
+ 0x01c0b293, 0x4ec4cb22, 0xa5bbf569, 0xc95728ae,
+ 0xa91d395a, 0xa31e7b63, 0xc0a32e64, 0xb7643657,
+ 0x2567d136, 0xe3122de3, 0x76a53444, 0xcf280a10,
+ 0x05cd5e1c, 0xb66fc196, 0xe0c5e261, 0x990f20ed,
+ 0xcb154b5e, 0xa1239211, 0x8728f209, 0x89864a31,
+ 0x931176b2, 0x6102222f, 0x5cd41054, 0xe93a1706,
+ 0x86a71d0d, 0xc03dbdb5, 0xf6bb6e4c, 0x37c50760,
+ 0x3eb08b9a, 0x6e6cf9d9, 0x395c67a6, 0xa04a94bb,
+ 0x96c94bf1, 0x9a40f7ab, 0xed6eadfe, 0xaac1b88e,
+ 0xcc6f1c00, 0x86839937, 0x8a6dd448, 0x480c3298,
+ 0xaebe784d, 0x60382619, 0x5e4d474c, 0x93d46d94,
+ 0x8d7b9cc3, 0x2559f252, 0x60a24985, 0xd1f349c3,
+ 0x2e093bd2, 0x696d9eb6, 0x40b00b30, 0x8074c435,
+ 0xf0b56942, 0x29846f0f, 0x48be18db, 0x0c131a3d,
+ 0x3d351947, 0x25a06545, 0x0ee53340, 0x5a61d26c,
+ 0x37dbdb38, 0x13d62777, 0x565fa90f, 0x087bdea4,
+ 0x8133af6d, 0xc9c4c594, 0x42b923e0, 0x4e33cbc2,
+ 0xa147c9a0, 0x8407ee75, 0xf73ee644, 0x1f44ec53,
+ 0xcb3790a0, 0xf7ae37b1, 0x5a79715a, 0x8f6ee615,
+ 0xcc60bc45, 0x4e66c1af, 0x7b0b1f94, 0xc239ceb2,
+ 0x880b2479, 0xbccb76fe, 0x2a546a43, 0x83c2927d,
+ 0x103bcba2, 0xc8f4de74, 0x9454cbbd, 0xc62861b4,
+ 0xd1cf3062, 0x5c6133b5, 0x43b8e61f, 0x5877212f,
+ 0x2549ccc4, 0x29c07e20, 0x4ffad4da, 0x2d24e378,
+ 0x98ff8b39, 0xc45aaa51, 0x6af055aa, 0x6f7e3fae,
+ 0x748ee408, 0x040d3ea4, 0x2251c39e, 0x78a2f3bb,
+ 0x48bf481a, 0xf6141f76, 0xf0f6b544, 0x6dd79fb8,
+ 0xda4a7835, 0xa81bfc0e, 0xaae86d35, 0xf3659088,
+ 0x591c6a13, 0x904e695f, 0x667a3282, 0xe8438002,
+ 0xa10f66fb, 0x3272641d, 0x440914c5, 0x903be937,
+ 0x343f21b0, 0xe723efce, 0x5d1a95df, 0xeb510faf,
+ 0xba579bdf, 0x57d0ccd1, 0xb2ee3192, 0x3a9820a3,
+ 0x139bd576, 0x571dcb84, 0x2bd3c196, 0xdbbfe58f,
+ 0x79806a7b, 0x3aa31704, 0x8dad4aca, 0xb5fb57ae,
+ 0xba077641, 0xc05bee37, 0xeba2d6a0, 0x6c270425,
+ 0x56494d33, 0xd716a608, 0x2bcd99f3, 0x692b9907,
+ 0x2fd1e07b, 0x56cd7c15, 0x215dd0d1, 0xa50d2369,
+ 0x7bbce941, 0xd2bab540, 0x369e64fc, 0xb2477f2f,
+ 0xe5c24b48, 0x347dbfc2, 0xc9b8ab1d, 0x3c333954,
diff --git a/src/soc/intel/broadwell/microcode/microcode-MC0306D3_FFFF000D.h b/src/soc/intel/broadwell/microcode/microcode-MC0306D3_FFFF000D.h
new file mode 100644
index 0000000..8f41a6b
--- /dev/null
+++ b/src/soc/intel/broadwell/microcode/microcode-MC0306D3_FFFF000D.h
@@ -0,0 +1,960 @@
+ 0x00000001, 0xffff000d, 0x04102014, 0x000306d3,
+ 0xd5751e1f, 0x00000001, 0x000000c0, 0x00003bd0,
+ 0x00003c00, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x000000a1, 0x00020001, 0xffff000d,
+ 0x00000000, 0x00000ed1, 0x20140410, 0x00000ed1,
+ 0x00000001, 0x000306d3, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0xfd619f8d, 0x1f3ddfc9, 0x1a220633, 0x74f80c15,
+ 0x34ad7ecf, 0x1631677e, 0x87f10b8f, 0x3d6b9b79,
+ 0xe1d4113f, 0xc3085503, 0x1367060c, 0x9bf7efea,
+ 0x2b756eb6, 0x2ee07b69, 0x7cfd1dc4, 0x9811c8b2,
+ 0x86cf4036, 0x20534caf, 0x37046580, 0x432b4e6c,
+ 0x6a3a2e54, 0x88a74dfc, 0x81a503f6, 0x67736b51,
+ 0xbc2b11b7, 0xbcf3adc9, 0x96c8eefe, 0x688bcc49,
+ 0x16c4f996, 0xe0175cd2, 0x454d7a58, 0xa67afd13,
+ 0x098d9e42, 0xf86d2ec2, 0x738a67a6, 0x26c4ad17,
+ 0x08666776, 0x050d971d, 0x68998a7c, 0x21ac9cf9,
+ 0x29e27b61, 0xd61cfd7d, 0x3500ff83, 0xd4123687,
+ 0x27b72496, 0xe9b867f6, 0x62920d71, 0xe159dd34,
+ 0x3991c6ba, 0x367a5719, 0x7af5e9df, 0x5cb9fd11,
+ 0xf5988469, 0x4153f210, 0x24b194a9, 0x8c563988,
+ 0xac5bfd38, 0xd271e693, 0x16e9b292, 0x0c6583d0,
+ 0xd2501a4f, 0x9896af00, 0x6665aa9f, 0x0f3a8de9,
+ 0xc8f0db5f, 0x60b7a546, 0xe3a52963, 0x0ea3eb39,
+ 0x0d8c08ab, 0x2f5faa26, 0x1d3cbd56, 0xa8596256,
+ 0x00000011, 0x7dcc88cf, 0x0902af39, 0xb44d1c1f,
+ 0x3e1049a9, 0x7588d51b, 0x796eaabe, 0x3db19fce,
+ 0xa1369590, 0xfc8484c3, 0x829d6097, 0x6238d557,
+ 0x9c8911f6, 0x61aa5434, 0x4412f8de, 0xcd8fb89a,
+ 0xcd4b8bc2, 0xba545c64, 0xc8ae7f5e, 0x66e242b1,
+ 0xa298e161, 0x5b95e50b, 0x3b9c99ce, 0x0b5ba78b,
+ 0xd405126d, 0x93f08120, 0x16b6253e, 0xd40c1a84,
+ 0xf544baa9, 0x710082ad, 0x9bdd9150, 0xf38930d4,
+ 0xeae555a4, 0x647330a3, 0x3ad7eadd, 0x7ffc7de4,
+ 0xc2c533e7, 0x516771b6, 0x2831d2e9, 0x32fa23b4,
+ 0x5bd3ae89, 0x7471b30c, 0x5295c4dc, 0x3a9df604,
+ 0x6a70ce22, 0xa6484ac0, 0xd1e48a26, 0xabd97c27,
+ 0x82ccdb5c, 0x634016ec, 0x4822c821, 0x92f06cdd,
+ 0xed869dea, 0x00f3be65, 0xb4501303, 0x981480f2,
+ 0xd20656ee, 0x004e9c3d, 0xe7df1021, 0x719549a8,
+ 0xe7915318, 0x09a27ded, 0x7f485d31, 0xa5358273,
+ 0x295f9aad, 0xd5d835e3, 0xf9ef8f73, 0xa80be2e1,
+ 0x04a973c9, 0xb99f47f1, 0x99496ec7, 0x509e05df,
+ 0xc25ae410, 0x3c55e466, 0xa466514a, 0xbaf50114,
+ 0x02516eec, 0x55429251, 0x35d6e978, 0xf4b084e0,
+ 0xef522588, 0x1566a573, 0xdab30ba3, 0xd62c460d,
+ 0x3229bc4d, 0xee82bb0a, 0x579b99b9, 0xfbf0df96,
+ 0x24d71eb5, 0xb4726d43, 0xe149157a, 0x695dee99,
+ 0x2c4f77a0, 0xa9b742fe, 0xff5e5076, 0x6ca7129f,
+ 0xde05773d, 0x0ecffbd6, 0x44d088f3, 0xa7355824,
+ 0xc7f2d772, 0xa6f31b8b, 0x1fc0d02b, 0x5b1cffba,
+ 0x86722ce0, 0xf4a73732, 0x4cd04c54, 0xe8a1f6a2,
+ 0xe57ce1f2, 0x1c677824, 0xf4150acc, 0xe7c5f5fa,
+ 0x70f2878b, 0x28f9a79e, 0x2a2e696b, 0xd322245d,
+ 0xcb60d03a, 0xff3d24e7, 0xabb4f5be, 0x97b3b5e0,
+ 0x88a9477f, 0x7ad05ee1, 0x09b230de, 0x920d449c,
+ 0x444632ee, 0x486a4841, 0x8f5074e9, 0xbb955bcf,
+ 0x43e4a7d3, 0x11b42f83, 0x5f483210, 0xa8137a9f,
+ 0x562c7dc7, 0xee2d0684, 0xd4551d26, 0x1dcc1ab4,
+ 0x96331950, 0x4ea6432b, 0x0a42623e, 0x935c725f,
+ 0xc41157b7, 0x84c26c12, 0x54fc81fa, 0xe7326a17,
+ 0x8b788933, 0xb8065c43, 0xdae2908f, 0x6731ef6c,
+ 0xa33ecfee, 0x00b24e73, 0x8024238c, 0x49ddba31,
+ 0x6b78464c, 0x413f6ad8, 0xfa3987be, 0x5ce4ecee,
+ 0x734755b8, 0x8b803a79, 0xab288eea, 0xf74c5e72,
+ 0xf073c91a, 0x7b92c729, 0xf79310d2, 0x7fd7b30b,
+ 0x09c13d06, 0x844ffd6b, 0x873df05f, 0xe8ac1364,
+ 0x463ee0e0, 0xe24863ec, 0x437d6e1f, 0x968d2745,
+ 0x47d98e46, 0x70e67de0, 0x78c881d6, 0x2e4d2e38,
+ 0xef59e42d, 0x67caeb12, 0xd6571589, 0xc946d5f6,
+ 0x803fd9b8, 0xab37f7c5, 0x2034ddaa, 0x4c204b3e,
+ 0x8d97f636, 0xf07ed23e, 0xea40f609, 0x73b87e7f,
+ 0x66cf66e6, 0x2c4749a0, 0x830c290a, 0xf0c498eb,
+ 0x8dd8818c, 0xb0963fc4, 0x291bea1b, 0x477a28b0,
+ 0x73bcb859, 0x528f4cad, 0xfdb6dbb5, 0x4ed7bf52,
+ 0xa8e1251d, 0x62372447, 0xd81e1b75, 0xfe1072f3,
+ 0xfffe5f59, 0x44621d40, 0x2fb05129, 0x773bd11a,
+ 0x687ef365, 0x5bef55a3, 0x051cddd5, 0x9c974bea,
+ 0x1571d467, 0x374f7254, 0xcdb57cdc, 0x1085ae3d,
+ 0xf7e9e722, 0xfe1425c3, 0xe86408a2, 0x8bf5dc05,
+ 0x43604eee, 0xb4785cb3, 0x4cf7c290, 0x0d1853ef,
+ 0xfe57262c, 0xfbfdc84e, 0x14fdb978, 0x0669fcc6,
+ 0xb5572dd7, 0x7fe29a7d, 0xe85f0170, 0x871105cb,
+ 0x2344c983, 0xcec2cb20, 0xfca6f137, 0x03d089fa,
+ 0x9ebb8224, 0xc6a2b9a7, 0x1fc3679c, 0x43058d9f,
+ 0x828d82a9, 0xf319005b, 0x526050eb, 0x1cdf8e3a,
+ 0x8209a908, 0x018d74fa, 0x13d5900d, 0x225b29d1,
+ 0x278dac2d, 0x676b9b2c, 0x026faaf6, 0x8edb67b5,
+ 0xd75a96ab, 0x224acb96, 0x22411678, 0x38aa9438,
+ 0xf4aac722, 0xc518af44, 0x7a9506f9, 0xd15ed925,
+ 0xfb06733c, 0xbc06c224, 0x440aeca7, 0x4071fabb,
+ 0x0bca306a, 0x7e83e9f5, 0x42e911cc, 0x10db8534,
+ 0x01bff3b4, 0xdef6f9d9, 0xa6d71329, 0x3e1001f2,
+ 0x1e4770c9, 0x8dbdd2fe, 0x2022b0ed, 0x0a974f60,
+ 0x20367bf5, 0x431bf25c, 0xde8ac82b, 0x361ac2c1,
+ 0x9c6ef7a7, 0x967fdc78, 0xb7479e62, 0xe9b9e084,
+ 0x4ab210cc, 0xd95df191, 0xfcfb4f09, 0x01e06598,
+ 0x61d4ca0a, 0x77e0d081, 0x3b754aa2, 0x146eacb1,
+ 0x4f60bec5, 0x7f1bb75c, 0xef21650e, 0x13f17206,
+ 0xb8e1b745, 0x29ce216e, 0x2e2c645b, 0x3cae2663,
+ 0xe007c5fe, 0xcf9430cf, 0x1a60f850, 0x9832594e,
+ 0x3533c5cf, 0xf13bbf1b, 0x8e8d7d5a, 0x53541e26,
+ 0x67c06674, 0x303baf34, 0xa62fded7, 0x819d882f,
+ 0x5453c1fe, 0x8e55c62b, 0x2c17dc91, 0x14359946,
+ 0x5e2984f7, 0x4eab33cc, 0x5e824341, 0x60fca1f3,
+ 0xf18b9645, 0xb4c41f48, 0x4bab106c, 0xc8860d88,
+ 0xca3b8251, 0xefe41524, 0x871a26f7, 0x0b03ede7,
+ 0x51cdcfaf, 0x62275acb, 0xe72462d0, 0x0aa21d45,
+ 0x5425e3e9, 0x7789c661, 0x90953bb3, 0xa96e73c4,
+ 0x11c83c20, 0x68391fdc, 0xd6d495ce, 0x8a0da5cb,
+ 0xe257d89c, 0x882aa651, 0x246f0d2e, 0x54ce1362,
+ 0x0d2afd9f, 0xf01b8ef9, 0x54872d82, 0x176401be,
+ 0xdbcea6ba, 0xa11b6d6d, 0x881c5466, 0x4b04064c,
+ 0x375d883a, 0x844048fe, 0xa8ec8798, 0x9d375b11,
+ 0xc534b413, 0x68139ae1, 0x17da46cd, 0x1518c41d,
+ 0xa5920e4b, 0xb79bdd73, 0x7348b0b9, 0x3148fa55,
+ 0xb09a5d05, 0xa36fd001, 0x6711047b, 0x04a68f65,
+ 0x583b218e, 0xe611d3e6, 0xa9116f2a, 0xcd640ee3,
+ 0x5db70abd, 0x115c31c8, 0xbe8c45c8, 0x996d5280,
+ 0xe1415219, 0x98b6bbf8, 0x22a317a5, 0x5c89d84b,
+ 0xf893b417, 0x08f50cba, 0x0cdef7b2, 0x3f455101,
+ 0x9a8941bc, 0xa59aee26, 0x6a157d44, 0xa0fdc84f,
+ 0xe988c48c, 0xbaa6d132, 0xcba0d365, 0xd8d60a8d,
+ 0xb71b4533, 0x9a03a05f, 0x7b8c773e, 0x0c74ff06,
+ 0xfa4fc0b8, 0x189bbde3, 0x73717458, 0xe0938394,
+ 0x096fd2df, 0x1d2ab06b, 0x4051d80f, 0xfa9b5a46,
+ 0x131859b0, 0x85d2d964, 0x210c5c40, 0xd8dae214,
+ 0xd1a9dc1f, 0x3b55f05b, 0xfcddc3d8, 0x1ee84a11,
+ 0x5f30471c, 0xd4124f85, 0xd486601e, 0xb096ff4a,
+ 0xed3de43a, 0x14fa8e84, 0xd48d26e3, 0x0dc2e658,
+ 0xe310e62c, 0xbb4b6e22, 0xefa33558, 0x0cf000a3,
+ 0x7bd152d7, 0x53ac70e3, 0xd86b6548, 0x1adbb94d,
+ 0x8168ec3d, 0x3d65e16a, 0x49677322, 0xc2807ce4,
+ 0x8f5c249b, 0x9d2b8f5e, 0x82ef7b07, 0xfd48508d,
+ 0x2653f52d, 0xc96cc386, 0xcd9febbc, 0x87d03cd5,
+ 0x163496aa, 0xbec3e624, 0x2da86568, 0xb6988408,
+ 0x313b707d, 0x9543b838, 0xe5b4f5dc, 0x216a2878,
+ 0x5cc72af4, 0xba4ad3f8, 0xe61d4433, 0xf6931c30,
+ 0x69958b32, 0x7f806611, 0x5c3bcb71, 0x9dc197ab,
+ 0x83a19e8f, 0x010ec11a, 0x3abb1545, 0xccb32eb9,
+ 0x973ae017, 0xe2d099a1, 0x8b8cced3, 0x0a1dfdd6,
+ 0xf0ff6da7, 0xfc4d7c2a, 0x0f49539a, 0xc1af3de0,
+ 0xbff45038, 0xc380bbd8, 0x925280df, 0x9242dff8,
+ 0x2d9aa5d3, 0x098fff37, 0x59cce683, 0x42aa1c4a,
+ 0xc6626616, 0x717ed9df, 0x06803d69, 0x7212ede7,
+ 0x80212e78, 0x3b2448e5, 0x6b5387d5, 0xa5561eeb,
+ 0xaa777b73, 0x8ab89d57, 0x7ee070d2, 0xaccafd8e,
+ 0x7b3102c5, 0x910ea05f, 0x23b2ddce, 0x16866131,
+ 0x80e0b89d, 0x3579ff4c, 0x60b35402, 0xe2336e9d,
+ 0xa13a43a6, 0x37c88845, 0xcf1f4c66, 0x09cf7fd9,
+ 0x700a3c0b, 0x01799ebb, 0x819a1fb9, 0x27f0a5d1,
+ 0x071d6e4e, 0xc4ee5bc0, 0x39c1cf0a, 0xfb1bf4a0,
+ 0x92c83ef7, 0xd98933d0, 0xb7e5a53b, 0x4b04b2dd,
+ 0xeeb18ddb, 0x388af8d8, 0x508eeff3, 0xdb70cb66,
+ 0x2f3ff305, 0x52476dab, 0x1d8a075d, 0xb2745306,
+ 0x3e7a90e1, 0x3cefc46c, 0x43928619, 0xdc05b9f6,
+ 0x12de4379, 0x9d05278b, 0x1b1e3a30, 0x5fa1bb6e,
+ 0x679c5dd7, 0x4399903c, 0x1e320aac, 0xe7c257da,
+ 0x0fb9919b, 0x9dd38866, 0xeb7b568a, 0xf1d33179,
+ 0x32c8229a, 0x012fd9b7, 0x38949a78, 0xe4a5d0ce,
+ 0x9b6ef347, 0x450009e2, 0x3e10eb63, 0x6258c4f0,
+ 0x06afb6d6, 0x95891323, 0x4993a4fe, 0xc8ebda7e,
+ 0xa15e1b57, 0x43498d08, 0x36426a8b, 0x0f7b1c45,
+ 0x2e6df8f1, 0x2ab10e1a, 0x10ab87b0, 0x9330c916,
+ 0x220736c6, 0x9e49e377, 0xf7e6b0e8, 0xcab4dbf4,
+ 0x6cc23e9c, 0x7928e4c3, 0x0a41ccc0, 0xb3b1f461,
+ 0xcafb0f57, 0xdea9c22f, 0x3a9e49b1, 0x4a53d13a,
+ 0x2c5b8dd6, 0xc2d0ed85, 0x03b88042, 0x284fdba7,
+ 0x0da0f22d, 0x90a26f17, 0xea99b35e, 0x36c656a8,
+ 0x6b124e5d, 0xfbcf87db, 0x317113a6, 0x8b4797bf,
+ 0xa5128368, 0x153344d3, 0x98773507, 0x28fb4dc4,
+ 0xb0203d53, 0x0bb56ec2, 0xc9dd32a9, 0x06da0808,
+ 0xd218d1f5, 0xb57dfd19, 0x7bbf7b88, 0x6ac8fb21,
+ 0x645939a8, 0x7814b519, 0xe7a6a885, 0x36e8def9,
+ 0xc2e60691, 0xa6815de3, 0x2a205898, 0xf6450c8f,
+ 0x51460efa, 0xbc49cf37, 0x35f08578, 0xbf593030,
+ 0x6e07aa9f, 0x7787220b, 0x1ae867d2, 0x2ee30393,
+ 0x0b8c717a, 0x9b751b3f, 0x7d7af8ac, 0x783f759b,
+ 0x09c83dbe, 0x86c48d99, 0x833db151, 0x4b037c5a,
+ 0x0c6689e4, 0x9a1ebd94, 0xcf67fbe6, 0xfd7c4ae6,
+ 0x3233c8b8, 0x36feb9d0, 0x7a370303, 0x609ced5f,
+ 0x7cb9864a, 0xbbd4b8b7, 0x0334c20c, 0x45611166,
+ 0xfb4d5fc2, 0xee5e59f4, 0x2c68985d, 0xcf584586,
+ 0xac738dda, 0x7c527aad, 0x7c754a55, 0x696b62d0,
+ 0xe06f72c9, 0xa27687cd, 0xd78521a6, 0x92444313,
+ 0xd566660c, 0x611b15ea, 0x9d6979d8, 0x79d89931,
+ 0xd9c4eb82, 0x5ca461cf, 0xa9115461, 0x36f959dd,
+ 0x17abc641, 0x2d511903, 0xf26989de, 0x9a256018,
+ 0x03776dd4, 0xede335c7, 0x8cc26b51, 0xb5afffea,
+ 0xdc14fbd0, 0x7eed020f, 0x08008eff, 0x0484485a,
+ 0x86ab07d6, 0x3f326254, 0x40125834, 0xff3ff59b,
+ 0x5596bc88, 0x7ace9672, 0x381c2058, 0x7d64f830,
+ 0x86b24e38, 0x05335027, 0x1eb1ab58, 0x6ed1ae70,
+ 0xba27adde, 0x0502849a, 0x616b8085, 0x0bd7ec05,
+ 0x9fe29e67, 0x98349d3d, 0xa4efc395, 0xf016d5e2,
+ 0xc5c51d86, 0xde01d6ce, 0xbf61d966, 0x672a84ba,
+ 0x4fe93690, 0x1fcd43ce, 0x770ce960, 0x90d67639,
+ 0x3e9170b2, 0x6b85f000, 0x14b65bc8, 0x294f8af2,
+ 0x18d84942, 0xddbc8103, 0xbb247f8e, 0xe9fb6370,
+ 0x0f4b6a28, 0xc5e1c7b9, 0xbbc84a13, 0xa24de5a0,
+ 0xf8afcb0e, 0x7fb0e02e, 0xdef6e6be, 0xc4399a03,
+ 0x5f7ac9f1, 0xbe4bcfb8, 0x2ce1f60c, 0x99fd27ee,
+ 0xffea343f, 0x5d068b34, 0xc04e0ce0, 0xeeb505d1,
+ 0xfc329233, 0x3e92617a, 0xbc5620d6, 0x305d18b9,
+ 0xed5d8f90, 0x0db5408b, 0x681cfb3a, 0x7714f728,
+ 0xfe208a8f, 0xe9902ffd, 0x2421578c, 0x1982d7cf,
+ 0xfdda6794, 0x8c000fb2, 0x4a025941, 0x1f2fb303,
+ 0xbb8cfcb9, 0x4d55e5d5, 0xe7a14fcd, 0x583edc5e,
+ 0xd71433c0, 0x541804e3, 0xc61facae, 0xcfa53ee7,
+ 0xa5fab138, 0x90348e99, 0x19448389, 0x69f1d7b3,
+ 0xccb89223, 0xd1d141b0, 0x81524952, 0x82e447c7,
+ 0x6c9f22fb, 0x5b656dad, 0xdff96438, 0xdeb4aecf,
+ 0x4f841edc, 0x67f94b17, 0xfad0500d, 0x8c0cd87e,
+ 0x78715b0c, 0x9ee02e12, 0xfb9fdc79, 0x437ba1e4,
+ 0xc64c1077, 0xaecd1853, 0x8fa914bf, 0x99dc698f,
+ 0x081f9e7f, 0x5cde0688, 0x43b92fa8, 0x870b880f,
+ 0xf510fc2c, 0xaa991f4f, 0x8f6e8658, 0x983cc679,
+ 0x63695e92, 0x7eff4f44, 0x75d6ba85, 0x4bd2a0d7,
+ 0x4e0279e3, 0x40b93083, 0xdc45388a, 0xf7437d8d,
+ 0x14931a49, 0xc4b28342, 0x8bbb71c6, 0xc25ae909,
+ 0x7d6f906e, 0xcb37fca4, 0xc3e0f81a, 0x6b72fad2,
+ 0x4566877d, 0xb8daf531, 0x1b8f32a3, 0xa46105b0,
+ 0x0b613b3b, 0x57a94846, 0x633f3c19, 0x00297f0e,
+ 0x2f0c3619, 0x03eaafa7, 0x02805dcd, 0xbd24d253,
+ 0xd14bac50, 0x12f9755e, 0xbaf4f7b0, 0x28b0d7ed,
+ 0x35d55e1c, 0x65129fbe, 0x463c81de, 0x01a70079,
+ 0xe2dca472, 0xf4c54db7, 0x35d2f975, 0xb59536bd,
+ 0xcc9edf4d, 0x742f67a7, 0xc6231839, 0x91701688,
+ 0x77f42430, 0x1eb81443, 0xc22b546a, 0x4e2cdc6b,
+ 0x368d513a, 0xd91340b0, 0x293dd0fa, 0x7df31dbf,
+ 0x8d99b096, 0x42b2e2dd, 0x9499fca6, 0x21b23844,
+ 0x2b983657, 0x624b3e1c, 0x4a098e28, 0xabc70a66,
+ 0xb5598204, 0xc0a505f2, 0xc7398dbb, 0x982e9434,
+ 0xce246d96, 0x97bee704, 0xcf3ae3cd, 0x6f8235b6,
+ 0xafb750a5, 0x1b617dec, 0x659abf86, 0x05b53a85,
+ 0xc1948aec, 0xfa3e25a1, 0x0b44f568, 0x215a7128,
+ 0xa9c33a8c, 0xb7ae6828, 0x9913d557, 0x4bf0d46f,
+ 0x93c2085b, 0x0162b5ed, 0x6b58ed78, 0x78dad6a7,
+ 0xee112cfd, 0xc68eb5b3, 0x9fb06612, 0x85df72b3,
+ 0x2300f0e4, 0x0d29d3b8, 0x8db8ffc6, 0xcad414ca,
+ 0xa8c070a3, 0xd6254be9, 0xfcb764a2, 0x083ad716,
+ 0xa6189f4a, 0x15dead52, 0x84d0f550, 0x0757d89b,
+ 0x2c55a527, 0xf66eb3c8, 0x3ac77655, 0xb2b619a9,
+ 0x89dd2bd6, 0x3f9f3093, 0x4191ee41, 0x7d1e29d8,
+ 0xf07d226c, 0x9a32975d, 0xec9dd0d5, 0x199104b1,
+ 0x82f890f5, 0xbf4d6e82, 0xb39ee9b9, 0x5c66a749,
+ 0xb6839d37, 0x152b186f, 0x742e9777, 0x458bde94,
+ 0x4bd4f5bb, 0xf6fb70e1, 0xfb5a83e6, 0xb689b939,
+ 0xac99e124, 0x8b18ea51, 0xc9c5ac33, 0x0b61a2e4,
+ 0x22aabc42, 0x884f38c9, 0xe17acec9, 0x96339daf,
+ 0xba6641c0, 0x821dfab5, 0x0dd79f4d, 0xd7f6fceb,
+ 0xc7cf358a, 0xb153e2d5, 0x9f733315, 0x1d7eb0ed,
+ 0x054f9cfa, 0xb0f5a285, 0xf6122750, 0x4b098863,
+ 0xd2ef7681, 0x54f9bfd4, 0x321d431d, 0xff848cae,
+ 0x72a9bdc8, 0x3ae4fae0, 0xff31660e, 0xf3f889c9,
+ 0x024b635e, 0xa093b278, 0xb697197c, 0x81d4eb25,
+ 0xed43d477, 0xb190526b, 0x061ea57c, 0x03aa279a,
+ 0xdc122178, 0xec601daa, 0x29168f1f, 0x95f8e1e2,
+ 0x6b843a11, 0x28653c43, 0x9fe693d7, 0x3a92021f,
+ 0xa916177f, 0x007fa394, 0xef32f471, 0x7cecc309,
+ 0xf862cc7b, 0xa86b8e1f, 0x4a1a9c17, 0x4fc278a2,
+ 0x3b0c7cd2, 0xcf68a7d5, 0xda89d3eb, 0xff0a595a,
+ 0x36df2e0f, 0x204d6a06, 0x6d0c3391, 0xd258381c,
+ 0xeb073990, 0xa7f23495, 0xb413be50, 0xbfc35987,
+ 0x0c485644, 0x28ea9014, 0xb99dd066, 0x2b314274,
+ 0xc7d9df96, 0x114b943d, 0xb61038fc, 0x22c401cd,
+ 0xf104089d, 0x051f2184, 0xe65d0ca0, 0xd50cfe8a,
+ 0x4df74650, 0x576ed432, 0x6bfeb328, 0xab1e45cc,
+ 0xf7fae6f1, 0x5d0d5726, 0xf41f0ed4, 0x384cf4ed,
+ 0x83a9d945, 0xa2cdcb13, 0xbcca0901, 0x7999efda,
+ 0xfb7514d1, 0x4a92f3f8, 0xe18765c8, 0xa3f9e35b,
+ 0x31e3b2d8, 0x8df542df, 0xfb837a1f, 0xebd47118,
+ 0x4bdd1f2b, 0xf5eecc0d, 0x10d4fc3c, 0x978df50f,
+ 0xc41696df, 0x787b512f, 0xd0585e5a, 0xd543b13e,
+ 0x940316f1, 0xfc243416, 0x555f742c, 0xac1a08e6,
+ 0x2dcf0d37, 0xb10524ae, 0x088e26ef, 0x2564af0c,
+ 0x0c048106, 0x948f8db9, 0xcbb73ea5, 0x1e8a482a,
+ 0x9deda1d5, 0x96ede29a, 0x4b18653b, 0x49cb25af,
+ 0x6780a2c5, 0x565e3197, 0x1fb0bb2a, 0x6e5cb25b,
+ 0xacd40161, 0x230b24d8, 0x99c0848c, 0xf422b976,
+ 0x58841d4e, 0x5d42e0a6, 0x7afed81a, 0x908f4969,
+ 0x037be350, 0x189e5969, 0x7a18ea6c, 0x84526f3e,
+ 0xad33fe78, 0x01ac2c9a, 0x4482da38, 0x4ff58651,
+ 0x9831ac67, 0xaa976763, 0x1137fa5d, 0x216ed51b,
+ 0xf49f36e4, 0x307536ad, 0x7b912ab6, 0xe7d4992b,
+ 0x6cb839e2, 0xe738fd0e, 0x4d83850f, 0x19bea1ad,
+ 0xcf13e511, 0xa87302fb, 0xdf728dd6, 0xc555225e,
+ 0x8b218a67, 0xe9033106, 0xc6ac27e6, 0x8a1c0228,
+ 0x690f3de0, 0x021dff12, 0x07611de6, 0x9464b011,
+ 0x7d52b05b, 0x4a84d692, 0xb5f00f53, 0x0e6fd0a6,
+ 0x9acddbd4, 0xb06fac11, 0xb7e983c6, 0x32136dce,
+ 0xfa7046f2, 0x13efb5be, 0x0bdffd27, 0xebd6929c,
+ 0x40b0359f, 0x31d2c0aa, 0xdd40ca75, 0x4c841480,
+ 0x5b4ea178, 0x1430bd55, 0x2d498aef, 0x3e4e94ae,
+ 0x86bc8a28, 0x763d9f06, 0x6c39d7c9, 0x1703945d,
+ 0x6473c9bf, 0x84d1acae, 0x0ec39cfc, 0xb74c0a01,
+ 0xd5494e70, 0x30a312c2, 0x4d71a954, 0x34994ab4,
+ 0x2d78e0ac, 0x7df31ad1, 0x59a311b3, 0x80d1b149,
+ 0xaea1d7aa, 0x344040b5, 0xd0b332e9, 0xd2d67887,
+ 0x540eab63, 0x6efe98a1, 0x7a2db758, 0x1f9952b3,
+ 0x0fe071c1, 0x6e8c120e, 0x393108ad, 0xfd85ba75,
+ 0x6392f0c2, 0xf9828e55, 0x10d1a53d, 0xbc1845d2,
+ 0xd2f371f4, 0x2843f3c8, 0x436926f6, 0x29fbf67f,
+ 0xa7419504, 0x82d63361, 0x33e40f06, 0x188d6a5a,
+ 0x0b93d329, 0xb2f04fb1, 0x11960d32, 0xbcfb3e3f,
+ 0xde96ae09, 0xcbb2e1a7, 0xb4e8715b, 0x88aa07d8,
+ 0xeedae5ac, 0x2359d910, 0xfac3cf81, 0x5de4d46a,
+ 0x16c2e0ba, 0x47f689d4, 0xb01ce43a, 0xe0632778,
+ 0x84df3976, 0x34a6d754, 0x97099c03, 0x265434d6,
+ 0x5680c37c, 0x14e98fea, 0x11afc869, 0xf753394a,
+ 0x1288aacd, 0x85c9a6ab, 0x6f1d74d6, 0xd3188519,
+ 0x0004e2c2, 0x9501fc01, 0x75d87368, 0x3f32a716,
+ 0x883b2bfc, 0x8d2e23d1, 0x26ea2cc9, 0x812b50c6,
+ 0x7e0699dd, 0xa2609dd7, 0x7d817f65, 0x1dcbb547,
+ 0x05627651, 0x5a8faab1, 0x6d3dd639, 0x69a50b6c,
+ 0xa715c39b, 0xa30447ec, 0xae24866d, 0x98ecb7c4,
+ 0xf67e9007, 0xd98bb525, 0x9ddc9a5e, 0x3aec4de1,
+ 0x3716ae5c, 0x18acca92, 0xdee13e59, 0x0c416743,
+ 0x816a872b, 0xdfcb07d6, 0xa0d9070a, 0x80958768,
+ 0x8d0a140b, 0xd70bc001, 0x97765bc4, 0x1647488c,
+ 0x1c98a1be, 0xfa22f2c7, 0xf89e2abf, 0x4f386ac7,
+ 0xac0bb70a, 0x6143fe48, 0xdd92f0a3, 0x2394eb52,
+ 0x44deb2c4, 0x6774bf77, 0xf33504b5, 0x229832df,
+ 0x25b5ccaa, 0x61c0ded4, 0x0e321dd0, 0x23526bba,
+ 0xc0cebde5, 0x3e05b81c, 0x9d02d7b7, 0x70970828,
+ 0x2e82eebd, 0x619e469f, 0xe111889c, 0x308ecf3d,
+ 0xff894187, 0xc621c30d, 0x758a6d90, 0x833eea4a,
+ 0xb3b20b61, 0xf015d72f, 0x1a76dfb0, 0xdf6d1a9f,
+ 0x426c1398, 0xc03b134a, 0x8d194762, 0x48045527,
+ 0x06c073fd, 0xbf5eedb6, 0x3459e42b, 0x3139195a,
+ 0x84ee4264, 0x333b082a, 0x32ff34c0, 0xa3dd3d9c,
+ 0x4084514e, 0x22c3349b, 0x2d9ab2a3, 0xb7ced20f,
+ 0xeb0e3142, 0x4e93557f, 0x7a6b53bf, 0xaa58363c,
+ 0xf4bd30d9, 0x0eefabc9, 0x2287fdc5, 0x67eb74f1,
+ 0x9d49a23a, 0xf831a00f, 0xce4216f0, 0xc5490499,
+ 0x971676f1, 0x47d0f868, 0xe5c54a68, 0x758deede,
+ 0x6127f344, 0x59cf592d, 0xbf0235a6, 0xd9d8b4cd,
+ 0x5b8ca035, 0x20688e52, 0x6335de11, 0x12560799,
+ 0xadd7979d, 0x40fed60b, 0x2fe37d49, 0x9ab5458d,
+ 0x7fdf90ec, 0xf6416301, 0xa4d7e8d4, 0x92d37e1e,
+ 0x99b5e81a, 0xf6335b7d, 0x3255cb10, 0x0999efa3,
+ 0xb98a28d4, 0x8750ea40, 0x3a54a6df, 0x6ec3d326,
+ 0x42f11600, 0x920a70cb, 0xa195d10a, 0x61d24edf,
+ 0x1e9a1543, 0x5bdf3ff7, 0x4c99a268, 0xc0ea61bf,
+ 0xe8e48611, 0x91c5798b, 0x2088f117, 0xfb079202,
+ 0x41912fde, 0x68d3c803, 0xf817ee7d, 0x41cbc832,
+ 0x131a5aa6, 0xf1e39d9d, 0xf1bdc2ac, 0x9eaf1463,
+ 0x6d22c66e, 0x883435cf, 0xb3bdf13d, 0xae8f59eb,
+ 0x1c5cdc70, 0x89cafb03, 0xe7c298c0, 0xdd6db24b,
+ 0x14796342, 0x75c21e82, 0x5ee6ff42, 0x7a80dac0,
+ 0xc04748a7, 0x7a6fe22c, 0x8aab3f27, 0xf4344a57,
+ 0x107e3770, 0x8389b238, 0xc32befee, 0x392479f8,
+ 0xa9709f09, 0x035e52e1, 0x53c7b796, 0x880cae3f,
+ 0x849dd94d, 0x96125558, 0xfd748bfc, 0x4da1f887,
+ 0xb4d64669, 0x9a617ef1, 0x3445bc62, 0xc1ba9b93,
+ 0xdee84ca0, 0x375a169d, 0xa6523724, 0xbeb8c86e,
+ 0x8ad25792, 0xd5dcc89f, 0xa8d9e2d6, 0xf52dc014,
+ 0xee6e769d, 0xd911fb08, 0x380474e8, 0xcf1562e2,
+ 0x614e97ea, 0x08966410, 0x4a6cb5a9, 0xc2f71ee9,
+ 0xd748b1a6, 0xba672cb5, 0x8c81de66, 0xdb50636e,
+ 0x603f622f, 0xdb3ea6b4, 0xceec5102, 0xc1f8fdef,
+ 0x5fd3c8f3, 0xb469fca5, 0x9740a37e, 0xfad1d586,
+ 0x8b9deb4c, 0x1f032fdb, 0x407f9cfd, 0xa2c0b3db,
+ 0x56397e65, 0x32d27df8, 0xf499b010, 0x98534f3d,
+ 0x994cdf90, 0xfb64b5b8, 0xfe63c204, 0xe219dfb6,
+ 0x80750a6e, 0x70ab1b84, 0xd3bcbea3, 0x8f43391d,
+ 0x6ed74ee0, 0x646235fe, 0x54448922, 0x9f76a7d0,
+ 0x3a7853d3, 0x41354906, 0x3ac85df0, 0x046c8f34,
+ 0x3d9f7a78, 0xbcd6329c, 0x218eaf53, 0x4dd9dd33,
+ 0x8f6c22fd, 0x7ec91842, 0x648d1dc2, 0x2a76f2af,
+ 0xf4be5517, 0xedee1bd0, 0xff663a4c, 0x450fa927,
+ 0x6da31c8b, 0x75149104, 0x532e712e, 0x18c7af2f,
+ 0xa5eab25b, 0x5a63dbb6, 0x9fa59ff3, 0x45d27103,
+ 0x5b5afcad, 0x77d96118, 0x13e7be62, 0xc0405d8e,
+ 0xcbc7edfe, 0x1be5b0dc, 0x82f2c7d3, 0x7aaecc18,
+ 0x3cd9daea, 0x7564c1ec, 0x86022818, 0x0e19dddb,
+ 0x13ea0b99, 0x0791ff8e, 0xb761a69e, 0x9e311da9,
+ 0xca49f61a, 0xac9f2d85, 0x5165e706, 0x5532cec5,
+ 0xeb6566ca, 0xaff9be6a, 0xee64bdd4, 0x362dca4e,
+ 0x7b29f959, 0xf48571d8, 0xba80de1b, 0x893ce0b5,
+ 0x1bad2f24, 0xc83d3cd7, 0x2cacf46e, 0x5b565715,
+ 0x9c100f12, 0xb7485c73, 0x08a7c844, 0xd8553fe0,
+ 0x3b52ae4d, 0x187ad207, 0x0fb8210b, 0xaf600874,
+ 0x95957490, 0xeccd9cf8, 0xa7a0a100, 0x08a9fa3a,
+ 0xe1b01968, 0x90eb8ef3, 0x9e0ad6d2, 0x74111e46,
+ 0x5879bfc6, 0xa0023e1c, 0x928cc4e5, 0x7d213704,
+ 0xa331dc4a, 0x11bc031b, 0x27d69823, 0x8caf750e,
+ 0x31d46a45, 0x5afba998, 0xe28a716d, 0xb62ff14d,
+ 0x7c1c9b52, 0x0c3826e9, 0x500aedef, 0xca08a104,
+ 0x9be613c6, 0x6a96e0fd, 0x6ca1d218, 0x7d3599fe,
+ 0xc09292b3, 0xa155b810, 0xe0e579c0, 0x78ffd475,
+ 0xf69cf4c8, 0x4aa572b5, 0x619938ad, 0x25dfa8d4,
+ 0x5629ab2c, 0x8057cef7, 0xa72a4c02, 0x2995d6c3,
+ 0x14943982, 0x0a413d0a, 0x540ed42b, 0x29cae2e1,
+ 0x537972ee, 0x2dcb6f3a, 0x4e3bbb25, 0x968057e4,
+ 0x768f0b84, 0xacaa51dd, 0xf459a482, 0x615c1795,
+ 0xb1fe8bb8, 0x6448865f, 0xe51c208b, 0x7a0efa0d,
+ 0x65bf8371, 0x6827afce, 0xc57f30cd, 0xba4399b7,
+ 0x1d0f3e2e, 0x6a5a323a, 0x5aa04b45, 0x5e1dae14,
+ 0x12e753c5, 0xde0f9041, 0x56818890, 0xf2b954e4,
+ 0xd09c4683, 0x20f21962, 0x458394e0, 0x1a16e6db,
+ 0xd076c686, 0x67fe28cb, 0x6bd468cb, 0xff5d9876,
+ 0xc052edd0, 0x6a5c528f, 0x17afc2d0, 0xf1d2eef3,
+ 0x79edf0b4, 0xf3be8055, 0x9fa97abb, 0x613b988a,
+ 0x189a39a6, 0x6f6141c4, 0xe8133b93, 0xb2be7bfa,
+ 0xe8cc4fc2, 0x78dd8839, 0xf043e7bd, 0x90f44bed,
+ 0xe12bacc9, 0xf4a71643, 0x62ad1964, 0x3c64aa98,
+ 0x74a5e3bd, 0xc95f800d, 0xd88691ae, 0x58984ebb,
+ 0xe8cc2a44, 0xb6a0b73d, 0xe5e605ae, 0x83b5b867,
+ 0x7498bd7b, 0x6077679f, 0x7861e1da, 0xef47eb79,
+ 0xfd42b4eb, 0xb20325ac, 0x1f36fd0f, 0x76aba6f8,
+ 0x270b8167, 0x773eb556, 0xe1854ea0, 0x43b840eb,
+ 0xbe7cdd89, 0x4bc092cd, 0x7bf0a8ac, 0xefb71e73,
+ 0xf24d23b5, 0xbfda8947, 0x6948e597, 0xde2900ce,
+ 0x2ae7cee1, 0x720c213a, 0x8e6d2cf9, 0x365fc2a1,
+ 0x0c913312, 0x783f56fe, 0x73b79dc6, 0x13bd5bab,
+ 0xdde6c1f2, 0xedaab069, 0x11a5cec8, 0x9cfed5e1,
+ 0x81c24b3a, 0x7b4468ee, 0xc0adc564, 0x43a875c5,
+ 0x34d0c0e3, 0xd5c7f55b, 0x0a1ea002, 0xecd93c12,
+ 0x2abdba19, 0xe510eca3, 0xd8b3ff67, 0x84e1188a,
+ 0xe01195f6, 0x848bfac4, 0x4f9d924f, 0xe78630a5,
+ 0x4dccefda, 0x253e4964, 0x5cd1cbf5, 0x23c06c98,
+ 0xe70ddb31, 0xc1d1fc22, 0x78e3d775, 0xc1385cd3,
+ 0x0ce45394, 0xd9a1ad0d, 0xc33ffe0a, 0x54f5c14c,
+ 0x60810c42, 0x41ba2159, 0x0f276cee, 0x2df6aedf,
+ 0x4ba323cd, 0x081dab5d, 0x5fb7281d, 0x53dfdadc,
+ 0x198b15bb, 0x1004ed99, 0x3545e049, 0x8612752b,
+ 0x7367c31d, 0xf7260473, 0x2eb23be1, 0x5b06dcad,
+ 0x6e99f3cd, 0x18d685ee, 0x3c26277c, 0x45541aac,
+ 0x7d51f65b, 0x993f72b2, 0xad1f58e9, 0x5c8e81e8,
+ 0x520a79db, 0xb812f0b3, 0x18f048d0, 0x15b8ec8e,
+ 0x76c397ce, 0x7cc5d0e0, 0x39c208b8, 0x5888b908,
+ 0x0314d78f, 0x308a2127, 0xf7dd7640, 0x972dbaff,
+ 0x1f63a1e2, 0x183d334a, 0x20ecac69, 0x42b14535,
+ 0x1c041cd4, 0xefc5280e, 0xa6fd3cd6, 0x7a58e164,
+ 0xfa10df45, 0x68664339, 0x78f9d6f2, 0x555336d5,
+ 0xd56ff3ba, 0x81255c10, 0x51c2e872, 0x08bb765e,
+ 0x7384d59e, 0xbe2ce7e8, 0xe36a0125, 0x098c061e,
+ 0x38e53853, 0x8559dfc2, 0xc383c6ab, 0x8751d637,
+ 0xa31b6c4b, 0x2ef24623, 0xb2d98a7a, 0x4d681fac,
+ 0xee5f2a2e, 0xbcbd0755, 0xe51f248b, 0x643f8517,
+ 0x998012b9, 0x457c8094, 0x748089e5, 0xb0fb4386,
+ 0x1d500930, 0x6ce14697, 0x04604d27, 0xbe4eaab6,
+ 0xecf0dc8f, 0x31a7a93c, 0xb30f0882, 0x0fe952ca,
+ 0x4b82a4dd, 0x3f7fe035, 0x265ed6e2, 0xe3cfb953,
+ 0xf43e3885, 0x86008caa, 0x93161e4e, 0x1f1711cb,
+ 0x0b06cc13, 0x81fbbd31, 0x69781ff6, 0xbf8891a6,
+ 0x4811c80c, 0x5c89737f, 0x4316c701, 0x46c85d92,
+ 0xec10fa68, 0xdacd2d73, 0x914f4f8d, 0xc7cb1a33,
+ 0x205b254e, 0xa7c0f927, 0xd71b5e85, 0x0390e164,
+ 0xd9c6883f, 0xd7111847, 0x1586114d, 0x0e673f37,
+ 0xa5ab37bf, 0xf552da74, 0xac2407ca, 0xaed5c4b6,
+ 0xb7e85ee8, 0x886eae8f, 0xe9eb88ef, 0x29ebe604,
+ 0xd44daea8, 0x22915310, 0x5f8549d1, 0x68e658da,
+ 0xc75cad23, 0xc57e8540, 0xafc42214, 0x3270df20,
+ 0x1bc21ad8, 0xa0ce5cdc, 0x18979ff1, 0xc4230844,
+ 0xa4871239, 0x1c1360a4, 0x22f00edd, 0x4c5711f5,
+ 0x94061516, 0x449158e9, 0xb0172bab, 0x3db64637,
+ 0xfd1467c8, 0xe99e4477, 0x2745c62c, 0x738d61d1,
+ 0x96d3074c, 0x4b7f4318, 0x7ec65bd0, 0xaf527569,
+ 0x5843ebf9, 0xe6944090, 0x78d3f0ce, 0x03f4583b,
+ 0xe9c2de38, 0xdec06404, 0x4dbe8a2b, 0x19312217,
+ 0xc8f5af3f, 0x42d76b0f, 0xd7358d26, 0x2f098718,
+ 0x29de0797, 0x33a318ac, 0xe2fd4fc8, 0xa2088d38,
+ 0xc1d467de, 0x7c78a97c, 0x7db9fb62, 0xaedae2e0,
+ 0xdcdaeb3a, 0x8eb882d8, 0x1ab28e3f, 0x4d3906cc,
+ 0x77fc8e79, 0xd415f3a6, 0xc4aef7ca, 0xb06cda4c,
+ 0x09466b2b, 0x6e725cc2, 0x4368c1f1, 0x5d3e5666,
+ 0xa902a872, 0xea9d9d72, 0x33c486fa, 0x81126e2d,
+ 0x861d0114, 0x983a6640, 0x3c97ef93, 0x7d3bff8b,
+ 0x9e48258c, 0xe970e97d, 0x7775cf4a, 0x6353c83a,
+ 0x1eaf7a11, 0x7bf23127, 0x5e3e026b, 0x45ab8b5f,
+ 0x977e8048, 0xd7801c80, 0x13b57de5, 0x61c0ccae,
+ 0x32ccb558, 0xc2d989e5, 0x535a36b6, 0xa4107fa2,
+ 0x38c154c5, 0x93d3d56e, 0xd08695a2, 0x9a825a22,
+ 0xb7855464, 0xb649621d, 0x50e4e3a2, 0xdc164c7f,
+ 0x90ea2d14, 0xc9ff13a8, 0xfd381e76, 0x0bbb585e,
+ 0x010f3067, 0x59acb73f, 0xa9770350, 0x634a6a8c,
+ 0xdeb65d3e, 0x3ba4bd98, 0x6f069d65, 0x43518658,
+ 0xa35e5614, 0xfa3bd68c, 0x9e49fdda, 0x5052dad9,
+ 0x18ccdb6b, 0x4eabab0e, 0x781975fe, 0x9cc938cf,
+ 0xad306b65, 0xe5b0a79c, 0x723ecfa4, 0x55a021a2,
+ 0x46601420, 0x59878c74, 0xa7081530, 0xcd5a3d7e,
+ 0xd7dea9fe, 0x402f0989, 0x1c5ded66, 0xfef17b6c,
+ 0x4b02847b, 0x86b26c82, 0xd487ef67, 0xd1352624,
+ 0x859bbb2c, 0x5bf20174, 0x7799ed57, 0x45de1f01,
+ 0x95f7acbc, 0xb1ebf7fd, 0xf856d947, 0xb563314b,
+ 0x0cb4ac11, 0xeb972fa1, 0xe09223ae, 0x5dd8b9b4,
+ 0x11ea6385, 0xcc369590, 0xf14743c3, 0x841756f3,
+ 0x9aec5c4d, 0x860e3108, 0x4998a2cf, 0xfef581c4,
+ 0xab54b700, 0x513e5448, 0x917b6beb, 0x4b15fc19,
+ 0x9100bc35, 0x30032eb9, 0x55ef7ec5, 0xf2529cf6,
+ 0xdf074354, 0x9e682fb3, 0xb0aee821, 0x2d51b279,
+ 0xbcc1fdc7, 0xfdc76de7, 0x61ee5cda, 0x6ab71474,
+ 0x114f8c6b, 0x0e3767a1, 0x4cc40a6c, 0x0af9bb29,
+ 0xfebf314f, 0xb02b71f2, 0xbadc325f, 0x2dee96ec,
+ 0x58f07f6c, 0x0f28feb7, 0x14077ae3, 0x6d912f92,
+ 0x6c3d8c31, 0x6e0d6ba9, 0x92ca43ee, 0xb2ef3e0a,
+ 0x400ecb2a, 0xe826eec2, 0xace8d208, 0xd7d4b9b6,
+ 0xaaa020d6, 0x5de84d5c, 0x3d3e4375, 0x8901f8d5,
+ 0xe3098df3, 0x4dd44138, 0x54b96fbb, 0x7b7ba02e,
+ 0x2cb14e4a, 0xb0e45681, 0xb4cbc8b3, 0x550fc1d1,
+ 0xb8c4220c, 0x2c9a8aec, 0x499cdc47, 0x8550c4cb,
+ 0xff37169d, 0xa51f7697, 0x69cd8fed, 0x4c6b6f68,
+ 0x0a90f4b5, 0x66f9a399, 0xa27de0f7, 0xe26bb59a,
+ 0x2ad731ba, 0x6713f143, 0x2bf90508, 0x6d3c7688,
+ 0x680c4002, 0x2650caa1, 0xb7dd3acc, 0xde1d383a,
+ 0x826a14f5, 0xe6873345, 0x1ec3e6db, 0x98f1cd0c,
+ 0x318e25b0, 0x66b4befe, 0xaaabfe6c, 0x42b6efe0,
+ 0xbebc2b31, 0x08ee8e6f, 0x0d6de4fe, 0x2eeb217f,
+ 0x2be8825b, 0x4215fe6b, 0x650f384f, 0x46c4bc13,
+ 0xb32a30b6, 0x2ebb4fa5, 0x7dceefdb, 0x81926756,
+ 0x66bc0c5f, 0xc1a82c82, 0x5ce8db64, 0xb7d03097,
+ 0xcd9664b9, 0x31c6433d, 0x8954438f, 0xc6cf1868,
+ 0xbd94227d, 0x85b74e82, 0x822672d7, 0x2e9a9e3d,
+ 0xa13db18d, 0xf93db5d3, 0x720e4f8d, 0xf3631ba7,
+ 0x274d1942, 0x99d23da3, 0x8e969e11, 0xaef394c0,
+ 0xf79a8263, 0x277739c3, 0x9d07ec40, 0xd063af8b,
+ 0xe1c2508f, 0x0ac4b49b, 0x74ff8ec6, 0xbe9ecca0,
+ 0x9d4ff3e6, 0x2c9ecf44, 0x310633bf, 0x8467904e,
+ 0x5b4c6812, 0x824678db, 0xcc8e5fa8, 0x14341767,
+ 0x29167620, 0x5e659953, 0x791f7a45, 0x476e0727,
+ 0x64722ed4, 0x32450f39, 0xadfc1254, 0xb1af8704,
+ 0x535a5c5e, 0xfff54d08, 0x758c07ff, 0x65375a76,
+ 0x0ed5f170, 0xcb1bd90f, 0x80f13b61, 0x6702fd15,
+ 0x9d4c14e0, 0xb39e54b6, 0xb944955b, 0xb7fd1a32,
+ 0xbfc45d6d, 0x01a2703d, 0x7b2b964d, 0x6847433c,
+ 0x37d20394, 0x82590b4b, 0x11419213, 0xa0256fd4,
+ 0x90359e0f, 0xce086abb, 0x48241e07, 0x0ca2f950,
+ 0x69e83c42, 0xe8fad553, 0x20d083fa, 0xc70f09da,
+ 0x1f56a896, 0xa0930d1a, 0xa6223ef8, 0x5fa0224d,
+ 0x7d0bdc29, 0x947eb487, 0x9279eba3, 0xadb2c854,
+ 0xcc987d85, 0x642312da, 0x4e22c2e5, 0x5b08812d,
+ 0x101d3cf6, 0x0940557c, 0xeaa90e60, 0xb23f68d6,
+ 0x2c2baf7d, 0xaa164b5c, 0xac9aeff3, 0xe1498fd5,
+ 0x9d4fc3cc, 0x8edf37ff, 0x9e005b03, 0xa60d281c,
+ 0xff8e4b10, 0x07960b50, 0xbd4f65fc, 0xf1c1192a,
+ 0x5ea77779, 0xf59e60b7, 0x30c2236a, 0x8e212249,
+ 0x86378149, 0x9d77192c, 0x24b0bd7e, 0x59711d09,
+ 0xf5dbe1a1, 0x432399f5, 0xf84686de, 0xb07b26bb,
+ 0xf9d3d2b3, 0x2bc6c921, 0x778f57ce, 0x3002790d,
+ 0x0cc84cc3, 0x90371b37, 0x5c65688a, 0xfb5c9aaf,
+ 0x875671e9, 0x7a58838e, 0xd8c542b6, 0xc6dd1d37,
+ 0x88a8d9fc, 0x83ebc24e, 0x4a8468c1, 0x3a93afaf,
+ 0xf6f493df, 0x53773406, 0x6ebd35f1, 0x545814bc,
+ 0x2df50375, 0xa4b61d31, 0x1a39dee6, 0x6f572e35,
+ 0x86d63ff0, 0x7c8a4ef2, 0xe0c0d07a, 0x06860631,
+ 0x38736cd1, 0x83605613, 0x927b4473, 0x08fbb7f2,
+ 0x3c8f9c53, 0x0b386ce7, 0xa10b3cea, 0x69808283,
+ 0x8d7d8179, 0x636d5076, 0x30570655, 0x1516c013,
+ 0x02052701, 0x70921316, 0x59ccf40f, 0x7434aa35,
+ 0xf23e7585, 0x16b4f774, 0x5afdea3e, 0x7ae7e117,
+ 0x18258ce7, 0x7bdc03f3, 0x0bb0e87f, 0x1c19d3f2,
+ 0x7714b0e2, 0x12827cb2, 0x210fc1cc, 0x2f63d58a,
+ 0x6f63ce81, 0x3e02b0d5, 0x6171d5fc, 0xaf57297b,
+ 0x7635f615, 0xe0dcb69f, 0xa25c93b6, 0xf61fd97f,
+ 0x31fa1e43, 0xd63c6b53, 0xf999eb72, 0x6e66865b,
+ 0x57502eb7, 0x5709355e, 0x382de69f, 0xa887e7fa,
+ 0xab5cb1cd, 0xac4d93d0, 0x71ff3b14, 0x079651d1,
+ 0xf562f181, 0xc3b19d8c, 0xf84a374d, 0x1f08120b,
+ 0xdae40659, 0xbe13fb85, 0x6f73d537, 0x59b0ae47,
+ 0x33b7610c, 0x5eb0ee71, 0x9dad6f42, 0x00c7cead,
+ 0xfc5bb288, 0x3dfa08d2, 0x71a10523, 0x9c47fd94,
+ 0x06402eda, 0xddda20fb, 0x0bbffdcf, 0xf4732d27,
+ 0x952e898a, 0x06ae838f, 0x59dbb23f, 0xc551a56c,
+ 0x404cd8ac, 0xaeee3e31, 0xc7ce5d65, 0xe6a1385d,
+ 0x2f3d819b, 0xb1a20788, 0x04a4c43a, 0x00522758,
+ 0xedd29ec7, 0x625b4b7c, 0xd2bc8984, 0x7847e80f,
+ 0xad281af9, 0x75d98391, 0x4866cbf4, 0xfe8d596b,
+ 0xa72eed1d, 0x6ce082be, 0xef7fcd9d, 0x760df468,
+ 0xe66cde2e, 0x71d5e574, 0x25b6d653, 0xb4ad6cdc,
+ 0xa9b958cd, 0x894aae63, 0x30b9c3a7, 0x7b245164,
+ 0xf74711ed, 0x8cd46730, 0xeb7fbd7b, 0xd325ec95,
+ 0xa5b39497, 0x2c99aa20, 0xf8499df3, 0x99ee6b13,
+ 0x043755ac, 0x31a19f4e, 0x1c115423, 0x3939a900,
+ 0xf472fe41, 0x33a528ec, 0x013248e3, 0x0e99668c,
+ 0xdff128cd, 0x793c601d, 0xcdc92d2f, 0xcff133e4,
+ 0x17e8231a, 0x18880710, 0xda2ca8e6, 0x02783d3b,
+ 0x7904d279, 0xb4b24eab, 0x5a7b4b94, 0x00066175,
+ 0x0478afdc, 0x74027171, 0x0a2ab928, 0xb830b8e8,
+ 0xc484bebe, 0xebcddeb9, 0x0bcbf579, 0x150266d0,
+ 0x816889ef, 0xe2fdf079, 0xa100729b, 0x5e83bab4,
+ 0x135a825a, 0x7e2aa571, 0x8579a179, 0x712d4a50,
+ 0x8246cdb4, 0xb0d3766a, 0x7d09f18e, 0x0e994508,
+ 0xcce7e62d, 0x109badf9, 0xb6efb156, 0x5850da7c,
+ 0xf62ed484, 0x7f20a5f0, 0x11cc2e7f, 0xa62eac0c,
+ 0xae394940, 0xd5a8f0ae, 0xe6323e8b, 0x7129531c,
+ 0x830137e4, 0x7033f471, 0x2696add1, 0x528f7df1,
+ 0xe7e8124a, 0xd42f86cf, 0x04cf385f, 0xed813cf5,
+ 0xcd1c2b77, 0x43143b93, 0x8f95050a, 0x0dd81f3c,
+ 0xf7279742, 0x7d1af038, 0x66067924, 0x5ea07b30,
+ 0x82faf2c0, 0xf54df0e6, 0x0f2e73c5, 0xdd793a4d,
+ 0x0629310c, 0xb5184717, 0x4b857506, 0x1f16c741,
+ 0xe3eea26d, 0x74a1c05c, 0x3c182ee5, 0x6fba03c7,
+ 0xec23f214, 0x717156aa, 0x82182fd2, 0xab6c81f6,
+ 0x6a6e640d, 0x1c1f36ba, 0xa159f43b, 0x814d5a34,
+ 0x2bc4c806, 0x42015304, 0x300365a9, 0xfb08510c,
+ 0x46b953cc, 0x6311bbf9, 0xb0445da7, 0x2c297c0c,
+ 0x58fd0492, 0x839a4f8a, 0xc447eb0f, 0xbe4240e2,
+ 0x51d82a3f, 0x1accd708, 0xccd437b0, 0x846c8d0c,
+ 0x63bf7c1a, 0x74eefbb9, 0x19945107, 0xf14a86db,
+ 0x780ea619, 0xfeeaa89a, 0xc990b35d, 0x1161b843,
+ 0x07da06ad, 0x5128d436, 0xe9310071, 0x4110e14b,
+ 0xcb0a7975, 0x25c167a0, 0xdc5a8f28, 0xe4084cdb,
+ 0xe6aed49d, 0x6c331afe, 0xf11d06ff, 0xe62a3ca0,
+ 0xa9ff7fa1, 0xd2db46d0, 0xb495e01e, 0x3a670d19,
+ 0xa0b6eed4, 0x30418359, 0xddd7bb00, 0xafcd85b0,
+ 0xabe12164, 0x1c8416e8, 0x3c809167, 0x4bfe5437,
+ 0x6086566d, 0x6e710983, 0xaf310d02, 0x7bdff002,
+ 0x7e0b3be4, 0xac566edf, 0x6bf7c0b6, 0x0ff57c23,
+ 0xda734e9c, 0xa869b285, 0x14bcb348, 0x07c41ba8,
+ 0x19455136, 0xef1313ae, 0x23c2ad1b, 0xd0f32243,
+ 0x92efefc4, 0xf15ae24e, 0xd15582b2, 0x3fc8c6e3,
+ 0x7ae972e3, 0x035c7b4f, 0x0d76252a, 0xf7753574,
+ 0x9113fd49, 0x3030594f, 0xea0908bd, 0xe39b466c,
+ 0xa5ba9434, 0xfd2968c3, 0x1ee4e46b, 0x60335567,
+ 0x32ae6e52, 0x8f224623, 0x8c9147c4, 0x2cf9a99d,
+ 0x7bb5507a, 0xa950df84, 0xde970a7b, 0xe22a20ba,
+ 0xba842593, 0x01b64148, 0x1970b848, 0xa4446941,
+ 0xafedfd1e, 0xb414bd13, 0x43df4559, 0x86ef4431,
+ 0x3eeedc18, 0xa8dcf3ac, 0x09899793, 0xb9781bdb,
+ 0x88be94b3, 0x0dbe648c, 0x0aebc10e, 0x477ea54a,
+ 0x36691e37, 0x290aa2b0, 0xd0d7e4d8, 0xbc426f43,
+ 0xcda9708f, 0xc0a83bc2, 0x201ecc21, 0xf70e22dc,
+ 0x964ed4f6, 0x59ca6847, 0x26f4605f, 0x0c9c01b4,
+ 0x1b266424, 0x693f37b1, 0x5b5a268d, 0x5f164776,
+ 0xfd8a78a6, 0xc2586266, 0x503ec9a1, 0x7b004e83,
+ 0xacaa9245, 0x64330576, 0x407438b0, 0x4684b70f,
+ 0x957a1131, 0x4b3024a9, 0x001d618d, 0xe91251d9,
+ 0xa56276ac, 0x71ab8637, 0x1b22d969, 0xd8b7b4b4,
+ 0x56d4ca50, 0xbffe4b4e, 0x9781ce53, 0xd898d2bd,
+ 0x8f896ff1, 0x2ce7c1ae, 0x8fc2aa62, 0x1dc4a026,
+ 0x261605e4, 0x484a9c99, 0xbe180435, 0xd5f9b147,
+ 0x1fba5361, 0x473e5aca, 0xf73cdca1, 0x4f5debc5,
+ 0x75508812, 0xdf3de403, 0x7ee2444e, 0x6daa916b,
+ 0xeaa32b74, 0x04d00ebe, 0xb3aec823, 0x448d7291,
+ 0x7efe5ef8, 0xfeb1b154, 0x72c7922b, 0x31fcc99e,
+ 0xbdf3f21c, 0x974a2b83, 0xc4876af1, 0xead3764b,
+ 0x77fd45e9, 0x8e6d3fd0, 0x5e9d5a44, 0x6c07e6bf,
+ 0x524917a5, 0x1e2d4b7b, 0x0ff5947f, 0xebab6cf5,
+ 0xef9fa9e9, 0xeb4dccfe, 0x91b1874d, 0xb65f533d,
+ 0x6114858b, 0x1dfb91ec, 0x64bc1885, 0x240142ed,
+ 0x1af872e3, 0xe912bd28, 0x1ea71791, 0xfb810585,
+ 0xf9f101cc, 0xe41fbd1f, 0xcb84c1bb, 0xfea084a5,
+ 0x18af0309, 0xff2da585, 0x8766e65f, 0x599f77a2,
+ 0x24f42390, 0x56a970fb, 0xefb4bbb3, 0x3786fb64,
+ 0x72f5456e, 0xf4305205, 0xf6596aee, 0xdcdb7218,
+ 0x58b76596, 0xe55929ef, 0x94d1d1a6, 0xe28eb56d,
+ 0xb9378086, 0x3c7bf722, 0xe4e048c4, 0xa5cc9dd2,
+ 0x73f57e62, 0x5814ef5c, 0xf71b8adb, 0x6ad8d467,
+ 0x0f983fb5, 0x87d273c8, 0xd9673604, 0x5a890223,
+ 0x48f16ada, 0x4039a9db, 0x0817705e, 0x00dc054c,
+ 0x9774d27d, 0x50666e78, 0x2599a963, 0xbd9ce049,
+ 0xf9ea8308, 0x32afae45, 0x4c79ed36, 0x671ae018,
+ 0x2be8b761, 0x57f3a0a3, 0x2534fd06, 0xe7f3a312,
+ 0x80f3dbeb, 0xb4f9923c, 0x273870e5, 0xad2c8da2,
+ 0x298c70dc, 0xb43aaf4f, 0xaab12c16, 0xb3d91988,
+ 0xb77b828c, 0x5ec9680c, 0x8fecd15c, 0x40ed5c2a,
+ 0xc63a4df7, 0xf4c176be, 0x2d9e13eb, 0xd634b762,
+ 0x2a3d276d, 0x34efed23, 0xda424c0a, 0xdc4e19b7,
+ 0xeb1ed713, 0xce39cb04, 0xe7e83936, 0xe4ca1e69,
+ 0x71cae859, 0x5996507b, 0x0c4bd960, 0x279d0678,
+ 0xa7f2ebe3, 0xbaf43fde, 0x06283487, 0xbac38dbe,
+ 0x05bfa8fe, 0xee232f80, 0x1d7f0b9d, 0xd2bb77cf,
+ 0x574bc488, 0x86a9466d, 0x24e74dcb, 0x93d8b185,
+ 0xef761788, 0xcb20e8ab, 0x079bf819, 0x810db08b,
+ 0xbe08aa4e, 0xd34a902e, 0x6fa74fc7, 0x80c8b5ea,
+ 0x812393b2, 0x54718e0d, 0x84ad6a45, 0xd17acdfa,
+ 0x9ec14467, 0xcd9204ce, 0x75ee14d8, 0x87c483da,
+ 0x13dfae2d, 0xa3d546f9, 0x3a5ff114, 0xfde3d600,
+ 0x4dc6634c, 0x8f8677cb, 0x7221efcf, 0xf5e44250,
+ 0xf92c1ce8, 0x1391f7ca, 0x9e6392d6, 0x7c9242c0,
+ 0x51a00eb1, 0x2a3c6e7f, 0x184086ad, 0xbb253371,
+ 0x1c643fa0, 0x941984ba, 0x9553df5c, 0x059aef7f,
+ 0x75da71a0, 0x207d221b, 0x02f81b21, 0x0b4a2af5,
+ 0xf1634f15, 0x35272791, 0x1cefda58, 0x468bf621,
+ 0xc18a9014, 0x606794e1, 0xb9249e52, 0x776e1ed9,
+ 0x1b650aa4, 0xd3594576, 0xdd9e73b6, 0xca2922ab,
+ 0x7df5c7ca, 0x44577765, 0x8707d8c1, 0xa126dfbf,
+ 0xc3b20bff, 0x934a56fc, 0x168a8d9e, 0x85b1f081,
+ 0xef1a4fe4, 0x5c0ddb87, 0x9db352a4, 0x39705f67,
+ 0xe95d82b9, 0xbe94a745, 0x6fef59eb, 0xd71398ee,
+ 0xeb99b4a2, 0x5f323310, 0x5370b06b, 0xb8ce274b,
+ 0xa9c4765f, 0x6ca93643, 0x6f67de35, 0x39cbf66a,
+ 0x0e21e2a2, 0xa0f8dd57, 0x92f4c319, 0x7aef37f9,
+ 0xcf40caf1, 0xb9e0a462, 0x894084b7, 0x1f6868de,
+ 0x82c448e2, 0xc7d18543, 0xab9dbe93, 0xfa1c5863,
+ 0xe09bb300, 0x89ca6894, 0xce8e2f18, 0xaabd3ffe,
+ 0xd2a323cd, 0x14f64d84, 0xb9f583bf, 0x501f4769,
+ 0x4e1ee7f4, 0x3e15cfa3, 0xfe38c1a4, 0x52885324,
+ 0xa13f64ca, 0xa4cf90a6, 0xa208d236, 0x9701ab9c,
+ 0x1b5969f9, 0x549764a1, 0x14d1456f, 0x645be44d,
+ 0x1171c2e1, 0xe5f9e266, 0xa8bc78a1, 0x05216d19,
+ 0x108028ed, 0x518c22a5, 0x581fe7a8, 0x07cd9720,
+ 0x0ab93b59, 0xb887ee7c, 0x762400ed, 0xd2ef9fac,
+ 0xa1d30e57, 0xb7eea0f9, 0xed99e0ea, 0x59a73db4,
+ 0x7c8d3a01, 0x1a9bc9fd, 0x2c9c5415, 0xb6a4585b,
+ 0xad135fb6, 0xc3fcc9dd, 0x3f028526, 0x4400eea2,
+ 0x7515ce24, 0xcaffcd58, 0x3c0ff735, 0xe95ecdce,
+ 0xf2f065b5, 0xef13ec63, 0xdafcee4b, 0x5c3e1fb2,
+ 0x16ba90e8, 0xcac20da6, 0x052eb63d, 0x1a528b5a,
+ 0x3f2590ee, 0x1ff396e1, 0x09563f70, 0xe97ed613,
+ 0xad032d48, 0x04b5851d, 0x0fdb91e8, 0x86e9166f,
+ 0x6d4561a0, 0xe0311d4a, 0xc6b2011d, 0x32781edd,
+ 0xd9d2265f, 0x7b70c422, 0x3c31b7b0, 0x4437e63a,
+ 0xccb6ce70, 0x6f77546f, 0xc0140afe, 0xb47aee63,
+ 0x7dc54822, 0x57f55f93, 0xafa3efd6, 0xc6e98616,
+ 0x5e9a52d7, 0x8ff63366, 0xa24f7551, 0xd5b7bd2b,
+ 0xd3fcfdb7, 0x0ea95c38, 0x0ea224be, 0x4292c2fd,
+ 0x4c9cfa2f, 0x862dbdb6, 0x08e28299, 0x3dfe9f49,
+ 0x5c553611, 0x8488d3dd, 0xa0e268bc, 0x39ad41fe,
+ 0xd4b39bd6, 0x40fc7809, 0x638c1464, 0xb7dab796,
+ 0xcb1c895c, 0xb8e2b8b2, 0xd3c35e5f, 0xc458516d,
+ 0x532b6d94, 0x8b62a506, 0xdaeb3ce2, 0x98ea960f,
+ 0x346cad70, 0x9e0d4a26, 0xdbebe48b, 0x4016fcf5,
+ 0x201f8b23, 0x7134d426, 0xeee3d183, 0xf481d91c,
+ 0x02d131c0, 0x3f0c06c3, 0x47d86074, 0xbfae4cfc,
+ 0x6e7394ee, 0x0d857b1d, 0x571ad1ed, 0xbe9f25e7,
+ 0x2892cdbd, 0xfcaca0b4, 0xfc2e9a4f, 0xeae2b5e3,
+ 0x263335b0, 0xf749f811, 0xed1ab509, 0x54f94255,
+ 0x66b5688a, 0x6c9dc695, 0xaec8aabc, 0xdfb4c65d,
+ 0x505b7bf2, 0x1ac9fcee, 0x8f3e0574, 0xfb35652b,
+ 0x27cb27c9, 0x258f0c1d, 0x9edd63de, 0x0c64f545,
+ 0x0c6652d2, 0xf63a9b36, 0xcd1b3fe9, 0xabd04f93,
+ 0x2d1baad8, 0xf064bfea, 0x068d4817, 0xb5cdd2ea,
+ 0xcd4fe633, 0x97f6b9c5, 0x2feb03ab, 0x8b88487f,
+ 0xf9b670d4, 0x3a04bc9e, 0x8c1ad2d0, 0xa8edd189,
+ 0xd5a53d78, 0xabc784e6, 0x16341395, 0x54c257c6,
+ 0x50103c7e, 0x64a11850, 0x228efea2, 0x9d0e61f5,
+ 0xb2d2c64c, 0x401365a1, 0x7605affa, 0x95e05eba,
+ 0xef3df857, 0x84ff300f, 0xd615eb03, 0x37e011a0,
+ 0x5cdfb8b6, 0x60121de2, 0xd0939da3, 0x33970d90,
+ 0xc8702165, 0x80c49887, 0x74d8a293, 0xbd204ffd,
+ 0x4e4545d7, 0x242c6279, 0x2b6e8807, 0x84d88cbd,
+ 0x02bc378e, 0xc40a8a50, 0x638ff7af, 0xa3568fc5,
+ 0x0417c94d, 0xc693decf, 0x15c451f3, 0xe5b9ecf9,
+ 0x30291491, 0xe563af2d, 0xe29aaeff, 0x72c3480b,
+ 0x04ed6ac9, 0x412aab0a, 0xb5214cdf, 0xdd3d233f,
+ 0xdb0cc4ae, 0xb84f3dde, 0x601c3fc3, 0xc436c24f,
+ 0xbaf43703, 0x976e740d, 0x849c9b3b, 0xdb39aa37,
+ 0x3602986e, 0x5ccfd857, 0xc8c75a82, 0x3a2e21fd,
+ 0x289380dc, 0xee5ac4b7, 0x9999bea2, 0xdffc0fe3,
+ 0xb4615380, 0x33256e38, 0xc14c0797, 0xde74d640,
+ 0x01192ee5, 0x336eddaf, 0x7965b89d, 0xbc6be382,
+ 0xc8b06b70, 0xbf59e3a6, 0xe1285c45, 0x119a60a0,
+ 0xb15e8de1, 0x48f941f4, 0xca4ecc1b, 0x38e390ad,
+ 0x254568f8, 0xa7f4a54c, 0x54f4e1ae, 0xcdcf2e77,
+ 0x3da82752, 0xd63fa8e1, 0x3dc6bdea, 0xd6d3d0bb,
+ 0x94f8bdbb, 0x31bae4ad, 0x6f0d285c, 0x6b8ea60b,
+ 0x93f14e91, 0xbb33520c, 0x1a8734e6, 0xc4c820fb,
+ 0x149ce77f, 0xb8521586, 0xcfe438fd, 0xa90b303c,
+ 0x19f5c7fc, 0x8c2b6f72, 0x9fcf3fb7, 0x2ac6e6c5,
+ 0xf00b9aa4, 0xe5904430, 0x2fa65ae5, 0x9b1febe8,
+ 0x16f83027, 0x68099b3f, 0xfc277f32, 0x93e3f154,
+ 0xde6d60b7, 0x61f4c9b5, 0xbe21c580, 0xf9d59432,
+ 0xa8e5b9b7, 0x13fefa47, 0xa0ff5b0e, 0x7f8481ae,
+ 0x2d347a70, 0xb6182d4d, 0x57525668, 0xb1ecf7ca,
+ 0x2cc60e33, 0x08c1ffc1, 0xe66249f0, 0x16b8cd8d,
+ 0x87ec062e, 0xc03f84bf, 0x405156cb, 0xeb9e17fe,
+ 0x4af57fd2, 0xc47d0917, 0xc2be80b3, 0x6548d767,
+ 0x9aeb2bf6, 0x3305e040, 0x7846572c, 0xd1902940,
+ 0x381dafbe, 0x25fc51ad, 0x1edc3187, 0xa3cba5e4,
+ 0x6e89d176, 0x0199acdf, 0x75cdcc3f, 0xded2d291,
+ 0xc12dc81c, 0x7c4b3884, 0x47becbae, 0x3e22c228,
+ 0x8550e559, 0x3a466929, 0xc43ce29f, 0xc9788cff,
+ 0xc4277795, 0xe724019a, 0xfe918df0, 0x2c6abfbd,
+ 0x7fd46dd5, 0x1173931e, 0xc70b0a5f, 0xa6bb739e,
+ 0x532aaba2, 0x9a8daa32, 0x5377c4ea, 0x023362ad,
+ 0xfd2a13e8, 0x21ca1840, 0x018d0b65, 0xd48d0238,
+ 0xee2eec42, 0xd8a094e3, 0xaf3440ed, 0xf2978c98,
+ 0x78677e8c, 0xe0892ff1, 0x6a7b0908, 0x48e8af87,
+ 0x2f7cc714, 0x0955da2f, 0x8b3e394d, 0xf840a07c,
+ 0x303afc53, 0x3c5e8540, 0x773ab507, 0x3957863b,
+ 0x4c79fd2a, 0x7f4b061d, 0x4b5dcc77, 0xffc8486e,
+ 0x9f2b41a1, 0x0b9acba3, 0x933e99bf, 0xb8dc56b4,
+ 0xfd1cef1b, 0x2c1cc2fc, 0x5406f187, 0x621624a4,
+ 0x36f04a05, 0x0b480751, 0x92a6ad1f, 0xa6f501de,
+ 0xb084d798, 0xee59d723, 0x142e94e3, 0x078cb4e2,
+ 0x6774027c, 0x76d2a25f, 0x0339be31, 0x49a5ddac,
+ 0x902ebd98, 0x4a728038, 0xc2878025, 0x95921373,
+ 0xdfc756fc, 0x8ed90103, 0xc600305d, 0xb8ed2922,
+ 0x54ec5f5c, 0xe2df9456, 0x24d2fd98, 0x3f53b5e4,
+ 0xd9e625fb, 0x5e40c264, 0xc6ff440e, 0xf5c0b1bd,
+ 0x6dcc8367, 0x8d0e66ba, 0x0f079314, 0xfca849bf,
+ 0x3a742c47, 0x3181071b, 0x1289cc30, 0x8867d976,
+ 0x5c3b9c85, 0xcf545291, 0xf23bf26e, 0x1ddab70f,
+ 0xb161bc53, 0xe00b5225, 0xeb5facd3, 0x2f96b099,
+ 0xad9bd959, 0x9fbd9635, 0xb411a275, 0x761fea3c,
+ 0x1d24e4d3, 0x01ce799c, 0x263cdaa1, 0xc45d1d82,
+ 0x5f47ce3b, 0x35390b7e, 0x8ea3c6b4, 0x19f538e9,
+ 0x8e53a982, 0xf97a87bf, 0x62255b4a, 0x194f20da,
+ 0x1b204209, 0xd9d7d195, 0x71839726, 0xeacc1b72,
+ 0x58dfbe91, 0x6bf2cff8, 0x4bca0864, 0xa93c0dcc,
+ 0xfcf731c8, 0xcbb05fd4, 0xeddc9d10, 0x3786774d,
+ 0xab89c6a8, 0x526d854e, 0x9da98f0e, 0x3ab13b32,
+ 0x855de1eb, 0x4798de80, 0x8891bf49, 0x8ac4674b,
+ 0xbca6b6d1, 0xe8005d76, 0x970e661b, 0x3f27a6c2,
+ 0x2d0d980e, 0xbaaab7c0, 0x09eff43d, 0x2d628f05,
+ 0x4fed0c71, 0x5f04d381, 0xa5b8ae36, 0x01b9e370,
+ 0x8eb62956, 0xd4be5760, 0x915a6790, 0xd82ba4d9,
+ 0x8e597ba0, 0x70dd7546, 0x293f4b5e, 0x9429f10e,
+ 0x38d23258, 0x4ec7e258, 0xff6d50d8, 0x461b97a7,
+ 0xc97c89bc, 0x8be38744, 0x810b6988, 0xfa6ac616,
+ 0x8e7e077d, 0x54d01139, 0x1170979a, 0xfb693b50,
+ 0xe1ecc0dd, 0xfb4d248e, 0xb83230f8, 0x2c2709ee,
+ 0x91f4795f, 0x9d7a1b55, 0x7f16af2a, 0x1f86acc3,
+ 0x4940e906, 0xe713b1e0, 0x574c3ffa, 0x50c918ba,
+ 0xae9042e6, 0x43470460, 0x9e99c336, 0xa74da7d2,
+ 0xc67e0682, 0xa1e8e4e2, 0xd3cad19e, 0xd5ba8efa,
+ 0x6cab7f82, 0xf696495a, 0x463383c7, 0xb379e7a3,
+ 0x973cce82, 0x9ae3a0a6, 0x7bad9106, 0x3889cc68,
+ 0xa5ce5306, 0x153d7346, 0x1483cf98, 0x77abe050,
+ 0xab7c1290, 0xbe290421, 0xc415efbd, 0xbcd8a4fd,
+ 0x1793f315, 0xf75e64b1, 0x8c04571b, 0x9972f58d,
+ 0xe7711e83, 0xf3f5c1b5, 0x7b1d71b9, 0xca206cd5,
+ 0x69cf448e, 0x2cf6071d, 0xe850d34b, 0x33a96494,
+ 0x2a3fe814, 0xc11023a1, 0xbb11230e, 0xd304b81b,
+ 0xb6a9dfc0, 0x4068b472, 0xf85bed8f, 0x03bb2e1f,
+ 0x9e7b3cfb, 0x472516fa, 0x228da936, 0xfc61d107,
+ 0xb6540f05, 0x7a629ce5, 0xca7d1270, 0x4c0f6252,
+ 0x0bb5e656, 0x9de79324, 0x39944d8a, 0x36e744fd,
+ 0xfcf6f8de, 0x0d8a0c30, 0xfa1e1af4, 0x40665448,
+ 0x28b90a7d, 0x1b57cf74, 0xf7a2ff20, 0xd05f0a8d,
+ 0x19087bb5, 0xddc47201, 0xcbc3f88e, 0xeabc21bd,
+ 0x24add3d2, 0xf2809ca3, 0xb16d4ec8, 0x0de17a29,
+ 0xfc709ef0, 0x658fe45f, 0x5248265b, 0x3a182f23,
+ 0x01462119, 0xde454c30, 0x65c1f7d9, 0x9e9f3e96,
+ 0xf2a6153d, 0xe57a3487, 0x93dabef9, 0x3c4945c4,
+ 0x5fa3a54e, 0xb0633694, 0x435ccad9, 0x77f81678,
+ 0xfced6b28, 0x527bc7e9, 0x420e5136, 0x7a1ec85e,
+ 0xb989aff2, 0x16f84d65, 0x6eedb0d9, 0x0a6d3632,
+ 0x15da7ddf, 0xe3c1372a, 0x68369fc5, 0x89841fcc,
+ 0xead4f084, 0x208bb162, 0xa646031b, 0x6f4a8621,
+ 0xa202f470, 0x83b33140, 0x3f5e1e90, 0x66f8096c,
+ 0xac529236, 0x98f294b3, 0x92facc63, 0x95d065f0,
+ 0x9267721a, 0x16d49767, 0xc6da6f9f, 0x5af873d1,
+ 0x879fa294, 0xe254b2f1, 0xbee6cd9b, 0x95507f8f,
+ 0xcf8f7874, 0x27a6dfea, 0x7dcc5e88, 0xcbd3efde,
+ 0xe1185367, 0xd943882d, 0x491bc418, 0xa0bc954f,
+ 0x6b4dd4d2, 0x576322d8, 0xf182116d, 0xe1331764,
+ 0xac279fc3, 0xa1373af6, 0x945c84bb, 0x5bffd717,
+ 0x1a0d11e3, 0x9f93aa15, 0x30ce3d84, 0x6357769f,
+ 0xb8d04350, 0x305a834c, 0x621099c8, 0x1983393c,
+ 0x28de7fb3, 0xcdf2902e, 0xd59e4aad, 0xa55a2b27,
+ 0x85787263, 0xca97d1ce, 0x68b3356e, 0xff6ee05e,
+ 0xe65ffef7, 0x5a0e6e3d, 0x99a7035a, 0x8fcfd982,
+ 0x2f7ae752, 0x0c1a2908, 0xad363223, 0xcc0177ad,
+ 0x711b94fe, 0xb7239481, 0xc19a8ac3, 0x50817d66,
+ 0x78882a19, 0xa66636e2, 0x1a18d180, 0x00da9eee,
+ 0x034f487d, 0x45b8e0a6, 0xffd4b3ba, 0x323f19c1,
+ 0x7e3e48ef, 0xeb831103, 0x09fbc414, 0x487be711,
+ 0x1fc1db81, 0x8217df9f, 0xe4abc57e, 0xc7f20bc8,
+ 0xdf35659b, 0x0093653f, 0x46b11f7a, 0x971e4cd2,
+ 0xc1050d9f, 0x72c6531b, 0x0e0e83ea, 0xeb2409cc,
+ 0xc69c2d7d, 0x355bd4b5, 0xe7346e94, 0xa7773e69,
+ 0xcee8514e, 0xceaef088, 0xd1d53863, 0x2c730e7b,
+ 0x417d137e, 0x9b8dc4be, 0x3d4d85a9, 0xf303cb94,
+ 0x15a222ec, 0x59a47f5e, 0x7fdd01f5, 0xedd28a1b,
+ 0x7f9a8c55, 0xd156ee8a, 0x87b2df46, 0xcb5c45b5,
+ 0x5f2a5f93, 0x0a9d516e, 0xeb6eb6a8, 0x8ac779b1,
+ 0xf8f00d55, 0x8d7266fd, 0x24a7b721, 0x9f193e0b,
+ 0xe6cf919d, 0x14a8ea29, 0x7fad28d1, 0xb1be27f2,
+ 0x221d72ef, 0x5ee3e088, 0xaa9ebd02, 0x81da0def,
+ 0xc10dc766, 0xaafd42d1, 0x0b0fb49f, 0x6b6bf26f,
+ 0x261a66e0, 0xbff6247a, 0x705ba10d, 0x07ee0461,
+ 0x0e5e60ec, 0x45b0b7dc, 0x95d384c7, 0x9e22215c,
+ 0xb8e536c1, 0x16cd182b, 0x310281aa, 0xb145c344,
+ 0xb65ebf94, 0x7e7a44b9, 0x48b9749e, 0x177392e4,
+ 0x04152095, 0x21d5b6d4, 0xc7d28ba4, 0xe4616102,
+ 0x7dc780d2, 0x42ed815e, 0x7b3cbe4b, 0xf78be42e,
+ 0xe7de6c47, 0xca5bdf5c, 0xbcab5322, 0x145be905,
+ 0x23516790, 0xed4f3a20, 0xf066de18, 0x36830cb7,
+ 0x834a5f15, 0x9618d294, 0x7206f2ae, 0x4feb2f08,
+ 0xa34042ec, 0x28e6ae40, 0x6d98e42f, 0x49f99f70,
+ 0x2f229dc9, 0xe782d396, 0x1ed636bc, 0x9e9ce45e,
+ 0x77f34517, 0x51a7bc32, 0x43805add, 0xd778a9aa,
+ 0x9f5bd5c6, 0xedba1377, 0x17f0e2dc, 0x4d84d371,
+ 0x6e422058, 0x64d7982e, 0xf046a2e9, 0x433f0351,
+ 0x3b3e1e0d, 0xf81f0b74, 0x20c09528, 0xca17c06d,
+ 0x831da66c, 0xe527f162, 0x96972110, 0xa8a7be13,
+ 0x2f0d9c70, 0xeee698ab, 0xad1c6abc, 0x7c96fc24,
+ 0xd399a69f, 0xac7fc485, 0x26156837, 0x27dc269a,
+ 0xe44b4cdd, 0x869e7ab3, 0x379c685c, 0x063d4c22,
+ 0x22e65723, 0xc64ea353, 0x5c256aee, 0x8a7935ba,
+ 0xbf3c8aab, 0x2e9abd9e, 0xbb3943c1, 0x2837df3d,
+ 0x0f19f7d3, 0x65938891, 0x15fde105, 0x38e8bcbb,
+ 0x5f4e5997, 0x287385ad, 0x4eaf5516, 0xc3700128,
+ 0x0b50a691, 0x11ec0611, 0x408be3fc, 0xe7638169,
+ 0xb994d9ed, 0xa8d9356f, 0x53eefe5f, 0x8a111522,
+ 0x6b068b63, 0xceced4b9, 0xafd4faee, 0x3884d599,
+ 0x34b5985b, 0x0c82e13f, 0x59215ff7, 0x911043ed,
+ 0x5e5dae2e, 0xe5843435, 0xd9474869, 0x350281aa,
+ 0x2ad158e8, 0x7123896f, 0x3eaf8c9e, 0x99b90f09,
+ 0x802740c3, 0xb8e665c9, 0xd0f5f529, 0x126b23b6,
+ 0xe208365d, 0x38cce937, 0x8a129e3d, 0x78db76ca,
+ 0xf5d20736, 0x2ef6ade8, 0xdd6d9dde, 0x372baa43,
+ 0x9bcd10dd, 0xd1b7f48a, 0x8431e624, 0xd5979b17,
+ 0x7bc2642d, 0xd2186b5d, 0x5a098368, 0x1866ce66,
+ 0x0149a8be, 0x0b63f195, 0x8f95369f, 0x4d362586,
+ 0x444718d4, 0x93a18a6b, 0x94cbb34d, 0xff0c20a5,
+ 0xb8d9ac40, 0x26969e98, 0x2f0d60ac, 0xe8ef3b88,
+ 0xd20c7233, 0xb1c5f1f4, 0x48706a33, 0xa1b5909d,
+ 0xec661a87, 0x7ff36756, 0x95bdbc8f, 0xfee2dfdc,
+ 0x0460ef1e, 0xb387245c, 0x55a2d182, 0x2dcd0940,
+ 0xe99e299e, 0xd4199d96, 0xc62203e7, 0x90212850,
+ 0xf6da62e8, 0x7ce9e934, 0x54697942, 0x7fc087aa,
+ 0x9843f4ec, 0x7deb5baf, 0x6b41c6fc, 0x560113a9,
+ 0xe05a9fbc, 0x49671f9a, 0x5f0be32f, 0xfc8a0e56,
+ 0x9927e6df, 0x8b167f8e, 0xf3b23d5a, 0x3c2318fa,
+ 0x56f6c4f8, 0xcf8eff18, 0xede6d2b9, 0x55592c6e,
+ 0x303a8416, 0x316ad298, 0x3d1542df, 0x8435ce0b,
+ 0xaa62a01f, 0x345228c6, 0xd5865248, 0x271309a6,
+ 0x69f8da64, 0x2fff484e, 0x018403bb, 0x38691ddb,
+ 0x60c8a4d8, 0xa2d72465, 0x6fb13785, 0xb99b42bd,
+ 0x6569d143, 0xb00c8530, 0xd71a09f7, 0x6ca0b9b2,
+ 0x1eb0d532, 0x0264b2f6, 0x65c01500, 0xb0be8d1a,
+ 0x5f4fdbb0, 0x7ac7c3cc, 0x51898d11, 0x113d34bd,
+ 0xbec078d3, 0x49129c93, 0xf6700c54, 0x58a50d36,
+ 0x75d68e5a, 0x5333f695, 0x2de57dfb, 0xde95df62,
+ 0x1d9f0ae2, 0xb012d517, 0x9e34af7f, 0xf7261039,
+ 0xa895801a, 0x28e352fb, 0x307fbd98, 0xbe8d83c3,
+ 0x562e93dd, 0xa697a7d1, 0x7b43888e, 0x8a408cac,
+ 0x88ea6024, 0x8c682d37, 0xdf2b33ca, 0xa2f78ebe,
+ 0x23af66b8, 0xed2c06ab, 0x940e4940, 0xa0bb4961,
+ 0x5747158e, 0x30a677a2, 0xc6ef5fb5, 0xc45ac482,
+ 0x11c25a06, 0x7c06a237, 0x49689182, 0x4a176923,
+ 0x77eedc4f, 0xcc65ee49, 0xcd26f5d9, 0x8eef5b7c,
+ 0xbaed281f, 0xe915c21a, 0x8da83c90, 0x18d11598,
+ 0x8859c9f3, 0x29b349f9, 0x45928152, 0x6dc7e5c4,
+ 0x4f545aee, 0x74e05a96, 0x1eeedf71, 0xb6f457d9,
+ 0xce3e49ad, 0xb06a2649, 0xc5293ecb, 0x2dc38789,
+ 0xa7481c6c, 0x54837608, 0x76f73b66, 0xdf80af5e,
+ 0xb90b8110, 0x3d4df647, 0xbe99edf4, 0x8042b279,
+ 0x6b4b5b32, 0x7bcb5237, 0xdc105c89, 0x5d99b6eb,
+ 0x215173e5, 0x68e59fec, 0xc3dc41e5, 0x996b24fd,
+ 0x79bbe803, 0xe99dd835, 0x2cf1fab9, 0x1d55b165,
+ 0xfdd11eb9, 0x7776e5a3, 0xc5a66fe0, 0x3862f8cc,
+ 0x0fbe6d6d, 0x184fde91, 0x4e0f282c, 0xebac791d,
+ 0x8d472645, 0xa9607139, 0x51b9c29d, 0xf1a6d11d,
+ 0x8bb50e54, 0x368eb3c1, 0x420493c0, 0x26923095,
+ 0xcb11ce4a, 0x4c445228, 0xd4da6bc8, 0x719786cd,
+ 0x40989b28, 0x91e912a2, 0x6b236aaa, 0x34199deb,
+ 0x45e69fab, 0x9bf9270e, 0x40b8de21, 0xf0e76fa2,
+ 0xb5b3e5d5, 0x081b7fb0, 0x752f31ef, 0xf4cbdc77,
+ 0xb7c80e7d, 0x402434ee, 0xedb7f032, 0x14681967,
+ 0x8a49da97, 0x03884246, 0xfa470e63, 0x2e420b0f,
+ 0x88c21717, 0xd0c470e4, 0x0dbb4f50, 0x36d1daa2,
+ 0x00cbf19f, 0xd202f093, 0x630a7ff1, 0x1ab4b80a,
+ 0x0f9af8b4, 0x1702eb74, 0xab0e81a3, 0x97e53ab5,
+ 0x5ea0cf39, 0x31173bfb, 0xa0e8af3e, 0x3b58b1ba,
+ 0x2ed8866c, 0xb01e2bd1, 0xf0a21578, 0xaa1f3543,
+ 0x7a15fd47, 0xb40b6a2d, 0xd06c0c89, 0x8569c8d3,
+ 0x69e6d786, 0x251eb918, 0x22379ae7, 0x743e04af,
+ 0xa3fc49a3, 0x45dac6eb, 0x4985eda6, 0x6c76a2dd,
+ 0xbb903235, 0x192cf45a, 0x0a3ee53b, 0xac85dde1,
+ 0xc71afaf0, 0xa2c4f5d8, 0xdd578d0c, 0x9e415976,
+ 0xd31df518, 0x179c47a9, 0x82b86f95, 0xde5551d3,
+ 0xa8453d3b, 0x19e52874, 0x3f436f24, 0xbd260e57,
diff --git a/src/soc/intel/broadwell/microcode/microcode-MF2306D2_FFFF0009.h b/src/soc/intel/broadwell/microcode/microcode-MF2306D2_FFFF0009.h
new file mode 100644
index 0000000..775a064
--- /dev/null
+++ b/src/soc/intel/broadwell/microcode/microcode-MF2306D2_FFFF0009.h
@@ -0,0 +1,1088 @@
+ 0x00000001, 0xffff0009, 0x12192013, 0x000306d2,
+ 0x4218a30f, 0x00000001, 0x000000f2, 0x000043d0,
+ 0x00004400, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x000000a1, 0x00020001, 0xffff0009,
+ 0x00000000, 0x00001011, 0x20131219, 0x00001011,
+ 0x00000001, 0x000306d2, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x60dcadd9, 0xa4e450f7, 0xa10e9ad8, 0x056947aa,
+ 0x6c53d792, 0x100ed262, 0x0e01ba87, 0x72e1b0a2,
+ 0xe1d4113f, 0xc3085503, 0x1367060c, 0x9bf7efea,
+ 0x2b756eb6, 0x2ee07b69, 0x7cfd1dc4, 0x9811c8b2,
+ 0x86cf4036, 0x20534caf, 0x37046580, 0x432b4e6c,
+ 0x6a3a2e54, 0x88a74dfc, 0x81a503f6, 0x67736b51,
+ 0xbc2b11b7, 0xbcf3adc9, 0x96c8eefe, 0x688bcc49,
+ 0x16c4f996, 0xe0175cd2, 0x454d7a58, 0xa67afd13,
+ 0x098d9e42, 0xf86d2ec2, 0x738a67a6, 0x26c4ad17,
+ 0x08666776, 0x050d971d, 0x68998a7c, 0x21ac9cf9,
+ 0x29e27b61, 0xd61cfd7d, 0x3500ff83, 0xd4123687,
+ 0x27b72496, 0xe9b867f6, 0x62920d71, 0xe159dd34,
+ 0x3991c6ba, 0x367a5719, 0x7af5e9df, 0x5cb9fd11,
+ 0xf5988469, 0x4153f210, 0x24b194a9, 0x8c563988,
+ 0xac5bfd38, 0xd271e693, 0x16e9b292, 0x0c6583d0,
+ 0xd2501a4f, 0x9896af00, 0x6665aa9f, 0x0f3a8de9,
+ 0xc8f0db5f, 0x60b7a546, 0xe3a52963, 0x0ea3eb39,
+ 0x0d8c08ab, 0x2f5faa26, 0x1d3cbd56, 0xa8596256,
+ 0x00000011, 0x90cab116, 0x0e040e30, 0xd347b746,
+ 0x60a21d1a, 0xd6be9b2c, 0x4b45f3f8, 0x4c9f9895,
+ 0x71624dde, 0xc9c2d232, 0x2c3e4884, 0xd50de558,
+ 0xb2215b04, 0xea8e09bf, 0x51d7cfd4, 0xd288b7cd,
+ 0xc56200cd, 0x7b35c8b7, 0x7efb18fc, 0x8ccc42b7,
+ 0x308b55da, 0xc91a08b3, 0x7d122c6e, 0xbd62a0aa,
+ 0x65c1171c, 0xa485a771, 0x03a8f12c, 0xe90e07fa,
+ 0x55fdbf8a, 0x8e479b93, 0x3ed879ac, 0x17aa3978,
+ 0xcf82b042, 0x22bcb074, 0xaddb3933, 0x32fd00b1,
+ 0x347ab750, 0x6d2142fa, 0x046ae713, 0x2e2bfa45,
+ 0xb597e339, 0x70d86bc7, 0x6f0fd994, 0x57b225f6,
+ 0x12a0db1a, 0x475b29df, 0xa5a56fdc, 0x74da2980,
+ 0x901db0e3, 0xc574be49, 0xfb71d343, 0x1dad8d1b,
+ 0x82de7760, 0x92eb14aa, 0xe1b0f244, 0x73d4f475,
+ 0x4d8598a6, 0xea08353b, 0xe491af06, 0x4d0402e0,
+ 0xc5a719e7, 0x06ee0e61, 0xc300bdf8, 0xe929060f,
+ 0x422d6721, 0xdb2e2923, 0x849977e1, 0xb721f8d8,
+ 0x1489a38a, 0x4ea362e1, 0xb5544404, 0x29b7b6b5,
+ 0xb9467e1e, 0xb6a573ee, 0xa197f784, 0x3d8a563d,
+ 0x3021a920, 0x228d2a9d, 0x42ad7645, 0xa5a41a0e,
+ 0x64afa2b5, 0xaa7de848, 0xf8749a8f, 0xe0e93b95,
+ 0xc9033385, 0xac9abe32, 0x0511c7f5, 0x48ed3483,
+ 0x37cdcaa3, 0x44f857b7, 0x8f0d8931, 0x87531352,
+ 0x792265db, 0x978c9f15, 0x70d04944, 0xfcf1c5f5,
+ 0x2bf9391b, 0x944e902b, 0xe2ea9bcf, 0x5e8443cc,
+ 0x08d91892, 0x9cbfcc80, 0x49317133, 0xec45a8e3,
+ 0xa13f80d8, 0xaa718e22, 0x2ba22e08, 0x2ab3aece,
+ 0xe6e47fb9, 0x89a2a54a, 0xad5c63fc, 0xde5d1791,
+ 0x95c2f6cc, 0x651f0b35, 0x2d3712c0, 0x37a3b34e,
+ 0x366c5ff7, 0xff2f1373, 0x73fd3f21, 0x883dcc99,
+ 0x723a5552, 0x82ad9770, 0xb962ad18, 0x99e02541,
+ 0x38dbfbaa, 0xe8ac0a04, 0xc8de2eb3, 0x8b3526b6,
+ 0x860ee4d6, 0x18d5abbf, 0x44ab0a68, 0x17b2491c,
+ 0x16745351, 0x01219370, 0x441c7a6f, 0x5abed659,
+ 0x1de122cf, 0x9272e352, 0x0d41ec76, 0x1a814149,
+ 0xb77e6086, 0xdbca84ee, 0x3836808f, 0x0013eeed,
+ 0xe6a8fa02, 0x4967bf1c, 0x9aa60708, 0xbffb9bdb,
+ 0x0f9a1e2a, 0xb6ad6fd5, 0xf80e5a06, 0xc5c02e14,
+ 0xa97f7853, 0xd1313de0, 0xce6d086e, 0x2b84fd27,
+ 0xcf946267, 0x2592a173, 0x31461442, 0x9f916969,
+ 0x0a82297a, 0x2662bfb3, 0xdea00742, 0xdc7dc6f3,
+ 0xa4169ea3, 0x18367c67, 0x5b32a88b, 0xa5c49b29,
+ 0x1dc6d4c2, 0xc7bbb15d, 0x763efa0f, 0x86bcb021,
+ 0xe342da14, 0xc1f524e6, 0x3fb25d07, 0xc95facb5,
+ 0xbac2e017, 0xb46425e4, 0x0e4ed37c, 0x3e2e0643,
+ 0x0e4923d5, 0x0808d43d, 0xb8290fed, 0x9c13b38f,
+ 0x5af54b12, 0xe52c28f9, 0x4f0e7520, 0x31d23033,
+ 0x7ffd77d6, 0x3fd6a6ec, 0xa240c9f6, 0xc0d2e7d0,
+ 0xf21322f5, 0x9a11ce94, 0x0dea1e5d, 0x54195ec4,
+ 0x131902ed, 0xbe9d2fac, 0x6e2fe66c, 0x77ba266c,
+ 0x60fff3c1, 0x26423e88, 0xa1113c26, 0x04e4b990,
+ 0x6f377b8e, 0x19ad39c3, 0x48e73dfd, 0x70224deb,
+ 0xb58c15f5, 0x2dd6ab84, 0xa341d89d, 0x94a1f39f,
+ 0xdcdc46d6, 0x2bd6ec0e, 0x54c549a3, 0x9050b2ba,
+ 0x2eb0dbe7, 0xace8bf18, 0xdf56ecf4, 0x8893fc94,
+ 0x6432e94f, 0x35376b1d, 0x134c4258, 0xe94bfed0,
+ 0x14d3b85c, 0x57bbb532, 0x1e9684db, 0x9807ea4f,
+ 0xc6b43292, 0xd7f59cae, 0xfb5883cf, 0x725ba2cb,
+ 0xc6f02596, 0x538a8e81, 0xa5136f90, 0x497459c4,
+ 0xba645c2e, 0x23218d30, 0xb775bc86, 0xd0e34625,
+ 0xfd1065ae, 0x3f0bbb0f, 0x6004224b, 0xf6a6ae86,
+ 0x37dea01c, 0x9a368723, 0xda4a7a86, 0x6f7582f8,
+ 0xd528c630, 0xd74842c0, 0xae825db4, 0x41426f8e,
+ 0x60cd01a9, 0xf0982f32, 0xa8d0f194, 0xfd1a2924,
+ 0x85297030, 0x993747a1, 0x5900e9a4, 0xb806c570,
+ 0x6665a0e7, 0x5c5c606c, 0xa482052e, 0x3586ceb7,
+ 0xbe34a09a, 0x6d58da9c, 0x9c16214a, 0x77ca2413,
+ 0xeff1c03d, 0x26bdb02b, 0x7e92c547, 0x7d1c9ccc,
+ 0x901781bf, 0xe06ca3ec, 0x0068f014, 0x4f037a36,
+ 0x66f1e220, 0xe932bbc7, 0x35f71129, 0x491299d5,
+ 0x96dd255d, 0x56140c48, 0xb9d9e9d8, 0x5887b654,
+ 0xb4f00c09, 0xcac8a128, 0x08061536, 0x156d0a53,
+ 0x58fd722c, 0xf8ccae65, 0x4c423ed6, 0x5085dcb6,
+ 0x8d0a4c58, 0x5118e592, 0x720d0e07, 0x32695cf4,
+ 0xf47583cc, 0xf5a360b9, 0xec68c6b3, 0xdb0b23bd,
+ 0x63dd835b, 0xb46e45d6, 0xa26e3679, 0x882d0205,
+ 0xfd1e47a4, 0x5e8f4fe2, 0x2394c20a, 0x5bce06ce,
+ 0xe0652d89, 0x1638aa4a, 0x5863895f, 0xdb7e13df,
+ 0x0baeb5c0, 0xb28bb54d, 0xdaacd6e9, 0xf90ac314,
+ 0x6add6021, 0xed119aac, 0xdc6d04a1, 0x471ead10,
+ 0x962c88c9, 0xfdc72b61, 0x0e22af57, 0x146a42c3,
+ 0x34822bae, 0xd83b4b11, 0x1c3a2415, 0x0e0727a2,
+ 0x566e88a3, 0x4b47cf5e, 0x853639c7, 0x215b716c,
+ 0xee2e2600, 0xaf2f7ba8, 0x090ff22c, 0x34392116,
+ 0xa6b296ac, 0x55e79700, 0x35246cf5, 0x086ddb6b,
+ 0xc01e8683, 0xf6e013f0, 0xe792446b, 0x86ff93eb,
+ 0x05aa2844, 0xaebc8787, 0x1593f6d0, 0x604b0cea,
+ 0x69b5616f, 0xdda86324, 0x7ba648ca, 0xf33a5c5f,
+ 0xa0aef658, 0x1bc7f6c2, 0xb2ce4a17, 0xc83e3e90,
+ 0x1d3471ab, 0xaa361ce2, 0x33f2fca3, 0x0105f18f,
+ 0xc27017fd, 0xf3416a6a, 0xfa21e77d, 0x6a889e68,
+ 0xb31c3c49, 0x532f9608, 0x78a9b0f4, 0xf7a0720e,
+ 0x1d387e41, 0x882da2d0, 0x400753f4, 0x9343c148,
+ 0xda9f747c, 0x9b988343, 0x69ece870, 0x8e45b698,
+ 0xa1e885bb, 0xb1d2f776, 0x8bdf9fbc, 0x988675b8,
+ 0x6c3800df, 0xedfe4ea2, 0xed70c58e, 0x129307cf,
+ 0xdcbdde56, 0x7d603fa3, 0xc1ddaf53, 0xf566a221,
+ 0x611af0b7, 0x491709a6, 0xf6796c46, 0x03c2dd09,
+ 0x20086a5d, 0xa56d3c4e, 0x21838c3e, 0x741bf887,
+ 0xc47d1e10, 0x197d7b3f, 0x19abae48, 0x8abffda8,
+ 0x94435b72, 0xa11b897a, 0x6ec815ac, 0x4c6b3739,
+ 0x0f4d4593, 0x0dc528b1, 0x9ea4eafc, 0xe3af5be4,
+ 0xa09856b0, 0x4bb60468, 0x34fce4fb, 0x34cd957d,
+ 0x20cdc911, 0x7f9fe9df, 0xe2391995, 0x1a2321d7,
+ 0xa34c246b, 0x79a899ee, 0xd52abee4, 0x9a846264,
+ 0xc0b4fbf4, 0x3a632892, 0x9c27c222, 0x1420cf14,
+ 0x9cf93d04, 0x86fb1630, 0x968387c7, 0x0d112814,
+ 0x43aece1a, 0xef85dc1a, 0x203a9857, 0xd1003708,
+ 0xb39d7773, 0x7e5779f1, 0x508b45d4, 0xa405466b,
+ 0xe57343c6, 0x940fac2a, 0xb7a50d24, 0xe0fab30c,
+ 0x3576bb69, 0x1aaf0431, 0x2d15232e, 0x303fdc31,
+ 0xe13f2053, 0xfb33e941, 0x4e2b238b, 0xd4ec4f24,
+ 0xe63f9c36, 0x6e4f9a38, 0x540def86, 0x06266f87,
+ 0xce6b1e32, 0x8e0b9478, 0x26b2d339, 0x9ff9b40b,
+ 0x204575b8, 0x946a0473, 0xb78a9ebe, 0x3a5309dd,
+ 0x9f0eb17c, 0x1a064211, 0x85f47105, 0x0cb89d9f,
+ 0xebd7b379, 0xd5c975a8, 0x9d52f464, 0x592a5bf4,
+ 0x6f501956, 0x77578fdb, 0xa0e62c23, 0x6e3dd1e3,
+ 0xc8774186, 0xe053f68f, 0xece83dc5, 0xc38d39f9,
+ 0x18f92077, 0x343d3efb, 0xb35d2c11, 0xdb5cde6b,
+ 0xdfcaf3ec, 0x218e1dc5, 0x686ca7be, 0x97b191be,
+ 0xea2008e9, 0x32c1fefc, 0x0cffe063, 0xf7bb6146,
+ 0x08b326e0, 0x2357455d, 0xa0dbebfe, 0x3cdb6cd3,
+ 0x1e9f5ef6, 0xc51c7891, 0xd8d1fad7, 0x990bc89e,
+ 0x273ec572, 0xfca8183a, 0x43bcca27, 0x99d670f9,
+ 0x4eaea6f1, 0x927e1c1d, 0x0ae4b5ab, 0x346b589e,
+ 0x0bf98ede, 0x47941bd5, 0x5da1b808, 0x7aadcba5,
+ 0x17123c86, 0x3d58244b, 0xfecdb4ab, 0xe9c9f379,
+ 0xf6ed0fde, 0x48ce0701, 0x15031801, 0x6dc08d12,
+ 0xe2b0fefd, 0xfa919920, 0x2be7b549, 0xa0690325,
+ 0xf4423306, 0x0291c221, 0x99e3f0f4, 0x2a0213b7,
+ 0x652b0769, 0x461e57c6, 0x9cf49672, 0x1b8bc086,
+ 0x88c7410c, 0x85129bf0, 0x536ae506, 0x60ff4af5,
+ 0x134acbe9, 0x413c6069, 0xf12375e2, 0xcdfcc5a9,
+ 0x36969c82, 0xd77fb84a, 0x3b1cc035, 0x6449616f,
+ 0x9c350286, 0x4570139a, 0xe54e3afd, 0x52675e36,
+ 0x4d53c27e, 0x9744c74e, 0xaa66ba08, 0x1f5d449d,
+ 0xae4153cd, 0x6d096a28, 0xe6bdb07c, 0xd0e87cdd,
+ 0xad5ac1d1, 0xcd7153c8, 0xb313634b, 0xfa507906,
+ 0xefd74671, 0xcbd126ea, 0x51418e17, 0x43ec6973,
+ 0x4c28d874, 0xce7c2fb7, 0x59627e9b, 0x0d71d899,
+ 0x1679ce3a, 0xe7578b23, 0x7b5c43e4, 0xe93d2313,
+ 0x0b09b9f4, 0x62e26321, 0xc08da4ad, 0xd03e459f,
+ 0xc705d09a, 0xfabd5d2b, 0xd817fcb4, 0xc61fbe8c,
+ 0xa216cbc0, 0xa844f721, 0xb1c44147, 0x383a2589,
+ 0x1c26ed0a, 0x66e837ab, 0xf2c158ac, 0x91ab35a5,
+ 0x4ac10d6e, 0xce73a342, 0x8ab5e6a7, 0xdd4e6278,
+ 0x37ae66b3, 0x3c21ffd7, 0x575d7013, 0x68c5ed99,
+ 0xa4bb530f, 0x9c233812, 0xda6817c5, 0x3eda3a7e,
+ 0x02e81b6f, 0x57b8b9eb, 0x6b3f1bad, 0xc267a085,
+ 0x7f9ece08, 0x9b72eb5a, 0x25861ce3, 0x7821c4b9,
+ 0x87fd9a93, 0x80683eb8, 0xd203432a, 0x9281544f,
+ 0x9385bd78, 0x7c75f0ee, 0x20a72d75, 0xfe9b3d5d,
+ 0x0309006c, 0x7c295280, 0xf91efe20, 0xc1f9db0c,
+ 0x7873af11, 0x816dd3e1, 0xc750c0d3, 0xc038fb60,
+ 0x4934e055, 0x660fc920, 0x8611b0c0, 0x5fcdb814,
+ 0x8c8eb7c5, 0x769da935, 0x08138d4f, 0x5b4fae17,
+ 0x6991be76, 0xfef63442, 0xef554565, 0x119ac2a4,
+ 0x7237898b, 0xbbfddec5, 0x396b9e2c, 0x7cd52890,
+ 0xdcec9de6, 0x83c47ede, 0x34a05845, 0x0c210e8a,
+ 0x65810421, 0x63eade0b, 0x0ba1c957, 0xbec6d006,
+ 0xc36e7402, 0x2784fa19, 0x7a3e246a, 0xcf110e8b,
+ 0xc3f4dd61, 0xe9a8d6ec, 0xfb63b0ce, 0x7cc2e35d,
+ 0x6d8b1883, 0x14369707, 0xd6c37e16, 0xb634047d,
+ 0x25c02b3d, 0x7ddc3504, 0x5aad3917, 0x663f641a,
+ 0x399cb455, 0x54becc41, 0x23c2b715, 0xe039d8fb,
+ 0x51e80309, 0xf20f1460, 0x6bde63bf, 0x8064aadc,
+ 0xc4037a27, 0x60ece5f5, 0x0b6b72bd, 0x3b804ca9,
+ 0x1b908ced, 0x6fba1773, 0xe415203c, 0xd9823431,
+ 0x446ea0e9, 0xe7d21771, 0x903d3805, 0x3f512124,
+ 0x19414ce9, 0xabd95d7d, 0x2363ff6d, 0xba47b061,
+ 0x4382c277, 0x63b01743, 0xbec54415, 0xdd06dd91,
+ 0x7ce565fb, 0x8660d02b, 0xf13e4e5c, 0x71241c8d,
+ 0x505f298d, 0x42d4a434, 0x1bb5254f, 0xb4502dfa,
+ 0xf76a59ca, 0x6185caef, 0xddd5b940, 0x13577870,
+ 0xd79c5b38, 0x814245f5, 0x14beb2d0, 0x28ce5345,
+ 0x439b8dfb, 0xcb4e9b67, 0x0441d3d8, 0xcc0640c7,
+ 0x4d868505, 0xda87621c, 0xe4795039, 0xd586c8ea,
+ 0x8308073a, 0x78559ce3, 0xc4f93658, 0xe8df85ba,
+ 0x9aed2c23, 0x1ef7c4b3, 0x4613829c, 0x0bfe4683,
+ 0x1b7a1f2a, 0xd85f2584, 0x74fae5a6, 0x7d64660c,
+ 0xf1d6cdc0, 0x1db730d3, 0x03650f53, 0x4809a85e,
+ 0xd5c41303, 0x2239e054, 0xf1a6de34, 0x53e4a8d5,
+ 0x28b166e9, 0x40dae4a1, 0x5e6cdb6f, 0x924b3867,
+ 0x48188d16, 0x4855da97, 0xef986afc, 0xf65f1c49,
+ 0x7914b1f3, 0x10c182b8, 0xdadc1cee, 0x0e7422e3,
+ 0xfc308219, 0x67098cc9, 0x5380b7ed, 0x65f7d3a6,
+ 0x711e0657, 0x59e7cabf, 0xb1c47735, 0xf7e0034a,
+ 0xab62300c, 0x2f636eaf, 0x746ac675, 0xcb7b4bda,
+ 0x01f117cd, 0x8af07a1e, 0x39616883, 0x22a8e329,
+ 0x80fa99e5, 0xfc48b995, 0x9c43516e, 0x40411674,
+ 0x52647c1e, 0x29659ea1, 0x5f8b6429, 0x8ad95229,
+ 0x5a77c499, 0x3fe94266, 0xe21d84cb, 0x15140834,
+ 0xeb6e862a, 0xf93cfeb8, 0xd1435c17, 0x2ed2d4d6,
+ 0xe94b371f, 0x1dfa1a35, 0xf8eefd0c, 0xfc502190,
+ 0x3022d1e7, 0x8e98dc70, 0xb3941c72, 0x48ce162e,
+ 0x04def7d2, 0x05505c46, 0xce8253fd, 0x727f4df1,
+ 0x5cf5d8a0, 0x125b5812, 0x1b1b715e, 0xaa322065,
+ 0x846ed704, 0x86f73cf7, 0xbe585d0c, 0xac05cff0,
+ 0xe6762d2a, 0xd6409b1f, 0xfeadc485, 0x14eeca23,
+ 0xf75ed62e, 0xc4c19528, 0x16b1ee8f, 0x34137e4c,
+ 0xeaa695c2, 0x5a2c7542, 0x40f886f9, 0x6e901f70,
+ 0x59265bf3, 0x54dbf006, 0x98ebf58e, 0x0d88e5e8,
+ 0x95b34bf2, 0xb3375ead, 0x027495a2, 0xceebe58d,
+ 0xf9351f6f, 0x97f088fa, 0x86ce4b3b, 0xad4c488a,
+ 0x2134e0f6, 0xc61fd37c, 0x47e6b2d5, 0x55d2a66c,
+ 0x57471792, 0x5cc3af34, 0x69cb3eb2, 0xd3f4e2cc,
+ 0x371d07e5, 0xe72a5df5, 0x6ae73a0e, 0x82d06141,
+ 0x50d338d6, 0xb097808e, 0xa928f699, 0xce757e78,
+ 0x2371b850, 0x5c54c120, 0x94cee629, 0xb67686a3,
+ 0x09ad4704, 0xf0a155b7, 0xcc179b36, 0xa6aeced0,
+ 0xb3f51661, 0x9cbcd13f, 0x94e8c76e, 0x024361f6,
+ 0xcd887436, 0x2bf4d7a1, 0xf7c17b37, 0x133e8eeb,
+ 0x3ea6a45f, 0x520d492e, 0x742d90e8, 0x2ce299fd,
+ 0xd0a875d5, 0x0a5a57f2, 0xcaae21e5, 0x9086856d,
+ 0x8ac23fa2, 0xe7b4d462, 0x4999f32d, 0x60274da4,
+ 0x6a5ee783, 0xca34744a, 0x7f64c6ee, 0xf699a281,
+ 0x5ece3f79, 0xe7afc768, 0x7836a20a, 0x390502fe,
+ 0xaf39bfe1, 0x5f8c0721, 0x0f5aac11, 0xd3052ccc,
+ 0xba7c23aa, 0x6da80adf, 0xf4634e0e, 0x2663505d,
+ 0x117d649c, 0x5fc39b44, 0x1ec1cc7f, 0x0e666e4e,
+ 0xd3279646, 0x32862aca, 0x90ce9078, 0x9b18c91f,
+ 0xba531b12, 0x73f42de1, 0x5a374359, 0x3aa5989b,
+ 0xad23fc0f, 0xcde1c203, 0x2389c404, 0xf1d6b5c4,
+ 0x86cb6fba, 0x2ae50b83, 0x30aacd67, 0x20b657df,
+ 0xbb25fdb7, 0x04b5c269, 0xaea481af, 0xe89b2fae,
+ 0x2ca04b4b, 0xe6b53b3c, 0x55ac73f1, 0xceceba11,
+ 0x3b317b02, 0xf920f5c7, 0x2112e25f, 0x9f1399a5,
+ 0x3b5aed97, 0x82fa3db6, 0x32da32ce, 0x61aa356c,
+ 0xd9eef8a3, 0x5ad1a4a8, 0xbb0cc345, 0x7f25edea,
+ 0xd9ae7b9b, 0x22575550, 0xd3ef4ba6, 0xb9ade338,
+ 0x942e2317, 0x2f5e3e65, 0x6e6dd63d, 0xc7837067,
+ 0xba1be094, 0xc07d82eb, 0x3b241ff9, 0x92844bbe,
+ 0xeea2e10f, 0x2a194f95, 0x133ba864, 0xdf698784,
+ 0x7e632e2f, 0x99d5dcb9, 0xfa78c04f, 0x2d02fbce,
+ 0xb7597402, 0xe60a3216, 0x0f213875, 0xcb448cd9,
+ 0xcc024c70, 0xa47a7983, 0x6fcef001, 0x34a50c04,
+ 0x0b5a4a5b, 0xd36e43f6, 0xc86c5f31, 0x3add4a92,
+ 0x7f046e63, 0x7456031d, 0x4cac381b, 0x23bc33be,
+ 0xfa562030, 0x86b4ac9a, 0x80f47e71, 0x83d06b96,
+ 0x56eb1b14, 0xc4dc487c, 0x7fd6b538, 0x17173b7b,
+ 0x9c4586c3, 0x691b85b8, 0x7ff336c8, 0xc5b6593e,
+ 0x3f6ccc20, 0xbf268878, 0xcaff2726, 0x122aee01,
+ 0xe43c6e44, 0xb72b3568, 0x4e1697fa, 0xe51dad88,
+ 0xd5eec231, 0x7fe6b74e, 0x7e4cb0dd, 0x924a4b42,
+ 0x35745453, 0xe39021dc, 0xe961be10, 0x41b255b5,
+ 0x40921705, 0xb979c943, 0xeb9c766d, 0xa6d1e044,
+ 0xceec56a6, 0x073f7166, 0x66ef10bd, 0x820bab05,
+ 0xf8cfdd84, 0x3ac5a605, 0x8f0e8aff, 0x7f289d22,
+ 0x72aafac8, 0x607e9d8c, 0x7a204ee4, 0x7d69e188,
+ 0xb733f89f, 0x216c50a1, 0x1775d87f, 0x92cb5854,
+ 0x16726cb0, 0xaada1cdc, 0xceab8da0, 0x5ac08515,
+ 0x7222d621, 0x2d3bf547, 0xb2a46d39, 0x0a55e404,
+ 0xd0f96092, 0x0a43bbfd, 0x779d431b, 0xd609119d,
+ 0xe697cc29, 0xc4e32548, 0x113046c7, 0x92d36739,
+ 0x949850b4, 0xcca28eff, 0x9b782d07, 0xf1fb4163,
+ 0x7658cd91, 0x3c8bf795, 0xffe6a68e, 0x75bc1e62,
+ 0xcdc63834, 0xd1c34186, 0xb579135b, 0xc7eb7d2d,
+ 0xd3452086, 0x679e302d, 0x0747bee7, 0x25318574,
+ 0x758eefe7, 0x12a3b686, 0x2a2c7026, 0x53957f5b,
+ 0xa68abe52, 0x2f4b07be, 0xec811b09, 0x28784687,
+ 0x475bde35, 0xf4a568a2, 0xa18bdf37, 0x885986b3,
+ 0x99b2a57a, 0x2733dfed, 0x1d4f2eca, 0x7709ed9f,
+ 0x0871af03, 0x44bdf6df, 0x39f9442f, 0x845c147c,
+ 0x729d2f05, 0x18338f18, 0xccb3c963, 0xfc7ad8aa,
+ 0x99a2f4fc, 0x8623ad7a, 0xfbf465d8, 0x35d1c38a,
+ 0xb4f128a3, 0xd42f5685, 0xcbed5c09, 0xf0025603,
+ 0x3777cd54, 0x7b420f01, 0x8f6b58bd, 0xfa0aef03,
+ 0x8afa1826, 0x48de3c1c, 0x2bc4310f, 0x95253743,
+ 0x11b55236, 0xd54775a9, 0xde3fff8b, 0x6b3f5bc7,
+ 0x06dc676e, 0x7b8f3f71, 0x50375e23, 0x1c17605e,
+ 0x480e3072, 0x10d2dbff, 0x7f64178e, 0xb4655d95,
+ 0x89f6a71c, 0x055850f5, 0xf131342d, 0x4019b083,
+ 0x35f83286, 0x3f2802d6, 0x1ccad590, 0x8d30bbc9,
+ 0x0db48257, 0x623f5161, 0x4f0a481b, 0xaa474fdb,
+ 0x56c1009d, 0x53465fb2, 0x4f924a49, 0xfd639965,
+ 0x532fa28e, 0x54cd2cc2, 0x61288c49, 0x8a2bcce3,
+ 0xa5675c7b, 0xe12a3be0, 0x08e66dbc, 0x8b7414c2,
+ 0x635888d4, 0xa263d533, 0x50db6461, 0xf8199d4e,
+ 0xb8f1667f, 0xed571290, 0x9f1d222c, 0xd9add4b7,
+ 0x66037020, 0xfa0d25ac, 0x7cd3c0d0, 0xce280271,
+ 0x1932ba92, 0xd6be5076, 0xd7b3d11d, 0xf1fb5981,
+ 0xd8c6a441, 0x58cdff75, 0x808a2b55, 0x6d973a34,
+ 0x319de89c, 0x27769381, 0x056768af, 0xf878d036,
+ 0x9f63efb1, 0x6135e150, 0xba675883, 0x81042913,
+ 0x2550419d, 0xddbe61d5, 0xc81a8da9, 0xe9089ba7,
+ 0xa5dd3918, 0xdab05623, 0xac841d16, 0x7a864bdf,
+ 0x46ae5d33, 0x3180fbd3, 0x8e230a5b, 0x1f8d9fa7,
+ 0xc174d6cd, 0xd0522dfa, 0xed499bae, 0x9fe63278,
+ 0x813ab3fc, 0xdc3e2d0a, 0x0ed5951d, 0xf51ee2d4,
+ 0x592c2bca, 0xad780575, 0xb86b8caa, 0xb4ab113a,
+ 0x890b756b, 0xdfb71bbd, 0x47ac5f8b, 0x0f68e078,
+ 0xc112fc4f, 0xe0e409d4, 0x4a5cc89c, 0x1bf61256,
+ 0x49ce9b62, 0x18e47e44, 0x6e01609a, 0x916190f8,
+ 0x8e1d1bbb, 0xbdaec593, 0x6d5114e1, 0xaf91d407,
+ 0x062cc782, 0x957dbe4b, 0x4de1f42b, 0x318afaa9,
+ 0x2f1067ad, 0x6687998f, 0xe7f887b5, 0xe9cbc3ea,
+ 0xcd552a52, 0x45fcaacb, 0x1f4a1e4e, 0xa87e4274,
+ 0xb418aa40, 0xdf7f30cc, 0x5a044a5b, 0xf797bc5d,
+ 0xe8ba9054, 0x261f08c3, 0xf611337e, 0x9a30fd97,
+ 0x29e9daab, 0x59113c28, 0xe79046ed, 0xc6175e4b,
+ 0x11db74ea, 0xa671fd1c, 0x7bd62061, 0xd5b5d377,
+ 0x4b900be9, 0x5e5226ac, 0xf3b663a3, 0x3166e685,
+ 0x097259d4, 0x482a03e5, 0x401fdd84, 0x8cd79939,
+ 0x4b18a6bb, 0xa7f79818, 0x04d794a9, 0x6e9ba6c5,
+ 0xd53f0063, 0x18265a15, 0x978b673b, 0xdca20ad1,
+ 0xf8909d73, 0xc3215238, 0x93fdabd3, 0x715d53bb,
+ 0x0f26a37a, 0xc9eb821d, 0xf27257d7, 0x0bcd73d3,
+ 0xa1fcf2d2, 0x4ab25bf8, 0x1167cddb, 0x202c00a7,
+ 0x697afe18, 0x4bdf8fdd, 0x7532710e, 0x9829abb2,
+ 0xa24ebb8a, 0x56f66505, 0x6e91067f, 0xf31f7c76,
+ 0x87aa0191, 0x501fe66a, 0x640a3180, 0xefa32181,
+ 0xaaea0e03, 0x47aa7a2d, 0x1cc55c2a, 0x154ccb03,
+ 0xf6f717a3, 0x2aea78ad, 0xf4d6132b, 0xc78a6acf,
+ 0x123cdf52, 0xff4bf2e7, 0xda02924d, 0xfe03ab9b,
+ 0x755b6f25, 0x9d4a5428, 0x38e816ef, 0xac958ddd,
+ 0xf688caf4, 0xd565bd38, 0x0a2f534f, 0x3af3dc2e,
+ 0xe6b9af6d, 0x67d5e6ba, 0x3e322b23, 0x6d65d663,
+ 0x558ebe4c, 0x7fc567a5, 0x2aa6b0cb, 0xdb23312c,
+ 0x95ef5f3e, 0x79419a81, 0x8150fef9, 0xd453b954,
+ 0x661e23b0, 0xde16a0b7, 0xa007dc74, 0x9a9c28e9,
+ 0xde5becbd, 0x5f34bb32, 0x1852ea78, 0xc7312271,
+ 0x3da2a26c, 0x36b6f593, 0xac766916, 0x37c63eb6,
+ 0x972c3928, 0x4453ba46, 0xfda8992d, 0x059b3982,
+ 0x846a03a1, 0x639648c8, 0x0b655eba, 0x77c9d10d,
+ 0xe2d5adc8, 0x2f76cd22, 0xcb817adf, 0x20b42438,
+ 0x72340883, 0x02494a75, 0x2dab7976, 0x00cbc5af,
+ 0xfe356cd2, 0xbde2c706, 0xbf6321bc, 0x330a9fc4,
+ 0x0d9c78ee, 0xc8134ad8, 0xb6d331e9, 0xfa6d61a8,
+ 0xfcb3f05a, 0x6f728e48, 0xa051cd9a, 0x6a47dc1b,
+ 0x62d967b9, 0x06447515, 0xde7feee7, 0xd2306a03,
+ 0x71ddf8da, 0xa20fb50f, 0x1f233990, 0x3b8c7328,
+ 0x7e6b3149, 0xa0927d88, 0x316eeef3, 0x73532916,
+ 0xc1a2c9eb, 0x0b84f1f6, 0xe5d42a13, 0x9235e6f7,
+ 0xb5c53568, 0x77e7fc23, 0x87133210, 0xa50378d6,
+ 0xa6c761ec, 0x0ed2ad00, 0x5048961f, 0x69352031,
+ 0x274d9f59, 0x900cecf3, 0x15b846d1, 0x6f41240f,
+ 0xb0bac716, 0xfd913172, 0xa9ee7733, 0x415ca79d,
+ 0xc7adb3a7, 0x1b21b7f1, 0x46f97f7d, 0xcb666a59,
+ 0x45c1e930, 0xe178cfed, 0xb0a4e287, 0xd4565967,
+ 0xd5e1b84c, 0x35f2ccc8, 0x69576869, 0xb5ed3da9,
+ 0x69e48e1e, 0x00c070ce, 0x22c1ed82, 0x3b0302be,
+ 0x58fca488, 0x5b027e58, 0xdea55117, 0xe1b14089,
+ 0x5a5e34a1, 0x604059bb, 0xb67bbc68, 0xa2ee3188,
+ 0x5339bf75, 0x44eeaee9, 0x130297fb, 0x0ac960a2,
+ 0x1dbe6756, 0xa0b6afe7, 0x89f4a68a, 0xd9761d47,
+ 0x0313bf98, 0x8c2a9a4e, 0x5335bd7f, 0xec1f7210,
+ 0xb899b3c2, 0x8c76f63f, 0x324b1123, 0xc79cc31d,
+ 0x70defa52, 0x1f9d068f, 0xfe68684f, 0xfc34f99a,
+ 0x497e2ba9, 0xafde1a2e, 0xd3e5efc9, 0x7a767f96,
+ 0x4854cff5, 0x86d26e2a, 0x756d3858, 0x4b138d76,
+ 0x8ebf96d1, 0x504b2cfd, 0x2b342daa, 0x3bce0fcd,
+ 0x4c1329bc, 0xaaa0b662, 0xd826add9, 0xba2294ca,
+ 0x328f227c, 0x8b11dc5c, 0x641069b8, 0x85d2f558,
+ 0x8db40b5b, 0x22ba2372, 0xdcde53c5, 0x79406548,
+ 0xda717c22, 0x3edcdbbb, 0xd3bf588c, 0x4d21dc09,
+ 0xbfbe0835, 0x445d79c2, 0x9186154b, 0xd8757931,
+ 0x6cc2fda5, 0xee5bec7a, 0xa406a703, 0x1f382345,
+ 0xeda58f77, 0x138a5396, 0x8f330eeb, 0x8c0bfe6d,
+ 0x406170fa, 0x1a26c83e, 0x89da729d, 0xc0a36a93,
+ 0xab107add, 0x895b0dba, 0x44c72fdf, 0xafb497f2,
+ 0x07e595dd, 0x82f10ac6, 0x05533816, 0xa508c8e4,
+ 0x06967120, 0x843fc145, 0x088a9254, 0xc9fa8c99,
+ 0xf8c9e485, 0x10166a50, 0x93098cbf, 0x8bd33259,
+ 0xbfe45bbf, 0x4593eada, 0x4ded8aeb, 0x8da9b4fc,
+ 0x6500a2c5, 0xcb0ed4a3, 0x9b875b07, 0xbbf626f9,
+ 0x65f9a0e8, 0x95bee21e, 0xadc6f514, 0x2530164a,
+ 0x6a3cc255, 0x8dc4e14d, 0x8e600ee4, 0xc7c2edfd,
+ 0x2c00aed0, 0x902a3b97, 0x39069f67, 0xc1d66342,
+ 0x935a7012, 0xdb4bdae1, 0xfd5e6d06, 0x5474664b,
+ 0xe7051ffd, 0xbee1e0bd, 0x5acf1aaa, 0x3a6a5f92,
+ 0x9130e4fe, 0xe9ee424c, 0x4a475aea, 0xff851640,
+ 0x69c24a9c, 0x4a055b88, 0x24d7028e, 0xb8f5a11b,
+ 0x7b451dce, 0x36b90efa, 0x0816c853, 0x36247966,
+ 0x457b7fb4, 0x082dda9a, 0x6e515ab8, 0x09784a04,
+ 0x279e3e51, 0xebce6723, 0xc3f87fae, 0xd22884e6,
+ 0xcc61399e, 0x36e7194c, 0xfc9035e0, 0xd0d0cf09,
+ 0xe538fe52, 0xfcf309b3, 0x24e7cc29, 0x7dfeb54f,
+ 0x7bb9c289, 0x5b5ace34, 0xbc048587, 0x181c6ba7,
+ 0x68a21ec9, 0x067922d2, 0x256d6392, 0x96c3ce60,
+ 0x7beaccaf, 0x11635cd2, 0xe9f2e8c7, 0x864eb506,
+ 0xdbc5369d, 0x98201a87, 0x81805dfb, 0xcdb68451,
+ 0x4bde831c, 0x52c9a44e, 0xccb7ebc8, 0xdd04cf8a,
+ 0xff631388, 0xc6b4a68b, 0x5b9e8643, 0x0b783754,
+ 0x330e86c1, 0xa3146d54, 0x23129703, 0xe0f462dc,
+ 0xa0e27e2d, 0x03b413f8, 0x97aeb991, 0xd93f60c9,
+ 0xe6816707, 0xf9f7623b, 0xf6737142, 0x9546adbb,
+ 0xd701e5f6, 0x6df8ddeb, 0xcda63487, 0x0663f283,
+ 0x921a49f8, 0x298d6b62, 0xe6d0c061, 0xf9a351c9,
+ 0x21fc5a29, 0xf80360e9, 0xfa40159e, 0x68a67bc5,
+ 0x16b26133, 0x672d361f, 0x31a15e46, 0x0b2e2ead,
+ 0x2a7982a9, 0x5350d494, 0x0bbb2836, 0x8eb00983,
+ 0x4efb127e, 0xabc5254f, 0x5830b321, 0xc36b67eb,
+ 0x3be1629a, 0x9fa8974a, 0xfeb63ab4, 0x19224f6f,
+ 0xc7ff35c4, 0xc9f50be0, 0x7b352263, 0x632d81b4,
+ 0x23cc9877, 0xa1d20d50, 0xa1bb25fa, 0x68739501,
+ 0x09a740f7, 0x5c99f10b, 0x927e7d8b, 0xaaa48590,
+ 0xf8c85d0e, 0xb78afbf3, 0xc7e64477, 0xc1744f7f,
+ 0xdd94991e, 0x0c8fc3cf, 0x8d8ed675, 0xbe527132,
+ 0x427a946e, 0x1378322d, 0x549df0bd, 0xba2258a0,
+ 0xf6b5391b, 0x75c73dc7, 0xb50023c0, 0xa9ee16fb,
+ 0x9f1fdf02, 0x5db168c0, 0x866c520e, 0xab4137da,
+ 0x05615ade, 0xea30a15f, 0x709f68eb, 0xd24862c0,
+ 0x5af24b5c, 0x5a4b0579, 0x1c44e1ea, 0xe66bddb7,
+ 0x08b0c7f7, 0x201c61c7, 0xc2aff628, 0x93763863,
+ 0x921586f2, 0x3130137c, 0x46b381f2, 0x7d1bc7eb,
+ 0xbebde217, 0x42af3319, 0xf2ced318, 0x52cee723,
+ 0x63586e1b, 0xfcbdc19a, 0xb2505e9b, 0xabbc98ce,
+ 0x7e706262, 0x40a52361, 0x98ff4565, 0x30dbe4db,
+ 0xa4743710, 0xc5275397, 0x4d39c879, 0x5c68fa8d,
+ 0x02a4fb6d, 0x765c1aba, 0x228e3b92, 0xd04752e8,
+ 0xa95e7e69, 0xbf760bbe, 0x3eb46677, 0xa601e376,
+ 0x72ddfdcd, 0xd7a4a683, 0x97dbb641, 0x86a7e27e,
+ 0x942cfe36, 0x4088cf58, 0xa7d3f1c5, 0x0d97794c,
+ 0xcfa57b9d, 0x8894c96f, 0x79562a3c, 0xbd2eafe3,
+ 0xe07ad19d, 0x0136fdfa, 0x4d5cf83f, 0x522dfcb1,
+ 0xe4ef93cb, 0x4fc31ac5, 0x67676d1c, 0x7d2e3bb3,
+ 0xf3d89c14, 0xf09d83d6, 0x01fb8b26, 0xf8062cfa,
+ 0x0b3d9aad, 0xbe5702a4, 0xee1d769c, 0x12b573ac,
+ 0xc4a7a43c, 0xe19b7d65, 0x09fc15f8, 0x688556e6,
+ 0x67f3ff37, 0x46860995, 0xca2ad83c, 0xe0413f37,
+ 0x7cbc74f0, 0x3f1395fd, 0xfb4f1db9, 0xde029a4d,
+ 0x3ae29aad, 0x770623c8, 0xf7f367dc, 0xc08a2a66,
+ 0xaf8f8d83, 0xbd247a9d, 0x977a00bc, 0x483d13ec,
+ 0xe53cdb66, 0xf6ed2acf, 0xb38826b7, 0xcde53a2e,
+ 0xf1936f7e, 0xeaf64b9f, 0x590390a8, 0xdedf8298,
+ 0x187173f6, 0x079ba901, 0xce905c53, 0xe3b7bdf1,
+ 0xf4bc2b1d, 0x92670795, 0x9ffe5e01, 0xde676ad9,
+ 0x11b031ab, 0x8b36b068, 0xbc50c114, 0x2292479d,
+ 0x48e5c480, 0x731b1223, 0xa9bf2216, 0x0caea825,
+ 0x13be48ba, 0xfb00d6ab, 0x130ea973, 0x44110a8b,
+ 0x8de72774, 0x98996fc5, 0xdaf7e6c4, 0x4feaff06,
+ 0x4db97c3f, 0x5b025a0b, 0xe2e49643, 0xc0f2e737,
+ 0x91a75aa2, 0x003d9592, 0x94a01495, 0xc33c69ed,
+ 0xc562cf5f, 0x6c743acc, 0x111e592f, 0x842b7050,
+ 0xb1297d34, 0xd44d4b80, 0x7350b0c8, 0x59c39193,
+ 0x68b31697, 0x6495fdff, 0xaafa67d1, 0xcd1f5f46,
+ 0xf5bb17d1, 0x78b7e743, 0x6931f3d1, 0x87b90ecb,
+ 0x8c7aa961, 0x398b83c9, 0x580c192e, 0x7666a8cd,
+ 0xfd45b4e8, 0x8593f2a0, 0xe2dfd37d, 0x16567816,
+ 0x16c10d33, 0xbe038067, 0xafafbb44, 0x83637c33,
+ 0xcdca84b9, 0x3c516321, 0xf198ddf0, 0x7bdc4b7c,
+ 0x11880844, 0xca6b670d, 0x3d57b609, 0x7196ffad,
+ 0xacf163c1, 0x08d1eb86, 0xea8fb4ae, 0xc1d5affe,
+ 0x26fa287e, 0xecade3c5, 0x5000416f, 0xf7cf603b,
+ 0xc17b0ca5, 0x4cacc97a, 0x217b1442, 0x42ac4d77,
+ 0x938309a1, 0x561d06a9, 0x1bd39686, 0x8b560889,
+ 0xa85b8309, 0x191e5458, 0x51a7c28e, 0x519c77e9,
+ 0x460b1fd0, 0x4fb27662, 0xc13033ce, 0xa25f2b45,
+ 0x38b507bb, 0xa7743f25, 0x2cf52299, 0xf8d1a303,
+ 0xe0def3f8, 0x787cd345, 0xb8bbdb12, 0x953e00d2,
+ 0x16d60be6, 0xfc00bc63, 0x185b0ef5, 0x0264cd05,
+ 0xda62f4e7, 0x9a7ae78e, 0x8f97b28c, 0x890d45b7,
+ 0xb0b7764c, 0x2a57f4da, 0x6c2bc675, 0x151ecc64,
+ 0x4ee7e8be, 0xedabe1ee, 0x1746de0a, 0x98f58e8d,
+ 0x93334686, 0xaa77e498, 0x7fe049a0, 0x0a6ed9b1,
+ 0x251146f1, 0x18f92378, 0x293b93a5, 0x67697c76,
+ 0xbcbd1e34, 0xb64d5372, 0x49e24c2c, 0xc642ac96,
+ 0xad2ca528, 0x7b22c2ed, 0xa509b8af, 0xc2e1f8b9,
+ 0xb493316f, 0xaeff84d8, 0x3b8203b7, 0x989f56ad,
+ 0x6b2c87d1, 0x036e2bac, 0x5a854fcf, 0x160aa0d0,
+ 0x54dd376d, 0xe88e0861, 0x89949ad8, 0xe7ce6297,
+ 0x4958a424, 0x6067f7b8, 0x4424dbf8, 0xb8fcf27e,
+ 0x88490419, 0x2867674a, 0x125c5fc6, 0x30b40e53,
+ 0xa36645ac, 0xd2132796, 0x9633255a, 0xf5d9a47a,
+ 0x23e2778a, 0x07994dbd, 0x2cac2037, 0x662ff0db,
+ 0xdcd76674, 0x240e2e46, 0x68eb9947, 0xf47c01a7,
+ 0x0f78eebf, 0x75f2c7e6, 0xf4ea2a54, 0x833f7869,
+ 0x19aaea84, 0x71f43bc7, 0x1e8bad09, 0x93552f9c,
+ 0x57bc3fc0, 0x90f65a10, 0x2cb23682, 0x536863d7,
+ 0x642c8e70, 0x17aa1ad5, 0x95390357, 0xa0300b25,
+ 0x787919b1, 0xbb1c7630, 0x5d6afad9, 0xda23ca3e,
+ 0x17a408d7, 0x54a2bbd4, 0x199e3300, 0xe301ac6a,
+ 0xcb021156, 0xaa3982e0, 0x906a5e15, 0x050e23d8,
+ 0xe091ef1b, 0xd8f6e478, 0x22efbe5e, 0xf37fc04c,
+ 0x88f3f7f0, 0x751824d7, 0xb4bbcc32, 0xe1b667e7,
+ 0x59326f7b, 0xc5c474e0, 0xb8abab00, 0xee9383b3,
+ 0x01d8914d, 0xa7e95c24, 0x6a93ac10, 0xe0bccd1e,
+ 0xf174f290, 0x4351b48d, 0x78b49e91, 0xb2eae046,
+ 0xfaa39124, 0x274be1f1, 0xa860b8f9, 0x6d12d876,
+ 0x1c4f08ac, 0x2e31b4dc, 0x2cc62112, 0x3860e4ae,
+ 0xe1cbfd43, 0x1a153233, 0xb08fa237, 0x0e67f4e4,
+ 0xce687d17, 0x3e66f9f9, 0x1b10cdcd, 0x498d6218,
+ 0x1659a1c1, 0xf127900d, 0x377fae38, 0x07c4e3a7,
+ 0xe43b9dee, 0x8c5bf70b, 0xa95a3bf8, 0x1141b347,
+ 0xadee4f86, 0x74893714, 0x5b8bf395, 0xb2418987,
+ 0x3e716c6f, 0x6056cede, 0xc664361e, 0x630e6949,
+ 0xce1bd0c0, 0xdb87f09c, 0x63c33f7a, 0x04de7e67,
+ 0x44a3af83, 0xb31aac95, 0x954073a4, 0xf155cfc1,
+ 0x5706fd07, 0xec36d3ec, 0xb9a62d76, 0xa7fbd558,
+ 0xe1be62c6, 0x2cb0f254, 0xdaf8147c, 0xc018f5a8,
+ 0x15e9f7ea, 0xf8e41b6b, 0xaa47efd2, 0x869d9340,
+ 0x08a9579f, 0x53d043e3, 0xd7e8ecda, 0xa94b8af1,
+ 0x019447b3, 0xbb9340f8, 0x86631524, 0x56119d33,
+ 0xf56ccfff, 0x90277fba, 0xfe80743e, 0x3c4f7210,
+ 0xe9ae478e, 0xbf28e0d7, 0xc1ba190a, 0xc6e1f336,
+ 0x3348bdc5, 0xba301b06, 0x109c28a9, 0x93f00944,
+ 0xde71dedb, 0x75db5a8e, 0x3fd50476, 0x502177f1,
+ 0xef867f0e, 0xc697a9cf, 0x2fb33834, 0xc2ae73a1,
+ 0x0ef411e7, 0xaca15582, 0xa631b708, 0x5e29a326,
+ 0x19d4fb1e, 0x0e14bbbb, 0x69b9da7c, 0x9adf734c,
+ 0xaa3cbf09, 0xf49a1914, 0xedc06e2a, 0x2e26907c,
+ 0xe4e7b0f3, 0x555e18bd, 0x64b9378c, 0xc015228c,
+ 0x6652b24c, 0x964f67df, 0x53e52747, 0x437f0435,
+ 0xf5eaae4d, 0x67e627a8, 0x88922d96, 0xacefb73d,
+ 0x196b3dab, 0x18df6f1d, 0x1fb1e3a4, 0x41368e0e,
+ 0xe6b38563, 0x2217d9b7, 0xd60fcd57, 0xc6e54482,
+ 0xe13857b7, 0x9608f663, 0xa98387d0, 0xd0dc79e9,
+ 0x5eb66007, 0xa6d47edc, 0x216ce2ff, 0x774fbfab,
+ 0x015327b3, 0x601bc15e, 0x11008332, 0x9530321f,
+ 0x81f5a229, 0x1ec81430, 0xa9b62b58, 0xad7106c6,
+ 0x316ccc64, 0xaf84878f, 0x57196f56, 0x337e718e,
+ 0x599624b5, 0x783bbb19, 0x0bd61790, 0x5ea38aeb,
+ 0x80924f04, 0xfb90c004, 0x517a5a49, 0x72dc2f94,
+ 0xc67f6691, 0xa5fa6d1b, 0xf37258d2, 0x052a2710,
+ 0x2265b5d6, 0x1ff7543f, 0x8d98d31a, 0xd07d518e,
+ 0xc693a93b, 0xe322f235, 0xfd5a13a6, 0xf4b5bec7,
+ 0x6a879bf6, 0xb5c9c3c5, 0x02b4c679, 0x79126fcc,
+ 0x9471f8ca, 0x240b738f, 0x82d6eed8, 0x5cebe2ab,
+ 0xd0ce0802, 0xc352d955, 0xab391b94, 0x255e337b,
+ 0xe24e9d28, 0x590b078f, 0x6f02bdcf, 0xa798c871,
+ 0x032a8771, 0x4c177274, 0xe6e5f8fd, 0x5802dd90,
+ 0x99c73404, 0x3d6d3858, 0x888fee18, 0x54fe3a75,
+ 0xd1de4ef6, 0xe70daa9e, 0xd8117486, 0x5e724f88,
+ 0x7484de9a, 0x416b0091, 0x649600dd, 0x79cfdc3f,
+ 0xdf187828, 0xfb82fa6a, 0xe1373450, 0x99b1b237,
+ 0x625c568c, 0x346de1e2, 0x3d09ae1c, 0x61e47376,
+ 0x3b3e6b1b, 0x143a8e94, 0xe8f18ca6, 0x930210e2,
+ 0xc7ad686f, 0xd79827d0, 0x843e3682, 0xb8df98e7,
+ 0xdbb1452f, 0xfd7718fb, 0x050c794d, 0x620c3ed3,
+ 0x37a9b4e9, 0x930917b0, 0xcf005633, 0x37881383,
+ 0xbccfabf2, 0x1ef2b275, 0x5373eb32, 0xf720edd7,
+ 0xf7e2c7be, 0xf510f803, 0xe0af57df, 0xed683137,
+ 0x3b1824d7, 0x4e518264, 0x75ca2a31, 0x8e665a08,
+ 0xda2f2631, 0x90f2e624, 0x0b7f10ed, 0x13c77405,
+ 0xbc8f1852, 0x50efce03, 0x6f37e62c, 0x2146f0ac,
+ 0xcba12673, 0xb0cf7aa3, 0x62c260c6, 0x914a686e,
+ 0x4f88de7d, 0xe08828e4, 0x836ade2e, 0x1169dea1,
+ 0xfa527a96, 0xdb0b67db, 0x81c54c3f, 0x3242a174,
+ 0x3720d1eb, 0xa2d66d86, 0x3aa9d815, 0x2f50dd70,
+ 0x7ebd695b, 0xa23ce46e, 0x809e2b62, 0x80868a12,
+ 0x9fb19fde, 0x063cf06c, 0x5fb5c6be, 0x02305e67,
+ 0xb07a8437, 0x802d6f3c, 0xa3ae466f, 0x78b26abc,
+ 0x1b794720, 0x32909b4d, 0x341790e7, 0xe970c75d,
+ 0xe486e869, 0x77ff3164, 0x2af5bb86, 0x8cbe9546,
+ 0x0c554b7f, 0x1d6733f9, 0xc8a2e9dc, 0x55be433a,
+ 0xa8822719, 0xc3bb4f7d, 0x8ff63bad, 0xccfca1d7,
+ 0xfbd989c3, 0x00cc0aed, 0x62d8ea04, 0x28db507e,
+ 0x9b010be7, 0x5ba82df9, 0xc5033952, 0xbb36456a,
+ 0x503bedc2, 0x7f34a7d8, 0x4c95f684, 0xa9fe83c0,
+ 0x2119ef47, 0xb140a84c, 0x110d1d3e, 0x29d56f44,
+ 0x6d005db8, 0xb5266ffb, 0x5cd3945d, 0x2245bf69,
+ 0xc0240f64, 0x1ab59295, 0x3dbfbe90, 0xce0195d8,
+ 0xeb62d7af, 0xc674e175, 0xb9a0b91a, 0x04f4fd68,
+ 0x5034bc19, 0xb5f1e1d0, 0x4d17664b, 0xf3a3b573,
+ 0x45bd805d, 0xec3af23f, 0x83026378, 0x7b5796e6,
+ 0xedafef9a, 0xcc728ce5, 0x8e7b49b5, 0x30b6e2ea,
+ 0xd624ca20, 0xf92dc17d, 0xe1cf296a, 0x5391caed,
+ 0x993eb46a, 0x7eadd9ee, 0x20e03f32, 0x10309bda,
+ 0xc42a95b2, 0x264c9739, 0x47d678a3, 0x5aca4b99,
+ 0x27c8bd0c, 0x08dc0c8e, 0x41a0d977, 0x84495d9a,
+ 0xb3e7c7f5, 0xbb7208c3, 0xeeffd6af, 0x99728ae8,
+ 0x96e3acc5, 0x46c5b5f0, 0x4e9692c7, 0x4a2856b6,
+ 0xa6e70afd, 0x0ebfa9d7, 0x5a617dfe, 0x136458c5,
+ 0xe81577fb, 0x9a346ce6, 0x2276bd4b, 0x19872c41,
+ 0xebeeaf79, 0xf1eee391, 0x3a092d4b, 0x6d480ae7,
+ 0x11cbc262, 0xfd19181e, 0xcd2baf7b, 0xf3d3b630,
+ 0x7e02cd19, 0xeafa37c0, 0xfc3ab903, 0x19d7d5ea,
+ 0x1522555d, 0xe659e8af, 0x4241187a, 0x0c95a038,
+ 0xf7a8c439, 0x2ba81067, 0x8537a7da, 0x3fffa8f8,
+ 0xa86c8fe5, 0xee860d78, 0x9cdde285, 0xe59c35d1,
+ 0xf3423ace, 0x3b9f18d6, 0xe6b4d111, 0x6307359e,
+ 0xc10d0c18, 0xdd6a1283, 0xd61b5cdb, 0xa52c1e9f,
+ 0x1cf0ee74, 0x207bfe55, 0xab0c199a, 0x6680655f,
+ 0x458ac1c5, 0x59669d48, 0xde00456a, 0xfa24fb02,
+ 0xdb25e6b3, 0x4759b8d5, 0xc297affa, 0xd24e5878,
+ 0xf79ba7bd, 0xcb7ec9d8, 0x8df35387, 0x29ee1378,
+ 0x296aa1a2, 0x0292c907, 0xf2a42aec, 0x2d91514a,
+ 0xcff397e1, 0xdd316608, 0x6d45c90a, 0x361936da,
+ 0xed008c30, 0x24fa496f, 0x5c1ecc6c, 0xd239ade4,
+ 0x143fcedc, 0xeb5a8ea5, 0x893127d2, 0xa1c06528,
+ 0xfeab6608, 0x8f773eff, 0x17b1cd39, 0xb6cdb5f1,
+ 0xae013c68, 0x6757a0e1, 0x236096f1, 0xa994b205,
+ 0x7c717a31, 0xdf765300, 0xcf9936c7, 0x5d5edb37,
+ 0xeaa7c17c, 0x73ae0a85, 0x4f0a3a26, 0xadf63001,
+ 0xeeabbc57, 0x65e37d8c, 0x93e64068, 0xc5686912,
+ 0x810e38bb, 0x1c89b1e6, 0xdb5c9e5a, 0x217f4efb,
+ 0x054ca07a, 0x90624ad1, 0x4f1212c8, 0x9099eb4c,
+ 0x8ca443a3, 0x99887edb, 0xb8428dd8, 0x60ad4105,
+ 0x9153afa4, 0xefdf8bcd, 0xb82041ce, 0x22c39153,
+ 0x4ba5ab79, 0x73b4a621, 0x45a91da2, 0x9d7597c7,
+ 0xe501fdaa, 0x45a8fce2, 0x2b32624d, 0xcef2645e,
+ 0xc88eead4, 0x72bbee6a, 0xb63e6cb9, 0xc17830fc,
+ 0x5fc477f0, 0x56f8f783, 0x8742083a, 0xd3bdf98f,
+ 0x2222e3ce, 0xf20cd44a, 0xa3c8f166, 0xfb70b222,
+ 0x88cf7d3c, 0x97064ca0, 0xa81e37c3, 0x2045a54e,
+ 0xec70f5d7, 0x8461dad2, 0x0478a8a7, 0x88753a88,
+ 0x9753a230, 0x982cff7a, 0xafeff6b7, 0x7913a243,
+ 0x44e314b1, 0xb71105e0, 0x9d0e8204, 0x237c3118,
+ 0x4d8873df, 0x0368c70b, 0x432f8cb4, 0xfd493409,
+ 0xafea07a6, 0x4afb576d, 0x8e517d06, 0x7a3b84f6,
+ 0x1bae9381, 0x8f62e882, 0xa9f1e783, 0x9824163a,
+ 0x8054f277, 0xe62e9cbd, 0xc39dde1b, 0x24e232f8,
+ 0x5acdaacb, 0x27074e5b, 0x5383d8ff, 0xd28f6398,
+ 0x4bd1d713, 0xd6282ec9, 0x4cc38f04, 0x02432175,
+ 0x18386f71, 0x3cf5efea, 0xa4913139, 0x5ab9eb4c,
+ 0x63ec6690, 0x0b882807, 0x6ae93e1e, 0x25a6cd92,
+ 0x71fa0fb7, 0x5c4d0517, 0x507a5f0b, 0x9ad2772b,
+ 0x7d3f0e07, 0x3205aa7a, 0x7c946116, 0x6b243eaf,
+ 0x7d33f31e, 0x45c18845, 0xdae4efc6, 0xa9047dfe,
+ 0xd178dcd1, 0x6aa30ca9, 0xdeabd81f, 0x2876c341,
+ 0xde3095a5, 0x8f93d022, 0x9a78e64b, 0x147aa0a0,
+ 0x5dfeb2f9, 0x158167ff, 0x1335d1b4, 0x675d6ea6,
+ 0x066f0909, 0xc9324702, 0x68a75527, 0x740aa84f,
+ 0xea686192, 0x78af651b, 0xe99f5db7, 0x09cbc101,
+ 0xdbee388f, 0x1694ff29, 0x30d9ed06, 0x1d4a9a16,
+ 0x0c60ca8f, 0x2ca66130, 0xb4ec8db1, 0x6171e7b1,
+ 0xef850685, 0xf54862d4, 0x16c0dadf, 0x12f2dfc9,
+ 0x2b243a21, 0x52a919a8, 0x8d5f31e7, 0xc088c5ce,
+ 0x7a19e823, 0xc1e6b67e, 0xa4f9108d, 0x8db0d42a,
+ 0x7875a613, 0xa255a349, 0xd97b2cb6, 0x559065be,
+ 0x6fcd2ef6, 0x8d1171bb, 0x8f18fddb, 0xe595af9d,
+ 0xfcc7b725, 0xd4dd9eab, 0x8eb142c2, 0x0dba44ee,
+ 0xbc15e3c2, 0xdd4ac8ae, 0x983f0570, 0xbde2b8f4,
+ 0x05d637bf, 0x9b743557, 0x09715719, 0x0ff8e59a,
+ 0x149f663e, 0xeebf9293, 0x3c185a86, 0x6840c25e,
+ 0xc55135f1, 0xa2f18168, 0x8bcfe5d5, 0x6fccbd86,
+ 0x3788ec27, 0xf329aa1c, 0x58660612, 0x16117c7e,
+ 0x14f2d445, 0x4920e0b0, 0xff40c550, 0x3b63926c,
+ 0x0381f602, 0xfdea61fa, 0x2e38a30e, 0xfc5126c0,
+ 0xab87149e, 0x5feec484, 0x637981b0, 0x8c0f6a85,
+ 0x104a7e55, 0xa90838d3, 0xa939d5b4, 0xbe2af69d,
+ 0x1a317bd4, 0x4a9b5f22, 0x63d814d9, 0xc85123be,
+ 0x7e1481ef, 0xa603d165, 0xb7e841fe, 0x30ed4470,
+ 0x863de857, 0xe32a5888, 0x1cd57a0c, 0x43c1cdfb,
+ 0x04674312, 0xc35d2105, 0x371e3da1, 0x0d1e1e4a,
+ 0x4b40954c, 0x390999f6, 0xe716caa2, 0x652a4e26,
+ 0xd5c0cd7f, 0xec4ae3f0, 0xa3d608ec, 0x1dededb3,
+ 0x182ed1cc, 0xe489b2ad, 0xb054197c, 0x42c190a8,
+ 0xa8506f5b, 0x6418f784, 0x92d4c59f, 0x4b418817,
+ 0x5d201fe1, 0x5a9a37d2, 0xb0091aff, 0x1fe39f66,
+ 0x84780a91, 0xe6064a1b, 0x1cd45cbe, 0x6c755ad5,
+ 0x4caf827f, 0x75dd9197, 0x3729cec0, 0x8aca424d,
+ 0x776e9d2e, 0xef760768, 0xdf4198de, 0x9f05d70b,
+ 0xef057918, 0xec188356, 0x4ece4eb0, 0x772f0f1d,
+ 0x362ff7e3, 0x4a03ec39, 0xca53b1ac, 0x73c28a2e,
+ 0x40e5b160, 0x16e86af3, 0xa0cbdb1c, 0xa6aed291,
+ 0x0ab81158, 0x0c7f02b0, 0x275ae7bf, 0xe0d7c4a9,
+ 0x5522d0ba, 0xdae982a3, 0x8a0b4523, 0x894f1444,
+ 0x7756510f, 0x1c9b8981, 0x5f069df3, 0x7c8c7760,
+ 0xa3ee5d29, 0xd06d000b, 0x7728c354, 0xc1c4591b,
+ 0xfde7cbd0, 0x544700a4, 0xdffce270, 0x32d2487b,
+ 0x2ca88ecb, 0xe7cce47b, 0xf83288bd, 0xdd339922,
+ 0xbdd47228, 0x76db965e, 0x431c0f8f, 0xba5d25a3,
+ 0xcd834ae9, 0x86921f22, 0xe4877ac2, 0x3e1b5b95,
+ 0xd5234c8f, 0xc7e7385e, 0x928ddc50, 0x0e4a0fa2,
+ 0x8050e130, 0x82f33e5c, 0x58138b8c, 0x09dc5478,
+ 0x2c289b5f, 0x15b50b6e, 0xe644f3c2, 0x1ec32392,
+ 0x6329f8d3, 0x4bec7bba, 0xf287393f, 0x6ddfdc28,
+ 0x19279547, 0xd959cbe9, 0xde36bdfe, 0xd331cb85,
+ 0xfb54623f, 0x27312ff7, 0xa130674d, 0xf685a278,
+ 0x66568885, 0xf91e7b16, 0xd6d478f9, 0xeb3e71e3,
+ 0x12539a50, 0x59daf29a, 0x1ea64234, 0xe969a7c4,
+ 0xacaa2ce2, 0x8f0031dc, 0x1d08a790, 0xac89aea9,
+ 0xc2a043c8, 0x6bcf4143, 0x946fface, 0x1adef1ab,
+ 0xebf52457, 0xd475c20b, 0x3a39c57f, 0x30c9780c,
+ 0xc0f043ef, 0x5b5a39be, 0xe645e543, 0x255f0ba3,
+ 0xab3b85c4, 0x21759224, 0x756cd543, 0xb7742f3a,
+ 0xaf97507c, 0xa2453bde, 0x96b1f799, 0xfec73877,
+ 0x9c34bf8e, 0xdf9231db, 0xeedff688, 0xf67910c3,
+ 0xde6024ae, 0x0a62d30e, 0x65d1c88c, 0x3011e133,
+ 0x39f50d0b, 0xfd243709, 0x2da0e404, 0xdb4e401c,
+ 0xf3aff2f8, 0x6047fc17, 0xf0e9ead3, 0xdf1ae302,
+ 0xaabdc780, 0x5b63e544, 0x22bed644, 0x4dcf2470,
+ 0x19d2a919, 0x903382c1, 0x2e402150, 0x4872f3f9,
+ 0x0d4ca05e, 0x0a3d9ae2, 0xe61503aa, 0xaf5aa08c,
+ 0xaad5d0d9, 0x38340bfc, 0x8a5d80d3, 0xac4102b2,
+ 0x4370fc0d, 0x9bfe01a7, 0xf615110a, 0x4f503457,
+ 0x498dd852, 0xf300128d, 0xeaf6bfd7, 0x768fb7bf,
+ 0x83ef2619, 0x05514fe9, 0xd50aa19a, 0xf86947f2,
+ 0xfc74994b, 0xfd5c9a73, 0x38e27cac, 0x6b262e0c,
+ 0x34be3f6e, 0x87cb6bb3, 0x3dbdd583, 0xb8e9c34c,
+ 0xb311507a, 0x79935daf, 0x263da6ae, 0x7ad52658,
+ 0x319fada4, 0x5e71607e, 0x761fd4e5, 0x00f87dcf,
+ 0x09270f2d, 0xd93aff66, 0xfb26e3a9, 0xdb25947c,
+ 0xc5629920, 0x45e5085c, 0xd936f257, 0x317f73a2,
+ 0x39a0e9ba, 0xa26e9f7c, 0xe1dd2b14, 0x60b43ee8,
+ 0xc735576f, 0xf0f57ce3, 0x15a992cc, 0x85e2e70f,
+ 0x41252493, 0xa00fc96e, 0xee0d164e, 0x9a2fd342,
+ 0x17bb6ddc, 0x43bb570e, 0x4d76b6ac, 0xd4936e7f,
+ 0x986a6732, 0xe4c03135, 0xc6b14bc4, 0x55ba9b73,
+ 0x9034db90, 0xfe753761, 0xf7975632, 0x2a178d8b,
+ 0x322b692a, 0xb31a855d, 0x362689d5, 0x20780137,
+ 0x79bbbd00, 0xbceaae8a, 0x224a74e8, 0x0fb909fd,
+ 0xb890dff6, 0xd4089bfa, 0x926d8b60, 0x6f5c0e24,
+ 0x71977fb0, 0x46413ccf, 0x513ca99d, 0xe2d8c8ae,
+ 0x7a4252d0, 0xeeed8154, 0xc680e6c1, 0x5a8c66ac,
+ 0xa855ccd6, 0xffdef525, 0x5f968fe1, 0xfb8756aa,
+ 0x1a5cb2c4, 0xeac328f6, 0x93a4e911, 0xb5a09138,
+ 0xba9ac8a8, 0x4191c901, 0x53ec0c31, 0x85c96494,
+ 0x4f972ed2, 0xf9f71b28, 0xdabcb423, 0xe82713ac,
+ 0x4d72f3df, 0x831af5df, 0x1715e437, 0x8b6f6a68,
+ 0x76252952, 0x8cc152b0, 0xbea262b4, 0x102f1560,
+ 0x18a2c2f6, 0x5839d7cd, 0x7ac4e51c, 0xaa94091e,
+ 0xa25211d9, 0xc1c30509, 0x669b09b0, 0xc44c6de2,
+ 0xa9b78ae1, 0x8790646c, 0x78049e2e, 0x22edab05,
+ 0xf68a2e25, 0xbeb03399, 0xa47f6039, 0x279e4d42,
+ 0x66629c7e, 0x6ce2d290, 0xa688d117, 0x2acac477,
+ 0xa3587cf4, 0x3f6a4bbe, 0xee014b78, 0xeb8a8f51,
+ 0x41d49058, 0x28ec1df3, 0x2bbf4908, 0x8c46e525,
+ 0xbb7e6a2b, 0x2ef264a7, 0x80f2ea8c, 0x1bdcc09e,
+ 0x359a9f19, 0xff25ddb6, 0xd23c07aa, 0xd7a6999b,
+ 0x6650425b, 0x6e0e62de, 0xf0efedd0, 0x67b5d110,
+ 0xf2853e31, 0x22e72b2b, 0xcf42eedf, 0x19a1ade4,
+ 0x5ec9217e, 0x979d620b, 0x4716de11, 0x4dc51dcd,
+ 0x07c751ac, 0xa18ec017, 0xa9360d50, 0x5f5567b9,
+ 0xaa29ee88, 0x359acec2, 0xffe70d66, 0xe0a4d339,
+ 0xa30b0041, 0xffbdc17e, 0xea9a34b5, 0xdf5ef104,
+ 0x8e2b9779, 0x6118b665, 0xa3e9bfc8, 0x4582c1de,
+ 0xf41570a0, 0x067a2ae6, 0x381e704c, 0xc919a87d,
+ 0x4fa95cbc, 0x151cbe8c, 0x07aacaa6, 0x46d48b01,
+ 0xd87a8dbc, 0xdec805d4, 0x91526f9a, 0x0086f881,
+ 0xe9b56bb4, 0x92c84ec8, 0x0c1defa4, 0x140f7fc0,
+ 0x59af67a0, 0xe4b7064e, 0xc743ac3f, 0x03daf36f,
+ 0x3beb03d1, 0xafa266e6, 0x0841dbf8, 0x2f5c8573,
+ 0x1d8ebedc, 0xec7784e8, 0x574fe13a, 0x8dd6d989,
+ 0xd084f5e3, 0x718fffa8, 0xc6ceb8a1, 0x056ff3e7,
+ 0x8213e34b, 0x8d65a185, 0x5cebf134, 0xeabeb5b4,
+ 0x22161265, 0xc05581f8, 0x9871f6fd, 0xba60da2d,
+ 0xdba85220, 0x5e8660b0, 0xd88c8f67, 0xaabcb748,
+ 0xddcb74b4, 0xfb404f6a, 0xbbdd2ed7, 0x4b7b3501,
+ 0x7d71379c, 0x9e72eb89, 0x69e385c6, 0x7c6c1427,
+ 0x3ddb8cb7, 0xafa28900, 0x16592d8f, 0x1e00232f,
+ 0x3f01c408, 0x92bf2031, 0x284c780c, 0x3446ad71,
+ 0xe85881b7, 0x3eeed4da, 0x343526b0, 0x4fa3a536,
+ 0x7e555986, 0xf68db7a0, 0x3b6dc978, 0x83c0fcbb,
+ 0xe6621f11, 0xb5655e40, 0x0ce1f9a2, 0xc09fd28c,
+ 0x78ddfcd8, 0x9472bfed, 0x74547420, 0x725903ee,
+ 0xdbd220d5, 0xe3881f96, 0x4146a6b7, 0xb04cbdfa,
+ 0x4fe69746, 0xe17334f0, 0xac460fbc, 0x49b29cc9,
+ 0x9d5ecaff, 0x1248a36e, 0x9f6dc260, 0xdaab7b50,
+ 0x96dfc49a, 0xb5f1366b, 0x817e4272, 0xed869802,
+ 0x6d908607, 0xa2c5b9fe, 0xc0efd578, 0xbbb42a02,
+ 0xed1d3c7c, 0x3cf29a98, 0xa8249ed9, 0x7a29768e,
+ 0x97ada287, 0xaecf9ead, 0x26d483a0, 0x17216d12,
+ 0x2eca6e6b, 0x77e0c2a7, 0x329158b6, 0xa4c61d43,
+ 0xc903e068, 0x6561939c, 0xec320289, 0x079ff8e3,
+ 0x24d8cdd5, 0x9b4e370c, 0x90672bb1, 0xb6c7aaf9,
+ 0x8dd0ac13, 0x36adc925, 0xd262e319, 0x6dbebf09,
+ 0xef8f288e, 0xeea4ad16, 0xc93f3706, 0x48849c65,
+ 0xf7f780dd, 0x55f3fa2f, 0x5896c272, 0x6e743071,
+ 0xaf675bdb, 0xe16f4c3e, 0xec48aad7, 0x9fb145a6,
+ 0x90086058, 0xdae0d020, 0xa50f73c3, 0x4e43b7e0,
+ 0xfc103a19, 0x2f3fcbde, 0xeaeca2d8, 0x74910aa1,
+ 0xd40fa076, 0xb718e2a3, 0xa9fb6add, 0xd0a5bc70,
+ 0x05d17b2c, 0x594954de, 0x59bf3f5e, 0x41624d25,
+ 0x60770de2, 0x9d32f8e3, 0x0e7588c1, 0x1f3677b0,
+ 0x21c379f3, 0x3fcbb7ac, 0x79764479, 0x37c20880,
+ 0x7d491746, 0xb03d6fc6, 0x691e3054, 0x57542bfa,
+ 0x959cc18d, 0x22ee98a5, 0x6110a373, 0xd429b7fc,
+ 0x9181496c, 0x17e5e56d, 0xf7b69960, 0x81c3f770,
+ 0x11c2ec89, 0xb1a132b7, 0x54286945, 0x0a1b4eaa,
+ 0x8cb1b5cd, 0x9ed6cd13, 0x0a6477ee, 0x724a5b35,
+ 0x3550905c, 0x79d6d986, 0x37724798, 0x5ba2169c,
+ 0xd122657b, 0x79fbd815, 0x26aee21e, 0xd6e7243f,
+ 0x62c48828, 0x0562d740, 0xa1bbe8a3, 0x9ae5dbaa,
+ 0xeb3ec654, 0xeeac837f, 0xa54bba8c, 0x7fac6536,
+ 0xffa8c35b, 0x061f8bfa, 0x7d9533ec, 0x78f87477,
+ 0xcabd108e, 0x5bcf62f1, 0x58d83fef, 0x05e6a00f,
+ 0xd5e4cff0, 0x4c44180f, 0xf21050b4, 0x255cbabb,
+ 0x8f4ae68d, 0xaa822b11, 0x1c3bb1b5, 0x347c77cb,
+ 0x366ef0d6, 0x0f742f69, 0x3d5e3fc3, 0x7e4dec5e,
+ 0xe6515e83, 0x101f8de5, 0xd8237dda, 0x0d700c40,
+ 0x13ac76ba, 0x008f46d3, 0x9f1a0edf, 0x0eeace4e,
+ 0x1596d8f4, 0x46d843c9, 0xd1aeb9be, 0x72e09971,
+ 0xa93353ba, 0xb9c3c6aa, 0x73b4947d, 0xc62131e2,
+ 0x2a92f319, 0xb09606d4, 0xcb133c6e, 0x0d5d85ec,
+ 0xa757b193, 0x00785404, 0x16e66999, 0x4f76e608,
+ 0xbfd6b3bd, 0x3e3d93e6, 0x6f63d7dd, 0x8c3dfb98,
+ 0x6a102833, 0xa91ea02c, 0xd1070130, 0xb6bf3c3e,
+ 0x21fb4b30, 0xdf6297fd, 0xed73d0ad, 0xf791741e,
+ 0x8518ea52, 0xadb6b7ff, 0xe2bd4fe0, 0x5c844be4,
+ 0x3a5567c8, 0x4f6ec218, 0xdc67a1c3, 0x59f2b806,
+ 0x646ad07d, 0xe5abd80a, 0xbf0eb949, 0x03e4844e,
+ 0x3ac74739, 0xa2bce00d, 0x08c21c92, 0xf0e6759c,
+ 0x8fd20178, 0x79ff53e1, 0x2bd18ac1, 0x4fdf3ddf,
+ 0xfc54f10a, 0x7665fff2, 0xd98cd3ff, 0xfe2ba8e2,
+ 0x52dd9a64, 0xc3d1f3b0, 0x15f41c0f, 0x7669f39b,
+ 0x9072e300, 0x9efa554f, 0x0fb67177, 0xdbcfc4ac,
+ 0x861ec40d, 0x8f6fa82c, 0xe2de1597, 0x4964d065,
+ 0x8f15846a, 0xc382e6e2, 0x58770e9f, 0xa09bb14b,
+ 0x708eb67f, 0xa49f057f, 0x83b11fcb, 0xb0d34112,
+ 0x7a9a5daf, 0xafd33ba5, 0xe5d89e53, 0xc1afc620,
+ 0x229da718, 0xddf2759f, 0x45c0efb1, 0x9d5da4a6,
+ 0xd5230d44, 0x7ebf292f, 0x3996a3f1, 0x7bb08a21,
+ 0x8fe43e7f, 0xcefe1068, 0xae1c2659, 0x3e682d77,
+ 0x31b27947, 0xde0620e2, 0xc2d11457, 0x39f82f72,
+ 0xd4bdea10, 0xd4048eb7, 0xb8efda7a, 0x6c34ce7f,
+ 0xedf09103, 0x58d1b66c, 0x02a70f28, 0x732b9b67,
+ 0xbdd49541, 0x2e2cf321, 0xb1cdb375, 0x8dde29db,
+ 0x601f6b01, 0x785529e8, 0x41ad52a9, 0xed71153f,
+ 0x07c79c1f, 0x9e461531, 0x501068ef, 0x2dc5363d,
+ 0x33cef6d4, 0x064ad3a2, 0xfaaa9bfb, 0xf76c5b83,
+ 0x9289e370, 0x0154d7cd, 0x83d0e636, 0x4b3842ba,
+ 0x2cae0edd, 0x5ce95b31, 0x3db27a61, 0x0f51b0ca,
+ 0x95bda166, 0x8df62ddf, 0x2cc5641e, 0x3b300f09,
+ 0x26e76f94, 0xfd78be19, 0xc6792770, 0x22d84fe2,
+ 0xd8eb196c, 0xe31d6b01, 0xdb03bb74, 0xf6e121ac,
+ 0xc1cdde3a, 0xe4c11ad4, 0xb4bc4bf2, 0xceb0e8b8,
+ 0x4ea9774b, 0x16a5e47b, 0xaa971fec, 0x1194532e,
+ 0x9128d77d, 0x03bc2c57, 0x87c7e234, 0x7d6b1d7e,
+ 0x78cee50f, 0x776a5ead, 0x07a11696, 0xfa84a709,
+ 0xfea6994f, 0xed358a6f, 0xdeb08ffc, 0x5d2f6dc5,
+ 0x2755ef28, 0x846a53fd, 0x63db6af1, 0x76ecd9c2,
+ 0x17258c17, 0x34295fc7, 0x397dbd9b, 0x9e4cee04,
+ 0x4be32c1b, 0x132d214e, 0x5bbcce39, 0x9a2625a4,
+ 0x0ab4a812, 0x16bf4dfc, 0x59119f94, 0x539c8bec,
+ 0xb3fc6822, 0x1925d683, 0x52918b41, 0xa70912fb,
+ 0x707d6f19, 0x2eb3abc2, 0xc1346a8b, 0x77b15003,
+ 0xf9b94f05, 0x93de2cec, 0x8b5dd8a8, 0x6da2d243,
+ 0xe983be77, 0x3900428d, 0x89ca7386, 0xfeeb986e,
+ 0x809e485e, 0xe6e278f9, 0x0878a9a2, 0xa885bce2,
+ 0x760c8195, 0xd32bbe96, 0x8fae0dd5, 0xdc34b30d,
+ 0x16ae4373, 0x145399ab, 0xb15e8d82, 0x985afd4a,
+ 0x940e003d, 0xaeebaf5b, 0xd480e43a, 0x8739a867,
+ 0xbabf7203, 0x4a9a3cf1, 0x921ba29c, 0x3297b9ea,
+ 0x95fa0d58, 0x4d3b4b0b, 0xb2d5664c, 0x46e2119c,
+ 0xcca14ac4, 0x976a18e3, 0x2897eaa4, 0x027121e9,
+ 0xed13e632, 0x6b6f0121, 0x56c171f6, 0x706a9172,
+ 0x6544f1b1, 0xb6ff2537, 0x3574b6b9, 0xf8652021,
+ 0xf4232bb5, 0x70af56bd, 0x49c4647a, 0xf844d462,
+ 0x029cd35d, 0x556c1755, 0xa8175a9c, 0x52eb80f2,
+ 0xc11acf51, 0x318533a5, 0x512efd2f, 0x52ed6298,
+ 0xec6ced43, 0x711e465f, 0xfbff9bd2, 0x218a90db,
+ 0x87fdd5e9, 0x72b4193b, 0x9936e8c1, 0x5d4aec55,
+ 0xec0330ec, 0x93587390, 0xca7d3e24, 0x23cb68e2,
+ 0x118dd06f, 0x2886289c, 0x91512d10, 0xa6b6a2c1,
+ 0x664301c5, 0x88b752b7, 0x64898d8a, 0xeb640624,
+ 0x23d0d326, 0x72a1f775, 0x92d6f0eb, 0x4dd8738f,
+ 0xd078d93a, 0x06753e1c, 0x9cf0c82c, 0xf00cc737,
+ 0xfc0ecc80, 0x33143b0c, 0x4dbc5b7d, 0x48b0f487,
+ 0x949f695c, 0xeb6e3068, 0x1aee517a, 0x8eabd9d1,
+ 0xb93e0ffc, 0xc4b49583, 0xd910f46d, 0x2844c6c2,
+ 0x24dc24d7, 0xa46eba6d, 0x554136eb, 0x7f7829ad,
+ 0x01a0ac92, 0xf119a06b, 0x8062e710, 0xf10ccaf2,
+ 0x6dd59f14, 0x5ac0ba38, 0xd3a4dde1, 0xc64cae46,
+ 0xb72a8bb3, 0x52ef37f5, 0x343766ed, 0x5fb6a469,
+ 0xa5c94b87, 0x8e6b898f, 0x0e2b0d8e, 0xbe8acd6f,
+ 0x82233d64, 0x5e86a977, 0xa776c960, 0xcacf60d5,
+ 0xa57f2025, 0x52ea9bd0, 0xb295e953, 0xb1270add,
+ 0xf15658c5, 0x5a6d399a, 0x34c8fb55, 0x40fc94f0,
+ 0x3b83bd2a, 0xf894c342, 0x15f0179f, 0xf1ebf249,
+ 0xe985b001, 0xd36553bc, 0x45b449b5, 0x66e02d8e,
+ 0x0fedbd4d, 0xce5a6f83, 0x44991f4d, 0x3e77771a,
+ 0x557e741e, 0xcb9c8fb7, 0x6f96d05f, 0x6bc3ad7c,
+ 0xfe74f377, 0xabb544f9, 0xc8e5c138, 0x042cef42,
+ 0x36e6e463, 0x6d16afab, 0x2f2b9bd3, 0x32079836,
+ 0x51769d1e, 0x8cc04292, 0x525565be, 0x01d56797,
+ 0x720ad744, 0x2b5df827, 0x7c6e7011, 0xde5bf3d3,
+ 0xef9d6a47, 0xbf01585c, 0xe1603753, 0x01e68b5b,
+ 0x58d8acf0, 0x361a243c, 0x3776bb5e, 0x85a6ecf0,
+ 0x63c02a88, 0xaed9b0ca, 0xe40c2f4f, 0x514ea59e,
+ 0xd7bb50a6, 0x7001b952, 0x6ca0a02f, 0x67e8539b,
+ 0xe1f361c8, 0xe3716e13, 0xd586fef9, 0xfaf596b0,
+ 0x4640fa6d, 0x80705225, 0xacb7d58c, 0x7fae4071,
+ 0x26ee2f89, 0x48b8d5dd, 0xf4574eff, 0x98a58c8b,
+ 0x618e6e9a, 0x347e98ab, 0x5cd6cfae, 0x4f5b528e,
+ 0x771d54b4, 0x21516d45, 0xf38af4d4, 0xec0b3b4b,
+ 0x14e6034f, 0x7fbd2f59, 0xe6239e0b, 0x5ebc33b9,
+ 0x570813e7, 0x60d71433, 0x2e1904a6, 0xd812f1e2,
+ 0xcc3fdb32, 0xaf49475a, 0x1ae1a880, 0xe51fc578,
+ 0xb55554c1, 0xf949cc2c, 0xeabe1429, 0x2960311f,
+ 0x53230b20, 0xa5a3894e, 0x20446134, 0x74c8b394,
+ 0xb8431124, 0x076686a6, 0x2a0150a0, 0xfb6c2ce8,
+ 0xc8e5fbbe, 0xd0d0fa89, 0xe8665995, 0x9ce4ca40,
+ 0x4eadf970, 0xe072ed22, 0x452c3086, 0x2764ed1b,
+ 0xd448e31d, 0x4c8c021a, 0x99c64394, 0x2ba2d7c7,
+ 0x8934267c, 0x8cb9794e, 0x3199ceee, 0x04d33b9f,
+ 0x088b031e, 0x24943620, 0xe2f9107f, 0xb4abbd6e,
+ 0xb38eaaa1, 0xa57c73ed, 0xce94691d, 0x04d698c2,
+ 0x4e7fb748, 0xf2c08794, 0x686c6194, 0x43444a75,
+ 0x1d58410c, 0x7dabdc47, 0xdd74abbf, 0x3ec0abc1,
+ 0xb7b670d2, 0x7b0de6c2, 0x8a9f70f9, 0x6ccc208a,
+ 0x6ce3de6f, 0x551fb837, 0x8d025ec4, 0xc7442d5a,
+ 0x40f816f7, 0x2094a730, 0xfe1f6937, 0x80d0db62,
+ 0x183becf2, 0xd35d3f49, 0xcc998142, 0xb6739af0,
+ 0x97b0368c, 0x441b052c, 0x70ca379a, 0x577e6cdd,
+ 0x7437d170, 0xb787ea6b, 0x6d3b604f, 0x3b09f548,
+ 0x97f7c5b4, 0xfcf26e94, 0xb6f45efb, 0x79a8935b,
+ 0xbecadb7d, 0xeb675066, 0xe6c22273, 0xd2cf07b8,
+ 0xc0861fb9, 0x5cfd6a54, 0x365d62b9, 0xa609756d,
+ 0x7b72e7f7, 0x102f49fb, 0x90027250, 0xda9eb6b2,
+ 0x65fba88c, 0x62fa6f4e, 0x6e879917, 0x7d927e47,
+ 0x8002767c, 0x79151e4f, 0xe66a40fe, 0x1f2439d6,
+ 0x17a01a2b, 0x897cebd5, 0x2ad301cf, 0x43d218d7,
+ 0xc715e53a, 0xcee15463, 0x90bb7eb7, 0x167ee2c2,
+ 0x550941e6, 0x1c8a8a47, 0xd740f5b5, 0xdf8251ff,
+ 0x6df5fc79, 0xc2430fd2, 0x7201d76c, 0xc5002d57,
+ 0xbaeec9a5, 0x4843f217, 0x728f1a02, 0xceb636b1,
+ 0x63743721, 0x6ddd4de1, 0x4a67f6f0, 0x8a2a1ab6,
+ 0x8c44023b, 0x15f9cc7b, 0xaa420aea, 0xabd03e1e,
+ 0xbbfb1f2b, 0x1bb238bb, 0x2c5f33d6, 0x926fe3d2,
+ 0x737922c0, 0xcb0eccd7, 0x8e3b46c5, 0xc348f724,
+ 0x54b0eb04, 0x385da1f9, 0xea039a00, 0xdaf6e3d6,
+ 0xd258a9b2, 0xf43a1c73, 0xeee7349a, 0xe6b7901d,
+ 0x01be8c8b, 0x882b3a06, 0x38c02aa1, 0xc49b2165,
+ 0xcb388a1d, 0x74210862, 0xc434cbfc, 0x8e500a12,
+ 0x508803ac, 0x8043dabd, 0x2cecf15b, 0x048e5649,
+ 0xfe645dab, 0xeaceb60b, 0x8311ca61, 0xab9f4511,
+ 0x7a0ffa90, 0x3411961b, 0x7b2c4f72, 0x73130c5c,
+ 0x643632f0, 0xdca6055e, 0x4b8cd13b, 0x7a52e0cc,
+ 0xb1d00e0e, 0x54ae56a7, 0xe0ec71b2, 0x1b6e774a,
+ 0x2ab8e5e8, 0x9672b8a7, 0x025ac7b4, 0x6b08cdcc,
+ 0x32ccedf5, 0xb1141149, 0x12fa8126, 0x373afaab,
+ 0x83e42c76, 0x0159c8a2, 0xb13cf6bf, 0xd8da66d3,
+ 0x24b60bdd, 0x8b5b060b, 0x402b300d, 0xfff0c83c,
+ 0xf6a8ea62, 0xac272df6, 0x53086cb5, 0x4ea409a2,
+ 0x6cb249e2, 0x4ea1be62, 0xb879b594, 0x315f2c8b,
+ 0x55762201, 0x7a7d3b17, 0x383e6c9a, 0xf0e5b411,
+ 0xa6ddddfd, 0x1f0d69d7, 0x40207544, 0xcec14837,
+ 0x82a869dd, 0xadb4a24f, 0xb42dfde2, 0xee6daca2,
+ 0xfd993731, 0x2b3a9667, 0xa5efb2dc, 0x60ab758b,
+ 0x904823e5, 0x8b397ec6, 0x583bdc39, 0x2f684911,
+ 0xcad9fa2a, 0x19ff56df, 0x0a2fe1a5, 0x5c509a75,
+ 0xc596710d, 0xacb8dfac, 0x2394f499, 0xe1ce4e85,
+ 0x849e2e31, 0xca844ddc, 0x77e773a5, 0xa7282ff6,
+ 0xb7419e7a, 0x9f162e55, 0xae797c86, 0x48eaba22,
+ 0x7658346f, 0x9f68d435, 0x8ff92ee8, 0xafb8bac3,
+ 0x27d12c8d, 0x24d39bc5, 0xddf983a7, 0x15df80e6,
+ 0xf1874da4, 0x6f1cfffd, 0xfc90c1e5, 0x086a24af,
+ 0xe2b7a6d1, 0x29c2dd81, 0x03fe3085, 0x2b6ca57c,
+ 0x294dd96c, 0x9c919f8a, 0x1e8b3e28, 0x641bb984,
+ 0x9b164c7d, 0x3bf59568, 0xc2732dfe, 0x3ae42a9b,
+ 0x51ffd5ef, 0xb46f3080, 0x5a8fc9ec, 0xc850715b,
+ 0x6c9b29ea, 0x327043ad, 0x85fb278a, 0x0a03d808,
+ 0x4bfc9cc7, 0xd5da3807, 0x40438ce5, 0xbf4ba07b,
+ 0x348ef9c3, 0x68981b8c, 0x04fd77b8, 0x808eaed4,
+ 0x4024f961, 0x43c60bf6, 0x33ce96c7, 0x2641e352,
+ 0xdde4129b, 0x2f263f1d, 0x046ab1df, 0x913a20a5,
+ 0x9e147635, 0xe2bfff03, 0x728ab89d, 0x63fa4abb,
+ 0x3acafd43, 0xf09a0b18, 0x34f8efeb, 0x47150130,
+ 0xf1ac1beb, 0xa01721b9, 0xe38d5aad, 0xfd56a4d9,
+ 0x892ab9ab, 0xea173f66, 0xc9b77a86, 0x47307a51,
+ 0xd84571cc, 0xb96c7c28, 0x5468cf27, 0x3d1bc060,
+ 0x2cf06fb0, 0x7e2a059a, 0xe76aa885, 0xc7d202d3,
+ 0xf987735f, 0x7bf69df9, 0xa4193b44, 0xc4072f63,
+ 0x63991b95, 0x945d2547, 0x20fc01a1, 0x0b402cea,
+ 0x1cfecda1, 0x196c9850, 0xc94a7a8f, 0x45cbde21,
+ 0x21c0ca0d, 0x8e9bb55b, 0xb6ed98ae, 0x0249a938,
+ 0x30e011e1, 0x27c8d7c2, 0x9e80e963, 0xe6d92f0b,
+ 0x04e474f9, 0xe1d709f1, 0x1a53d51d, 0x0353c881,
+ 0xfa068cfd, 0xe02b14a9, 0x89246dd0, 0xb116fa1c,
+ 0x0c75dbc0, 0x5960758c, 0xa7617739, 0x601e7af3,
+ 0x0b145e7b, 0xecab38b4, 0x9cd6d9dc, 0x24922fe7,
+ 0x5392ed2f, 0xd520c878, 0xbf49bfee, 0xcde77d02,
+ 0xe0d5c3d4, 0x58af2dce, 0x0fa35621, 0xfead6943,
+ 0x4d134689, 0xedd86ec4, 0x1c585bad, 0x5dcc5011,
+ 0xe693cdad, 0x08bc39ef, 0x4d5c2eb8, 0x562fc8ea,
+ 0x5722d5a0, 0x4b6d1a81, 0xd918439a, 0xffb036b8,
+ 0x0875f77a, 0x2aa45832, 0xe57f674e, 0x82865775,
+ 0x0777538a, 0xf6e2a2c6, 0x05800e76, 0x8aec959e,
+ 0xd48b20cd, 0xf654b1c5, 0xf69d4a1f, 0xa67f1175,
+ 0xe7659527, 0x6556a72f, 0xc668df31, 0x24ee119a,
+ 0x29ab3c17, 0x18add733, 0xca05fc8d, 0xc06bb38a,
+ 0x889ac6ff, 0xed44ec98, 0x9e6e95d2, 0x2b0d6d52,
+ 0xea3452bb, 0x34243ed0, 0xc8a08a5d, 0xc1bbab18,
+ 0x5e581153, 0xbac12814, 0xd2357305, 0xcb70d646,
+ 0xf487b1d6, 0xfcd1e9dd, 0x21777851, 0x5b92f071,
+ 0x67c845e9, 0x6321ea09, 0x827f7274, 0x22c01684,
+ 0x798684cb, 0xba8ef875, 0xf1278dfb, 0x1c5cb755,
+ 0x18fd2615, 0xad58062b, 0xc4300928, 0xa0d3104a,
+ 0x712a1440, 0x8894b46c, 0xfb4b84d4, 0x55cbf0c7,
+ 0xfedf3627, 0x2ea77c79, 0xa1b78735, 0xd6e5a364,
+ 0x35965a2d, 0x8bc0e5db, 0x9cd0194a, 0x11ddd727,
+ 0xe08db7fc, 0x4df6fc69, 0xd17f011a, 0xfae3c4b8,
+ 0x2c3c5c73, 0xa467c3cb, 0x89f6501d, 0xaf32cb3a,
+ 0x380dc067, 0x41596623, 0x22a7d4a8, 0xbe8b0434,
+ 0x0f7800df, 0xab523ed0, 0x9d7dc989, 0x5ec4bcf6,
+ 0x4f022e80, 0x99b97f3b, 0x4faaf990, 0x03a13ca5,
+ 0x820ab836, 0x6adb2a3e, 0x5ce24831, 0x8ed91c35,
+ 0xe620f720, 0x55d25cf9, 0xc54fbcbf, 0xa5fc7938,
+ 0xc87a81f1, 0xd74e02b9, 0xf64cf87c, 0x623fa08a,
+ 0x0cce5093, 0xa36151ee, 0xb866b3eb, 0x84910e75,
+ 0xf661e712, 0x3a05d594, 0xdcddb707, 0x21ebcff5,
+ 0x885e5df6, 0x78bba2ae, 0x8e476778, 0x1a96a94a,
+ 0xfb21c330, 0x0ba8c353, 0xbd43c2f2, 0x2e90c656,
+ 0x3cf1ea31, 0xc0376d4c, 0x7da645b9, 0x17a721dd,
+ 0xf36d91bf, 0xef039f41, 0x170fb94f, 0x412eb43a,
+ 0xca9bb538, 0x79dbf629, 0x53d8e9d6, 0x6c2873a3,
+ 0xb20aa7b0, 0x411ea772, 0xd3940300, 0xe3eeb2b1,
+ 0xb1447842, 0xfa968e41, 0xf86f6d53, 0xea74a6e4,
+ 0x50017ed1, 0x137b64ef, 0x57aa89e6, 0x58bcfdbf,
+ 0x313df290, 0xeee35be7, 0xff6371aa, 0x7824087e,
+ 0x6a6af46a, 0x5eb17e3e, 0x66aa29f1, 0x390d2224,
+ 0x9a3103f4, 0xe917080f, 0x8f14c563, 0x7fa6073a,
+ 0x3dc5a464, 0x83429234, 0x33e53a2e, 0x53ac6111,
+ 0x66c554d2, 0xbc1aa8c6, 0xa6c8643b, 0x3dea0eca,
+ 0x30449e5d, 0x2a9877e5, 0x559ca66d, 0x6514aa69,
+ 0x6c69e2a4, 0xdbfe8dfb, 0xfdf29c50, 0x6f437112,
+ 0x51d9f7d1, 0x030c0ae4, 0xb1805d8e, 0xa58131b6,
+ 0xf8f278b0, 0x8c213886, 0x64704d93, 0x494d9951,
+ 0x2c6021ab, 0xff3efcae, 0x36834cdf, 0xccd660bf,
+ 0xc058237d, 0xbd527c49, 0x16574e3d, 0x235ea78c,
+ 0x670a728f, 0xc3ea2598, 0x87d9124b, 0x4b147e87,
+ 0x31b49aff, 0x16bd0265, 0x2ee20101, 0x8782f2e1,
+ 0xfba8663d, 0xa89589ee, 0x83b536c7, 0x27fcab8b,
+ 0xcca38f50, 0x1b0bad50, 0x308efb8b, 0xd8c736ed,
+ 0x7730e97b, 0x91ea5131, 0xfbcc9fbe, 0x29365daa,
+ 0xe02916f6, 0xf0c27e05, 0xceda5df1, 0x34ee39a3,
+ 0x1375df92, 0x710a961e, 0x450ed796, 0xcdae04b7,
+ 0x89b701c0, 0x1280670a, 0xb0477c8d, 0x8e18717e,
+ 0x4b1f7f00, 0xfbaa0da9, 0x5adbcf4e, 0x11244a8b,
+ 0x65846f9c, 0xe5c460bd, 0x75992da6, 0xa302551a,
+ 0x073443d7, 0x1c8b99d1, 0x6fec0447, 0xc1a17c28,
+ 0x931f3aea, 0x6fa840bd, 0x6f6d19bd, 0xac13195a,
+ 0x2e4cc277, 0xb0a7f22b, 0x3b66eb78, 0x118dc92f,
+ 0x99bf634e, 0xfdc075d3, 0x3812edf6, 0xa9bc9863,
+ 0xa73adaab, 0x26eebd69, 0xfcacdf51, 0x219f808f,
+ 0x3a860155, 0xeffed15c, 0xa68b41a9, 0x51341a4d,
+ 0x94262c2a, 0xcfa064ee, 0x4add813b, 0x1f9a2384,
+ 0x95b0c413, 0x10b1c740, 0xcfcb4015, 0xd47df89f,
+ 0xcb1ced78, 0xe82e2b5d, 0x0509bfbe, 0xd6e567cd,
+ 0x47c63990, 0x2797cd61, 0x0b23673b, 0x02c9558e,
+ 0xd10f8637, 0xb0b74f37, 0xf815f24d, 0xcff48230,
+ 0x63b2632a, 0xb505c39e, 0x2ee5ecd6, 0x7e275fff,
+ 0xdc528dcc, 0x181e426e, 0x0f61bbb2, 0x5b805240,
+ 0x6ed556d2, 0x021b8d45, 0x7a399a7e, 0x038ddd4f,
+ 0xa3830f78, 0xcba6400d, 0x250da41f, 0x269e4863,
+ 0xc40dee2e, 0xf31b451d, 0xe12831ec, 0x0233f1db,
+ 0xfde934c5, 0xb72dc8d5, 0xc7059be7, 0x34a11f1d,
+ 0x02abc4a0, 0x48bfb4eb, 0xafdaaa5f, 0xff416152,
+ 0x9a47b765, 0x42f8cfe9, 0x85b7d7d8, 0x5bd1c0a5,
+ 0x6e630534, 0x3dbbf977, 0xba09d82d, 0x82d0bfc3,
+ 0x5127bb6c, 0xdc15a078, 0xa17fb836, 0xa1fcf1b7,
+ 0x652dc96b, 0xad3f7c1c, 0x8ba84f6e, 0x8b454c78,
+ 0xd78ff2f1, 0x9449c56a, 0x2bc9ab5f, 0x15d39aae,
+ 0x501a09f2, 0x2f94aadb, 0x4fbb92d4, 0xc3f86f8f,
+ 0xd7372c17, 0xe69d7c19, 0xf0e03d13, 0x0221c7dd,
+ 0xb41a6236, 0xd9d517ef, 0x6267dfa1, 0xfc341357,
+ 0xb128aa71, 0xed797b03, 0xbf7ec359, 0x97d4ba34,
+ 0x47c127de, 0x8dafe9e7, 0xc33227c4, 0x9b8b5274,
+ 0x6fd5ecd1, 0x9751158b, 0xe3045a12, 0x6bd7a121,
+ 0x32f09731, 0x063ac542, 0xdc800b17, 0x107d33c7,
+ 0xada5c07b, 0xa6ec05b4, 0xe5681e29, 0x65c5d6bd,
+ 0xdd811551, 0x0eed9893, 0x5532e0c7, 0x766e6d14,
+ 0x74f5c2b7, 0x8c3a64e4, 0xede1d969, 0xfc70b733,
+ 0xf1dbc965, 0x919af426, 0xe19121d8, 0xeffc6577,
+ 0x5e87b1cb, 0x62c19cb3, 0x51358ff6, 0xdd366c74,
+ 0x78830da7, 0x6885d628, 0x4855c5d4, 0x729df091,
+ 0x736e2e59, 0xa29a58ac, 0x28d0a070, 0x5b2d472b,
+ 0x319b794d, 0x218f1457, 0x10f56298, 0x00977b80,
+ 0x9766ce20, 0x5109c226, 0x057b67ac, 0x432a7df7,
+ 0x915a8464, 0x1f75cc31, 0x9019204c, 0x8e4ba49d,
+ 0x80a5a121, 0xbda48f11, 0x12d69925, 0xf18f6be3,
+ 0x0472067e, 0xc61d82aa, 0x474ed278, 0x0fd576f4,
+ 0x821d8a25, 0x190aacd0, 0x407fbcfd, 0xc6f8a72c,
+ 0x616e1154, 0x9f03dc6a, 0xcce5c742, 0x6bfbc28e,
+ 0xad360bb0, 0x72389018, 0x45ee84b0, 0x58b68943,
+ 0xac08e844, 0xa2ab1783, 0xb10d1dcb, 0x51784a73,
+ 0x0ff46a4c, 0xe76d72c8, 0x9605e763, 0xfa200113,
+ 0x8f6615af, 0x1434afb7, 0x151ab4b7, 0x2b96c172,
diff --git a/src/soc/intel/broadwell/microcode/microcode_blob.h b/src/soc/intel/broadwell/microcode/microcode_blob.h
index a9162ec..28b4307 100644
--- a/src/soc/intel/broadwell/microcode/microcode_blob.h
+++ b/src/soc/intel/broadwell/microcode/microcode_blob.h
@@ -17,15 +17,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#if CONFIG_INTEL_LYNXPOINT_LP
-#include "microcode-M7240650_ffff000a.h"
-#include "microcode-M7240651_00000015.h"
-#else
-#include "microcode-M32306c1_ffff000d.h"
-#include "microcode-M32306c2_ffff0003.h"
-#include "microcode-M32306c3_00000012.h"
-#include "microcode-M3240660_ffff000b.h"
-#endif
+#include "microcode-M7240651_00000017.h" /* Haswell ULT C0 or D0 */
+#include "microcode-MF2306D2_FFFF0009.h" /* Broadwell C0 */
+#include "microcode-MC0306D3_FFFF000D.h" /* Broadwell D0 */
+
/* Dummy terminator */
0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6964
-gerrit
commit 22918bda52c75c8126e16dda8ca51139544bebd3
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Wed Apr 30 16:36:13 2014 -0700
broadwell: add new intel SOC
broadwell: Import files from haswell/lynxpoint into soc/broadwell
Reviewed-on: https://chromium-review.googlesource.com/198425
(cherry picked from commit 178400e5709d676dd41e6a75df06faa829e0e3af)
broadwell: Unify and clean up license
Reviewed-on: https://chromium-review.googlesource.com/198426
(cherry picked from commit 30d3c25a0abc76be68477c39a654b95a5975f55d)
broadwell: pch.h: split PM into new header
Reviewed-on: https://chromium-review.googlesource.com/198427
(cherry picked from commit 97a8d0b051f476d0edc06301f57326a718df1373)
broadwell: pch.h: split RCBA into new header
Reviewed-on: https://chromium-review.googlesource.com/198428
(cherry picked from commit fa217361b28fdb8d3a3e85f070dfaf13c0d48135)
broadwell: pch.h: split SATA into new header
Reviewed-on: https://chromium-review.googlesource.com/198429
(cherry picked from commit bf8795ca92f9f0467e7869c701038abb4529ac71)
broadwell: pch.h: split SPI into new header
Reviewed-on: https://chromium-review.googlesource.com/198550
(cherry picked from commit 099af14676a2654ca3e24e66d7b9f0b4ab13cd14)
broadwell: pch.h: split SerialIO into new header
Reviewed-on: https://chromium-review.googlesource.com/198551
(cherry picked from commit 4f3c028686aed78fb07b8792dcf46aebd2268ea6)
broadwell: pch.h: split LPC into new header
Reviewed-on: https://chromium-review.googlesource.com/198552
(cherry picked from commit 10bad5bbb6739c0277fd5330d26a89d60fd5c102)
broadwell: pch.h: split GPIO into new header and clean up
Reviewed-on: https://chromium-review.googlesource.com/198553
(cherry picked from commit 9c97532460562215b78e10b011a29e092a07f3e5)
broadwell: pch.h: split USB into new headers
Reviewed-on: https://chromium-review.googlesource.com/198554
(cherry picked from commit 86ef1a45a2e5f307467b3be48e377569f37b3068)
broadwell: Split IOBP into separate files
Reviewed-on: https://chromium-review.googlesource.com/198734
(cherry picked from commit f93b8bda71728f1383937ad675d2d5fb5a927600)
broadwell: smbus: Extract common code and split header
Reviewed-on: https://chromium-review.googlesource.com/198735
(cherry picked from commit 8052030a9d6b22e8a19938fa9b93e90d08f0057d)
broadwell: Create iomap.h header with platform base addresses
Reviewed-on: https://chromium-review.googlesource.com/198736
(cherry picked from commit b35947d070b28871637dfe2b930a9f2be80958ee)
broadwell: Add header for platform PCI devices
Reviewed-on: https://chromium-review.googlesource.com/198737
(cherry picked from commit 6ac4e56db6e489bb9eaf91a0c3c543399f691500)
broadwell: Split SMM related defines/prototypes to new header
Reviewed-on: https://chromium-review.googlesource.com/198738
(cherry picked from commit 2a2595067077cd918bfd48cad79a684b8e1ff0f4)
broadwell: cpu.h: Split MSR defines to separate header
Reviewed-on: https://chromium-review.googlesource.com/198739
(cherry picked from commit 01148cd2c9edd97cd0c8ef3cfed58bc8c33eb805)
broadwell: Create romstage header file
Reviewed-on: https://chromium-review.googlesource.com/198740
(cherry picked from commit 31c91e811b9e07e7bcba6b9f8f5720a31322eb21)
broadwell: Create ram stage header file
Reviewed-on: https://chromium-review.googlesource.com/198741
(cherry picked from commit 93dde85f98d43d4a1886b59004d1bab4924ad621)
broadwell: Add reference code data interface
Reviewed-on: https://chromium-review.googlesource.com/198743
(cherry picked from commit 9059b8e2308892a48c838c3099404c9cf450df95)
broadwell: Clean up ACPI NVS region
Reviewed-on: https://chromium-review.googlesource.com/198897
(cherry picked from commit d83cc82c36661556eb1e2e437b7ac51d5b8e4a14)
broadwell: Move CTDP ACPI methods to new file
Reviewed-on: https://chromium-review.googlesource.com/198898
(cherry picked from commit fc1e711290df304d18c558d697eea8a5e57061b2)
broadwell: Split EHCI and XHCI ACPI devices
Reviewed-on: https://chromium-review.googlesource.com/198899
(cherry picked from commit 26f437b27e00dbd5c92ea22e76404633a62fb7ca)
broadwell: ACPI: Clean up SerialIO ACPI code
Reviewed-on: https://chromium-review.googlesource.com/198910
(cherry picked from commit ea3cd39566c1bb2ead463a6253b6204a62545d35)
broadwell: ACPI: Remove special handling of LPT-LP chipset
Reviewed-on: https://chromium-review.googlesource.com/198911
(cherry picked from commit 2c54df159bf6759c8f866628e83541de6f4e28f6)
broadwell: ACPI: Clean up use of base address defines
Reviewed-on: https://chromium-review.googlesource.com/198912
(cherry picked from commit 34e4788955bceff01631fd0b4dbf0aa24cf56b75)
broadwell: ACPI: Clean up and fix formatting
Reviewed-on: https://chromium-review.googlesource.com/198913
(cherry picked from commit bc0f7c6d2f95681eb987bb6ff6baf2d16cc77050)
broadwell: Add header for ACPI defines and prototypes
Reviewed-on: https://chromium-review.googlesource.com/198914
(cherry picked from commit 9951e7931942d2921f92f6e094b1cc32c190eab9)
broadwell: Add reset_system function and header
Reviewed-on: https://chromium-review.googlesource.com/198915
(cherry picked from commit 6d1efb94bd39bcd6f7e3e0de2f3299a384b109ef)
broadwell: Move PCODE MMIO defines to systemagent.h
Reviewed-on: https://chromium-review.googlesource.com/198916
(cherry picked from commit abb5f87e548fbde3a08e14a18714b4e4391c955f)
broadwell: Unify chip.h and add chip.c
Reviewed-on: https://chromium-review.googlesource.com/198917
(cherry picked from commit a9c2d7ff3afa1e2a10be85ccc72b7db0f2aaafe1)
broadwell: Rename HASWELL_BCLK to CPU_BCLK
Reviewed-on: https://chromium-review.googlesource.com/198918
(cherry picked from commit 65ac1a07abaf14eb42fec6c5df67d2d3688ad5a1)
broadwell: Clean up broadwell/cpu.h
Reviewed-on: https://chromium-review.googlesource.com/198919
(cherry picked from commit 17353803babc8ace279e105c012130678226144e)
broadwell: Clean up broadwell/systemagent.h
Reviewed-on: https://chromium-review.googlesource.com/198920
(cherry picked from commit 49d7a023f3ff04a65d16622aa9b2fa6004b693ae)
broadwell: Clean up broadwell/pch.h
Reviewed-on: https://chromium-review.googlesource.com/198921
(cherry picked from commit 17da652b4408a91fcfea99dd35fe9f9e1bdcf03b)
broadwell: Clean up management engine driver
Reviewed-on: https://chromium-review.googlesource.com/198922
(cherry picked from commit 4fce5fbb56dc4f31b77e5ada05463c043ad5be72)
broadwell: Add common CPUID and PCI Device ID defines
Reviewed-on: https://chromium-review.googlesource.com/198923
(cherry picked from commit c6bf20309f33168ea2cc4634cbda5ec242824ba8)
broadwell: Clean up and expand report_platform
Reviewed-on: https://chromium-review.googlesource.com/198924
(cherry picked from commit 5082d4824db149e867a2cd8be34c932b03754022)
broadwell: Clean up the bootblock code
Reviewed-on: https://chromium-review.googlesource.com/198925
(cherry picked from commit ba0206ab76fe0b6834a14dc57f400d139094623c)
broadwell: Clean up ramstage device and driver operations
Reviewed-on: https://chromium-review.googlesource.com/199180
(cherry picked from commit d8fc9daf129738713a5059286b7ead004f3b7569)
broadwell: Clean up XHCI and EHCI ramstage drivers
Reviewed-on: https://chromium-review.googlesource.com/199181
(cherry picked from commit d355247333a828a146ce7cf9b92a63da74119c1d)
broadwell: Clean up gpio handling code
Reviewed-on: https://chromium-review.googlesource.com/199182
(cherry picked from commit d62cef1970fe75f8166315016b3d8415cddcab20)
broadwell: Clean up the PCH generic code
Reviewed-on: https://chromium-review.googlesource.com/199183
(cherry picked from commit 3b93b3ea79965d5ac831bf9015e49330f157b0ff)
broadwell: Move get_top_of_ram() and cbmem_top() to memmap.c
Reviewed-on: https://chromium-review.googlesource.com/199184
(cherry picked from commit 68955ba4ff8b49ff466d7badaa934bd143026ba7)
broadwell: Clean up pmutil.c
Reviewed-on: https://chromium-review.googlesource.com/199185
(cherry picked from commit b6fb672ae879e17422f7449f70c3669055096f84)
broadwell: pmutil: Add new acpi_sci_irq() function
Reviewed-on: https://chromium-review.googlesource.com/199186
(cherry picked from commit 80ad8bb9bdc75f180e667861fed42a3844226bc5)
broadwell: Clean up HDA ramstage driver
Reviewed-on: https://chromium-review.googlesource.com/199187
(cherry picked from commit b4962acd706eaa66c1c3ef4d22eba313642fbb2d)
broadwell: Clean up cache_as_ram assembly
Reviewed-on: https://chromium-review.googlesource.com/199188
(cherry picked from commit 8a457b82610b604ae7f69e2500815ce411c2d02d)
broadwell: romstage: Separate stack helper functions
Reviewed-on: https://chromium-review.googlesource.com/199189
(cherry picked from commit c220383c90466fc2dbf4b6107679b08ecb4aadad)
broadwell: Add function to read WPSR from SPI
Reviewed-on: https://chromium-review.googlesource.com/199190
(cherry picked from commit 935404da1157d606b913eff6c2635ae898e9980a)
broadwell: Clean up SMBUS code in romstage and ramstage
Reviewed-on: https://chromium-review.googlesource.com/199191
(cherry picked from commit 6ae9d93c1a6f14da6429a4e5b01619c9ccaefdaa)
broadwell: SPI: Clean up romstage and ramstage code
Reviewed-on: https://chromium-review.googlesource.com/199192
(cherry picked from commit 28ffd71a416aee2ab54bc5d782cfeef31d4d30bf)
broadwell: Clean up PCIe root port ramstage driver
Reviewed-on: https://chromium-review.googlesource.com/199193
(cherry picked from commit 781f3a1b72c72f0bb05f5524edec471ad13ec90e)
broadwell: Clean up minihd ramstage driver
Reviewed-on: https://chromium-review.googlesource.com/199194
(cherry picked from commit a52d275e41fdcbf9895d07350725609d9be1ff0e)
broadwell: Update romstage main to follow baytrail format
Reviewed-on: https://chromium-review.googlesource.com/199361
(cherry picked from commit 0678c739af84c871922ffba5594132b25e471ddd)
broadwell: Add CPU set_max_freq function for romstage
Reviewed-on: https://chromium-review.googlesource.com/199362
(cherry picked from commit 68b0122472af27f38502d42a8a6c80678ddbbba6)
broadwell: romstage: Add chipset_power_state implementation
Reviewed-on: https://chromium-review.googlesource.com/199363
(cherry picked from commit 761cec3b6bb9bde579c3214f3f1196f65700757c)
broadwell: romstage: Convert systemagent init to reg_script
Reviewed-on: https://chromium-review.googlesource.com/199364
(cherry picked from commit c2ea2d3a0c7555a353fb9a1d4a63e773ac8961b2)
broadwell: romstage: Convert pch init to reg_script
Reviewed-on: https://chromium-review.googlesource.com/199365
(cherry picked from commit 4383de5846e97ca5aee6dd210459d8dba0af981c)
broadwell: elog: Use chipset_power_state for events
Reviewed-on: https://chromium-review.googlesource.com/199366
(cherry picked from commit 0ef5961ebe3a7037d5fbe361fbc70a87ac2edad9)
broadwell: Clean up SATA ramstage driver
Reviewed-on: https://chromium-review.googlesource.com/199367
(cherry picked from commit ffa5743f74551bd48aa7e5445ce7cd9dc7b07ce8)
broadwell: Update ramstage graphics driver to support broadwell
Reviewed-on: https://chromium-review.googlesource.com/199368
(cherry picked from commit bb01deb8bbed56f15e1143504e4cf012ecf5a281)
broadwell: Update raminit to follow baytrail layout
Reviewed-on: https://chromium-review.googlesource.com/199369
(cherry picked from commit 3f25c23dc58f85d2521916cd6edbe9deeeb8d523)
broadwell: Update and unify the finalize steps
Reviewed-on: https://chromium-review.googlesource.com/199390
(cherry picked from commit ddc4c116b42d38dfdfc45ef4388fbfab32ca48fa)
broadwell: Clean up SMM code
Reviewed-on: https://chromium-review.googlesource.com/199391
(cherry picked from commit 8295e56c9b643fd4b9267d70b5efd0cf94dd67dd)
broadwell: Clean up LPC ramstage driver
Reviewed-on: https://chromium-review.googlesource.com/199392
(cherry picked from commit 28326aeaaf304c9262866588d91b79b37d1d9a2e)
broadwell: Clean up systemagent ramstage driver
Reviewed-on: https://chromium-review.googlesource.com/199393
(cherry picked from commit 749988fff07eab8d2c9ebc731e3ed9e427b3f7b3)
broadwell: Move C-state configuration information to acpi.c
Reviewed-on: https://chromium-review.googlesource.com/199394
(cherry picked from commit 198a3cd5cbd009be406298cbb53163f075fe9990)
broadwell: Clean up CPU ramstage driver
Reviewed-on: https://chromium-review.googlesource.com/199395
(cherry picked from commit 8159689bba479bab6fd2e949e3e1c3f817088969)
broadwell: Do not reserve SMM relocation region
Reviewed-on: https://chromium-review.googlesource.com/199402
(cherry picked from commit e2ab52340e3d3a97a3f8dbdad8fac9f7769d1b4c)
broadwell: Add an early ramstage driver
Reviewed-on: https://chromium-review.googlesource.com/199403
(cherry picked from commit c7a8c867101b49a7f9f17ec1a8777a8db145f3e3)
broadwell: Support for second reference code binary
Reviewed-on: https://chromium-review.googlesource.com/199404
(cherry picked from commit abb99b36e97c4f739b23abed6146fea370bbbec2)
broadwell: Clean up serialio init code
Reviewed-on: https://chromium-review.googlesource.com/199405
(cherry picked from commit e09a1f8520a7b72451a1e2068b200f7c5451f489)
broadwell: acpi: Add function to fill out FADT
Reviewed-on: https://chromium-review.googlesource.com/199406
(cherry picked from commit 7e58f43e46d4382cf4541057f81fe6be3e4d6e74)
broadwell: Update C-state table creation
Reviewed-on: https://chromium-review.googlesource.com/199407
(cherry picked from commit 68b1f70e32e1d0c6fc4332dce402ad78334e0063)
broadwell: acpi: Clean up acpi table creation code
Reviewed-on: https://chromium-review.googlesource.com/199408
(cherry picked from commit 49088b312b159bb17a9330eda6a88d6f324ea146)
broadwell: acpi: Add ACPI table create helper functions
Reviewed-on: https://chromium-review.googlesource.com/199409
(cherry picked from commit 344c3c511d0341457525ef4d6eb70201404fc62c)
broadwell: Add soc/intel/broadwell Makefiles
Reviewed-on: https://chromium-review.googlesource.com/199410
(cherry picked from commit ea8f97738eadd3b0b6a642754df7a7d22e547ffc)
broadwell: Add Kconfig for broadwell soc
Reviewed-on: https://chromium-review.googlesource.com/199411
(cherry picked from commit 8c99038a5c20812497619134c66d45bc4f21c8fe)
Squashed 78 commits for broadwell that form a solid code base.
Change-Id: I365ca9a45978b5e0cc5237f884e20a44f62a0e63
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
src/soc/intel/broadwell/Kconfig | 215 +++++
src/soc/intel/broadwell/Makefile.inc | 103 ++
src/soc/intel/broadwell/acpi.c | 613 ++++++++++++
src/soc/intel/broadwell/acpi/cpu.asl | 122 +++
src/soc/intel/broadwell/acpi/ctdp.asl | 237 +++++
src/soc/intel/broadwell/acpi/device_nvs.asl | 51 +
src/soc/intel/broadwell/acpi/ehci.asl | 51 +
src/soc/intel/broadwell/acpi/globalnvs.asl | 108 +++
src/soc/intel/broadwell/acpi/gpio.asl | 133 +++
src/soc/intel/broadwell/acpi/hda.asl | 29 +
src/soc/intel/broadwell/acpi/irqlinks.asl | 492 ++++++++++
src/soc/intel/broadwell/acpi/lpc.asl | 229 +++++
src/soc/intel/broadwell/acpi/pch.asl | 83 ++
src/soc/intel/broadwell/acpi/pci_irqs.asl | 89 ++
src/soc/intel/broadwell/acpi/pcie.asl | 214 +++++
src/soc/intel/broadwell/acpi/pcie_port.asl | 28 +
src/soc/intel/broadwell/acpi/sata.asl | 25 +
src/soc/intel/broadwell/acpi/serialio.asl | 468 +++++++++
src/soc/intel/broadwell/acpi/sleepstates.asl | 26 +
src/soc/intel/broadwell/acpi/smbus.asl | 241 +++++
src/soc/intel/broadwell/acpi/systemagent.asl | 212 +++++
src/soc/intel/broadwell/acpi/xhci.asl | 347 +++++++
src/soc/intel/broadwell/bootblock/Makefile.inc | 1 +
src/soc/intel/broadwell/bootblock/cpu.c | 131 +++
src/soc/intel/broadwell/bootblock/pch.c | 94 ++
src/soc/intel/broadwell/bootblock/systemagent.c | 44 +
src/soc/intel/broadwell/bootblock/timestamp.inc | 19 +
src/soc/intel/broadwell/broadwell/acpi.h | 37 +
src/soc/intel/broadwell/broadwell/cpu.h | 72 ++
src/soc/intel/broadwell/broadwell/device_nvs.h | 43 +
src/soc/intel/broadwell/broadwell/ehci.h | 32 +
src/soc/intel/broadwell/broadwell/gpio.h | 192 ++++
src/soc/intel/broadwell/broadwell/iobp.h | 27 +
src/soc/intel/broadwell/broadwell/iomap.h | 62 ++
src/soc/intel/broadwell/broadwell/lpc.h | 93 ++
src/soc/intel/broadwell/broadwell/me.h | 501 ++++++++++
src/soc/intel/broadwell/broadwell/msr.h | 109 +++
src/soc/intel/broadwell/broadwell/nvs.h | 70 ++
src/soc/intel/broadwell/broadwell/pch.h | 52 +
src/soc/intel/broadwell/broadwell/pci_devs.h | 69 ++
src/soc/intel/broadwell/broadwell/pei_data.h | 177 ++++
src/soc/intel/broadwell/broadwell/pei_wrapper.h | 49 +
src/soc/intel/broadwell/broadwell/pm.h | 168 ++++
src/soc/intel/broadwell/broadwell/ramstage.h | 38 +
src/soc/intel/broadwell/broadwell/rcba.h | 166 ++++
src/soc/intel/broadwell/broadwell/reset.h | 25 +
src/soc/intel/broadwell/broadwell/romstage.h | 63 ++
src/soc/intel/broadwell/broadwell/sata.h | 85 ++
src/soc/intel/broadwell/broadwell/serialio.h | 94 ++
src/soc/intel/broadwell/broadwell/smbus.h | 52 +
src/soc/intel/broadwell/broadwell/smm.h | 73 ++
src/soc/intel/broadwell/broadwell/spi.h | 100 ++
src/soc/intel/broadwell/broadwell/systemagent.h | 121 +++
src/soc/intel/broadwell/broadwell/xhci.h | 61 ++
src/soc/intel/broadwell/chip.c | 82 ++
src/soc/intel/broadwell/chip.h | 137 +++
src/soc/intel/broadwell/cpu.c | 722 ++++++++++++++
src/soc/intel/broadwell/ehci.c | 94 ++
src/soc/intel/broadwell/elog.c | 138 +++
src/soc/intel/broadwell/finalize.c | 127 +++
src/soc/intel/broadwell/gpio.c | 199 ++++
src/soc/intel/broadwell/hda.c | 155 +++
src/soc/intel/broadwell/igd.c | 558 +++++++++++
src/soc/intel/broadwell/iobp.c | 125 +++
src/soc/intel/broadwell/lpc.c | 584 ++++++++++++
src/soc/intel/broadwell/me.c | 1007 ++++++++++++++++++++
src/soc/intel/broadwell/me_status.c | 278 ++++++
src/soc/intel/broadwell/memmap.c | 39 +
src/soc/intel/broadwell/microcode/microcode_blob.c | 23 +
src/soc/intel/broadwell/microcode/microcode_blob.h | 33 +
src/soc/intel/broadwell/minihd.c | 128 +++
src/soc/intel/broadwell/monotonic_timer.c | 63 ++
src/soc/intel/broadwell/pch.c | 212 +++++
src/soc/intel/broadwell/pcie.c | 632 ++++++++++++
src/soc/intel/broadwell/pei_data.c | 48 +
src/soc/intel/broadwell/pei_data.h | 115 +++
src/soc/intel/broadwell/pmutil.c | 452 +++++++++
src/soc/intel/broadwell/ramstage.c | 88 ++
src/soc/intel/broadwell/refcode.c | 189 ++++
src/soc/intel/broadwell/reset.c | 51 +
src/soc/intel/broadwell/romstage/Makefile.inc | 12 +
src/soc/intel/broadwell/romstage/cache_as_ram.inc | 336 +++++++
src/soc/intel/broadwell/romstage/cpu.c | 49 +
src/soc/intel/broadwell/romstage/pch.c | 146 +++
src/soc/intel/broadwell/romstage/power_state.c | 131 +++
src/soc/intel/broadwell/romstage/raminit.c | 114 +++
src/soc/intel/broadwell/romstage/report_platform.c | 211 ++++
src/soc/intel/broadwell/romstage/romstage.c | 164 ++++
src/soc/intel/broadwell/romstage/smbus.c | 52 +
src/soc/intel/broadwell/romstage/spi.c | 149 +++
src/soc/intel/broadwell/romstage/stack.c | 124 +++
src/soc/intel/broadwell/romstage/systemagent.c | 55 ++
src/soc/intel/broadwell/sata.c | 254 +++++
src/soc/intel/broadwell/serialio.c | 296 ++++++
src/soc/intel/broadwell/smbus.c | 113 +++
src/soc/intel/broadwell/smbus_common.c | 155 +++
src/soc/intel/broadwell/smi.c | 123 +++
src/soc/intel/broadwell/smihandler.c | 545 +++++++++++
src/soc/intel/broadwell/smmrelocate.c | 439 +++++++++
src/soc/intel/broadwell/spi.c | 637 +++++++++++++
src/soc/intel/broadwell/spi_loading.c | 93 ++
src/soc/intel/broadwell/stage_cache.c | 35 +
src/soc/intel/broadwell/systemagent.c | 440 +++++++++
src/soc/intel/broadwell/tsc_freq.c | 32 +
src/soc/intel/broadwell/xhci.c | 203 ++++
105 files changed, 18223 insertions(+)
diff --git a/src/soc/intel/broadwell/Kconfig b/src/soc/intel/broadwell/Kconfig
new file mode 100644
index 0000000..47b3116
--- /dev/null
+++ b/src/soc/intel/broadwell/Kconfig
@@ -0,0 +1,215 @@
+config SOC_INTEL_BROADWELL
+ bool
+ help
+ Intel Broadwell and Haswell ULT support.
+
+if SOC_INTEL_BROADWELL
+
+config CPU_SPECIFIC_OPTIONS
+ def_bool y
+ select ARCH_BOOTBLOCK_X86_32
+ select ARCH_ROMSTAGE_X86_32
+ select ARCH_RAMSTAGE_X86_32
+ select ALT_CBFS_LOAD_PAYLOAD
+ select BACKUP_DEFAULT_SMM_REGION
+ select CACHE_MRC_BIN
+ select CACHE_MRC_SETTINGS
+ select CACHE_RELOCATED_RAMSTAGE_OUTSIDE_CBMEM
+ select CACHE_ROM
+ select CAR_MIGRATION
+ select COLLECT_TIMESTAMPS
+ select CPU_INTEL_FIRMWARE_INTERFACE_TABLE
+ select CPU_MICROCODE_IN_CBFS
+ select DYNAMIC_CBMEM
+ select HAVE_MONOTONIC_TIMER
+ select HAVE_SMI_HANDLER
+ select HAVE_HARD_RESET
+ select HAVE_USBDEBUG
+ select IOAPIC
+ select MMCONF_SUPPORT
+ select MMCONF_SUPPORT_DEFAULT
+ select RELOCATABLE_MODULES
+ select REG_SCRIPT
+ select PARALLEL_MP
+ select PCIEXP_ASPM
+ select PCIEXP_COMMON_CLOCK
+ select SMM_MODULES
+ select SMM_TSEG
+ select SMP
+ select SPI_FLASH
+ select SSE2
+ select TSC_CONSTANT_RATE
+ select TSC_SYNC_MFENCE
+ select UDELAY_TSC
+
+config BOOTBLOCK_CPU_INIT
+ string
+ default "soc/intel/broadwell/bootblock/cpu.c"
+
+config BOOTBLOCK_NORTHBRIDGE_INIT
+ string
+ default "soc/intel/broadwell/bootblock/systemagent.c"
+
+config BOOTBLOCK_SOUTHBRIDGE_INIT
+ string
+ default "soc/intel/broadwell/bootblock/pch.c"
+
+config MICROCODE_INCLUDE_PATH
+ string
+ default "src/soc/intel/broadwell/microcode"
+
+config MMCONF_BASE_ADDRESS
+ hex
+ default 0xf0000000
+
+config SERIAL_CPU_INIT
+ bool
+ default n
+
+config SMM_TSEG_SIZE
+ hex
+ default 0x800000
+
+config IED_REGION_SIZE
+ hex
+ default 0x400000
+
+config SMM_RESERVED_SIZE
+ hex
+ default 0x100000
+
+config VGA_BIOS_ID
+ string
+ default "8086,0406"
+
+config CACHE_MRC_SIZE_KB
+ int
+ default 512
+
+config DCACHE_RAM_BASE
+ hex
+ default 0xff7c0000
+
+config DCACHE_RAM_SIZE
+ hex
+ default 0x10000
+ help
+ The size of the cache-as-ram region required during bootblock
+ and/or romstage. Note DCACHE_RAM_SIZE and DCACHE_RAM_MRC_VAR_SIZE
+ must add up to a power of 2.
+
+config DCACHE_RAM_MRC_VAR_SIZE
+ hex
+ default 0x30000
+ help
+ The amount of cache-as-ram region required by the reference code.
+
+config DCACHE_RAM_ROMSTAGE_STACK_SIZE
+ hex
+ default 0x2000
+ help
+ The amount of anticipated stack usage from the data cache
+ during pre-ram rom stage execution.
+
+config HAVE_MRC
+ bool "Add a Memory Reference Code binary"
+ help
+ Select this option to add a Memory Reference Code binary to
+ the resulting coreboot image.
+
+ Note: Without this binary coreboot will not work
+
+if HAVE_MRC
+
+config MRC_FILE
+ string "Intel Memory Reference Code path and filename"
+ depends on HAVE_MRC
+ default "mrc.bin"
+ help
+ The filename of the file to use as Memory Reference Code binary.
+
+config MRC_BIN_ADDRESS
+ hex
+ default 0xfffa0000
+
+config CACHE_MRC_SETTINGS
+ bool "Save cached MRC settings"
+ default y
+
+endif # HAVE_MRC
+
+config CBFS_SIZE
+ hex "Size of CBFS filesystem in ROM"
+ default 0x100000
+ help
+ The firmware image has to store more than just coreboot, including:
+ - a firmware descriptor
+ - Intel Management Engine firmware
+ - MRC cache information
+ This option allows to limit the size of the CBFS portion in the
+ firmware image.
+
+config PRE_GRAPHICS_DELAY
+ int "Graphics initialization delay in ms"
+ default 0
+ help
+ On some systems, coreboot boots so fast that connected monitors
+ (mostly TVs) won't be able to wake up fast enough to talk to the
+ VBIOS. On those systems we need to wait for a bit before executing
+ the VBIOS.
+
+config RESET_ON_INVALID_RAMSTAGE_CACHE
+ bool "Reset the system on S3 wake when ramstage cache invalid."
+ default n
+ depends on RELOCATABLE_RAMSTAGE
+ help
+ The romstage code caches the loaded ramstage program in SMM space.
+ On S3 wake the romstage will copy over a fresh ramstage that was
+ cached in the SMM space. This option determines the action to take
+ when the ramstage cache is invalid. If selected the system will
+ reset otherwise the ramstage will be reloaded from cbfs.
+
+config MONOTONIC_TIMER_MSR
+ def_bool y
+ select HAVE_MONOTONIC_TIMER
+ help
+ Provide a monotonic timer using the 24MHz MSR counter.
+
+config EHCI_BAR
+ hex
+ default 0xd8000000
+
+config EHCI_DEBUG_OFFSET
+ hex
+ default 0xa0
+
+config SERIRQ_CONTINUOUS_MODE
+ bool
+ default y
+ help
+ If you set this option to y, the serial IRQ machine will be
+ operated in continuous mode.
+
+config ME_MBP_CLEAR_LATE
+ bool "Defer wait for ME MBP Cleared"
+ default y
+ help
+ If you set this option to y, the Management Engine driver
+ will defer waiting for the MBP Cleared indicator until the
+ finalize step. This can speed up boot time if the ME takes
+ a long time to indicate this status.
+
+config LOCK_MANAGEMENT_ENGINE
+ bool "Lock Management Engine section"
+ default n
+ help
+ The Intel Management Engine supports preventing write accesses
+ from the host to the Management Engine section in the firmware
+ descriptor. If the ME section is locked, it can only be overwritten
+ with an external SPI flash programmer. You will want this if you
+ want to increase security of your ROM image once you are sure
+ that the ME firmware is no longer going to change.
+
+ If unsure, say N.
+
+endif
diff --git a/src/soc/intel/broadwell/Makefile.inc b/src/soc/intel/broadwell/Makefile.inc
new file mode 100644
index 0000000..9d7ab1e
--- /dev/null
+++ b/src/soc/intel/broadwell/Makefile.inc
@@ -0,0 +1,103 @@
+subdirs-y += bootblock
+subdirs-y += microcode
+subdirs-y += romstage
+subdirs-y += ../common
+subdirs-y += ../../../cpu/x86/lapic
+subdirs-y += ../../../cpu/x86/mtrr
+subdirs-y += ../../../cpu/x86/smm
+subdirs-y += ../../../cpu/x86/tsc
+subdirs-y += ../../../cpu/intel/microcode
+subdirs-y += ../../../cpu/intel/turbo
+
+ramstage-y += acpi.c
+ramstage-y += chip.c
+ramstage-y += cpu.c
+ramstage-y += elog.c
+ramstage-y += finalize.c
+ramstage-y += gpio.c
+romstage-y += gpio.c
+smm-y += gpio.c
+ramstage-y += hda.c
+ramstage-y += igd.c
+ramstage-y += iobp.c
+romstage-y += iobp.c
+ramstage-y += lpc.c
+ramstage-y += me.c
+ramstage-y += me_status.c
+romstage-y += me_status.c
+ramstage-y += memmap.c
+romstage-y += memmap.c
+ramstage-y += minihd.c
+ramstage-y += monotonic_timer.c
+ramstage-y += pch.c
+romstage-y += pch.c
+ramstage-y += pcie.c
+ramstage-y += pei_data.c
+romstage-y += pei_data.c
+ramstage-y += pmutil.c
+romstage-y += pmutil.c
+smm-y += pmutil.c
+ramstage-y += ramstage.c
+ramstage-$(CONFIG_HAVE_REFCODE_BLOB) += refcode.c
+ramstage-y += reset.c
+romstage-y += reset.c
+ramstage-y += sata.c
+ramstage-y += serialio.c
+ramstage-y += smbus.c
+ramstage-y += smbus_common.c
+romstage-y += smbus_common.c
+ramstage-y += smi.c
+smm-y += smihandler.c
+ramstage-y += smmrelocate.c
+ramstage-y += spi.c
+smm-$(CONFIG_SPI_FLASH_SMM) += spi.c
+ramstage-y += spi_loading.c
+ramstage-y += stage_cache.c
+romstage-y += stage_cache.c
+ramstage-y += systemagent.c
+ramstage-y += tsc_freq.c
+romstage-y += tsc_freq.c
+smm-y += tsc_freq.c
+ramstage-y += ehci.c
+ramstage-y += xhci.c
+smm-y += xhci.c
+
+INCLUDES += -Isrc/soc/intel/broadwell/
+
+# Run an intermediate step when producing coreboot.rom
+# that adds additional components to the final firmware
+# image outside of CBFS
+INTERMEDIATE := pch_add_me
+
+pch_add_me: $(obj)/coreboot.pre $(IFDTOOL)
+ printf " DD Adding Intel Firmware Descriptor\n"
+ dd if=3rdparty/mainboard/$(MAINBOARDDIR)/descriptor.bin \
+ of=$(obj)/coreboot.pre conv=notrunc >/dev/null 2>&1
+ printf " IFDTOOL me.bin -> coreboot.pre\n"
+ $(objutil)/ifdtool/ifdtool \
+ -i ME:3rdparty/mainboard/$(MAINBOARDDIR)/me.bin \
+ $(obj)/coreboot.pre
+ mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre
+ifeq ($(CONFIG_LOCK_MANAGEMENT_ENGINE),y)
+ printf " IFDTOOL Locking Management Engine\n"
+ $(objutil)/ifdtool/ifdtool -l $(obj)/coreboot.pre
+ mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre
+else
+ printf " IFDTOOL Unlocking Management Engine\n"
+ $(objutil)/ifdtool/ifdtool -u $(obj)/coreboot.pre
+ mv $(obj)/coreboot.pre.new $(obj)/coreboot.pre
+endif
+
+PHONY += pch_add_me
+
+# If an MRC file is an ELF file determine the entry address and first loadable
+# section offset in the file. Subtract the offset from the entry address to
+# determine the final location.
+mrcelfoffset = $(shell readelf -S -W $(CONFIG_MRC_FILE) | sed -e 's/\[ /[0/' | awk '$$3 ~ /PROGBITS/ { print "0x"$$5; exit }' )
+mrcelfentry = $(shell readelf -h -W $(CONFIG_MRC_FILE) | grep 'Entry point address' | awk '{print $$NF }')
+
+# Add memory reference code blob.
+cbfs-files-$(CONFIG_HAVE_MRC) += mrc.bin
+mrc.bin-file := $(call strip_quotes,$(CONFIG_MRC_FILE))
+mrc.bin-position := $(if $(findstring elf,$(CONFIG_MRC_FILE)),$(shell printf "0x%x" $$(( $(mrcelfentry) - $(mrcelfoffset) )) ),$(CONFIG_MRC_BIN_ADDRESS))
+mrc.bin-type := 0xab
diff --git a/src/soc/intel/broadwell/acpi.c b/src/soc/intel/broadwell/acpi.c
new file mode 100644
index 0000000..782503e
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi.c
@@ -0,0 +1,613 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/acpi.h>
+#include <arch/acpigen.h>
+#include <arch/io.h>
+#include <arch/smp/mpspec.h>
+#include <cbmem.h>
+#include <console/console.h>
+#include <cpu/x86/smm.h>
+#include <console/console.h>
+#include <types.h>
+#include <string.h>
+#include <arch/cpu.h>
+#include <cpu/x86/msr.h>
+#include <cpu/x86/tsc.h>
+#include <cpu/intel/turbo.h>
+#include <ec/google/chromeec/ec.h>
+#include <vendorcode/google/chromeos/gnvs.h>
+#include <broadwell/acpi.h>
+#include <broadwell/cpu.h>
+#include <broadwell/iomap.h>
+#include <broadwell/lpc.h>
+#include <broadwell/msr.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/pm.h>
+#include <chip.h>
+
+/*
+ * List of suported C-states in this processor. Only the ULT parts support C8,
+ * C9, and C10.
+ */
+enum {
+ C_STATE_C0, /* 0 */
+ C_STATE_C1, /* 1 */
+ C_STATE_C1E, /* 2 */
+ C_STATE_C3, /* 3 */
+ C_STATE_C6_SHORT_LAT, /* 4 */
+ C_STATE_C6_LONG_LAT, /* 5 */
+ C_STATE_C7_SHORT_LAT, /* 6 */
+ C_STATE_C7_LONG_LAT, /* 7 */
+ C_STATE_C7S_SHORT_LAT, /* 8 */
+ C_STATE_C7S_LONG_LAT, /* 9 */
+ C_STATE_C8, /* 10 */
+ C_STATE_C9, /* 11 */
+ C_STATE_C10, /* 12 */
+ NUM_C_STATES
+};
+
+#define MWAIT_RES(state, sub_state) \
+ { \
+ .addrl = (((state) << 4) | (sub_state)), \
+ .space_id = ACPI_ADDRESS_SPACE_FIXED, \
+ .bit_width = ACPI_FFIXEDHW_VENDOR_INTEL, \
+ .bit_offset = ACPI_FFIXEDHW_CLASS_MWAIT, \
+ .access_size = ACPI_FFIXEDHW_FLAG_HW_COORD, \
+ }
+
+static acpi_cstate_t cstate_map[NUM_C_STATES] = {
+ [C_STATE_C0] = { },
+ [C_STATE_C1] = {
+ .latency = 0,
+ .power = 1000,
+ .resource = MWAIT_RES(0,0),
+ },
+ [C_STATE_C1E] = {
+ .latency = 0,
+ .power = 1000,
+ .resource = MWAIT_RES(0,1),
+ },
+ [C_STATE_C3] = {
+ .latency = C_STATE_LATENCY_FROM_LAT_REG(0),
+ .power = 900,
+ .resource = MWAIT_RES(1, 0),
+ },
+ [C_STATE_C6_SHORT_LAT] = {
+ .latency = C_STATE_LATENCY_FROM_LAT_REG(1),
+ .power = 800,
+ .resource = MWAIT_RES(2, 0),
+ },
+ [C_STATE_C6_LONG_LAT] = {
+ .latency = C_STATE_LATENCY_FROM_LAT_REG(2),
+ .power = 800,
+ .resource = MWAIT_RES(2, 1),
+ },
+ [C_STATE_C7_SHORT_LAT] = {
+ .latency = C_STATE_LATENCY_FROM_LAT_REG(1),
+ .power = 700,
+ .resource = MWAIT_RES(3, 0),
+ },
+ [C_STATE_C7_LONG_LAT] = {
+ .latency = C_STATE_LATENCY_FROM_LAT_REG(2),
+ .power = 700,
+ .resource = MWAIT_RES(3, 1),
+ },
+ [C_STATE_C7S_SHORT_LAT] = {
+ .latency = C_STATE_LATENCY_FROM_LAT_REG(1),
+ .power = 700,
+ .resource = MWAIT_RES(3, 2),
+ },
+ [C_STATE_C7S_LONG_LAT] = {
+ .latency = C_STATE_LATENCY_FROM_LAT_REG(2),
+ .power = 700,
+ .resource = MWAIT_RES(3, 3),
+ },
+ [C_STATE_C8] = {
+ .latency = C_STATE_LATENCY_FROM_LAT_REG(3),
+ .power = 600,
+ .resource = MWAIT_RES(4, 0),
+ },
+ [C_STATE_C9] = {
+ .latency = C_STATE_LATENCY_FROM_LAT_REG(4),
+ .power = 500,
+ .resource = MWAIT_RES(5, 0),
+ },
+ [C_STATE_C10] = {
+ .latency = C_STATE_LATENCY_FROM_LAT_REG(5),
+ .power = 400,
+ .resource = MWAIT_RES(6, 0),
+ },
+};
+
+static int cstate_set_s0ix[3] = {
+ C_STATE_C1E,
+ C_STATE_C7S_LONG_LAT,
+ C_STATE_C10
+};
+
+static int cstate_set_non_s0ix[3] = {
+ C_STATE_C1E,
+ C_STATE_C3,
+ C_STATE_C7S_LONG_LAT
+};
+
+static int get_cores_per_package(void)
+{
+ struct cpuinfo_x86 c;
+ struct cpuid_result result;
+ int cores = 1;
+
+ get_fms(&c, cpuid_eax(1));
+ if (c.x86 != 6)
+ return 1;
+
+ result = cpuid_ext(0xb, 1);
+ cores = result.ebx & 0xff;
+
+ return cores;
+}
+
+void acpi_init_gnvs(global_nvs_t *gnvs)
+{
+ /* Set unknown wake source */
+ gnvs->pm1i = -1;
+
+ /* CPU core count */
+ gnvs->pcnt = dev_count_cpu();
+
+#if CONFIG_CONSOLE_CBMEM
+ /* Update the mem console pointer. */
+ gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
+#endif
+
+#if CONFIG_CHROMEOS
+ /* Initialize Verified Boot data */
+ chromeos_init_vboot(&(gnvs->chromeos));
+#if CONFIG_EC_GOOGLE_CHROMEEC
+ gnvs->chromeos.vbt2 = google_ec_running_ro() ?
+ ACTIVE_ECFW_RO : ACTIVE_ECFW_RW;
+#endif
+ gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO;
+#endif
+}
+
+void acpi_create_intel_hpet(acpi_hpet_t * hpet)
+{
+ acpi_header_t *header = &(hpet->header);
+ acpi_addr_t *addr = &(hpet->addr);
+
+ memset((void *) hpet, 0, sizeof(acpi_hpet_t));
+
+ /* fill out header fields */
+ memcpy(header->signature, "HPET", 4);
+ memcpy(header->oem_id, OEM_ID, 6);
+ memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
+ memcpy(header->asl_compiler_id, ASLC, 4);
+
+ header->length = sizeof(acpi_hpet_t);
+ header->revision = 1;
+
+ /* fill out HPET address */
+ addr->space_id = 0; /* Memory */
+ addr->bit_width = 64;
+ addr->bit_offset = 0;
+ addr->addrl = (unsigned long long)HPET_BASE_ADDRESS & 0xffffffff;
+ addr->addrh = (unsigned long long)HPET_BASE_ADDRESS >> 32;
+
+ hpet->id = 0x8086a201; /* Intel */
+ hpet->number = 0x00;
+ hpet->min_tick = 0x0080;
+
+ header->checksum =
+ acpi_checksum((void *) hpet, sizeof(acpi_hpet_t));
+}
+
+unsigned long acpi_fill_mcfg(unsigned long current)
+{
+ current += acpi_create_mcfg_mmconfig((acpi_mcfg_mmconfig_t *)current,
+ MCFG_BASE_ADDRESS, 0, 0, 255);
+ return current;
+}
+
+void acpi_fill_in_fadt(acpi_fadt_t *fadt)
+{
+ const uint16_t pmbase = ACPI_BASE_ADDRESS;
+
+ fadt->sci_int = acpi_sci_irq();
+ fadt->smi_cmd = APM_CNT;
+ fadt->acpi_enable = APM_CNT_ACPI_ENABLE;
+ fadt->acpi_disable = APM_CNT_ACPI_DISABLE;
+ fadt->s4bios_req = 0x0;
+ fadt->pstate_cnt = 0;
+
+ fadt->pm1a_evt_blk = pmbase + PM1_STS;
+ fadt->pm1b_evt_blk = 0x0;
+ fadt->pm1a_cnt_blk = pmbase + PM1_CNT;
+ fadt->pm1b_cnt_blk = 0x0;
+ fadt->pm2_cnt_blk = pmbase + PM2_CNT;
+ fadt->pm_tmr_blk = pmbase + PM1_TMR;
+ fadt->gpe0_blk = pmbase + GPE0_STS(0);
+ fadt->gpe1_blk = 0;
+
+ fadt->pm1_evt_len = 4;
+ fadt->pm1_cnt_len = 2;
+ fadt->pm2_cnt_len = 1;
+ fadt->pm_tmr_len = 4;
+ fadt->gpe0_blk_len = 32;
+ fadt->gpe1_blk_len = 0;
+ fadt->gpe1_base = 0;
+ fadt->cst_cnt = 0;
+ fadt->p_lvl2_lat = 1;
+ fadt->p_lvl3_lat = 87;
+ fadt->flush_size = 1024;
+ fadt->flush_stride = 16;
+ fadt->duty_offset = 1;
+ fadt->duty_width = 0;
+ fadt->day_alrm = 0xd;
+ fadt->mon_alrm = 0x00;
+ fadt->century = 0x00;
+ fadt->iapc_boot_arch = ACPI_FADT_LEGACY_DEVICES | ACPI_FADT_8042;
+
+ fadt->flags = ACPI_FADT_WBINVD | ACPI_FADT_C1_SUPPORTED |
+ ACPI_FADT_C2_MP_SUPPORTED | ACPI_FADT_SLEEP_BUTTON |
+ ACPI_FADT_RESET_REGISTER | ACPI_FADT_SEALED_CASE |
+ ACPI_FADT_S4_RTC_WAKE | ACPI_FADT_PLATFORM_CLOCK;
+
+ fadt->reset_reg.space_id = 1;
+ fadt->reset_reg.bit_width = 8;
+ fadt->reset_reg.bit_offset = 0;
+ fadt->reset_reg.resv = 0;
+ fadt->reset_reg.addrl = 0xcf9;
+ fadt->reset_reg.addrh = 0;
+ fadt->reset_value = 6;
+
+ fadt->x_pm1a_evt_blk.space_id = 1;
+ fadt->x_pm1a_evt_blk.bit_width = fadt->pm1_evt_len * 8;
+ fadt->x_pm1a_evt_blk.bit_offset = 0;
+ fadt->x_pm1a_evt_blk.resv = 0;
+ fadt->x_pm1a_evt_blk.addrl = pmbase + PM1_STS;
+ fadt->x_pm1a_evt_blk.addrh = 0x0;
+
+ fadt->x_pm1b_evt_blk.space_id = 1;
+ fadt->x_pm1b_evt_blk.bit_width = 0;
+ fadt->x_pm1b_evt_blk.bit_offset = 0;
+ fadt->x_pm1b_evt_blk.resv = 0;
+ fadt->x_pm1b_evt_blk.addrl = 0x0;
+ fadt->x_pm1b_evt_blk.addrh = 0x0;
+
+ fadt->x_pm1a_cnt_blk.space_id = 1;
+ fadt->x_pm1a_cnt_blk.bit_width = fadt->pm1_cnt_len * 8;
+ fadt->x_pm1a_cnt_blk.bit_offset = 0;
+ fadt->x_pm1a_cnt_blk.resv = 0;
+ fadt->x_pm1a_cnt_blk.addrl = pmbase + PM1_CNT;
+ fadt->x_pm1a_cnt_blk.addrh = 0x0;
+
+ fadt->x_pm1b_cnt_blk.space_id = 1;
+ fadt->x_pm1b_cnt_blk.bit_width = 0;
+ fadt->x_pm1b_cnt_blk.bit_offset = 0;
+ fadt->x_pm1b_cnt_blk.resv = 0;
+ fadt->x_pm1b_cnt_blk.addrl = 0x0;
+ fadt->x_pm1b_cnt_blk.addrh = 0x0;
+
+ fadt->x_pm2_cnt_blk.space_id = 1;
+ fadt->x_pm2_cnt_blk.bit_width = fadt->pm2_cnt_len * 8;
+ fadt->x_pm2_cnt_blk.bit_offset = 0;
+ fadt->x_pm2_cnt_blk.resv = 0;
+ fadt->x_pm2_cnt_blk.addrl = pmbase + PM2_CNT;
+ fadt->x_pm2_cnt_blk.addrh = 0x0;
+
+ fadt->x_pm_tmr_blk.space_id = 1;
+ fadt->x_pm_tmr_blk.bit_width = fadt->pm_tmr_len * 8;
+ fadt->x_pm_tmr_blk.bit_offset = 0;
+ fadt->x_pm_tmr_blk.resv = 0;
+ fadt->x_pm_tmr_blk.addrl = pmbase + PM1_TMR;
+ fadt->x_pm_tmr_blk.addrh = 0x0;
+
+ fadt->x_gpe0_blk.space_id = 0;
+ fadt->x_gpe0_blk.bit_width = 0;
+ fadt->x_gpe0_blk.bit_offset = 0;
+ fadt->x_gpe0_blk.resv = 0;
+ fadt->x_gpe0_blk.addrl = 0;
+ fadt->x_gpe0_blk.addrh = 0;
+
+ fadt->x_gpe1_blk.space_id = 1;
+ fadt->x_gpe1_blk.bit_width = 0;
+ fadt->x_gpe1_blk.bit_offset = 0;
+ fadt->x_gpe1_blk.resv = 0;
+ fadt->x_gpe1_blk.addrl = 0x0;
+ fadt->x_gpe1_blk.addrh = 0x0;
+}
+
+static acpi_tstate_t tss_table_fine[] = {
+ { 100, 1000, 0, 0x00, 0 },
+ { 94, 940, 0, 0x1f, 0 },
+ { 88, 880, 0, 0x1e, 0 },
+ { 82, 820, 0, 0x1d, 0 },
+ { 75, 760, 0, 0x1c, 0 },
+ { 69, 700, 0, 0x1b, 0 },
+ { 63, 640, 0, 0x1a, 0 },
+ { 57, 580, 0, 0x19, 0 },
+ { 50, 520, 0, 0x18, 0 },
+ { 44, 460, 0, 0x17, 0 },
+ { 38, 400, 0, 0x16, 0 },
+ { 32, 340, 0, 0x15, 0 },
+ { 25, 280, 0, 0x14, 0 },
+ { 19, 220, 0, 0x13, 0 },
+ { 13, 160, 0, 0x12, 0 },
+};
+
+static acpi_tstate_t tss_table_coarse[] = {
+ { 100, 1000, 0, 0x00, 0 },
+ { 88, 875, 0, 0x1f, 0 },
+ { 75, 750, 0, 0x1e, 0 },
+ { 63, 625, 0, 0x1d, 0 },
+ { 50, 500, 0, 0x1c, 0 },
+ { 38, 375, 0, 0x1b, 0 },
+ { 25, 250, 0, 0x1a, 0 },
+ { 13, 125, 0, 0x19, 0 },
+};
+
+static int generate_T_state_entries(int core, int cores_per_package)
+{
+ int len;
+
+ /* Indicate SW_ALL coordination for T-states */
+ len = acpigen_write_TSD_package(core, cores_per_package, SW_ALL);
+
+ /* Indicate FFixedHW so OS will use MSR */
+ len += acpigen_write_empty_PTC();
+
+ /* Set a T-state limit that can be modified in NVS */
+ len += acpigen_write_TPC("\\TLVL");
+
+ /*
+ * CPUID.(EAX=6):EAX[5] indicates support
+ * for extended throttle levels.
+ */
+ if (cpuid_eax(6) & (1 << 5))
+ len += acpigen_write_TSS_package(
+ ARRAY_SIZE(tss_table_fine), tss_table_fine);
+ else
+ len += acpigen_write_TSS_package(
+ ARRAY_SIZE(tss_table_coarse), tss_table_coarse);
+
+ return len;
+}
+
+static int generate_C_state_entries(void)
+{
+ device_t dev = SA_DEV_ROOT;
+ config_t *config = dev->chip_info;
+ acpi_cstate_t map[3];
+ int *set;
+ int i;
+
+ if (config->s0ix_enable)
+ set = cstate_set_s0ix;
+ else
+ set = cstate_set_non_s0ix;
+
+ for (i = 0; i < 3; i++) {
+ memcpy(&map[i], &cstate_map[set[i]], sizeof(acpi_cstate_t));
+ map[i].ctype = i + 1;
+ }
+
+ /* Generate C-state tables */
+ return acpigen_write_CST_package(map, ARRAY_SIZE(map));
+}
+
+static int calculate_power(int tdp, int p1_ratio, int ratio)
+{
+ u32 m;
+ u32 power;
+
+ /*
+ * M = ((1.1 - ((p1_ratio - ratio) * 0.00625)) / 1.1) ^ 2
+ *
+ * Power = (ratio / p1_ratio) * m * tdp
+ */
+
+ m = (110000 - ((p1_ratio - ratio) * 625)) / 11;
+ m = (m * m) / 1000;
+
+ power = ((ratio * 100000 / p1_ratio) / 100);
+ power *= (m / 100) * (tdp / 1000);
+ power /= 1000;
+
+ return (int)power;
+}
+
+static int generate_P_state_entries(int core, int cores_per_package)
+{
+ int len, len_pss;
+ int ratio_min, ratio_max, ratio_turbo, ratio_step;
+ int coord_type, power_max, power_unit, num_entries;
+ int ratio, power, clock, clock_max;
+ msr_t msr;
+
+ /* Determine P-state coordination type from MISC_PWR_MGMT[0] */
+ msr = rdmsr(MSR_MISC_PWR_MGMT);
+ if (msr.lo & MISC_PWR_MGMT_EIST_HW_DIS)
+ coord_type = SW_ANY;
+ else
+ coord_type = HW_ALL;
+
+ /* Get bus ratio limits and calculate clock speeds */
+ msr = rdmsr(MSR_PLATFORM_INFO);
+ ratio_min = (msr.hi >> (40-32)) & 0xff; /* Max Efficiency Ratio */
+
+ /* Determine if this CPU has configurable TDP */
+ if (cpu_config_tdp_levels()) {
+ /* Set max ratio to nominal TDP ratio */
+ msr = rdmsr(MSR_CONFIG_TDP_NOMINAL);
+ ratio_max = msr.lo & 0xff;
+ } else {
+ /* Max Non-Turbo Ratio */
+ ratio_max = (msr.lo >> 8) & 0xff;
+ }
+ clock_max = ratio_max * CPU_BCLK;
+
+ /* Calculate CPU TDP in mW */
+ msr = rdmsr(MSR_PKG_POWER_SKU_UNIT);
+ power_unit = 2 << ((msr.lo & 0xf) - 1);
+ msr = rdmsr(MSR_PKG_POWER_SKU);
+ power_max = ((msr.lo & 0x7fff) / power_unit) * 1000;
+
+ /* Write _PCT indicating use of FFixedHW */
+ len = acpigen_write_empty_PCT();
+
+ /* Write _PPC with no limit on supported P-state */
+ len += acpigen_write_PPC_NVS();
+
+ /* Write PSD indicating configured coordination type */
+ len += acpigen_write_PSD_package(core, 1, coord_type);
+
+ /* Add P-state entries in _PSS table */
+ len += acpigen_write_name("_PSS");
+
+ /* Determine ratio points */
+ ratio_step = PSS_RATIO_STEP;
+ num_entries = (ratio_max - ratio_min) / ratio_step;
+ while (num_entries > PSS_MAX_ENTRIES-1) {
+ ratio_step <<= 1;
+ num_entries >>= 1;
+ }
+
+ /* P[T] is Turbo state if enabled */
+ if (get_turbo_state() == TURBO_ENABLED) {
+ /* _PSS package count including Turbo */
+ len_pss = acpigen_write_package(num_entries + 2);
+
+ msr = rdmsr(MSR_TURBO_RATIO_LIMIT);
+ ratio_turbo = msr.lo & 0xff;
+
+ /* Add entry for Turbo ratio */
+ len_pss += acpigen_write_PSS_package(
+ clock_max + 1, /*MHz*/
+ power_max, /*mW*/
+ PSS_LATENCY_TRANSITION, /*lat1*/
+ PSS_LATENCY_BUSMASTER, /*lat2*/
+ ratio_turbo << 8, /*control*/
+ ratio_turbo << 8); /*status*/
+ } else {
+ /* _PSS package count without Turbo */
+ len_pss = acpigen_write_package(num_entries + 1);
+ }
+
+ /* First regular entry is max non-turbo ratio */
+ len_pss += acpigen_write_PSS_package(
+ clock_max, /*MHz*/
+ power_max, /*mW*/
+ PSS_LATENCY_TRANSITION, /*lat1*/
+ PSS_LATENCY_BUSMASTER, /*lat2*/
+ ratio_max << 8, /*control*/
+ ratio_max << 8); /*status*/
+
+ /* Generate the remaining entries */
+ for (ratio = ratio_min + ((num_entries - 1) * ratio_step);
+ ratio >= ratio_min; ratio -= ratio_step) {
+
+ /* Calculate power at this ratio */
+ power = calculate_power(power_max, ratio_max, ratio);
+ clock = ratio * CPU_BCLK;
+
+ len_pss += acpigen_write_PSS_package(
+ clock, /*MHz*/
+ power, /*mW*/
+ PSS_LATENCY_TRANSITION, /*lat1*/
+ PSS_LATENCY_BUSMASTER, /*lat2*/
+ ratio << 8, /*control*/
+ ratio << 8); /*status*/
+ }
+
+ /* Fix package length */
+ len_pss--;
+ acpigen_patch_len(len_pss);
+
+ return len + len_pss;
+}
+
+void generate_cpu_entries(void)
+{
+ int len_pr;
+ int coreID, cpuID, pcontrol_blk = ACPI_BASE_ADDRESS, plen = 6;
+ int totalcores = dev_count_cpu();
+ int cores_per_package = get_cores_per_package();
+ int numcpus = totalcores/cores_per_package;
+
+ printk(BIOS_DEBUG, "Found %d CPU(s) with %d core(s) each.\n",
+ numcpus, cores_per_package);
+
+ for (cpuID=1; cpuID <=numcpus; cpuID++) {
+ for (coreID=1; coreID<=cores_per_package; coreID++) {
+ if (coreID>1) {
+ pcontrol_blk = 0;
+ plen = 0;
+ }
+
+ /* Generate processor \_PR.CPUx */
+ len_pr = acpigen_write_processor(
+ (cpuID-1)*cores_per_package+coreID-1,
+ pcontrol_blk, plen);
+
+ /* Generate P-state tables */
+ len_pr += generate_P_state_entries(
+ coreID-1, cores_per_package);
+
+ /* Generate C-state tables */
+ len_pr += generate_C_state_entries();
+
+ /* Generate T-state tables */
+ len_pr += generate_T_state_entries(
+ cpuID-1, cores_per_package);
+
+ len_pr--;
+ acpigen_patch_len(len_pr);
+ }
+ }
+}
+
+unsigned long acpi_madt_irq_overrides(unsigned long current)
+{
+ int sci = acpi_sci_irq();
+ acpi_madt_irqoverride_t *irqovr;
+ uint16_t flags = MP_IRQ_TRIGGER_LEVEL;
+
+ /* INT_SRC_OVR */
+ irqovr = (void *)current;
+ current += acpi_create_madt_irqoverride(irqovr, 0, 0, 2, 0);
+
+ if (sci >= 20)
+ flags |= MP_IRQ_POLARITY_LOW;
+ else
+ flags |= MP_IRQ_POLARITY_HIGH;
+
+ /* SCI */
+ irqovr = (void *)current;
+ current += acpi_create_madt_irqoverride(irqovr, 0, sci, sci, flags);
+
+ /* GPIO Controller */
+ irqovr = (void *)current;
+ flags = MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_HIGH;
+ current += acpi_create_madt_irqoverride(irqovr, 0, 14, 14, flags);
+
+ return current;
+}
diff --git a/src/soc/intel/broadwell/acpi/cpu.asl b/src/soc/intel/broadwell/acpi/cpu.asl
new file mode 100644
index 0000000..f0da2de
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/cpu.asl
@@ -0,0 +1,122 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* These devices are created at runtime */
+External (\_PR.CPU0, DeviceObj)
+External (\_PR.CPU1, DeviceObj)
+External (\_PR.CPU2, DeviceObj)
+External (\_PR.CPU3, DeviceObj)
+External (\_PR.CPU4, DeviceObj)
+External (\_PR.CPU5, DeviceObj)
+External (\_PR.CPU6, DeviceObj)
+External (\_PR.CPU7, DeviceObj)
+
+/* Notify OS to re-read CPU tables, assuming ^2 CPU count */
+Method (PNOT)
+{
+ If (LGreaterEqual (\PCNT, 2)) {
+ Notify (\_PR.CPU0, 0x81) // _CST
+ Notify (\_PR.CPU1, 0x81) // _CST
+ }
+ If (LGreaterEqual (\PCNT, 4)) {
+ Notify (\_PR.CPU2, 0x81) // _CST
+ Notify (\_PR.CPU3, 0x81) // _CST
+ }
+ If (LGreaterEqual (\PCNT, 8)) {
+ Notify (\_PR.CPU4, 0x81) // _CST
+ Notify (\_PR.CPU5, 0x81) // _CST
+ Notify (\_PR.CPU6, 0x81) // _CST
+ Notify (\_PR.CPU7, 0x81) // _CST
+ }
+}
+
+/* Notify OS to re-read CPU _PPC limit, assuming ^2 CPU count */
+Method (PPCN)
+{
+ If (LGreaterEqual (\PCNT, 2)) {
+ Notify (\_PR.CPU0, 0x80) // _PPC
+ Notify (\_PR.CPU1, 0x80) // _PPC
+ }
+ If (LGreaterEqual (\PCNT, 4)) {
+ Notify (\_PR.CPU2, 0x80) // _PPC
+ Notify (\_PR.CPU3, 0x80) // _PPC
+ }
+ If (LGreaterEqual (\PCNT, 8)) {
+ Notify (\_PR.CPU4, 0x80) // _PPC
+ Notify (\_PR.CPU5, 0x80) // _PPC
+ Notify (\_PR.CPU6, 0x80) // _PPC
+ Notify (\_PR.CPU7, 0x80) // _PPC
+ }
+}
+
+/* Notify OS to re-read Throttle Limit tables, assuming ^2 CPU count */
+Method (TNOT)
+{
+ If (LGreaterEqual (\PCNT, 2)) {
+ Notify (\_PR.CPU0, 0x82) // _TPC
+ Notify (\_PR.CPU1, 0x82) // _TPC
+ }
+ If (LGreaterEqual (\PCNT, 4)) {
+ Notify (\_PR.CPU2, 0x82) // _TPC
+ Notify (\_PR.CPU3, 0x82) // _TPC
+ }
+ If (LGreaterEqual (\PCNT, 8)) {
+ Notify (\_PR.CPU4, 0x82) // _TPC
+ Notify (\_PR.CPU5, 0x82) // _TPC
+ Notify (\_PR.CPU6, 0x82) // _TPC
+ Notify (\_PR.CPU7, 0x82) // _TPC
+ }
+}
+
+/* Return a package containing enabled processor entries */
+Method (PPKG)
+{
+ If (LGreaterEqual (\PCNT, 8)) {
+ Return (Package()
+ {
+ \_PR.CPU0,
+ \_PR.CPU1,
+ \_PR.CPU2,
+ \_PR.CPU3,
+ \_PR.CPU4,
+ \_PR.CPU5,
+ \_PR.CPU6,
+ \_PR.CPU7
+ })
+ } ElseIf (LGreaterEqual (\PCNT, 4)) {
+ Return (Package ()
+ {
+ \_PR.CPU0,
+ \_PR.CPU1,
+ \_PR.CPU2,
+ \_PR.CPU3
+ })
+ } ElseIf (LGreaterEqual (\PCNT, 2)) {
+ Return (Package ()
+ {
+ \_PR.CPU0,
+ \_PR.CPU1
+ })
+ } Else {
+ Return (Package ()
+ {
+ \_PR.CPU0
+ })
+ }
+}
diff --git a/src/soc/intel/broadwell/acpi/ctdp.asl b/src/soc/intel/broadwell/acpi/ctdp.asl
new file mode 100644
index 0000000..2aefda9
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/ctdp.asl
@@ -0,0 +1,237 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+Scope (\_SB.PCI0.MCHC)
+{
+ Mutex (CTCM, 1) /* CTDP Switch Mutex (sync level 1) */
+ Name (CTCC, 0) /* CTDP Current Selection */
+ Name (CTCN, 0) /* CTDP Nominal Select */
+ Name (CTCD, 1) /* CTDP Down Select */
+ Name (CTCU, 2) /* CTDP Up Select */
+ Name (SPL1, 0) /* Saved PL1 value */
+
+ OperationRegion (MCHB, SystemMemory,
+ Add (MCH_BASE_ADDRESS, 0x5000), 0x1000)
+ Field (MCHB, DWordAcc, Lock, Preserve)
+ {
+ Offset (0x930), /* PACKAGE_POWER_SKU */
+ CTDN, 15, /* CTDP Nominal PL1 */
+ Offset (0x938), /* PACKAGE_POWER_SKU_UNIT */
+ PUNI, 4, /* Power Units */
+ , 4,
+ EUNI, 5, /* Energy Units */
+ , 3,
+ TUNI, 4, /* Time Units */
+ Offset (0x958), /* PLATFORM_INFO */
+ , 40,
+ LFM_, 8, /* Maximum Efficiency Ratio (LFM) */
+ Offset (0x9a0), /* TURBO_POWER_LIMIT1 */
+ PL1V, 15, /* Power Limit 1 Value */
+ PL1E, 1, /* Power Limit 1 Enable */
+ PL1C, 1, /* Power Limit 1 Clamp */
+ PL1T, 7, /* Power Limit 1 Time */
+ Offset (0x9a4), /* TURBO_POWER_LIMIT2 */
+ PL2V, 15, /* Power Limit 2 Value */
+ PL2E, 1, /* Power Limit 2 Enable */
+ PL2C, 1, /* Power Limit 2 Clamp */
+ PL2T, 7, /* Power Limit 2 Time */
+ Offset (0xf3c), /* CONFIG_TDP_NOMINAL */
+ TARN, 8, /* CTDP Nominal Turbo Activation Ratio */
+ Offset (0xf40), /* CONFIG_TDP_LEVEL1 */
+ CTDD, 15, /* CTDP Down PL1 */
+ , 1,
+ TARD, 8, /* CTDP Down Turbo Activation Ratio */
+ Offset (0xf48), /* MSR_CONFIG_TDP_LEVEL2 */
+ CTDU, 15, /* CTDP Up PL1 */
+ , 1,
+ TARU, 8, /* CTDP Up Turbo Activation Ratio */
+ Offset (0xf50), /* CONFIG_TDP_CONTROL */
+ CTCS, 2, /* CTDP Select */
+ Offset (0xf54), /* TURBO_ACTIVATION_RATIO */
+ TARS, 8, /* Turbo Activation Ratio Select */
+ }
+
+ /*
+ * Search CPU0 _PSS looking for control=arg0 and then
+ * return previous P-state entry number for new _PPC
+ *
+ * Format of _PSS:
+ * Name (_PSS, Package () {
+ * Package (6) { freq, power, tlat, blat, control, status }
+ * }
+ */
+ External (\_PR.CPU0._PSS)
+ Method (PSSS, 1, NotSerialized)
+ {
+ Store (One, Local0) /* Start at P1 */
+ Store (SizeOf (\_PR.CPU0._PSS), Local1)
+
+ While (LLess (Local0, Local1)) {
+ /* Store _PSS entry Control value to Local2 */
+ ShiftRight (DeRefOf (Index (DeRefOf (Index
+ (\_PR.CPU0._PSS, Local0)), 4)), 8, Local2)
+ If (LEqual (Local2, Arg0)) {
+ Return (Subtract (Local0, 1))
+ }
+ Increment (Local0)
+ }
+
+ Return (0)
+ }
+
+ /* Calculate PL2 based on chip type */
+ Method (CPL2, 1, NotSerialized)
+ {
+ /* Haswell ULT PL2 = 25W */
+ /* FIXME: update for broadwell */
+ Return (Multiply (25, 8))
+ }
+
+ /* Set Config TDP Down */
+ Method (STND, 0, Serialized)
+ {
+ If (Acquire (CTCM, 100)) {
+ Return (0)
+ }
+ If (LEqual (CTCD, CTCC)) {
+ Release (CTCM)
+ Return (0)
+ }
+
+ Store ("Set TDP Down", Debug)
+
+ /* Set CTC */
+ Store (CTCD, CTCS)
+
+ /* Set TAR */
+ Store (TARD, TARS)
+
+ /* Set PPC limit and notify OS */
+ Store (PSSS (TARD), PPCM)
+ PPCN ()
+
+ /* Set PL2 */
+ Store (CPL2 (CTDD), PL2V)
+
+ /* Set PL1 */
+ Store (CTDD, PL1V)
+
+ /* Store the new TDP Down setting */
+ Store (CTCD, CTCC)
+
+ Release (CTCM)
+ Return (1)
+ }
+
+ /* Set Config TDP Nominal from Down */
+ Method (STDN, 0, Serialized)
+ {
+ If (Acquire (CTCM, 100)) {
+ Return (0)
+ }
+ If (LEqual (CTCN, CTCC)) {
+ Release (CTCM)
+ Return (0)
+ }
+
+ Store ("Set TDP Nominal", Debug)
+
+ /* Set PL1 */
+ Store (CTDN, PL1V)
+
+ /* Set PL2 */
+ Store (CPL2 (CTDN), PL2V)
+
+ /* Set PPC limit and notify OS */
+ Store (PSSS (TARN), PPCM)
+ PPCN ()
+
+ /* Set TAR */
+ Store (TARN, TARS)
+
+ /* Set CTC */
+ Store (CTCN, CTCS)
+
+ /* Store the new TDP Nominal setting */
+ Store (CTCN, CTCC)
+
+ Release (CTCM)
+ Return (1)
+ }
+
+ /* Calculate PL1 value based on requested TDP */
+ Method (TDPP, 1, NotSerialized)
+ {
+ Return (Multiply (ShiftLeft (Subtract (PUNI, 1), 2), Arg0))
+ }
+
+ /* Enable Controllable TDP to limit PL1 to requested value */
+ Method (CTLE, 1, Serialized)
+ {
+ If (Acquire (CTCM, 100)) {
+ Return (0)
+ }
+
+ Store ("Enable PL1 Limit", Debug)
+
+ /* Set _PPC to LFM */
+ Store (PSSS (LFM_), Local0)
+ Add (Local0, 1, PPCM)
+ \PPCN ()
+
+ /* Set TAR to LFM-1 */
+ Subtract (LFM_, 1, TARS)
+
+ /* Set PL1 to desired value */
+ Store (PL1V, SPL1)
+ Store (TDPP (Arg0), PL1V)
+
+ /* Set PL1 CLAMP bit */
+ Store (One, PL1C)
+
+ Release (CTCM)
+ Return (1)
+ }
+
+ /* Disable Controllable TDP */
+ Method (CTLD, 0, Serialized)
+ {
+ If (Acquire (CTCM, 100)) {
+ Return (0)
+ }
+
+ Store ("Disable PL1 Limit", Debug)
+
+ /* Clear PL1 CLAMP bit */
+ Store (Zero, PL1C)
+
+ /* Set PL1 to normal value */
+ Store (SPL1, PL1V)
+
+ /* Set TAR to 0 */
+ Store (Zero, TARS)
+
+ /* Set _PPC to 0 */
+ Store (Zero, PPCM)
+ \PPCN ()
+
+ Release (CTCM)
+ Return (1)
+ }
+}
diff --git a/src/soc/intel/broadwell/acpi/device_nvs.asl b/src/soc/intel/broadwell/acpi/device_nvs.asl
new file mode 100644
index 0000000..d5af2e8
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/device_nvs.asl
@@ -0,0 +1,51 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* Device Enabled in ACPI Mode */
+
+S0EN, 8, // DMA Enable
+S1EN, 8, // I2C0 Enable
+S2EN, 8, // I2C1 Enable
+S3EN, 8, // SPI0 Enable
+S4EN, 8, // SPI1 Enable
+S5EN, 8, // UART0 Enable
+S6EN, 8, // UART1 Enable
+S7EN, 8, // SDIO Enable
+
+/* BAR 0 */
+
+S0B0, 32, // DMA BAR0
+S1B0, 32, // I2C0 BAR0
+S2B0, 32, // I2C1 BAR0
+S3B0, 32, // SPI0 BAR0
+S4B0, 32, // SPI1 BAR0
+S5B0, 32, // UART0 BAR0
+S6B0, 32, // UART1 BAR0
+S7B0, 32, // SDIO BAR0
+
+/* BAR 1 */
+
+S0B1, 32, // DMA BAR1
+S1B1, 32, // I2C0 BAR1
+S2B1, 32, // I2C1 BAR1
+S3B1, 32, // SPI0 BAR1
+S4B1, 32, // SPI1 BAR1
+S5B1, 32, // UART0 BAR1
+S6B1, 32, // UART1 BAR1
+S7B1, 32, // SDIO BAR1
diff --git a/src/soc/intel/broadwell/acpi/ehci.asl b/src/soc/intel/broadwell/acpi/ehci.asl
new file mode 100644
index 0000000..a2e704f
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/ehci.asl
@@ -0,0 +1,51 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+// EHCI Controller 0:1d.0
+
+Device (EHCI)
+{
+ Name(_ADR, 0x001d0000)
+ Name (_PRW, Package(){ 0x6d, 3 })
+
+ // Leave USB ports on for to allow Wake from USB
+
+ Method(_S3D,0) // Highest D State in S3 State
+ {
+ Return (2)
+ }
+
+ Method(_S4D,0) // Highest D State in S4 State
+ {
+ Return (2)
+ }
+
+ Device (HUB7)
+ {
+ Name (_ADR, 0x00000000)
+
+ // How many are there?
+ Device (PRT1) { Name (_ADR, 1) } // USB Port 0
+ Device (PRT2) { Name (_ADR, 2) } // USB Port 1
+ Device (PRT3) { Name (_ADR, 3) } // USB Port 2
+ Device (PRT4) { Name (_ADR, 4) } // USB Port 3
+ Device (PRT5) { Name (_ADR, 5) } // USB Port 4
+ Device (PRT6) { Name (_ADR, 6) } // USB Port 5
+ }
+}
diff --git a/src/soc/intel/broadwell/acpi/globalnvs.asl b/src/soc/intel/broadwell/acpi/globalnvs.asl
new file mode 100644
index 0000000..413c811
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/globalnvs.asl
@@ -0,0 +1,108 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* Global Variables */
+
+Name (\PICM, 0) // IOAPIC/8259
+
+/*
+ * Global ACPI memory region. This region is used for passing information
+ * between coreboot (aka "the system bios"), ACPI, and the SMI handler.
+ * Since we don't know where this will end up in memory at ACPI compile time,
+ * we have to fix it up in coreboot's ACPI creation phase.
+ */
+
+OperationRegion (GNVS, SystemMemory, 0xC0DEBABE, 0x2000)
+Field (GNVS, ByteAcc, NoLock, Preserve)
+{
+ /* Miscellaneous */
+ Offset (0x00),
+ OSYS, 16, // 0x00 - Operating System
+ SMIF, 8, // 0x02 - SMI function
+ PRM0, 8, // 0x03 - SMI function parameter
+ PRM1, 8, // 0x04 - SMI function parameter
+ SCIF, 8, // 0x05 - SCI function
+ PRM2, 8, // 0x06 - SCI function parameter
+ PRM3, 8, // 0x07 - SCI function parameter
+ LCKF, 8, // 0x08 - Global Lock function for EC
+ PRM4, 8, // 0x09 - Lock function parameter
+ PRM5, 8, // 0x0a - Lock function parameter
+ PCNT, 8, // 0x0b - Processor Count
+ PPCM, 8, // 0x0c - Max PPC State
+ TMPS, 8, // 0x0d - Temperature Sensor ID
+ TLVL, 8, // 0x0e - Throttle Level Limit
+ FLVL, 8, // 0x0f - Current FAN Level
+ TCRT, 8, // 0x10 - Critical Threshold
+ TPSV, 8, // 0x11 - Passive Threshold
+ TMAX, 8, // 0x12 - CPU Tj_max
+ TPMP, 8, // 0x13 - TPM Present
+ S5U0, 8, // 0x14 - Enable USB in S5
+ S3U0, 8, // 0x15 - Enable USB in S3
+ S33G, 8, // 0x16 - Enable 3G in S3
+ LIDS, 8, // 0x17 - LID State
+ PWRS, 8, // 0x18 - AC Power State
+ CMEM, 32, // 0x19 - 0x1c - CBMEM TOC
+ CBMC, 32, // 0x1d - 0x20 - Coreboot Memory Console
+ PM1I, 32, // 0x21 - 0x24 - PM1 wake status bit
+
+ /* ChromeOS specific */
+ Offset (0x100),
+ #include <vendorcode/google/chromeos/acpi/gnvs.asl>
+
+ /* Device specific */
+ Offset (0x1000),
+ #include "device_nvs.asl"
+}
+
+/* Set flag to enable USB charging in S3 */
+Method (S3UE)
+{
+ Store (One, \S3U0)
+}
+
+/* Set flag to disable USB charging in S3 */
+Method (S3UD)
+{
+ Store (Zero, \S3U0)
+}
+
+/* Set flag to enable USB charging in S5 */
+Method (S5UE)
+{
+ Store (One, \S5U0)
+}
+
+/* Set flag to disable USB charging in S5 */
+Method (S5UD)
+{
+ Store (Zero, \S5U0)
+}
+
+/* Set flag to enable 3G module in S3 */
+Method (S3GE)
+{
+ Store (One, \S33G)
+}
+
+/* Set flag to disable 3G module in S3 */
+Method (S3GD)
+{
+ Store (Zero, \S33G)
+}
diff --git a/src/soc/intel/broadwell/acpi/gpio.asl b/src/soc/intel/broadwell/acpi/gpio.asl
new file mode 100644
index 0000000..5df512e
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/gpio.asl
@@ -0,0 +1,133 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+Device (GPIO)
+{
+ // GPIO Controller
+ Name (_HID, "INT33C7")
+ Name (_CID, "INT33C7")
+ Name (_UID, 1)
+
+ Name (RBUF, ResourceTemplate()
+ {
+ DWordIo (ResourceProducer,
+ MinFixed, // IsMinFixed
+ MaxFixed, // IsMaxFixed
+ PosDecode, // Decode
+ EntireRange, // ISARanges
+ 0x00000000, // AddressGranularity
+ 0x00000000, // AddressMinimum
+ 0x00000000, // AddressMaximum
+ 0x00000000, // AddressTranslation
+ 0x00000000, // RangeLength
+ , // ResourceSourceIndex
+ , // ResourceSource
+ BAR0)
+ Interrupt (ResourceConsumer,
+ Level, ActiveHigh, Shared, , , ) {14}
+ })
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ CreateDwordField (^RBUF, ^BAR0._MIN, BMIN)
+ CreateDwordField (^RBUF, ^BAR0._MAX, BMAX)
+ CreateDwordField (^RBUF, ^BAR0._LEN, BLEN)
+
+ Store (GPIO_BASE_SIZE, BLEN)
+ Store (GPIO_BASE_ADDRESS, BMIN)
+ Store (Subtract (Add (GPIO_BASE_ADDRESS,
+ GPIO_BASE_SIZE), 1), BMAX)
+
+ Return (RBUF)
+ }
+
+ Method (_STA, 0, NotSerialized)
+ {
+ Return (0xF)
+ }
+
+ // GWAK: Setup GPIO as ACPI GPE for Wake
+ // Arg0: GPIO Number
+ Method (GWAK, 1, NotSerialized)
+ {
+ // Local0 = GPIO Base Address
+ Store (And (GPBS, Not(0x1)), Local0)
+
+ // Local1 = BANK, Local2 = OFFSET
+ Divide (Arg0, 32, Local2, Local1)
+
+ //
+ // Set OWNER to ACPI
+ //
+
+ // Local3 = GPIOBASE + GPIO_OWN(BANK)
+ Store (Add (Local0, Multiply (Local1, 0x4)), Local3)
+
+ // GPIO_OWN(BANK)
+ OperationRegion (IOWN, SystemIO, Local3, 4)
+ Field (IOWN, AnyAcc, NoLock, Preserve) {
+ GOWN, 32,
+ }
+
+ // GPIO_OWN[GPIO] = 0 (ACPI)
+ Store (And (GOWN, Not (ShiftLeft (0x1, Local2))), GOWN)
+
+ //
+ // Set ROUTE to SCI
+ //
+
+ // Local3 = GPIOBASE + GPIO_ROUTE(BANK)
+ Store (Add (Add (Local0, 0x30), Multiply (Local1, 0x4)), Local3)
+
+ // GPIO_ROUTE(BANK)
+ OperationRegion (IROU, SystemIO, Local3, 4)
+ Field (IROU, AnyAcc, NoLock, Preserve) {
+ GROU, 32,
+ }
+
+ // GPIO_ROUTE[GPIO] = 0 (SCI)
+ Store (And (GROU, Not (ShiftLeft (0x1, Local2))), GROU)
+
+ //
+ // Set GPnCONFIG to GPIO|INPUT|INVERT
+ //
+
+ // Local3 = GPIOBASE + GPnCONFIG0(GPIO)
+ Store (Add (Add (Local0, 0x100), Multiply (Arg0, 0x8)), Local3)
+
+ // GPnCONFIG(GPIO)
+ OperationRegion (GPNC, SystemIO, Local3, 8)
+ Field (GPNC, AnyAcc, NoLock, Preserve) {
+ GMOD, 1, // MODE: 0=NATIVE 1=GPIO
+ , 1,
+ GIOS, 1, // IO_SEL: 0=OUTPUT 1=INPUT
+ GINV, 1, // INVERT: 0=NORMAL 1=INVERT
+ GLES, 1, // LxEB: 0=EDGE 1=LEVEL
+ , 24,
+ ILVL, 1, // INPUT: 0=LOW 1=HIGH
+ OLVL, 1, // OUTPUT: 0=LOW 1=HIGH
+ GPWP, 2, // PULLUP: 00=NONE 01=DOWN 10=UP 11=INVALID
+ ISEN, 1, // SENSE: 0=ENABLE 1=DISABLE
+ }
+
+ Store (0x1, GMOD) // GPIO
+ Store (0x1, GIOS) // INPUT
+ Store (0x1, GINV) // INVERT
+ }
+}
diff --git a/src/soc/intel/broadwell/acpi/hda.asl b/src/soc/intel/broadwell/acpi/hda.asl
new file mode 100644
index 0000000..2173661
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/hda.asl
@@ -0,0 +1,29 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* Intel PCH HDA */
+
+// Intel High Definition Audio (Azalia) 0:1b.0
+
+Device (HDEF)
+{
+ Name (_ADR, 0x001b0000)
+ Name (_PRW, Package () { 0x6d, 3 })
+}
diff --git a/src/soc/intel/broadwell/acpi/irqlinks.asl b/src/soc/intel/broadwell/acpi/irqlinks.asl
new file mode 100644
index 0000000..fee400e
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/irqlinks.asl
@@ -0,0 +1,492 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+Device (LNKA)
+{
+ Name (_HID, EISAID("PNP0C0F"))
+ Name (_UID, 1)
+
+ // Disable method
+ Method (_DIS, 0, Serialized)
+ {
+ Store (0x80, PRTA)
+ }
+
+ // Possible Resource Settings for this Link
+ Name (_PRS, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared)
+ { 1, 3, 4, 5, 6, 7, 10, 12, 14, 15 }
+ })
+
+ // Current Resource Settings for this link
+ Method (_CRS, 0, Serialized)
+ {
+ Name (RTLA, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared) {}
+ })
+ CreateWordField (RTLA, 1, IRQ0)
+
+ // Clear the WordField
+ Store (Zero, IRQ0)
+
+ // Set the bit from PRTA
+ ShiftLeft (1, And (PRTA, 0x0f), IRQ0)
+
+ Return (RTLA)
+ }
+
+ // Set Resource Setting for this IRQ link
+ Method (_SRS, 1, Serialized)
+ {
+ CreateWordField (Arg0, 1, IRQ0)
+
+ // Which bit is set?
+ FindSetRightBit (IRQ0, Local0)
+
+ Decrement(Local0)
+ Store (Local0, PRTA)
+ }
+
+ // Status
+ Method (_STA, 0, Serialized)
+ {
+ If(And (PRTA, 0x80)) {
+ Return (0x9)
+ } Else {
+ Return (0xb)
+ }
+ }
+}
+
+Device (LNKB)
+{
+ Name (_HID, EISAID("PNP0C0F"))
+ Name (_UID, 2)
+
+ // Disable method
+ Method (_DIS, 0, Serialized)
+ {
+ Store (0x80, PRTB)
+ }
+
+ // Possible Resource Settings for this Link
+ Name (_PRS, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared)
+ { 1, 3, 4, 5, 6, 7, 11, 12, 14, 15 }
+ })
+
+ // Current Resource Settings for this link
+ Method (_CRS, 0, Serialized)
+ {
+ Name (RTLB, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared) {}
+ })
+ CreateWordField (RTLB, 1, IRQ0)
+
+ // Clear the WordField
+ Store (Zero, IRQ0)
+
+ // Set the bit from PRTB
+ ShiftLeft (1, And (PRTB, 0x0f), IRQ0)
+
+ Return (RTLB)
+ }
+
+ // Set Resource Setting for this IRQ link
+ Method (_SRS, 1, Serialized)
+ {
+ CreateWordField (Arg0, 1, IRQ0)
+
+ // Which bit is set?
+ FindSetRightBit (IRQ0, Local0)
+
+ Decrement(Local0)
+ Store (Local0, PRTB)
+ }
+
+ // Status
+ Method (_STA, 0, Serialized)
+ {
+ If(And (PRTB, 0x80)) {
+ Return (0x9)
+ } Else {
+ Return (0xb)
+ }
+ }
+}
+
+Device (LNKC)
+{
+ Name (_HID, EISAID("PNP0C0F"))
+ Name (_UID, 3)
+
+ // Disable method
+ Method (_DIS, 0, Serialized)
+ {
+ Store (0x80, PRTC)
+ }
+
+ // Possible Resource Settings for this Link
+ Name (_PRS, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared)
+ { 1, 3, 4, 5, 6, 7, 10, 12, 14, 15 }
+ })
+
+ // Current Resource Settings for this link
+ Method (_CRS, 0, Serialized)
+ {
+ Name (RTLC, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared) {}
+ })
+ CreateWordField (RTLC, 1, IRQ0)
+
+ // Clear the WordField
+ Store (Zero, IRQ0)
+
+ // Set the bit from PRTC
+ ShiftLeft (1, And (PRTC, 0x0f), IRQ0)
+
+ Return (RTLC)
+ }
+
+ // Set Resource Setting for this IRQ link
+ Method (_SRS, 1, Serialized)
+ {
+ CreateWordField (Arg0, 1, IRQ0)
+
+ // Which bit is set?
+ FindSetRightBit (IRQ0, Local0)
+
+ Decrement(Local0)
+ Store (Local0, PRTC)
+ }
+
+ // Status
+ Method (_STA, 0, Serialized)
+ {
+ If(And (PRTC, 0x80)) {
+ Return (0x9)
+ } Else {
+ Return (0xb)
+ }
+ }
+}
+
+Device (LNKD)
+{
+ Name (_HID, EISAID("PNP0C0F"))
+ Name (_UID, 4)
+
+ // Disable method
+ Method (_DIS, 0, Serialized)
+ {
+ Store (0x80, PRTD)
+ }
+
+ // Possible Resource Settings for this Link
+ Name (_PRS, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared)
+ { 1, 3, 4, 5, 6, 7, 11, 12, 14, 15 }
+ })
+
+ // Current Resource Settings for this link
+ Method (_CRS, 0, Serialized)
+ {
+ Name (RTLD, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared) {}
+ })
+ CreateWordField (RTLD, 1, IRQ0)
+
+ // Clear the WordField
+ Store (Zero, IRQ0)
+
+ // Set the bit from PRTD
+ ShiftLeft (1, And (PRTD, 0x0f), IRQ0)
+
+ Return (RTLD)
+ }
+
+ // Set Resource Setting for this IRQ link
+ Method (_SRS, 1, Serialized)
+ {
+ CreateWordField (Arg0, 1, IRQ0)
+
+ // Which bit is set?
+ FindSetRightBit (IRQ0, Local0)
+
+ Decrement(Local0)
+ Store (Local0, PRTD)
+ }
+
+ // Status
+ Method (_STA, 0, Serialized)
+ {
+ If(And (PRTD, 0x80)) {
+ Return (0x9)
+ } Else {
+ Return (0xb)
+ }
+ }
+}
+
+Device (LNKE)
+{
+ Name (_HID, EISAID("PNP0C0F"))
+ Name (_UID, 5)
+
+ // Disable method
+ Method (_DIS, 0, Serialized)
+ {
+ Store (0x80, PRTE)
+ }
+
+ // Possible Resource Settings for this Link
+ Name (_PRS, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared)
+ { 1, 3, 4, 5, 6, 7, 10, 12, 14, 15 }
+ })
+
+ // Current Resource Settings for this link
+ Method (_CRS, 0, Serialized)
+ {
+ Name (RTLE, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared) {}
+ })
+ CreateWordField (RTLE, 1, IRQ0)
+
+ // Clear the WordField
+ Store (Zero, IRQ0)
+
+ // Set the bit from PRTE
+ ShiftLeft (1, And (PRTE, 0x0f), IRQ0)
+
+ Return (RTLE)
+ }
+
+ // Set Resource Setting for this IRQ link
+ Method (_SRS, 1, Serialized)
+ {
+ CreateWordField (Arg0, 1, IRQ0)
+
+ // Which bit is set?
+ FindSetRightBit (IRQ0, Local0)
+
+ Decrement(Local0)
+ Store (Local0, PRTE)
+ }
+
+ // Status
+ Method (_STA, 0, Serialized)
+ {
+ If(And (PRTE, 0x80)) {
+ Return (0x9)
+ } Else {
+ Return (0xb)
+ }
+ }
+}
+
+Device (LNKF)
+{
+ Name (_HID, EISAID("PNP0C0F"))
+ Name (_UID, 6)
+
+ // Disable method
+ Method (_DIS, 0, Serialized)
+ {
+ Store (0x80, PRTF)
+ }
+
+ // Possible Resource Settings for this Link
+ Name (_PRS, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared)
+ { 1, 3, 4, 5, 6, 7, 11, 12, 14, 15 }
+ })
+
+ // Current Resource Settings for this link
+ Method (_CRS, 0, Serialized)
+ {
+ Name (RTLF, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared) {}
+ })
+ CreateWordField (RTLF, 1, IRQ0)
+
+ // Clear the WordField
+ Store (Zero, IRQ0)
+
+ // Set the bit from PRTF
+ ShiftLeft (1, And (PRTF, 0x0f), IRQ0)
+
+ Return (RTLF)
+ }
+
+ // Set Resource Setting for this IRQ link
+ Method (_SRS, 1, Serialized)
+ {
+ CreateWordField (Arg0, 1, IRQ0)
+
+ // Which bit is set?
+ FindSetRightBit (IRQ0, Local0)
+
+ Decrement(Local0)
+ Store (Local0, PRTF)
+ }
+
+ // Status
+ Method (_STA, 0, Serialized)
+ {
+ If(And (PRTF, 0x80)) {
+ Return (0x9)
+ } Else {
+ Return (0xb)
+ }
+ }
+}
+
+Device (LNKG)
+{
+ Name (_HID, EISAID("PNP0C0F"))
+ Name (_UID, 7)
+
+ // Disable method
+ Method (_DIS, 0, Serialized)
+ {
+ Store (0x80, PRTG)
+ }
+
+ // Possible Resource Settings for this Link
+ Name (_PRS, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared)
+ { 1, 3, 4, 5, 6, 7, 10, 12, 14, 15 }
+ })
+
+ // Current Resource Settings for this link
+ Method (_CRS, 0, Serialized)
+ {
+ Name (RTLG, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared) {}
+ })
+ CreateWordField (RTLG, 1, IRQ0)
+
+ // Clear the WordField
+ Store (Zero, IRQ0)
+
+ // Set the bit from PRTG
+ ShiftLeft (1, And (PRTG, 0x0f), IRQ0)
+
+ Return (RTLG)
+ }
+
+ // Set Resource Setting for this IRQ link
+ Method (_SRS, 1, Serialized)
+ {
+ CreateWordField (Arg0, 1, IRQ0)
+
+ // Which bit is set?
+ FindSetRightBit (IRQ0, Local0)
+
+ Decrement(Local0)
+ Store (Local0, PRTG)
+ }
+
+ // Status
+ Method (_STA, 0, Serialized)
+ {
+ If(And (PRTG, 0x80)) {
+ Return (0x9)
+ } Else {
+ Return (0xb)
+ }
+ }
+}
+
+Device (LNKH)
+{
+ Name (_HID, EISAID("PNP0C0F"))
+ Name (_UID, 8)
+
+ // Disable method
+ Method (_DIS, 0, Serialized)
+ {
+ Store (0x80, PRTH)
+ }
+
+ // Possible Resource Settings for this Link
+ Name (_PRS, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared)
+ { 1, 3, 4, 5, 6, 7, 11, 12, 14, 15 }
+ })
+
+ // Current Resource Settings for this link
+ Method (_CRS, 0, Serialized)
+ {
+ Name (RTLH, ResourceTemplate()
+ {
+ IRQ (Level, ActiveLow, Shared) {}
+ })
+ CreateWordField (RTLH, 1, IRQ0)
+
+ // Clear the WordField
+ Store (Zero, IRQ0)
+
+ // Set the bit from PRTH
+ ShiftLeft (1, And (PRTH, 0x0f), IRQ0)
+
+ Return (RTLH)
+ }
+
+ // Set Resource Setting for this IRQ link
+ Method (_SRS, 1, Serialized)
+ {
+ CreateWordField (Arg0, 1, IRQ0)
+
+ // Which bit is set?
+ FindSetRightBit (IRQ0, Local0)
+
+ Decrement(Local0)
+ Store (Local0, PRTH)
+ }
+
+ // Status
+ Method (_STA, 0, Serialized)
+ {
+ If(And (PRTH, 0x80)) {
+ Return (0x9)
+ } Else {
+ Return (0xb)
+ }
+ }
+}
+
diff --git a/src/soc/intel/broadwell/acpi/lpc.asl b/src/soc/intel/broadwell/acpi/lpc.asl
new file mode 100644
index 0000000..2f27d9b
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/lpc.asl
@@ -0,0 +1,229 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+// Intel LPC Bus Device - 0:1f.0
+
+Device (LPCB)
+{
+ Name (_ADR, 0x001f0000)
+
+ OperationRegion(LPC0, PCI_Config, 0x00, 0x100)
+ Field (LPC0, AnyAcc, NoLock, Preserve)
+ {
+ Offset (0x40),
+ PMBS, 16, // PMBASE
+ Offset (0x48),
+ GPBS, 16, // GPIOBASE
+ Offset (0x60), // Interrupt Routing Registers
+ PRTA, 8,
+ PRTB, 8,
+ PRTC, 8,
+ PRTD, 8,
+ Offset (0x68),
+ PRTE, 8,
+ PRTF, 8,
+ PRTG, 8,
+ PRTH, 8,
+
+ Offset (0x80), // IO Decode Ranges
+ IOD0, 8,
+ IOD1, 8,
+ }
+
+ Device (DMAC) // DMA Controller
+ {
+ Name (_HID, EISAID("PNP0200"))
+ Name (_CRS, ResourceTemplate()
+ {
+ IO (Decode16, 0x00, 0x00, 0x01, 0x20)
+ IO (Decode16, 0x81, 0x81, 0x01, 0x11)
+ IO (Decode16, 0x93, 0x93, 0x01, 0x0d)
+ IO (Decode16, 0xc0, 0xc0, 0x01, 0x20)
+ DMA (Compatibility, NotBusMaster, Transfer8_16) { 4 }
+ })
+ }
+
+ Device (FWH) // Firmware Hub
+ {
+ Name (_HID, EISAID("INT0800"))
+ Name (_CRS, ResourceTemplate()
+ {
+ Memory32Fixed(ReadOnly, 0xff000000, 0x01000000)
+ })
+ }
+
+ Device (HPET)
+ {
+ Name (_HID, EISAID("PNP0103"))
+ Name (_CID, 0x010CD041)
+
+ Name (BUF0, ResourceTemplate()
+ {
+ Memory32Fixed(ReadOnly, 0xfed00000, 0x400, FED0)
+ })
+
+ Method (_STA, 0) // Device Status
+ {
+ If (HPTE) {
+ // Note: Ancient versions of Windows don't want
+ // to see the HPET in order to work right
+ If (LGreaterEqual(OSYS, 2001)) {
+ Return (0xf) // Enable and show device
+ } Else {
+ Return (0xb) // Enable and don't show device
+ }
+ }
+
+ Return (0x0) // Not enabled, don't show.
+ }
+
+ Method (_CRS, 0, Serialized) // Current resources
+ {
+ If (HPTE) {
+ CreateDWordField (BUF0,
+ \_SB.PCI0.LPCB.HPET.FED0._BAS, HPT0)
+
+ If (Lequal(HPAS, 1)) {
+ Store(0xfed01000, HPT0)
+ }
+
+ If (Lequal(HPAS, 2)) {
+ Store(0xfed02000, HPT0)
+ }
+
+ If (Lequal(HPAS, 3)) {
+ Store(0xfed03000, HPT0)
+ }
+ }
+
+ Return (BUF0)
+ }
+ }
+
+ Device(PIC) // 8259 Interrupt Controller
+ {
+ Name (_HID,EISAID("PNP0000"))
+ Name (_CRS, ResourceTemplate()
+ {
+ IO (Decode16, 0x20, 0x20, 0x01, 0x02)
+ IO (Decode16, 0x24, 0x24, 0x01, 0x02)
+ IO (Decode16, 0x28, 0x28, 0x01, 0x02)
+ IO (Decode16, 0x2c, 0x2c, 0x01, 0x02)
+ IO (Decode16, 0x30, 0x30, 0x01, 0x02)
+ IO (Decode16, 0x34, 0x34, 0x01, 0x02)
+ IO (Decode16, 0x38, 0x38, 0x01, 0x02)
+ IO (Decode16, 0x3c, 0x3c, 0x01, 0x02)
+ IO (Decode16, 0xa0, 0xa0, 0x01, 0x02)
+ IO (Decode16, 0xa4, 0xa4, 0x01, 0x02)
+ IO (Decode16, 0xa8, 0xa8, 0x01, 0x02)
+ IO (Decode16, 0xac, 0xac, 0x01, 0x02)
+ IO (Decode16, 0xb0, 0xb0, 0x01, 0x02)
+ IO (Decode16, 0xb4, 0xb4, 0x01, 0x02)
+ IO (Decode16, 0xb8, 0xb8, 0x01, 0x02)
+ IO (Decode16, 0xbc, 0xbc, 0x01, 0x02)
+ IO (Decode16, 0x4d0, 0x4d0, 0x01, 0x02)
+ IRQNoFlags () { 2 }
+ })
+ }
+
+ Device(MATH) // FPU
+ {
+ Name (_HID, EISAID("PNP0C04"))
+ Name (_CRS, ResourceTemplate()
+ {
+ IO (Decode16, 0xf0, 0xf0, 0x01, 0x01)
+ IRQNoFlags() { 13 }
+ })
+ }
+
+ Device(LDRC) // LPC device: Resource consumption
+ {
+ Name (_HID, EISAID("PNP0C02"))
+ Name (_UID, 2)
+
+ Name (RBUF, ResourceTemplate()
+ {
+ IO (Decode16, 0x2e, 0x2e, 0x1, 0x02) // First SuperIO
+ IO (Decode16, 0x4e, 0x4e, 0x1, 0x02) // Second SuperIO
+ IO (Decode16, 0x61, 0x61, 0x1, 0x01) // NMI Status
+ IO (Decode16, 0x63, 0x63, 0x1, 0x01) // CPU Reserved
+ IO (Decode16, 0x65, 0x65, 0x1, 0x01) // CPU Reserved
+ IO (Decode16, 0x67, 0x67, 0x1, 0x01) // CPU Reserved
+ IO (Decode16, 0x80, 0x80, 0x1, 0x01) // Port 80 Post
+ IO (Decode16, 0x92, 0x92, 0x1, 0x01) // CPU Reserved
+ IO (Decode16, 0xb2, 0xb2, 0x1, 0x02) // SWSMI
+ IO (Decode16, ACPI_BASE_ADDRESS, ACPI_BASE_ADDRESS,
+ 0x1, 0xff)
+ })
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ Return (RBUF)
+ }
+ }
+
+ Device (RTC) // Real Time Clock
+ {
+ Name (_HID, EISAID("PNP0B00"))
+ Name (_CRS, ResourceTemplate()
+ {
+ IO (Decode16, 0x70, 0x70, 1, 8)
+ //IRQNoFlags() { 8 }
+ })
+ }
+
+ Device (TIMR) // Intel 8254 timer
+ {
+ Name (_HID, EISAID("PNP0100"))
+ Name (_CRS, ResourceTemplate() {
+ IO (Decode16, 0x40, 0x40, 0x01, 0x04)
+ IO (Decode16, 0x50, 0x50, 0x10, 0x04)
+ IRQNoFlags() {0}
+ })
+ }
+
+ Device (TPM) // Trusted Platform Module
+ {
+ Name (_HID, EISAID("IFX0102"))
+ Name (_CID, 0x310cd041)
+ Name (_UID, 1)
+
+ Method (_STA, 0)
+ {
+ If (TPMP) {
+ Return (0xf)
+ } Else {
+ Return (0x0)
+ }
+ }
+
+ Name (_CRS, ResourceTemplate() {
+ IO (Decode16, 0x2e, 0x2e, 0x01, 0x02)
+ IO (Decode16, 0x6f0, 0x6f0, 0x01, 0x10)
+ Memory32Fixed (ReadWrite, 0xfed40000, 0x5000)
+ IRQ (Edge, Activehigh, Exclusive) { 6 }
+ })
+ }
+
+ #include "gpio.asl"
+ #include "irqlinks.asl"
+ #include <acpi/ec.asl>
+ #include <acpi/superio.asl>
+}
diff --git a/src/soc/intel/broadwell/acpi/pch.asl b/src/soc/intel/broadwell/acpi/pch.asl
new file mode 100644
index 0000000..c484493
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/pch.asl
@@ -0,0 +1,83 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <soc/intel/broadwell/broadwell/iomap.h>
+
+Scope (\)
+{
+ // IO-Trap at 0x800. This is the ACPI->SMI communication interface.
+ OperationRegion (IO_T, SystemIO, 0x800, 0x10)
+ Field (IO_T, ByteAcc, NoLock, Preserve)
+ {
+ Offset (0x8),
+ TRP0, 8 // IO-Trap at 0x808
+ }
+
+ // Root Complex Register Block
+ OperationRegion (RCRB, SystemMemory, RCBA_BASE_ADDRESS, RCBA_BASE_SIZE)
+ Field (RCRB, DWordAcc, Lock, Preserve)
+ {
+ Offset (0x3404), // High Performance Timer Configuration
+ HPAS, 2, // Address Select
+ , 5,
+ HPTE, 1, // Address Enable
+ }
+}
+
+// High Definition Audio (Azalia) 0:1b.0
+#include "hda.asl"
+
+// PCI Express Ports 0:1c.x
+#include "pcie.asl"
+
+// USB EHCI 0:1d.0
+#include "ehci.asl"
+
+// USB XHCI 0:14.0
+#include "xhci.asl"
+
+// LPC Bridge 0:1f.0
+#include "lpc.asl"
+
+// SATA 0:1f.2
+#include "sata.asl"
+
+// SMBus 0:1f.3
+#include "smbus.asl"
+
+// Serial IO
+#include "serialio.asl"
+
+Method (_OSC, 4)
+{
+ /* Check for proper GUID */
+ If (LEqual (Arg0, ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766")))
+ {
+ /* Let OS control everything */
+ Return (Arg3)
+ }
+ Else
+ {
+ /* Unrecognized UUID */
+ CreateDWordField (Arg3, 0, CDW1)
+ Or (CDW1, 4, CDW1)
+ Return (Arg3)
+ }
+}
diff --git a/src/soc/intel/broadwell/acpi/pci_irqs.asl b/src/soc/intel/broadwell/acpi/pci_irqs.asl
new file mode 100644
index 0000000..0c23e10
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/pci_irqs.asl
@@ -0,0 +1,89 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+Method(_PRT)
+{
+ If (PICM) {
+ Return (Package() {
+ // Onboard graphics (IGD) 0:2.0
+ Package() { 0x0002ffff, 0, 0, 16 },
+ // Mini-HD Audio 0:3.0
+ Package() { 0x0003ffff, 0, 0, 16 },
+ // High Definition Audio 0:1b.0
+ Package() { 0x001bffff, 0, 0, 22 },
+ // PCIe Root Ports 0:1c.x
+ Package() { 0x001cffff, 0, 0, 16 },
+ Package() { 0x001cffff, 1, 0, 17 },
+ Package() { 0x001cffff, 2, 0, 18 },
+ Package() { 0x001cffff, 3, 0, 19 },
+ // EHCI 0:1d.0
+ Package() { 0x001dffff, 0, 0, 19 },
+ // Audio DSP (Smart Sound) 0:13.0
+ Package() { 0x0013ffff, 0, 0, 23 },
+ // XHCI 0:14.0
+ Package() { 0x0014ffff, 0, 0, 18 },
+ // LPC devices 0:1f.0
+ Package() { 0x001fffff, 0, 0, 22 },
+ Package() { 0x001fffff, 1, 0, 18 },
+ Package() { 0x001fffff, 2, 0, 17 },
+ Package() { 0x001fffff, 3, 0, 16 },
+ // Serial IO 0:15.0
+ Package() { 0x0015ffff, 0, 0, 20 },
+ Package() { 0x0015ffff, 1, 0, 21 },
+ Package() { 0x0015ffff, 2, 0, 21 },
+ Package() { 0x0015ffff, 3, 0, 21 },
+ // SDIO 0:17.0
+ Package() { 0x0017ffff, 0, 0, 23 },
+ })
+ } Else {
+ Return (Package() {
+ // Onboard graphics (IGD) 0:2.0
+ Package() { 0x0002ffff, 0, \_SB.PCI0.LPCB.LNKA, 0 },
+ // Mini-HD Audio 0:3.0
+ Package() { 0x0003ffff, 0, \_SB.PCI0.LPCB.LNKA, 0 },
+ // High Definition Audio 0:1b.0
+ Package() { 0x001bffff, 0, \_SB.PCI0.LPCB.LNKG, 0 },
+ // PCIe Root Ports 0:1c.x
+ Package() { 0x001cffff, 0, \_SB.PCI0.LPCB.LNKA, 0 },
+ Package() { 0x001cffff, 1, \_SB.PCI0.LPCB.LNKB, 0 },
+ Package() { 0x001cffff, 2, \_SB.PCI0.LPCB.LNKC, 0 },
+ Package() { 0x001cffff, 3, \_SB.PCI0.LPCB.LNKD, 0 },
+ // EHCI 0:1d.0
+ Package() { 0x001dffff, 0, \_SB.PCI0.LPCB.LNKD, 0 },
+ // Audio DSP (Smart Sound) 0:13.0
+ Package() { 0x0013ffff, 0, \_SB.PCI0.LPCB.LNKH, 0 },
+ // XHCI 0:14.0
+ Package() { 0x0014ffff, 0, \_SB.PCI0.LPCB.LNKC, 0 },
+ // LPC device 0:1f.0
+ Package() { 0x001fffff, 0, \_SB.PCI0.LPCB.LNKG, 0 },
+ Package() { 0x001fffff, 1, \_SB.PCI0.LPCB.LNKC, 0 },
+ Package() { 0x001fffff, 2, \_SB.PCI0.LPCB.LNKB, 0 },
+ Package() { 0x001fffff, 3, \_SB.PCI0.LPCB.LNKA, 0 },
+ // Serial IO 0:15.0
+ Package() { 0x0015ffff, 0, \_SB.PCI0.LPCB.LNKE, 0 },
+ Package() { 0x0015ffff, 1, \_SB.PCI0.LPCB.LNKF, 0 },
+ Package() { 0x0015ffff, 2, \_SB.PCI0.LPCB.LNKF, 0 },
+ Package() { 0x0015ffff, 3, \_SB.PCI0.LPCB.LNKF, 0 },
+ // SDIO 0:17.0
+ Package() { 0x0017ffff, 0, \_SB.PCI0.LPCB.LNKH, 0 },
+ })
+ }
+}
+
diff --git a/src/soc/intel/broadwell/acpi/pcie.asl b/src/soc/intel/broadwell/acpi/pcie.asl
new file mode 100644
index 0000000..a48bdde
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/pcie.asl
@@ -0,0 +1,214 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* Intel PCH PCIe support */
+
+Method (IRQM, 1, Serialized) {
+
+ /* Interrupt Map INTA->INTA, INTB->INTB, INTC->INTC, INTD->INTD */
+ Name (IQAA, Package() {
+ Package() { 0x0000ffff, 0, 0, 16 },
+ Package() { 0x0000ffff, 1, 0, 17 },
+ Package() { 0x0000ffff, 2, 0, 18 },
+ Package() { 0x0000ffff, 3, 0, 19 } })
+ Name (IQAP, Package() {
+ Package() { 0x0000ffff, 0, \_SB.PCI0.LPCB.LNKA, 0 },
+ Package() { 0x0000ffff, 1, \_SB.PCI0.LPCB.LNKB, 0 },
+ Package() { 0x0000ffff, 2, \_SB.PCI0.LPCB.LNKC, 0 },
+ Package() { 0x0000ffff, 3, \_SB.PCI0.LPCB.LNKD, 0 } })
+
+ /* Interrupt Map INTA->INTB, INTB->INTC, INTC->INTD, INTD->INTA */
+ Name (IQBA, Package() {
+ Package() { 0x0000ffff, 0, 0, 17 },
+ Package() { 0x0000ffff, 1, 0, 18 },
+ Package() { 0x0000ffff, 2, 0, 19 },
+ Package() { 0x0000ffff, 3, 0, 16 } })
+ Name (IQBP, Package() {
+ Package() { 0x0000ffff, 0, \_SB.PCI0.LPCB.LNKB, 0 },
+ Package() { 0x0000ffff, 1, \_SB.PCI0.LPCB.LNKC, 0 },
+ Package() { 0x0000ffff, 2, \_SB.PCI0.LPCB.LNKD, 0 },
+ Package() { 0x0000ffff, 3, \_SB.PCI0.LPCB.LNKA, 0 } })
+
+ /* Interrupt Map INTA->INTC, INTB->INTD, INTC->INTA, INTD->INTB */
+ Name (IQCA, Package() {
+ Package() { 0x0000ffff, 0, 0, 18 },
+ Package() { 0x0000ffff, 1, 0, 19 },
+ Package() { 0x0000ffff, 2, 0, 16 },
+ Package() { 0x0000ffff, 3, 0, 17 } })
+ Name (IQCP, Package() {
+ Package() { 0x0000ffff, 0, \_SB.PCI0.LPCB.LNKC, 0 },
+ Package() { 0x0000ffff, 1, \_SB.PCI0.LPCB.LNKD, 0 },
+ Package() { 0x0000ffff, 2, \_SB.PCI0.LPCB.LNKA, 0 },
+ Package() { 0x0000ffff, 3, \_SB.PCI0.LPCB.LNKB, 0 } })
+
+ /* Interrupt Map INTA->INTD, INTB->INTA, INTC->INTB, INTD->INTC */
+ Name (IQDA, Package() {
+ Package() { 0x0000ffff, 0, 0, 19 },
+ Package() { 0x0000ffff, 1, 0, 16 },
+ Package() { 0x0000ffff, 2, 0, 17 },
+ Package() { 0x0000ffff, 3, 0, 18 } })
+ Name (IQDP, Package() {
+ Package() { 0x0000ffff, 0, \_SB.PCI0.LPCB.LNKD, 0 },
+ Package() { 0x0000ffff, 1, \_SB.PCI0.LPCB.LNKA, 0 },
+ Package() { 0x0000ffff, 2, \_SB.PCI0.LPCB.LNKB, 0 },
+ Package() { 0x0000ffff, 3, \_SB.PCI0.LPCB.LNKC, 0 } })
+
+ Switch (ToInteger (Arg0)) {
+ /* PCIe Root Port 1 and 5 */
+ Case (Package() { 1, 5 }) {
+ If (PICM) {
+ Return (IQAA)
+ } Else {
+ Return (IQAP)
+ }
+ }
+
+ /* PCIe Root Port 2 and 6 */
+ Case (Package() { 2, 6 }) {
+ If (PICM) {
+ Return (IQBA)
+ } Else {
+ Return (IQBP)
+ }
+ }
+
+ /* PCIe Root Port 3 and 7 */
+ Case (Package() { 3, 7 }) {
+ If (PICM) {
+ Return (IQCA)
+ } Else {
+ Return (IQCP)
+ }
+ }
+
+ /* PCIe Root Port 4 and 8 */
+ Case (Package() { 4, 8 }) {
+ If (PICM) {
+ Return (IQDA)
+ } Else {
+ Return (IQDP)
+ }
+ }
+
+ Default {
+ If (PICM) {
+ Return (IQDA)
+ } Else {
+ Return (IQDP)
+ }
+ }
+ }
+}
+
+Device (RP01)
+{
+ Name (_ADR, 0x001c0000)
+
+ #include "pcie_port.asl"
+
+ Method (_PRT)
+ {
+ Return (IRQM (RPPN))
+ }
+}
+
+Device (RP02)
+{
+ Name (_ADR, 0x001c0001)
+
+ #include "pcie_port.asl"
+
+ Method (_PRT)
+ {
+ Return (IRQM (RPPN))
+ }
+}
+
+Device (RP03)
+{
+ Name (_ADR, 0x001c0002)
+
+ #include "pcie_port.asl"
+
+ Method (_PRT)
+ {
+ Return (IRQM (RPPN))
+ }
+}
+
+Device (RP04)
+{
+ Name (_ADR, 0x001c0003)
+
+ #include "pcie_port.asl"
+
+ Method (_PRT)
+ {
+ Return (IRQM (RPPN))
+ }
+}
+
+Device (RP05)
+{
+ Name (_ADR, 0x001c0004)
+
+ #include "pcie_port.asl"
+
+ Method (_PRT)
+ {
+ Return (IRQM (RPPN))
+ }
+}
+
+Device (RP06)
+{
+ Name (_ADR, 0x001c0005)
+
+ #include "pcie_port.asl"
+
+ Method (_PRT)
+ {
+ Return (IRQM (RPPN))
+ }
+}
+
+Device (RP07)
+{
+ Name (_ADR, 0x001c0006)
+
+ #include "pcie_port.asl"
+
+ Method (_PRT)
+ {
+ Return (IRQM (RPPN))
+ }
+}
+
+Device (RP08)
+{
+ Name (_ADR, 0x001c0007)
+
+ #include "pcie_port.asl"
+
+ Method (_PRT)
+ {
+ Return (IRQM (RPPN))
+ }
+}
diff --git a/src/soc/intel/broadwell/acpi/pcie_port.asl b/src/soc/intel/broadwell/acpi/pcie_port.asl
new file mode 100644
index 0000000..3226746
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/pcie_port.asl
@@ -0,0 +1,28 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* Included in each PCIe Root Port device */
+
+OperationRegion (RPCS, PCI_Config, 0x00, 0xFF)
+Field (RPCS, AnyAcc, NoLock, Preserve)
+{
+ Offset (0x4c), // Link Capabilities
+ , 24,
+ RPPN, 8, // Root Port Number
+}
diff --git a/src/soc/intel/broadwell/acpi/sata.asl b/src/soc/intel/broadwell/acpi/sata.asl
new file mode 100644
index 0000000..0af2a3f
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/sata.asl
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+// Intel SATA Controller 0:1f.2
+Device (SATA)
+{
+ Name (_ADR, 0x001f0002)
+}
diff --git a/src/soc/intel/broadwell/acpi/serialio.asl b/src/soc/intel/broadwell/acpi/serialio.asl
new file mode 100644
index 0000000..532eb50
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/serialio.asl
@@ -0,0 +1,468 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+// Intel Serial IO Devices in ACPI Mode
+
+// Serial IO Device BAR0 and BAR1 is 4KB
+#define SIO_BAR_LEN 0x1000
+
+// Serial IO Resource Consumption for BAR1
+Device (SIOR)
+{
+ Name (_HID, EISAID("PNP0C02"))
+ Name (_UID, 4)
+
+ Name (RBUF, ResourceTemplate()
+ {
+ // Serial IO BAR1 (PCI config space) resources
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D0) // SDMA
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D1) // I2C0
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D2) // I2C1
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D3) // SPI0
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D4) // SPI1
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D5) // UART0
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D6) // UART1
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, B1D7) // SDIO
+ })
+
+ // Update BAR1 address and length if set in NVS
+ Method (_CRS, 0, NotSerialized)
+ {
+ // SDMA
+ If (LNotEqual (\S0B1, Zero)) {
+ CreateDwordField (^RBUF, ^B1D0._BAS, B0AD)
+ CreateDwordField (^RBUF, ^B1D0._LEN, B0LN)
+ Store (\S0B1, B0AD)
+ Store (SIO_BAR_LEN, B0LN)
+ }
+
+ // I2C0
+ If (LNotEqual (\S1B1, Zero)) {
+ CreateDwordField (^RBUF, ^B1D1._BAS, B1AD)
+ CreateDwordField (^RBUF, ^B1D1._LEN, B1LN)
+ Store (\S1B1, B1AD)
+ Store (SIO_BAR_LEN, B1LN)
+ }
+
+ // I2C1
+ If (LNotEqual (\S2B1, Zero)) {
+ CreateDwordField (^RBUF, ^B1D2._BAS, B2AD)
+ CreateDwordField (^RBUF, ^B1D2._LEN, B2LN)
+ Store (\S2B1, B2AD)
+ Store (SIO_BAR_LEN, B2LN)
+ }
+
+ // SPI0
+ If (LNotEqual (\S3B1, Zero)) {
+ CreateDwordField (^RBUF, ^B1D3._BAS, B3AD)
+ CreateDwordField (^RBUF, ^B1D3._LEN, B3LN)
+ Store (\S3B1, B3AD)
+ Store (SIO_BAR_LEN, B3LN)
+ }
+
+ // SPI1
+ If (LNotEqual (\S4B1, Zero)) {
+ CreateDwordField (^RBUF, ^B1D4._BAS, B4AD)
+ CreateDwordField (^RBUF, ^B1D4._LEN, B4LN)
+ Store (\S4B1, B4AD)
+ Store (SIO_BAR_LEN, B4LN)
+ }
+
+ // UART0
+ If (LNotEqual (\S5B1, Zero)) {
+ CreateDwordField (^RBUF, ^B1D5._BAS, B5AD)
+ CreateDwordField (^RBUF, ^B1D5._LEN, B5LN)
+ Store (\S5B1, B5AD)
+ Store (SIO_BAR_LEN, B5LN)
+ }
+
+ // UART1
+ If (LNotEqual (\S6B1, Zero)) {
+ CreateDwordField (^RBUF, ^B1D6._BAS, B6AD)
+ CreateDwordField (^RBUF, ^B1D6._LEN, B6LN)
+ Store (\S6B1, B6AD)
+ Store (SIO_BAR_LEN, B6LN)
+ }
+
+ // SDIO
+ If (LNotEqual (\S7B1, Zero)) {
+ CreateDwordField (^RBUF, ^B1D7._BAS, B7AD)
+ CreateDwordField (^RBUF, ^B1D7._LEN, B7LN)
+ Store (\S7B1, B7AD)
+ Store (SIO_BAR_LEN, B7LN)
+ }
+
+ Return (RBUF)
+ }
+}
+
+Device (SDMA)
+{
+ // Serial IO DMA Controller
+ Name (_HID, "INTL9C60")
+ Name (_UID, 1)
+ Name (_ADR, 0x00150000)
+
+ // BAR0 is assigned during PCI enumeration and saved into NVS
+ Name (RBUF, ResourceTemplate ()
+ {
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
+ Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {7}
+ })
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ // Update BAR0 address and length if set in NVS
+ If (LNotEqual (\S0B0, Zero)) {
+ CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
+ CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
+ Store (\S0B0, B0AD)
+ Store (SIO_BAR_LEN, B0LN)
+ }
+
+ Return (RBUF)
+ }
+
+ Method (_STA, 0, NotSerialized)
+ {
+ If (LEqual (\S0EN, 0)) {
+ Return (0x0)
+ } Else {
+ Return (0xF)
+ }
+ }
+}
+
+Device (I2C0)
+{
+ // Serial IO I2C0 Controller
+ Name (_HID, "INT33C2")
+ Name (_CID, "INT33C2")
+ Name (_UID, 1)
+ Name (_ADR, 0x00150001)
+
+ // BAR0 is assigned during PCI enumeration and saved into NVS
+ Name (RBUF, ResourceTemplate ()
+ {
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
+ Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {7}
+ })
+
+ // DMA channels are only used if Serial IO DMA controller is enabled
+ Name (DBUF, ResourceTemplate ()
+ {
+ // TODO: Need to update IASL to support FixedDMA
+ //FixedDMA (0x18, 4, Width32Bit, DMA1) // Tx
+ //FixedDMA (0x19, 5, Width32Bit, DMA2) // Rx
+ })
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ // Update BAR0 address and length if set in NVS
+ If (LNotEqual (\S1B0, Zero)) {
+ CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
+ CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
+ Store (\S1B0, B0AD)
+ Store (SIO_BAR_LEN, B0LN)
+ }
+
+ // Check if Serial IO DMA Controller is enabled
+ If (LNotEqual (\_SB.PCI0.SDMA._STA, Zero)) {
+ Return (ConcatenateResTemplate (RBUF, DBUF))
+ } Else {
+ Return (RBUF)
+ }
+ }
+
+ Method (_STA, 0, NotSerialized)
+ {
+ If (LEqual (\S1EN, 0)) {
+ Return (0x0)
+ } Else {
+ Return (0xF)
+ }
+ }
+}
+
+Device (I2C1)
+{
+ // Serial IO I2C1 Controller
+ Name (_HID, "INT33C3")
+ Name (_CID, "INT33C3")
+ Name (_UID, 1)
+ Name (_ADR, 0x00150002)
+
+ // BAR0 is assigned during PCI enumeration and saved into NVS
+ Name (RBUF, ResourceTemplate ()
+ {
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
+ Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {7}
+ })
+
+ // DMA channels are only used if Serial IO DMA controller is enabled
+ Name (DBUF, ResourceTemplate ()
+ {
+ // TODO: Need to update IASL to support FixedDMA
+ //FixedDMA (0x1A, 6, Width32Bit, DMA1) // Tx
+ //FixedDMA (0x1B, 7, Width32Bit, DMA2) // Rx
+ })
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ // Update BAR0 address and length if set in NVS
+ If (LNotEqual (\S2B0, Zero)) {
+ CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
+ CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
+ Store (\S2B0, B0AD)
+ Store (SIO_BAR_LEN, B0LN)
+ }
+
+ // Check if Serial IO DMA Controller is enabled
+ If (LNotEqual (\_SB.PCI0.SDMA._STA, Zero)) {
+ Return (ConcatenateResTemplate (RBUF, DBUF))
+ } Else {
+ Return (RBUF)
+ }
+ }
+
+ Method (_STA, 0, NotSerialized)
+ {
+ If (LEqual (\S2EN, 0)) {
+ Return (0x0)
+ } Else {
+ Return (0xF)
+ }
+ }
+}
+
+Device (SPI0)
+{
+ // Serial IO SPI0 Controller
+ Name (_HID, "INT33C0")
+ Name (_CID, "INT33C0")
+ Name (_UID, 1)
+ Name (_ADR, 0x00150003)
+
+ // BAR0 is assigned during PCI enumeration and saved into NVS
+ Name (RBUF, ResourceTemplate ()
+ {
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
+ Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {7}
+ })
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ // Update BAR0 address and length if set in NVS
+ If (LNotEqual (\S3B0, Zero)) {
+ CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
+ CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
+ Store (\S3B0, B0AD)
+ Store (SIO_BAR_LEN, B0LN)
+ }
+
+ Return (RBUF)
+ }
+
+ Method (_STA, 0, NotSerialized)
+ {
+ If (LEqual (\S3EN, 0)) {
+ Return (0x0)
+ } Else {
+ Return (0xF)
+ }
+ }
+}
+
+Device (SPI1)
+{
+ // Serial IO SPI1 Controller
+ Name (_HID, "INT33C1")
+ Name (_CID, "INT33C1")
+ Name (_UID, 1)
+ Name (_ADR, 0x00150004)
+
+ // BAR0 is assigned during PCI enumeration and saved into NVS
+ Name (RBUF, ResourceTemplate ()
+ {
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
+ Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {7}
+ })
+
+ // DMA channels are only used if Serial IO DMA controller is enabled
+ Name (DBUF, ResourceTemplate ()
+ {
+ // TODO: Need to update IASL to support FixedDMA
+ //FixedDMA (0x10, 0, Width32Bit, DMA1) // Tx
+ //FixedDMA (0x11, 1, Width32Bit, DMA2) // Rx
+ })
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ // Update BAR0 address and length if set in NVS
+ If (LNotEqual (\S4B0, Zero)) {
+ CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
+ CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
+ Store (\S4B0, B0AD)
+ Store (SIO_BAR_LEN, B0LN)
+ }
+
+ // Check if Serial IO DMA Controller is enabled
+ If (LNotEqual (\_SB.PCI0.SDMA._STA, Zero)) {
+ Return (ConcatenateResTemplate (RBUF, DBUF))
+ } Else {
+ Return (RBUF)
+ }
+ }
+
+ Method (_STA, 0, NotSerialized)
+ {
+ If (LEqual (\S4EN, 0)) {
+ Return (0x0)
+ } Else {
+ Return (0xF)
+ }
+ }
+}
+
+Device (UAR0)
+{
+ // Serial IO UART0 Controller
+ Name (_HID, "INT33C4")
+ Name (_CID, "INT33C4")
+ Name (_UID, 1)
+ Name (_ADR, 0x00150005)
+
+ // BAR0 is assigned during PCI enumeration and saved into NVS
+ Name (RBUF, ResourceTemplate ()
+ {
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
+ Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {13}
+ })
+
+ // DMA channels are only used if Serial IO DMA controller is enabled
+ Name (DBUF, ResourceTemplate ()
+ {
+ // TODO: Need to update IASL to support FixedDMA
+ //FixedDMA (0x16, 2, Width32Bit, DMA1) // Tx
+ //FixedDMA (0x17, 3, Width32Bit, DMA2) // Rx
+ })
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ // Update BAR0 address and length if set in NVS
+ If (LNotEqual (\S5B0, Zero)) {
+ CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
+ CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
+ Store (\S5B0, B0AD)
+ Store (SIO_BAR_LEN, B0LN)
+ }
+
+ // Check if Serial IO DMA Controller is enabled
+ If (LNotEqual (\_SB.PCI0.SDMA._STA, Zero)) {
+ Return (ConcatenateResTemplate (RBUF, DBUF))
+ } Else {
+ Return (RBUF)
+ }
+ }
+
+ Method (_STA, 0, NotSerialized)
+ {
+ If (LEqual (\S5EN, 0)) {
+ Return (0x0)
+ } Else {
+ Return (0xF)
+ }
+ }
+}
+
+Device (UAR1)
+{
+ // Serial IO UART1 Controller
+ Name (_HID, "INT33C5")
+ Name (_CID, "INT33C5")
+ Name (_UID, 1)
+ Name (_ADR, 0x00150006)
+
+ // BAR0 is assigned during PCI enumeration and saved into NVS
+ Name (RBUF, ResourceTemplate ()
+ {
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
+ Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {13}
+ })
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ // Update BAR0 address and length if set in NVS
+ If (LNotEqual (\S6B0, Zero)) {
+ CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
+ CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
+ Store (\S6B0, B0AD)
+ Store (SIO_BAR_LEN, B0LN)
+ }
+
+ Return (RBUF)
+ }
+
+ Method (_STA, 0, NotSerialized)
+ {
+ If (LEqual (\S6EN, 0)) {
+ Return (0x0)
+ } Else {
+ Return (0xF)
+ }
+ }
+}
+
+Device (SDIO)
+{
+ // Serial IO SDIO Controller
+ Name (_HID, "INT33C6")
+ Name (_CID, "PNP0D40")
+ Name (_UID, 1)
+ Name (_ADR, 0x00170000)
+
+ // BAR0 is assigned during PCI enumeration and saved into NVS
+ Name (RBUF, ResourceTemplate ()
+ {
+ Memory32Fixed (ReadWrite, 0x00000000, 0x00000000, BAR0)
+ Interrupt (ResourceConsumer, Level, ActiveLow, Shared, , , ) {5}
+ })
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ // Update BAR0 address and length if set in NVS
+ If (LNotEqual (\S7B0, Zero)) {
+ CreateDwordField (^RBUF, ^BAR0._BAS, B0AD)
+ CreateDwordField (^RBUF, ^BAR0._LEN, B0LN)
+ Store (\S7B0, B0AD)
+ Store (SIO_BAR_LEN, B0LN)
+ }
+
+ Return (RBUF)
+ }
+
+ Method (_STA, 0, NotSerialized)
+ {
+ If (LEqual (\S7EN, 0)) {
+ Return (0x0)
+ } Else {
+ Return (0xF)
+ }
+ }
+}
diff --git a/src/soc/intel/broadwell/acpi/sleepstates.asl b/src/soc/intel/broadwell/acpi/sleepstates.asl
new file mode 100644
index 0000000..6fea862
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/sleepstates.asl
@@ -0,0 +1,26 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+Name (\_S0, Package () { 0x0, 0x0, 0x0, 0x0 })
+Name (\_S1, Package () { 0x1, 0x1, 0x0, 0x0 })
+Name (\_S2, Package () { 0x1, 0x1, 0x0, 0x0 })
+Name (\_S3, Package () { 0x5, 0x5, 0x0, 0x0 })
+Name (\_S4, Package () { 0x6, 0x6, 0x0, 0x0 })
+Name (\_S5, Package () { 0x7, 0x7, 0x0, 0x0 })
diff --git a/src/soc/intel/broadwell/acpi/smbus.asl b/src/soc/intel/broadwell/acpi/smbus.asl
new file mode 100644
index 0000000..15bcfde
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/smbus.asl
@@ -0,0 +1,241 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+// Intel SMBus Controller 0:1f.3
+
+Device (SBUS)
+{
+ Name (_ADR, 0x001f0003)
+
+#ifdef ENABLE_SMBUS_METHODS
+ OperationRegion (SMBP, PCI_Config, 0x00, 0x100)
+ Field(SMBP, DWordAcc, NoLock, Preserve)
+ {
+ Offset(0x40),
+ , 2,
+ I2CE, 1
+ }
+
+ OperationRegion (SMBI, SystemIO, SMBUS_IO_BASE, 0x20)
+ Field (SMBI, ByteAcc, NoLock, Preserve)
+ {
+ HSTS, 8, // Host Status
+ , 8,
+ HCNT, 8, // Host Control
+ HCMD, 8, // Host Command
+ TXSA, 8, // Transmit Slave Address
+ DAT0, 8, // Host Data 0
+ DAT1, 8, // Host Data 1
+ HBDB, 8, // Host Block Data Byte
+ PECK, 8, // Packet Error Check
+ RXSA, 8, // Receive Slave Address
+ RXDA, 16, // Receive Slave Data
+ AUXS, 8, // Auxiliary Status
+ AUXC, 8, // Auxiliary Control
+ SLPC, 8, // SMLink Pin Control
+ SBPC, 8, // SMBus Pin Control
+ SSTS, 8, // Slave Status
+ SCMD, 8, // Slave Command
+ NADR, 8, // Notify Device Address
+ NDLB, 8, // Notify Data Low Byte
+ NDLH, 8, // Notify Data High Byte
+ }
+
+ // Kill all SMBus communication
+ Method (KILL, 0, Serialized)
+ {
+ Or (HCNT, 0x02, HCNT) // Send Kill
+ Or (HSTS, 0xff, HSTS) // Clean Status
+ }
+
+ // Check if last operation completed
+ // return Failure = 0, Success = 1
+ Method (CMPL, 0, Serialized)
+ {
+ Store (4000, Local0) // Timeout 200ms in 50us steps
+ While (Local0) {
+ If (And(HSTS, 0x02)) { // Completion Status?
+ Return (1) // Operation Completed
+ } Else {
+ Stall (50)
+ Decrement (Local0)
+ If (LEqual(Local0, 0)) {
+ KILL()
+ }
+ }
+ }
+
+ Return (0) // Failure
+ }
+
+
+ // Wait for SMBus to become ready
+ Method (SRDY, 0, Serialized)
+ {
+ Store (200, Local0) // Timeout 200ms
+ While (Local0) {
+ If (And(HSTS, 0x40)) { // IN_USE?
+ Sleep(1) // Wait 1ms
+ Decrement(Local0) // timeout--
+ If (LEqual(Local0, 0)) {
+ Return (1)
+ }
+ } Else {
+ Store (0, Local0) // We're ready
+ }
+ }
+
+ Store (4000, Local0) // Timeout 200ms (50us * 4000)
+ While (Local0) {
+ If (And (HSTS, 0x01)) { // Host Busy?
+ Stall(50) // Wait 50us
+ Decrement(Local0) // timeout--
+ If (LEqual(Local0, 0)) {
+ KILL()
+ }
+ } Else {
+ Return (0) // Success
+ }
+ }
+
+ Return (1) // Failure
+ }
+
+ // SMBus Send Byte
+ // Arg0: Address
+ // Arg1: Data
+ // Return: 1 = Success, 0=Failure
+
+ Method (SSXB, 2, Serialized)
+ {
+
+ // Is the SMBus Controller Ready?
+ If (SRDY()) {
+ Return (0)
+ }
+
+ // Send Byte
+ Store (0, I2CE) // SMBus Enable
+ Store (0xbf, HSTS)
+ Store (Arg0, TXSA) // Write Address
+ Store (Arg1, HCMD) // Write Data
+
+ Store (0x48, HCNT) // Start + Byte Data Protocol
+
+ If (CMPL()) {
+ Or (HSTS, 0xff, HSTS) // Clean up
+ Return (1) // Success
+ }
+
+ Return (0)
+ }
+
+
+ // SMBus Receive Byte
+ // Arg0: Address
+ // Return: 0xffff = Failure, Data (8bit) = Success
+
+ Method (SRXB, 2, Serialized)
+ {
+
+ // Is the SMBus Controller Ready?
+ If (SRDY()) {
+ Return (0xffff)
+ }
+
+ // Receive Byte
+ Store (0, I2CE) // SMBus Enable
+ Store (0xbf, HSTS)
+ Store (Or (Arg0, 1), TXSA) // Write Address
+
+ Store (0x44, HCNT) // Start
+
+ If (CMPL()) {
+ Or (HSTS, 0xff, HSTS) // Clean up
+ Return (DAT0) // Success
+ }
+
+ Return (0xffff)
+ }
+
+
+ // SMBus Write Byte
+ // Arg0: Address
+ // Arg1: Command
+ // Arg2: Data
+ // Return: 1 = Success, 0=Failure
+
+ Method (SWRB, 3, Serialized)
+ {
+
+ // Is the SMBus Controller Ready?
+ If (SRDY()) {
+ Return (0)
+ }
+
+ // Send Byte
+ Store (0, I2CE) // SMBus Enable
+ Store (0xbf, HSTS)
+ Store (Arg0, TXSA) // Write Address
+ Store (Arg1, HCMD) // Write Command
+ Store (Arg2, DAT0) // Write Data
+
+ Store (0x48, HCNT) // Start + Byte Protocol
+
+ If (CMPL()) {
+ Or (HSTS, 0xff, HSTS) // Clean up
+ Return (1) // Success
+ }
+
+ Return (0)
+ }
+
+
+ // SMBus Read Byte
+ // Arg0: Address
+ // Arg1: Command
+ // Return: 0xffff = Failure, Data (8bit) = Success
+
+ Method (SRDB, 2, Serialized)
+ {
+
+ // Is the SMBus Controller Ready?
+ If (SRDY()) {
+ Return (0xffff)
+ }
+
+ // Receive Byte
+ Store (0, I2CE) // SMBus Enable
+ Store (0xbf, HSTS)
+ Store (Or (Arg0, 1), TXSA) // Write Address
+ Store (Arg1, HCMD) // Command
+
+ Store (0x48, HCNT) // Start
+
+ If (CMPL()) {
+ Or (HSTS, 0xff, HSTS) // Clean up
+ Return (DAT0) // Success
+ }
+
+ Return (0xffff)
+ }
+#endif
+}
+
diff --git a/src/soc/intel/broadwell/acpi/systemagent.asl b/src/soc/intel/broadwell/acpi/systemagent.asl
new file mode 100644
index 0000000..9c6dacd
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/systemagent.asl
@@ -0,0 +1,212 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <soc/intel/broadwell/broadwell/iomap.h>
+
+Name (_HID, EISAID ("PNP0A08")) // PCIe
+Name (_CID, EISAID ("PNP0A03")) // PCI
+
+Name (_ADR, 0)
+Name (_BBN, 0)
+
+Device (MCHC)
+{
+ Name (_ADR, 0x00000000) // 0:0.0
+
+ OperationRegion (MCHP, PCI_Config, 0x00, 0x100)
+ Field (MCHP, DWordAcc, NoLock, Preserve)
+ {
+ Offset (0x70), // ME Base Address
+ MEBA, 64,
+ Offset (0xa0), // Top of Used Memory
+ TOM, 64,
+ Offset (0xbc), // Top of Low Used Memory
+ TLUD, 32,
+ }
+}
+
+// Current Resource Settings
+
+Method (_CRS, 0, Serialized)
+{
+ Name (MCRS, ResourceTemplate()
+ {
+ // Bus Numbers
+ WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
+ 0x0000, 0x0000, 0x00ff, 0x0000, 0x0100,,, PB00)
+
+ // IO Region 0
+ DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
+ 0x0000, 0x0000, 0x0cf7, 0x0000, 0x0cf8,,, PI00)
+
+ // PCI Config Space
+ Io (Decode16, 0x0cf8, 0x0cf8, 0x0001, 0x0008)
+
+ // IO Region 1
+ DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
+ 0x0000, 0x0d00, 0xffff, 0x0000, 0xf300,,, PI01)
+
+ // VGA memory (0xa0000-0xbffff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000a0000, 0x000bffff, 0x00000000,
+ 0x00020000,,, ASEG)
+
+ // OPROM reserved (0xc0000-0xc3fff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000c0000, 0x000c3fff, 0x00000000,
+ 0x00004000,,, OPR0)
+
+ // OPROM reserved (0xc4000-0xc7fff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000c4000, 0x000c7fff, 0x00000000,
+ 0x00004000,,, OPR1)
+
+ // OPROM reserved (0xc8000-0xcbfff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000c8000, 0x000cbfff, 0x00000000,
+ 0x00004000,,, OPR2)
+
+ // OPROM reserved (0xcc000-0xcffff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000cc000, 0x000cffff, 0x00000000,
+ 0x00004000,,, OPR3)
+
+ // OPROM reserved (0xd0000-0xd3fff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000d0000, 0x000d3fff, 0x00000000,
+ 0x00004000,,, OPR4)
+
+ // OPROM reserved (0xd4000-0xd7fff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000d4000, 0x000d7fff, 0x00000000,
+ 0x00004000,,, OPR5)
+
+ // OPROM reserved (0xd8000-0xdbfff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000d8000, 0x000dbfff, 0x00000000,
+ 0x00004000,,, OPR6)
+
+ // OPROM reserved (0xdc000-0xdffff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000dc000, 0x000dffff, 0x00000000,
+ 0x00004000,,, OPR7)
+
+ // BIOS Extension (0xe0000-0xe3fff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000e0000, 0x000e3fff, 0x00000000,
+ 0x00004000,,, ESG0)
+
+ // BIOS Extension (0xe4000-0xe7fff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000e4000, 0x000e7fff, 0x00000000,
+ 0x00004000,,, ESG1)
+
+ // BIOS Extension (0xe8000-0xebfff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000e8000, 0x000ebfff, 0x00000000,
+ 0x00004000,,, ESG2)
+
+ // BIOS Extension (0xec000-0xeffff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000ec000, 0x000effff, 0x00000000,
+ 0x00004000,,, ESG3)
+
+ // System BIOS (0xf0000-0xfffff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x000f0000, 0x000fffff, 0x00000000,
+ 0x00010000,,, FSEG)
+
+ // PCI Memory Region (Top of memory-0xfebfffff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0x00000000, 0xfebfffff, 0x00000000,
+ 0xfec00000,,, PM01)
+
+ // TPM Area (0xfed40000-0xfed44fff)
+ DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed,
+ Cacheable, ReadWrite,
+ 0x00000000, 0xfed40000, 0xfed44fff, 0x00000000,
+ 0x00005000,,, TPMR)
+ })
+
+ // Find PCI resource area in MCRS
+ CreateDwordField(MCRS, PM01._MIN, PMIN)
+ CreateDwordField(MCRS, PM01._MAX, PMAX)
+ CreateDwordField(MCRS, PM01._LEN, PLEN)
+
+ // Fix up PCI memory region
+ // Start with Top of Lower Usable DRAM
+ Store (^MCHC.TLUD, Local0)
+ Store (^MCHC.MEBA, Local1)
+
+ // Check if ME base is equal
+ If (LEqual (Local0, Local1)) {
+ // Use Top Of Memory instead
+ Store (^MCHC.TOM, Local0)
+ }
+
+ Store (Local0, PMIN)
+ Add(Subtract(PMAX, PMIN), 1, PLEN)
+
+ Return (MCRS)
+}
+
+/* PCI Device Resource Consumption */
+Device (PDRC)
+{
+ Name (_HID, EISAID("PNP0C02"))
+ Name (_UID, 1)
+
+ Name (PDRS, ResourceTemplate() {
+ Memory32Fixed (ReadWrite, RCBA_BASE_ADDRESS, RCBA_BASE_SIZE)
+ Memory32Fixed (ReadWrite, MCH_BASE_ADDRESS, MCH_BASE_SIZE)
+ Memory32Fixed (ReadWrite, DMI_BASE_ADDRESS, DMI_BASE_SIZE)
+ Memory32Fixed (ReadWrite, EP_BASE_ADDRESS, EP_BASE_SIZE)
+ Memory32Fixed (ReadWrite, MCFG_BASE_ADDRESS, MCFG_BASE_SIZE)
+ Memory32Fixed (ReadWrite, EDRAM_BASE_ADDRESS, EDRAM_BASE_SIZE)
+ Memory32Fixed (ReadWrite, GDXC_BASE_ADDRESS, GDXC_BASE_SIZE)
+ })
+
+ // Current Resource Settings
+ Method (_CRS, 0, Serialized)
+ {
+ Return (PDRS)
+ }
+}
+
+/* PCI IRQ assignment */
+#include "pci_irqs.asl"
+
+/* Configurable TDP */
+#include "ctdp.asl"
diff --git a/src/soc/intel/broadwell/acpi/xhci.asl b/src/soc/intel/broadwell/acpi/xhci.asl
new file mode 100644
index 0000000..9d870e5
--- /dev/null
+++ b/src/soc/intel/broadwell/acpi/xhci.asl
@@ -0,0 +1,347 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+// XHCI Controller 0:14.0
+
+Device (XHCI)
+{
+ Name (_ADR, 0x00140000)
+
+ Name (PLSD, 5) // Port Link State - RxDetect
+ Name (PLSP, 7) // Port Link State - Polling
+
+ OperationRegion (XPRT, PCI_Config, 0x00, 0x100)
+ Field (XPRT, AnyAcc, NoLock, Preserve)
+ {
+ Offset (0x0),
+ DVID, 16,
+ Offset (0x10),
+ , 16,
+ XMEM, 16, // MEM_BASE
+ Offset (0x74),
+ D0D3, 2,
+ , 6,
+ PMEE, 1, // PME_EN
+ , 6,
+ PMES, 1, // PME_STS
+ Offset (0xb0),
+ , 13,
+ MB13, 1,
+ MB14, 1,
+ Offset (0xd0),
+ PR2R, 32, // USB2PR
+ PR2M, 32, // USB2PRM
+ PR3R, 32, // USB3PR
+ PR3M, 32, // USB3PRM
+ }
+
+ // Clear status bits
+ Method (LPCL, 0, Serialized)
+ {
+ OperationRegion (XREG, SystemMemory,
+ ShiftLeft (^XMEM, 16), 0x600)
+ Field (XREG, DWordAcc, Lock, Preserve)
+ {
+ Offset (0x510), // PORTSCNUSB3[0]
+ PSC0, 32,
+ Offset (0x520), // PORTSCNUSB3[1]
+ PSC1, 32,
+ Offset (0x530), // PORTSCNUSB3[2]
+ PSC2, 32,
+ Offset (0x540), // PORTSCNUSB3[3]
+ PSC3, 32,
+ }
+
+ // Port Enabled/Disabled (Bit 1)
+ Name (PEDB, ShiftLeft (1, 1))
+
+ // Change Status (Bits 23:17)
+ Name (CHST, ShiftLeft (0x7f, 17))
+
+ // Port 0
+ And (PSC0, Not (PEDB), Local0)
+ Or (Local0, CHST, PSC0)
+
+ // Port 1
+ And (PSC1, Not (PEDB), Local0)
+ Or (Local0, CHST, PSC1)
+
+ // Port 2
+ And (PSC2, Not (PEDB), Local0)
+ Or (Local0, CHST, PSC2)
+
+ // Port 3
+ And (PSC3, Not (PEDB), Local0)
+ Or (Local0, CHST, PSC3)
+ }
+
+ Method (LPS0, 0, Serialized)
+ {
+ OperationRegion (XREG, SystemMemory,
+ ShiftLeft (^XMEM, 16), 0x600)
+ Field (XREG, DWordAcc, Lock, Preserve)
+ {
+ Offset (0x510), // PORTSCNUSB3
+ , 5,
+ PLS1, 4, // [8:5] Port Link State
+ PPR1, 1, // [9] Port Power
+ , 7,
+ CSC1, 1, // [17] Connect Status Change
+ , 1,
+ WRC1, 1, // [19] Warm Port Reset Change
+ , 11,
+ WPR1, 1, // [31] Warm Port Reset
+ Offset (0x520), // PORTSCNUSB3
+ , 5,
+ PLS2, 4, // [8:5] Port Link State
+ PPR2, 1, // [9] Port Power
+ , 7,
+ CSC2, 1, // [17] Connect Status Change
+ , 1,
+ WRC2, 1, // [19] Warm Port Reset Change
+ , 11,
+ WPR2, 1, // [31] Warm Port Reset
+ Offset (0x530), // PORTSCNUSB3
+ , 5,
+ PLS3, 4, // [8:5] Port Link State
+ PPR3, 1, // [9] Port Power
+ , 7,
+ CSC3, 1, // [17] Connect Status Change
+ , 1,
+ WRC3, 1, // [19] Warm Port Reset Change
+ , 11,
+ WPR3, 1, // [31] Warm Port Reset
+ Offset (0x540), // PORTSCNUSB3
+ , 5,
+ PLS4, 4, // [8:5] Port Link State
+ PPR4, 1, // [9] Port Power
+ , 7,
+ CSC4, 1, // [17] Connect Status Change
+ , 1,
+ WRC4, 1, // [19] Warm Port Reset Change
+ , 11,
+ WPR4, 1, // [31] Warm Port Reset
+ }
+
+ // Wait for all powered ports to finish polling
+ Store (10, Local0)
+ While (LOr (LOr (LAnd (LEqual (PPR1, 1), LEqual (PLS1, PLSP)),
+ LAnd (LEqual (PPR2, 1), LEqual (PLS2, PLSP))),
+ LOr (LAnd (LEqual (PPR3, 1), LEqual (PLS3, PLSP)),
+ LAnd (LEqual (PPR4, 1), LEqual (PLS4, PLSP)))))
+ {
+ If (LEqual (Local0, 0)) {
+ Break
+ }
+ Decrement (Local0)
+ Stall (10)
+ }
+
+ // For each USB3 Port:
+ // If port is disconnected (PLS=5 PP=1 CSC=0)
+ // 1) Issue warm reset (WPR=1)
+ // 2) Poll for warm reset complete (WRC=0)
+ // 3) Write 1 to port status to clear
+
+ // Local# indicate if port is reset
+ Store (0, Local1)
+ Store (0, Local2)
+ Store (0, Local3)
+ Store (0, Local4)
+
+ If (LAnd (LEqual (PLS1, PLSD),
+ LAnd (LEqual (CSC1, 0), LEqual (PPR1, 1)))) {
+ Store (1, WPR1) // Issue warm reset
+ Store (1, Local1)
+ }
+ If (LAnd (LEqual (PLS2, PLSD),
+ LAnd (LEqual (CSC2, 0), LEqual (PPR2, 1)))) {
+ Store (1, WPR2) // Issue warm reset
+ Store (1, Local2)
+ }
+ If (LAnd (LEqual (PLS3, PLSD),
+ LAnd (LEqual (CSC3, 0), LEqual (PPR3, 1)))) {
+ Store (1, WPR3) // Issue warm reset
+ Store (1, Local3)
+ }
+ If (LAnd (LEqual (PLS4, PLSD),
+ LAnd (LEqual (CSC4, 0), LEqual (PPR4, 1)))) {
+ Store (1, WPR4) // Issue warm reset
+ Store (1, Local4)
+ }
+
+ // Poll for warm reset complete on all ports that were reset
+ Store (10, Local0)
+ While (LOr (LOr (LAnd (LEqual (Local1, 1), LEqual (WRC1, 0)),
+ LAnd (LEqual (Local2, 1), LEqual (WRC2, 0))),
+ LOr (LAnd (LEqual (Local3, 1), LEqual (WRC3, 0)),
+ LAnd (LEqual (Local4, 1), LEqual (WRC4, 0)))))
+ {
+ If (LEqual (Local0, 0)) {
+ Break
+ }
+ Decrement (Local0)
+ Stall (10)
+ }
+
+ // Clear status bits in all ports
+ LPCL ()
+ }
+
+ Method (_PSC, 0, NotSerialized)
+ {
+ Return (^D0D3)
+ }
+
+ Method (_PS0, 0, Serialized)
+ {
+ If (LEqual (^DVID, 0xFFFF)) {
+ Return ()
+ }
+ If (LOr (LEqual (^XMEM, 0xFFFF), LEqual (^XMEM, 0x0000))) {
+ Return ()
+ }
+
+ OperationRegion (XREG, SystemMemory,
+ Add (ShiftLeft (^XMEM, 16), 0x8000), 0x200)
+ Field (XREG, DWordAcc, Lock, Preserve)
+ {
+ Offset (0x0e0), // AUX Reset Control 1
+ , 15,
+ AX15, 1,
+ Offset (0x154), // AUX Domain PM Control Register 2
+ , 31,
+ CLK2, 1,
+ Offset (0x16c), // AUX Clock Control
+ , 2,
+ CLK0, 1,
+ , 11,
+ CLK1, 1, // USB3 Port Aux/Core Clock Gating Enable
+ }
+
+ // If device is in D3, set back to D0
+ Store (^D0D3, Local0)
+ if (LEqual (Local0, 3)) {
+ Store (0, ^D0D3)
+ }
+
+ // Clear PCI 0xB0[14:13]
+ Store (0, ^MB13)
+ Store (0, ^MB14)
+
+ // Clear MMIO 0x816C[14,2]
+ Store (0, CLK0)
+ Store (0, CLK1)
+
+ // Set MMIO 0x8154[31]
+ Store (1, CLK2)
+
+ // Handle per-port reset if needed
+ LPS0 ()
+
+ // Set MMIO 0x80e0[15]
+ Store (1, AX15)
+
+ Return ()
+ }
+
+ Method (_PS3, 0, Serialized)
+ {
+ If (LEqual (^DVID, 0xFFFF)) {
+ Return ()
+ }
+ If (LOr (LEqual (^XMEM, 0xFFFF), LEqual (^XMEM, 0x0000))) {
+ Return ()
+ }
+
+ OperationRegion (XREG, SystemMemory,
+ Add (ShiftLeft (^XMEM, 16), 0x8000), 0x200)
+ Field (XREG, DWordAcc, Lock, Preserve)
+ {
+ Offset (0x0e0), // AUX Reset Control 1
+ , 15,
+ AX15, 1,
+ Offset (0x154), // AUX Domain PM Control Register 2
+ , 31,
+ CLK2, 1,
+ Offset (0x16c), // AUX Clock Control
+ , 2,
+ CLK0, 1,
+ , 11,
+ CLK1, 1, // USB3 Port Aux/Core Clock Gating Enable
+ }
+
+ Store (1, ^PMES) // Clear PME Status
+ Store (1, ^PMEE) // Enable PME
+
+ // If device is in D3, set back to D0
+ Store (^D0D3, Local0)
+ if (LEqual (Local0, 3)) {
+ Store (0, ^D0D3)
+ }
+
+ // Set PCI 0xB0[14:13]
+ Store (1, ^MB13)
+ Store (1, ^MB14)
+
+ // Set MMIO 0x816C[14,2]
+ Store (1, CLK0)
+ Store (1, CLK1)
+
+ // Clear MMIO 0x8154[31]
+ Store (0, CLK2)
+
+ // Clear MMIO 0x80e0[15]
+ Store (0, AX15)
+
+ // Put device in D3
+ Store (3, ^D0D3)
+
+ Return ()
+ }
+
+ Name (_PRW, Package(){ 0x6d, 3 })
+
+ // Leave USB ports on for to allow Wake from USB
+
+ Method(_S3D,0) // Highest D State in S3 State
+ {
+ Return (3)
+ }
+
+ Method(_S4D,0) // Highest D State in S4 State
+ {
+ Return (3)
+ }
+
+ Device (HUB7)
+ {
+ Name (_ADR, 0x00000000)
+
+ // How many are there?
+ Device (PRT1) { Name (_ADR, 1) } // USB Port 0
+ Device (PRT2) { Name (_ADR, 2) } // USB Port 1
+ Device (PRT3) { Name (_ADR, 3) } // USB Port 2
+ Device (PRT4) { Name (_ADR, 4) } // USB Port 3
+ Device (PRT5) { Name (_ADR, 5) } // USB Port 4
+ Device (PRT6) { Name (_ADR, 6) } // USB Port 5
+ }
+}
+
diff --git a/src/soc/intel/broadwell/bootblock/Makefile.inc b/src/soc/intel/broadwell/bootblock/Makefile.inc
new file mode 100644
index 0000000..2ca5a45
--- /dev/null
+++ b/src/soc/intel/broadwell/bootblock/Makefile.inc
@@ -0,0 +1 @@
+chipset_bootblock_inc += $(src)/soc/intel/broadwell/bootblock/timestamp.inc
diff --git a/src/soc/intel/broadwell/bootblock/cpu.c b/src/soc/intel/broadwell/bootblock/cpu.c
new file mode 100644
index 0000000..11f1833
--- /dev/null
+++ b/src/soc/intel/broadwell/bootblock/cpu.c
@@ -0,0 +1,131 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdint.h>
+#include <arch/cpu.h>
+#include <cpu/x86/cache.h>
+#include <cpu/x86/msr.h>
+#include <cpu/x86/mtrr.h>
+#include <arch/io.h>
+#include <cpu/intel/microcode/microcode.c>
+#include <broadwell/rcba.h>
+#include <broadwell/msr.h>
+
+static void set_var_mtrr(
+ unsigned reg, unsigned base, unsigned size, unsigned type)
+
+{
+ /* Bit Bit 32-35 of MTRRphysMask should be set to 1 */
+ msr_t basem, maskm;
+ basem.lo = base | type;
+ basem.hi = 0;
+ wrmsr(MTRRphysBase_MSR(reg), basem);
+ maskm.lo = ~(size - 1) | MTRRphysMaskValid;
+ maskm.hi = (1 << (CONFIG_CPU_ADDR_BITS - 32)) - 1;
+ wrmsr(MTRRphysMask_MSR(reg), maskm);
+}
+
+static void enable_rom_caching(void)
+{
+ msr_t msr;
+
+ disable_cache();
+ /* Why only top 4MiB ? */
+ set_var_mtrr(1, CACHE_ROM_BASE, CONFIG_CACHE_ROM_SIZE, MTRR_TYPE_WRPROT);
+ enable_cache();
+
+ /* Enable Variable MTRRs */
+ msr.hi = 0x00000000;
+ msr.lo = 0x00000800;
+ wrmsr(MTRRdefType_MSR, msr);
+}
+
+static void set_flex_ratio_to_tdp_nominal(void)
+{
+ msr_t flex_ratio, msr;
+ u32 soft_reset;
+ u8 nominal_ratio;
+
+ /* Check for Flex Ratio support */
+ flex_ratio = rdmsr(MSR_FLEX_RATIO);
+ if (!(flex_ratio.lo & FLEX_RATIO_EN))
+ return;
+
+ /* Check for >0 configurable TDPs */
+ msr = rdmsr(MSR_PLATFORM_INFO);
+ if (((msr.hi >> 1) & 3) == 0)
+ return;
+
+ /* Use nominal TDP ratio for flex ratio */
+ msr = rdmsr(MSR_CONFIG_TDP_NOMINAL);
+ nominal_ratio = msr.lo & 0xff;
+
+ /* See if flex ratio is already set to nominal TDP ratio */
+ if (((flex_ratio.lo >> 8) & 0xff) == nominal_ratio)
+ return;
+
+ /* Set flex ratio to nominal TDP ratio */
+ flex_ratio.lo &= ~0xff00;
+ flex_ratio.lo |= nominal_ratio << 8;
+ flex_ratio.lo |= FLEX_RATIO_LOCK;
+ wrmsr(MSR_FLEX_RATIO, flex_ratio);
+
+ /* Set flex ratio in soft reset data register bits 11:6.
+ * RCBA region is enabled in southbridge bootblock */
+ soft_reset = RCBA32(SOFT_RESET_DATA);
+ soft_reset &= ~(0x3f << 6);
+ soft_reset |= (nominal_ratio & 0x3f) << 6;
+ RCBA32(SOFT_RESET_DATA) = soft_reset;
+
+ /* Set soft reset control to use register value */
+ RCBA32_OR(SOFT_RESET_CTRL, 1);
+
+ /* Issue warm reset, will be "CPU only" due to soft reset data */
+ outb(0x0, 0xcf9);
+ outb(0x6, 0xcf9);
+ while (1) {
+ asm("hlt");
+ }
+}
+
+static void check_for_clean_reset(void)
+{
+ msr_t msr;
+ msr = rdmsr(MTRRdefType_MSR);
+
+ /* Use the MTRR default type MSR as a proxy for detecting INIT#.
+ * Reset the system if any known bits are set in that MSR. That is
+ * an indication of the CPU not being properly reset. */
+ if (msr.lo & (MTRRdefTypeEn | MTRRdefTypeFixEn)) {
+ outb(0x0, 0xcf9);
+ outb(0x6, 0xcf9);
+ while (1) {
+ asm("hlt");
+ }
+ }
+}
+
+static void bootblock_cpu_init(void)
+{
+ /* Set flex ratio and reset if needed */
+ set_flex_ratio_to_tdp_nominal();
+ check_for_clean_reset();
+ enable_rom_caching();
+ intel_update_microcode_from_cbfs();
+}
diff --git a/src/soc/intel/broadwell/bootblock/pch.c b/src/soc/intel/broadwell/bootblock/pch.c
new file mode 100644
index 0000000..9e76f79
--- /dev/null
+++ b/src/soc/intel/broadwell/bootblock/pch.c
@@ -0,0 +1,94 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <cpu/x86/tsc.h>
+#include <broadwell/iomap.h>
+#include <broadwell/lpc.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/rcba.h>
+#include <broadwell/spi.h>
+
+static void store_initial_timestamp(void)
+{
+ /* Two 32bit scratchpad registers available:
+ * D0:F0 0xdc (SKPAD)
+ * D31:F2 0xd0 (SATA SP)
+ */
+ tsc_t tsc = rdtsc();
+ pci_write_config32(SA_DEV_ROOT, 0xdc, tsc.lo);
+ pci_write_config32(PCH_DEV_SATA, 0xd0, tsc.hi);
+}
+
+/*
+ * Enable Prefetching and Caching.
+ */
+static void enable_spi_prefetch(void)
+{
+ u8 reg8 = pci_read_config8(PCH_DEV_LPC, 0xdc);
+ reg8 &= ~(3 << 2);
+ reg8 |= (2 << 2); /* Prefetching and Caching Enabled */
+ pci_write_config8(PCH_DEV_LPC, 0xdc, reg8);
+}
+
+
+static void map_rcba(void)
+{
+ pci_write_config32(PCH_DEV_LPC, RCBA, RCBA_BASE_ADDRESS | 1);
+}
+
+static void enable_port80_on_lpc(void)
+{
+ /* Enable port 80 POST on LPC. The chipset does this by deafult,
+ * but it doesn't appear to hurt anything. */
+ u32 gcs = RCBA32(GCS);
+ gcs = gcs & ~0x4;
+ RCBA32(GCS) = gcs;
+}
+
+static void set_spi_speed(void)
+{
+ u32 fdod;
+ u8 ssfc;
+
+ /* Observe SPI Descriptor Component Section 0 */
+ SPIBAR32(SPIBAR_FDOC) = 0x1000;
+
+ /* Extract the Write/Erase SPI Frequency from descriptor */
+ fdod = SPIBAR32(SPIBAR_FDOD);
+ fdod >>= 24;
+ fdod &= 7;
+
+ /* Set Software Sequence frequency to match */
+ ssfc = SPIBAR8(SPIBAR_SSFC + 2);
+ ssfc &= ~7;
+ ssfc |= fdod;
+ SPIBAR8(SPIBAR_SSFC + 2) = ssfc;
+}
+
+static void bootblock_southbridge_init(void)
+{
+#if CONFIG_COLLECT_TIMESTAMPS
+ store_initial_timestamp();
+#endif
+ map_rcba();
+ enable_spi_prefetch();
+ enable_port80_on_lpc();
+ set_spi_speed();
+}
diff --git a/src/soc/intel/broadwell/bootblock/systemagent.c b/src/soc/intel/broadwell/bootblock/systemagent.c
new file mode 100644
index 0000000..b2dd27b
--- /dev/null
+++ b/src/soc/intel/broadwell/bootblock/systemagent.c
@@ -0,0 +1,44 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/systemagent.h>
+
+static void bootblock_northbridge_init(void)
+{
+ uint32_t reg;
+
+ /*
+ * The "io" variant of the config access is explicitly used to
+ * setup the PCIEXBAR because CONFIG_MMCONF_SUPPORT_DEFAULT is set to
+ * to true. That way all subsequent non-explicit config accesses use
+ * MCFG. This code also assumes that bootblock_northbridge_init() is
+ * the first thing called in the non-asm boot block code. The final
+ * assumption is that no assembly code is using the
+ * CONFIG_MMCONF_SUPPORT_DEFAULT option to do PCI config acceses.
+ *
+ * The PCIEXBAR is assumed to live in the memory mapped IO space under
+ * 4GiB.
+ */
+ reg = 0;
+ pci_io_write_config32(SA_DEV_ROOT, PCIEXBAR + 4, reg);
+ reg = CONFIG_MMCONF_BASE_ADDRESS | 4 | 1; /* 64MiB - 0-63 buses. */
+ pci_io_write_config32(SA_DEV_ROOT, PCIEXBAR, reg);
+}
diff --git a/src/soc/intel/broadwell/bootblock/timestamp.inc b/src/soc/intel/broadwell/bootblock/timestamp.inc
new file mode 100644
index 0000000..f565775
--- /dev/null
+++ b/src/soc/intel/broadwell/bootblock/timestamp.inc
@@ -0,0 +1,19 @@
+/* Store the initial timestamp for booting in mmx registers. This works
+ * because the bootblock isn't being compiled with MMX support so mm0 and
+ * mm1 will be preserved into romstage. */
+ .code32
+
+.global stash_timestamp
+stash_timestamp:
+
+ /* Save the BIST value */
+ movl %eax, %ebp
+
+ finit
+ rdtsc
+ movd %eax, %mm0
+ movd %edx, %mm1
+
+ /* Restore the BIST value to %eax */
+ movl %ebp, %eax
+
diff --git a/src/soc/intel/broadwell/broadwell/acpi.h b/src/soc/intel/broadwell/broadwell/acpi.h
new file mode 100644
index 0000000..63c0a36
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/acpi.h
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_ACPI_H_
+#define _BROADWELL_ACPI_H_
+
+#include <arch/acpi.h>
+#include <broadwell/nvs.h>
+
+/* P-state configuration */
+#define PSS_MAX_ENTRIES 8
+#define PSS_RATIO_STEP 2
+#define PSS_LATENCY_TRANSITION 10
+#define PSS_LATENCY_BUSMASTER 10
+
+void acpi_create_intel_hpet(acpi_hpet_t *hpet);
+void acpi_fill_in_fadt(acpi_fadt_t *fadt);
+unsigned long acpi_madt_irq_overrides(unsigned long current);
+void acpi_init_gnvs(global_nvs_t *gnvs);
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/cpu.h b/src/soc/intel/broadwell/broadwell/cpu.h
new file mode 100644
index 0000000..0f6f593
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/cpu.h
@@ -0,0 +1,72 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_CPU_H_
+#define _BROADWELL_CPU_H_
+
+#include <arch/cpu.h>
+#include <device/device.h>
+
+/* CPU types */
+#define HASWELL_FAMILY_ULT 0x40650
+#define BROADWELL_FAMILY_ULT 0x306d0
+
+/* Supported CPUIDs */
+#define CPUID_HASWELL_A0 0x306c1
+#define CPUID_HASWELL_B0 0x306c2
+#define CPUID_HASWELL_C0 0x306c3
+#define CPUID_HASWELL_ULT_B0 0x40650
+#define CPUID_HASWELL_ULT 0x40651
+#define CPUID_HASWELL_HALO 0x40661
+#define CPUID_BROADWELL_C0 0x306d2
+#define CPUID_BROADWELL_D0 0x306d3
+
+/* CPU bus clock is fixed at 100MHz */
+#define CPU_BCLK 100
+
+/* Latency times in units of 1024ns. */
+#define C_STATE_LATENCY_CONTROL_0_LIMIT 0x42
+#define C_STATE_LATENCY_CONTROL_1_LIMIT 0x73
+#define C_STATE_LATENCY_CONTROL_2_LIMIT 0x91
+#define C_STATE_LATENCY_CONTROL_3_LIMIT 0xe4
+#define C_STATE_LATENCY_CONTROL_4_LIMIT 0x145
+#define C_STATE_LATENCY_CONTROL_5_LIMIT 0x1ef
+
+#define C_STATE_LATENCY_MICRO_SECONDS(limit, base) \
+ (((1 << ((base)*5)) * (limit)) / 1000)
+#define C_STATE_LATENCY_FROM_LAT_REG(reg) \
+ C_STATE_LATENCY_MICRO_SECONDS(C_STATE_LATENCY_CONTROL_ ##reg## _LIMIT, \
+ (IRTL_1024_NS >> 10))
+
+/* Configure power limits for turbo mode */
+void set_power_limits(u8 power_limit_1_time);
+int cpu_config_tdp_levels(void);
+
+/*
+ * Determine if HyperThreading is disabled.
+ * The variable is not valid until setup_ap_init() has been called.
+ */
+extern int ht_disabled;
+
+/* CPU identification */
+u32 cpu_family_model(void);
+u32 cpu_stepping(void);
+int cpu_is_ult(void);
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/device_nvs.h b/src/soc/intel/broadwell/broadwell/device_nvs.h
new file mode 100644
index 0000000..f10f28d
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/device_nvs.h
@@ -0,0 +1,43 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_DEVICE_NVS_H_
+#define _BROADWELL_DEVICE_NVS_H_
+
+#include <stdint.h>
+
+/* Offset in Global NVS where this structure lives */
+#define DEVICE_NVS_OFFSET 0x1000
+
+#define SIO_NVS_DMA 0
+#define SIO_NVS_I2C0 1
+#define SIO_NVS_I2C1 2
+#define SIO_NVS_SPI0 3
+#define SIO_NVS_SPI1 4
+#define SIO_NVS_UART0 5
+#define SIO_NVS_UART1 6
+#define SIO_NVS_SDIO 7
+
+typedef struct {
+ u8 enable[8];
+ u32 bar0[8];
+ u32 bar1[8];
+} __attribute__((packed)) device_nvs_t;
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/ehci.h b/src/soc/intel/broadwell/broadwell/ehci.h
new file mode 100644
index 0000000..44d51ef
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/ehci.h
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_EHCI_H_
+#define _BROADWELL_EHCI_H_
+
+/* EHCI Memory Registers */
+#define EHCI_USB_CMD 0x20
+#define EHCI_USB_CMD_RUN (1 << 0)
+#define EHCI_USB_CMD_PSE (1 << 4)
+#define EHCI_USB_CMD_ASE (1 << 5)
+#define EHCI_PORTSC(port) (0x64 + (port * 4))
+#define EHCI_PORTSC_ENABLED (1 << 2)
+#define EHCI_PORTSC_SUSPEND (1 << 7)
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/gpio.h b/src/soc/intel/broadwell/broadwell/gpio.h
new file mode 100644
index 0000000..a035975
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/gpio.h
@@ -0,0 +1,192 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_GPIO_H_
+#define _BROADWELL_GPIO_H_
+
+#include <stdint.h>
+
+/* PCH-LP GPIOBASE Registers */
+#define GPIO_OWNER(set) (0x00 + ((set) * 4))
+#define GPIO_PIRQ_APIC_EN 0x10
+#define GPIO_BLINK 0x18
+#define GPIO_SER_BLINK 0x1c
+#define GPIO_SER_BLINK_CS 0x20
+#define GPIO_SER_BLINK_DATA 0x24
+#define GPIO_ROUTE(set) (0x30 + ((set) * 4))
+#define GPIO_ALT_GPI_SMI_STS 0x50
+#define GPIO_ALT_GPI_SMI_EN 0x54
+#define GPIO_RESET(set) (0x60 + ((set) * 4))
+#define GPIO_GLOBAL_CONFIG 0x7c
+#define GPIO_IRQ_IS(set) (0x80 + ((set) * 4))
+#define GPIO_IRQ_IE(set) (0x90 + ((set) * 4))
+#define GPIO_CONFIG0(gpio) (0x100 + ((gpio) * 8))
+#define GPIO_CONFIG1(gpio) (0x104 + ((gpio) * 8))
+
+#define MAX_GPIO_NUMBER 94 /* zero based */
+#define GPIO_LIST_END 0xffffffff
+
+/* conf0 */
+
+#define GPIO_MODE_NATIVE (0 << 0)
+#define GPIO_MODE_GPIO (1 << 0)
+
+#define GPIO_DIR_OUTPUT (0 << 2)
+#define GPIO_DIR_INPUT (1 << 2)
+
+#define GPIO_NO_INVERT (0 << 3)
+#define GPIO_INVERT (1 << 3)
+
+#define GPIO_IRQ_EDGE (0 << 4)
+#define GPIO_IRQ_LEVEL (1 << 4)
+
+#define GPI_LEVEL (1 << 30)
+
+#define GPIO_OUT_LOW 0
+#define GPIO_OUT_HIGH 1
+#define GPO_LEVEL_SHIFT 31
+#define GPO_LEVEL_MASK (1 << GPO_LEVEL_SHIFT)
+#define GPO_LEVEL_LOW (GPIO_OUT_LOW << GPO_LEVEL_SHIFT)
+#define GPO_LEVEL_HIGH (GPIO_OUT_HIGH << GPO_LEVEL_SHIFT)
+
+/* conf1 */
+
+#define GPIO_PULL_NONE (0 << 0)
+#define GPIO_PULL_DOWN (1 << 0)
+#define GPIO_PULL_UP (2 << 0)
+
+#define GPIO_SENSE_ENABLE (0 << 2)
+#define GPIO_SENSE_DISABLE (1 << 2)
+
+/* owner */
+
+#define GPIO_OWNER_ACPI 0
+#define GPIO_OWNER_GPIO 1
+
+/* route */
+
+#define GPIO_ROUTE_SCI 0
+#define GPIO_ROUTE_SMI 1
+
+/* irqen */
+
+#define GPIO_IRQ_DISABLE 0
+#define GPIO_IRQ_ENABLE 1
+
+/* blink */
+
+#define GPO_NO_BLINK 0
+#define GPO_BLINK 1
+
+/* reset */
+
+#define GPIO_RESET_PWROK 0
+#define GPIO_RESET_RSMRST 1
+
+/* pirq route to io-apic */
+
+#define GPIO_PIRQ_APIC_MASK 0
+#define GPIO_PIRQ_APIC_ROUTE 1
+
+#define PCH_GPIO_END \
+ { .conf0 = GPIO_LIST_END }
+
+#define PCH_GPIO_NATIVE \
+ { .conf0 = GPIO_MODE_NATIVE }
+
+#define PCH_GPIO_UNUSED \
+ { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT, \
+ .owner = GPIO_OWNER_GPIO, \
+ .conf1 = GPIO_SENSE_DISABLE }
+
+#define PCH_GPIO_ACPI_SCI \
+ { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT, \
+ .owner = GPIO_OWNER_ACPI, \
+ .route = GPIO_ROUTE_SCI }
+
+#define PCH_GPIO_ACPI_SMI \
+ { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT, \
+ .owner = GPIO_OWNER_ACPI, \
+ .route = GPIO_ROUTE_SMI }
+
+#define PCH_GPIO_INPUT \
+ { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT, \
+ .owner = GPIO_OWNER_GPIO }
+
+#define PCH_GPIO_INPUT_INVERT \
+ { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT, \
+ .owner = GPIO_OWNER_GPIO }
+
+#define PCH_GPIO_IRQ_EDGE \
+ { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_IRQ_EDGE, \
+ .owner = GPIO_OWNER_GPIO, \
+ .irqen = GPIO_IRQ_ENABLE }
+
+#define PCH_GPIO_IRQ_LEVEL \
+ { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_IRQ_LEVEL, \
+ .owner = GPIO_OWNER_GPIO, \
+ .irqen = GPIO_IRQ_ENABLE }
+
+#define PCH_GPIO_PIRQ \
+ { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT, \
+ .owner = GPIO_OWNER_GPIO, \
+ .pirq = GPIO_PIRQ_APIC_ROUTE }
+
+#define PCH_GPIO_OUT_HIGH \
+ { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_OUTPUT | GPO_LEVEL_HIGH, \
+ .owner = GPIO_OWNER_GPIO, \
+ .conf1 = GPIO_SENSE_DISABLE }
+
+#define PCH_GPIO_OUT_LOW \
+ { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_OUTPUT | GPO_LEVEL_LOW, \
+ .owner = GPIO_OWNER_GPIO, \
+ .conf1 = GPIO_SENSE_DISABLE }
+
+struct gpio_config {
+ u8 gpio;
+ u32 conf0;
+ u32 conf1;
+ u8 owner;
+ u8 route;
+ u8 irqen;
+ u8 reset;
+ u8 blink;
+ u8 pirq;
+} __attribute__ ((packed));
+
+/* Configure GPIOs with mainboard provided settings */
+void init_one_gpio(int gpio_num, struct gpio_config *config);
+void init_gpios(const struct gpio_config config[]);
+
+/* Get GPIO pin value */
+int get_gpio(int gpio_num);
+
+/* Set GPIO pin value */
+void set_gpio(int gpio_num, int value);
+
+/* Return non-zero if gpio is set to native function. 0 otherwise. */
+int gpio_is_native(int gpio_num);
+
+/*
+ * Get a number comprised of multiple GPIO values. gpio_num_array points to
+ * the array of gpio pin numbers to scan, terminated by -1.
+ */
+unsigned get_gpios(const int *gpio_num_array);
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/iobp.h b/src/soc/intel/broadwell/broadwell/iobp.h
new file mode 100644
index 0000000..48f7673
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/iobp.h
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_IOBP_H_
+#define _BROADWELL_IOBP_H_
+
+u32 pch_iobp_read(u32 address);
+void pch_iobp_write(u32 address, u32 data);
+void pch_iobp_update(u32 address, u32 andvalue, u32 orvalue);
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/iomap.h b/src/soc/intel/broadwell/broadwell/iomap.h
new file mode 100644
index 0000000..bb98975
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/iomap.h
@@ -0,0 +1,62 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_IOMAP_H_
+#define _BROADWELL_IOMAP_H_
+
+#define MCFG_BASE_ADDRESS CONFIG_MMCONF_BASE_ADDRESS
+#define MCFG_BASE_SIZE 0x4000000
+
+#define MCH_BASE_ADDRESS 0xfed10000
+#define MCH_BASE_SIZE 0x8000
+
+#define DMI_BASE_ADDRESS 0xfed18000
+#define DMI_BASE_SIZE 0x1000
+
+#define EP_BASE_ADDRESS 0xfed19000
+#define EP_BASE_SIZE 0x1000
+
+#define EDRAM_BASE_ADDRESS 0xfed80000
+#define EDRAM_BASE_SIZE 0x4000
+
+#define GDXC_BASE_ADDRESS 0xfed84000
+#define GDXC_BASE_SIZE 0x1000
+
+#define RCBA_BASE_ADDRESS 0xfed1c000
+#define RCBA_BASE_SIZE 0x4000
+
+#define HPET_BASE_ADDRESS 0xfed00000
+
+#define ACPI_BASE_ADDRESS 0x1000
+#define ACPI_BASE_SIZE 0x100
+
+#define GPIO_BASE_ADDRESS 0x1400
+#define GPIO_BASE_SIZE 0x400
+
+#define SMBUS_BASE_ADDRESS 0x0400
+#define SMBUS_BASE_SIZE 0x10
+
+/* Temporary addresses used in romstage */
+#define EARLY_GTT_BAR 0xe0000000
+#define EARLY_XHCI_BAR 0xd7000000
+#define EARLY_EHCI_BAR CONFIG_EHCI_BAR
+#define EARLY_UART_BAR CONFIG_TTYS0_BASE
+#define EARLY_TEMP_MMIO 0xfed08000
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/lpc.h b/src/soc/intel/broadwell/broadwell/lpc.h
new file mode 100644
index 0000000..180e527
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/lpc.h
@@ -0,0 +1,93 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_LPC_H_
+#define _BROADWELL_LPC_H_
+
+/* PCI Configuration Space (D31:F0): LPC */
+#define SERIRQ_CNTL 0x64
+#define PMBASE 0x40
+#define ACPI_CNTL 0x44
+#define ACPI_EN (1 << 7)
+#define SCI_IRQ_SEL (7 << 0)
+#define SCIS_IRQ9 0
+#define SCIS_IRQ10 1
+#define SCIS_IRQ11 2
+#define SCIS_IRQ20 4
+#define SCIS_IRQ21 5
+#define SCIS_IRQ22 6
+#define SCIS_IRQ23 7
+#define GPIOBASE 0x48
+#define BIOS_CNTL 0xdc
+#define GPIO_BASE 0x48 /* LPC GPIO Base Address Register */
+#define GPIO_CNTL 0x4C /* LPC GPIO Control Register */
+#define GPIO_EN (1 << 4)
+#define GPIO_ROUT 0xb8
+
+#define PIRQA_ROUT 0x60
+#define PIRQB_ROUT 0x61
+#define PIRQC_ROUT 0x62
+#define PIRQD_ROUT 0x63
+#define PIRQE_ROUT 0x68
+#define PIRQF_ROUT 0x69
+#define PIRQG_ROUT 0x6A
+#define PIRQH_ROUT 0x6B
+
+#define LPC_IO_DEC 0x80 /* IO Decode Ranges Register */
+#define LPC_EN 0x82 /* LPC IF Enables Register */
+#define CNF2_LPC_EN (1 << 13) /* 0x4e/0x4f */
+#define CNF1_LPC_EN (1 << 12) /* 0x2e/0x2f */
+#define MC_LPC_EN (1 << 11) /* 0x62/0x66 */
+#define KBC_LPC_EN (1 << 10) /* 0x60/0x64 */
+#define GAMEH_LPC_EN (1 << 9) /* 0x208/0x20f */
+#define GAMEL_LPC_EN (1 << 8) /* 0x200/0x207 */
+#define FDD_LPC_EN (1 << 3) /* LPC_IO_DEC[12] */
+#define LPT_LPC_EN (1 << 2) /* LPC_IO_DEC[9:8] */
+#define COMB_LPC_EN (1 << 1) /* LPC_IO_DEC[6:4] */
+#define COMA_LPC_EN (1 << 0) /* LPC_IO_DEC[2:0] */
+#define LPC_GEN1_DEC 0x84 /* LPC IF Generic Decode Range 1 */
+#define LPC_GEN2_DEC 0x88 /* LPC IF Generic Decode Range 2 */
+#define LPC_GEN3_DEC 0x8c /* LPC IF Generic Decode Range 3 */
+#define LPC_GEN4_DEC 0x90 /* LPC IF Generic Decode Range 4 */
+#define LGMR 0x98 /* LPC Generic Memory Range */
+#define RCBA 0xf0 /* Root Complex Register Block */
+
+/* Power Management */
+
+#define GEN_PMCON_1 0xa0
+#define SMI_LOCK (1 << 4)
+#define GEN_PMCON_2 0xa2
+#define SYSTEM_RESET_STS (1 << 4)
+#define THERMTRIP_STS (1 << 3)
+#define SYSPWR_FLR (1 << 1)
+#define PWROK_FLR (1 << 0)
+#define GEN_PMCON_3 0xa4
+#define SUS_PWR_FLR (1 << 14)
+#define GEN_RST_STS (1 << 9)
+#define RTC_BATTERY_DEAD (1 << 2)
+#define PWR_FLR (1 << 1)
+#define SLEEP_AFTER_POWER_FAIL (1 << 0)
+#define GEN_PMCON_LOCK 0xa6
+#define SLP_STR_POL_LOCK (1 << 2)
+#define ACPI_BASE_LOCK (1 << 1)
+#define PMIR 0xac
+#define PMIR_CF9LOCK (1 << 31)
+#define PMIR_CF9GR (1 << 20)
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/me.h b/src/soc/intel/broadwell/broadwell/me.h
new file mode 100644
index 0000000..ddecaf8
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/me.h
@@ -0,0 +1,501 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_ME_H_
+#define _BROADWELL_ME_H_
+
+#include <console/loglevel.h>
+
+#define ME_RETRY 100000 /* 1 second */
+#define ME_DELAY 10 /* 10 us */
+
+/*
+ * Management Engine PCI registers
+ */
+
+#define PCI_CPU_MEBASE_L 0x70 /* Set by MRC */
+#define PCI_CPU_MEBASE_H 0x74 /* Set by MRC */
+
+#define PCI_ME_HFS 0x40
+#define ME_HFS_CWS_RESET 0
+#define ME_HFS_CWS_INIT 1
+#define ME_HFS_CWS_REC 2
+#define ME_HFS_CWS_NORMAL 5
+#define ME_HFS_CWS_WAIT 6
+#define ME_HFS_CWS_TRANS 7
+#define ME_HFS_CWS_INVALID 8
+#define ME_HFS_STATE_PREBOOT 0
+#define ME_HFS_STATE_M0_UMA 1
+#define ME_HFS_STATE_M3 4
+#define ME_HFS_STATE_M0 5
+#define ME_HFS_STATE_BRINGUP 6
+#define ME_HFS_STATE_ERROR 7
+#define ME_HFS_ERROR_NONE 0
+#define ME_HFS_ERROR_UNCAT 1
+#define ME_HFS_ERROR_IMAGE 3
+#define ME_HFS_ERROR_DEBUG 4
+#define ME_HFS_MODE_NORMAL 0
+#define ME_HFS_MODE_DEBUG 2
+#define ME_HFS_MODE_DIS 3
+#define ME_HFS_MODE_OVER_JMPR 4
+#define ME_HFS_MODE_OVER_MEI 5
+#define ME_HFS_BIOS_DRAM_ACK 1
+#define ME_HFS_ACK_NO_DID 0
+#define ME_HFS_ACK_RESET 1
+#define ME_HFS_ACK_PWR_CYCLE 2
+#define ME_HFS_ACK_S3 3
+#define ME_HFS_ACK_S4 4
+#define ME_HFS_ACK_S5 5
+#define ME_HFS_ACK_GBL_RESET 6
+#define ME_HFS_ACK_CONTINUE 7
+
+struct me_hfs {
+ u32 working_state: 4;
+ u32 mfg_mode: 1;
+ u32 fpt_bad: 1;
+ u32 operation_state: 3;
+ u32 fw_init_complete: 1;
+ u32 ft_bup_ld_flr: 1;
+ u32 update_in_progress: 1;
+ u32 error_code: 4;
+ u32 operation_mode: 4;
+ u32 reserved: 4;
+ u32 boot_options_present: 1;
+ u32 ack_data: 3;
+ u32 bios_msg_ack: 4;
+} __attribute__ ((packed));
+
+#define PCI_ME_UMA 0x44
+
+struct me_uma {
+ u32 size: 6;
+ u32 reserved_1: 10;
+ u32 valid: 1;
+ u32 reserved_0: 14;
+ u32 set_to_one: 1;
+} __attribute__ ((packed));
+
+#define PCI_ME_H_GS 0x4c
+#define ME_INIT_DONE 1
+#define ME_INIT_STATUS_SUCCESS 0
+#define ME_INIT_STATUS_NOMEM 1
+#define ME_INIT_STATUS_ERROR 2
+#define ME_INIT_STATUS_SUCCESS_OTHER 3 /* SEE ME9 BWG */
+
+struct me_did {
+ u32 uma_base: 16;
+ u32 reserved: 7;
+ u32 rapid_start: 1;
+ u32 status: 4;
+ u32 init_done: 4;
+} __attribute__ ((packed));
+
+/*
+ * Apparently the GMES register is renamed to HFS2 (or HFSTS2 according
+ * to ME9 BWG). Sadly the PCH EDS and the ME BWG do not match on nomenclature.
+ */
+#define PCI_ME_HFS2 0x48
+/* Infrastructure Progress Values */
+#define ME_HFS2_PHASE_ROM 0
+#define ME_HFS2_PHASE_BUP 1
+#define ME_HFS2_PHASE_UKERNEL 2
+#define ME_HFS2_PHASE_POLICY 3
+#define ME_HFS2_PHASE_MODULE_LOAD 4
+#define ME_HFS2_PHASE_UNKNOWN 5
+#define ME_HFS2_PHASE_HOST_COMM 6
+/* Current State - Based on Infra Progress values. */
+/* ROM State */
+#define ME_HFS2_STATE_ROM_BEGIN 0
+#define ME_HFS2_STATE_ROM_DISABLE 6
+/* BUP State */
+#define ME_HFS2_STATE_BUP_INIT 0
+#define ME_HFS2_STATE_BUP_DIS_HOST_WAKE 1
+#define ME_HFS2_STATE_BUP_FLOW_DET 4
+#define ME_HFS2_STATE_BUP_VSCC_ERR 8
+#define ME_HFS2_STATE_BUP_CHECK_STRAP 0xa
+#define ME_HFS2_STATE_BUP_PWR_OK_TIMEOUT 0xb
+#define ME_HFS2_STATE_BUP_MANUF_OVRD_STRAP 0xd
+#define ME_HFS2_STATE_BUP_M3 0x11
+#define ME_HFS2_STATE_BUP_M0 0x12
+#define ME_HFS2_STATE_BUP_FLOW_DET_ERR 0x13
+#define ME_HFS2_STATE_BUP_M3_CLK_ERR 0x15
+#define ME_HFS2_STATE_BUP_CPU_RESET_DID_TIMEOUT_MEM_MISSING 0x17
+#define ME_HFS2_STATE_BUP_M3_KERN_LOAD 0x18
+#define ME_HFS2_STATE_BUP_T32_MISSING 0x1c
+#define ME_HFS2_STATE_BUP_WAIT_DID 0x1f
+#define ME_HFS2_STATE_BUP_WAIT_DID_FAIL 0x20
+#define ME_HFS2_STATE_BUP_DID_NO_FAIL 0x21
+#define ME_HFS2_STATE_BUP_ENABLE_UMA 0x22
+#define ME_HFS2_STATE_BUP_ENABLE_UMA_ERR 0x23
+#define ME_HFS2_STATE_BUP_SEND_DID_ACK 0x24
+#define ME_HFS2_STATE_BUP_SEND_DID_ACK_ERR 0x25
+#define ME_HFS2_STATE_BUP_M0_CLK 0x26
+#define ME_HFS2_STATE_BUP_M0_CLK_ERR 0x27
+#define ME_HFS2_STATE_BUP_TEMP_DIS 0x28
+#define ME_HFS2_STATE_BUP_M0_KERN_LOAD 0x32
+/* Policy Module State */
+#define ME_HFS2_STATE_POLICY_ENTRY 0
+#define ME_HFS2_STATE_POLICY_RCVD_S3 3
+#define ME_HFS2_STATE_POLICY_RCVD_S4 4
+#define ME_HFS2_STATE_POLICY_RCVD_S5 5
+#define ME_HFS2_STATE_POLICY_RCVD_UPD 6
+#define ME_HFS2_STATE_POLICY_RCVD_PCR 7
+#define ME_HFS2_STATE_POLICY_RCVD_NPCR 8
+#define ME_HFS2_STATE_POLICY_RCVD_HOST_WAKE 9
+#define ME_HFS2_STATE_POLICY_RCVD_AC_DC 0xa
+#define ME_HFS2_STATE_POLICY_RCVD_DID 0xb
+#define ME_HFS2_STATE_POLICY_VSCC_NOT_FOUND 0xc
+#define ME_HFS2_STATE_POLICY_VSCC_INVALID 0xd
+#define ME_HFS2_STATE_POLICY_FPB_ERR 0xe
+#define ME_HFS2_STATE_POLICY_DESCRIPTOR_ERR 0xf
+#define ME_HFS2_STATE_POLICY_VSCC_NO_MATCH 0x10
+/* Current PM Event Values */
+#define ME_HFS2_PMEVENT_CLEAN_MOFF_MX_WAKE 0
+#define ME_HFS2_PMEVENT_MOFF_MX_WAKE_ERROR 1
+#define ME_HFS2_PMEVENT_CLEAN_GLOBAL_RESET 2
+#define ME_HFS2_PMEVENT_CLEAN_GLOBAL_RESET_ERROR 3
+#define ME_HFS2_PMEVENT_CLEAN_ME_RESET 4
+#define ME_HFS2_PMEVENT_ME_RESET_EXCEPTION 5
+#define ME_HFS2_PMEVENT_PSEUDO_ME_RESET 6
+#define ME_HFS2_PMEVENT_S0MO_SXM3 7
+#define ME_HFS2_PMEVENT_SXM3_S0M0 8
+#define ME_HFS2_PMEVENT_NON_PWR_CYCLE_RESET 9
+#define ME_HFS2_PMEVENT_PWR_CYCLE_RESET_M3 0xa
+#define ME_HFS2_PMEVENT_PWR_CYCLE_RESET_MOFF 0xb
+#define ME_HFS2_PMEVENT_SXMX_SXMOFF 0xc
+
+struct me_hfs2 {
+ u32 bist_in_progress: 1;
+ u32 reserved1: 2;
+ u32 invoke_mebx: 1;
+ u32 cpu_replaced_sts: 1;
+ u32 mbp_rdy: 1;
+ u32 mfs_failure: 1;
+ u32 warm_reset_request: 1;
+ u32 cpu_replaced_valid: 1;
+ u32 reserved2: 4;
+ u32 mbp_cleared: 1;
+ u32 reserved3: 2;
+ u32 current_state: 8;
+ u32 current_pmevent: 4;
+ u32 progress_code: 4;
+} __attribute__ ((packed));
+
+#define PCI_ME_H_GS2 0x70
+#define PCI_ME_MBP_GIVE_UP 0x01
+
+#define PCI_ME_HERES 0xbc
+#define PCI_ME_EXT_SHA1 0x00
+#define PCI_ME_EXT_SHA256 0x02
+#define PCI_ME_HER(x) (0xc0+(4*(x)))
+
+struct me_heres {
+ u32 extend_reg_algorithm: 4;
+ u32 reserved: 26;
+ u32 extend_feature_present: 1;
+ u32 extend_reg_valid: 1;
+} __attribute__ ((packed));
+
+/*
+ * Management Engine MEI registers
+ */
+
+#define MEI_H_CB_WW 0x00
+#define MEI_H_CSR 0x04
+#define MEI_ME_CB_RW 0x08
+#define MEI_ME_CSR_HA 0x0c
+
+struct mei_csr {
+ u32 interrupt_enable: 1;
+ u32 interrupt_status: 1;
+ u32 interrupt_generate: 1;
+ u32 ready: 1;
+ u32 reset: 1;
+ u32 reserved: 3;
+ u32 buffer_read_ptr: 8;
+ u32 buffer_write_ptr: 8;
+ u32 buffer_depth: 8;
+} __attribute__ ((packed));
+
+#define MEI_ADDRESS_CORE 0x01
+#define MEI_ADDRESS_AMT 0x02
+#define MEI_ADDRESS_RESERVED 0x03
+#define MEI_ADDRESS_WDT 0x04
+#define MEI_ADDRESS_MKHI 0x07
+#define MEI_ADDRESS_ICC 0x08
+#define MEI_ADDRESS_THERMAL 0x09
+
+#define MEI_HOST_ADDRESS 0
+
+struct mei_header {
+ u32 client_address: 8;
+ u32 host_address: 8;
+ u32 length: 9;
+ u32 reserved: 6;
+ u32 is_complete: 1;
+} __attribute__ ((packed));
+
+#define MKHI_GROUP_ID_CBM 0x00
+#define MKHI_GROUP_ID_FWCAPS 0x03
+#define MKHI_GROUP_ID_MDES 0x08
+#define MKHI_GROUP_ID_GEN 0xff
+
+#define MKHI_GLOBAL_RESET 0x0b
+
+#define MKHI_FWCAPS_GET_RULE 0x02
+
+#define MKHI_MDES_ENABLE 0x09
+
+#define MKHI_GET_FW_VERSION 0x02
+#define MKHI_END_OF_POST 0x0c
+#define MKHI_FEATURE_OVERRIDE 0x14
+
+struct mkhi_header {
+ u32 group_id: 8;
+ u32 command: 7;
+ u32 is_response: 1;
+ u32 reserved: 8;
+ u32 result: 8;
+} __attribute__ ((packed));
+
+struct me_fw_version {
+ u16 code_minor;
+ u16 code_major;
+ u16 code_build_number;
+ u16 code_hot_fix;
+ u16 recovery_minor;
+ u16 recovery_major;
+ u16 recovery_build_number;
+ u16 recovery_hot_fix;
+} __attribute__ ((packed));
+
+/* ICC Messages */
+#define ICC_SET_CLOCK_ENABLES 0x3
+#define ICC_API_VERSION_LYNXPOINT 0x00030000
+
+struct icc_header {
+ u32 api_version;
+ u32 icc_command;
+ u32 icc_status;
+ u32 length;
+ u32 reserved;
+} __attribute__ ((packed));
+
+struct icc_clock_enables_msg {
+ u32 clock_enables;
+ u32 clock_mask;
+ u32 no_response: 1;
+ u32 reserved: 31;
+} __attribute__ ((packed));
+
+#define HECI_EOP_STATUS_SUCCESS 0x0
+#define HECI_EOP_PERFORM_GLOBAL_RESET 0x1
+
+#define CBM_RR_GLOBAL_RESET 0x01
+
+#define GLOBAL_RESET_BIOS_MRC 0x01
+#define GLOBAL_RESET_BIOS_POST 0x02
+#define GLOBAL_RESET_MEBX 0x03
+
+struct me_global_reset {
+ u8 request_origin;
+ u8 reset_type;
+} __attribute__ ((packed));
+
+typedef enum {
+ ME_NORMAL_BIOS_PATH,
+ ME_S3WAKE_BIOS_PATH,
+ ME_ERROR_BIOS_PATH,
+ ME_RECOVERY_BIOS_PATH,
+ ME_DISABLE_BIOS_PATH,
+ ME_FIRMWARE_UPDATE_BIOS_PATH,
+} me_bios_path;
+
+/*
+ * ME to BIOS Payload Datastructures and definitions. The ordering of the
+ * structures follows the ordering in the ME9 BWG.
+ */
+
+#define MBP_APPID_KERNEL 1
+#define MBP_APPID_INTEL_AT 3
+#define MBP_APPID_HWA 4
+#define MBP_APPID_ICC 5
+#define MBP_APPID_NFC 6
+/* Kernel items: */
+#define MBP_KERNEL_FW_VER_ITEM 1
+#define MBP_KERNEL_FW_CAP_ITEM 2
+#define MBP_KERNEL_ROM_BIST_ITEM 3
+#define MBP_KERNEL_PLAT_KEY_ITEM 4
+#define MBP_KERNEL_FW_TYPE_ITEM 5
+#define MBP_KERNEL_MFS_FAILURE_ITEM 6
+#define MBP_KERNEL_PLAT_TIME_ITEM 7
+/* Intel AT items: */
+#define MBP_INTEL_AT_STATE_ITEM 1
+/* ICC Items: */
+#define MBP_ICC_PROFILE_ITEM 1
+/* HWA Items: */
+#define MBP_HWA_REQUEST_ITEM 1
+/* NFC Items: */
+#define MBP_NFC_SUPPORT_DATA_ITEM 1
+
+#define MBP_MAKE_IDENT(appid, item) ((appid << 8) | item)
+#define MBP_IDENT(appid, item) \
+ MBP_MAKE_IDENT(MBP_APPID_##appid, MBP_##appid##_##item##_ITEM)
+
+typedef struct {
+ u32 mbp_size : 8;
+ u32 num_entries : 8;
+ u32 rsvd : 16;
+} __attribute__ ((packed)) mbp_header;
+
+typedef struct {
+ u32 app_id : 8;
+ u32 item_id : 8;
+ u32 length : 8;
+ u32 rsvd : 8;
+} __attribute__ ((packed)) mbp_item_header;
+
+typedef struct {
+ u32 major_version : 16;
+ u32 minor_version : 16;
+ u32 hotfix_version : 16;
+ u32 build_version : 16;
+} __attribute__ ((packed)) mbp_fw_version_name;
+
+typedef struct {
+ u32 full_net : 1;
+ u32 std_net : 1;
+ u32 manageability : 1;
+ u32 reserved_2 : 2;
+ u32 intel_at : 1;
+ u32 intel_cls : 1;
+ u32 reserved : 3;
+ u32 intel_mpc : 1;
+ u32 icc_over_clocking : 1;
+ u32 pavp : 1;
+ u32 reserved_1 : 4;
+ u32 ipv6 : 1;
+ u32 kvm : 1;
+ u32 och : 1;
+ u32 vlan : 1;
+ u32 tls : 1;
+ u32 reserved_4 : 1;
+ u32 wlan : 1;
+ u32 reserved_5 : 8;
+} __attribute__ ((packed)) mbp_mefwcaps;
+
+typedef struct {
+ u16 device_id;
+ u16 fuse_test_flags;
+ u32 umchid[4];
+} __attribute__ ((packed)) mbp_rom_bist_data;
+
+typedef struct {
+ u32 key[8];
+} mbp_platform_key;
+
+typedef struct {
+ u32 mobile: 1;
+ u32 desktop: 1;
+ u32 server: 1;
+ u32 workstation: 1;
+ u32 corporate: 1;
+ u32 consumer: 1;
+ u32 regular_super_sku: 1;
+ u32 rsvd: 1;
+ u32 image_type: 4;
+ u32 brand: 4;
+ u32 rsvd1: 16;
+} __attribute__ ((packed)) mbp_me_firmware_type;
+
+typedef struct {
+ mbp_me_firmware_type rule_data;
+ u8 available;
+} mbp_plat_type;
+
+typedef struct {
+ u16 icc_start_address;
+ u16 mask;
+} __attribute__ ((packed)) icc_address_mask;
+
+typedef struct {
+ u8 num_icc_profiles;
+ u8 icc_profile_soft_strap;
+ u8 icc_profile_index;
+ u8 reserved;
+ u32 icc_reg_bundles;
+ icc_address_mask icc_address_mask[0];
+} __attribute__ ((packed)) mbp_icc_profile;
+
+typedef struct {
+ u16 lock_state : 1;
+ u16 authenticate_module : 1;
+ u16 s3authentication : 1;
+ u16 flash_wear_out : 1;
+ u16 flash_variable_security : 1;
+ u16 reserved : 11;
+} __attribute__ ((packed)) tdt_state_flag;
+
+typedef struct {
+ u8 state;
+ u8 last_theft_trigger;
+ tdt_state_flag flags;
+} __attribute__ ((packed)) mbp_at_state;
+
+typedef struct {
+ u32 wake_event_mrst_time_ms;
+ u32 mrst_pltrst_time_ms;
+ u32 pltrst_cpurst_time_ms;
+} __attribute__ ((packed)) mbp_plat_time;
+
+typedef struct {
+ u32 device_type : 2;
+ u32 reserved : 30;
+} __attribute__ ((packed)) mbp_nfc_data;
+
+typedef struct {
+ mbp_fw_version_name *fw_version_name;
+ mbp_mefwcaps *fw_capabilities;
+ mbp_rom_bist_data *rom_bist_data;
+ mbp_platform_key *platform_key;
+ mbp_plat_type *fw_plat_type;
+ mbp_icc_profile *icc_profile;
+ mbp_at_state *at_state;
+ u32 *mfsintegrity;
+ mbp_plat_time *plat_time;
+ mbp_nfc_data *nfc_data;
+} me_bios_payload;
+
+struct me_fwcaps {
+ u32 id;
+ u8 length;
+ mbp_mefwcaps caps_sku;
+ u8 reserved[3];
+} __attribute__ ((packed));
+
+void intel_me_finalize(void);
+
+#if (CONFIG_DEFAULT_CONSOLE_LOGLEVEL >= BIOS_DEBUG)
+/* Defined in me_status.c for both romstage and ramstage */
+void intel_me_status(void);
+#else
+static inline void intel_me_status(void) { }
+#endif
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/msr.h b/src/soc/intel/broadwell/broadwell/msr.h
new file mode 100644
index 0000000..707041a
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/msr.h
@@ -0,0 +1,109 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_MSR_H_
+#define _BROADWELL_MSR_H_
+
+#define MSR_PIC_MSG_CONTROL 0x2e
+#define CORE_THREAD_COUNT_MSR 0x35
+#define IA32_FEATURE_CONTROL 0x3a
+#define CPUID_VMX (1 << 5)
+#define CPUID_SMX (1 << 6)
+#define MSR_PLATFORM_INFO 0xce
+#define PLATFORM_INFO_SET_TDP (1 << 29)
+#define MSR_PMG_CST_CONFIG_CONTROL 0xe2
+#define MSR_PMG_IO_CAPTURE_BASE 0xe4
+#define MSR_FEATURE_CONFIG 0x13c
+#define SMM_MCA_CAP_MSR 0x17d
+#define SMM_CPU_SVRSTR_BIT 57
+#define SMM_CPU_SVRSTR_MASK (1 << (SMM_CPU_SVRSTR_BIT - 32))
+#define MSR_FLEX_RATIO 0x194
+#define FLEX_RATIO_LOCK (1 << 20)
+#define FLEX_RATIO_EN (1 << 16)
+#define IA32_MISC_ENABLE 0x1a0
+#define MSR_MISC_PWR_MGMT 0x1aa
+#define MISC_PWR_MGMT_EIST_HW_DIS (1 << 0)
+#define MSR_TURBO_RATIO_LIMIT 0x1ad
+#define MSR_TEMPERATURE_TARGET 0x1a2
+#define IA32_PERF_CTL 0x199
+#define IA32_THERM_INTERRUPT 0x19b
+#define IA32_ENERGY_PERFORMANCE_BIAS 0x1b0
+#define ENERGY_POLICY_PERFORMANCE 0
+#define ENERGY_POLICY_NORMAL 6
+#define ENERGY_POLICY_POWERSAVE 15
+#define IA32_PACKAGE_THERM_INTERRUPT 0x1b2
+#define EMRRphysBase_MSR 0x1f4
+#define EMRRphysMask_MSR 0x1f5
+#define IA32_PLATFORM_DCA_CAP 0x1f8
+#define MSR_POWER_CTL 0x1fc
+#define MSR_LT_LOCK_MEMORY 0x2e7
+#define UNCORE_EMRRphysBase_MSR 0x2f4
+#define UNCORE_EMRRphysMask_MSR 0x2f5
+#define IA32_MC0_STATUS 0x401
+#define SMM_FEATURE_CONTROL_MSR 0x4e0
+#define SMM_CPU_SAVE_EN (1 << 1)
+
+#define MSR_C_STATE_LATENCY_CONTROL_0 0x60a
+#define MSR_C_STATE_LATENCY_CONTROL_1 0x60b
+#define MSR_C_STATE_LATENCY_CONTROL_2 0x60c
+#define MSR_C_STATE_LATENCY_CONTROL_3 0x633
+#define MSR_C_STATE_LATENCY_CONTROL_4 0x634
+#define MSR_C_STATE_LATENCY_CONTROL_5 0x635
+#define IRTL_VALID (1 << 15)
+#define IRTL_1_NS (0 << 10)
+#define IRTL_32_NS (1 << 10)
+#define IRTL_1024_NS (2 << 10)
+#define IRTL_32768_NS (3 << 10)
+#define IRTL_1048576_NS (4 << 10)
+#define IRTL_33554432_NS (5 << 10)
+#define IRTL_RESPONSE_MASK (0x3ff)
+#define MSR_COUNTER_24_MHZ 0x637
+
+/* long duration in low dword, short duration in high dword */
+#define MSR_PKG_POWER_LIMIT 0x610
+#define PKG_POWER_LIMIT_MASK 0x7fff
+#define PKG_POWER_LIMIT_EN (1 << 15)
+#define PKG_POWER_LIMIT_CLAMP (1 << 16)
+#define PKG_POWER_LIMIT_TIME_SHIFT 17
+#define PKG_POWER_LIMIT_TIME_MASK 0x7f
+
+#define MSR_VR_CURRENT_CONFIG 0x601
+#define MSR_VR_MISC_CONFIG 0x603
+#define MSR_PKG_POWER_SKU_UNIT 0x606
+#define MSR_PKG_POWER_SKU 0x614
+#define MSR_DDR_RAPL_LIMIT 0x618
+#define MSR_VR_MISC_CONFIG2 0x636
+#define MSR_PP0_POWER_LIMIT 0x638
+#define MSR_PP1_POWER_LIMIT 0x640
+
+#define MSR_CONFIG_TDP_NOMINAL 0x648
+#define MSR_CONFIG_TDP_LEVEL1 0x649
+#define MSR_CONFIG_TDP_LEVEL2 0x64a
+#define MSR_CONFIG_TDP_CONTROL 0x64b
+#define MSR_TURBO_ACTIVATION_RATIO 0x64c
+
+/* SMM save state MSRs */
+#define SMBASE_MSR 0xc20
+#define IEDBASE_MSR 0xc22
+
+/* MTRRcap_MSR bits */
+#define SMRR_SUPPORTED (1<<11)
+#define EMRR_SUPPORTED (1<<12)
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/nvs.h b/src/soc/intel/broadwell/broadwell/nvs.h
new file mode 100644
index 0000000..34594cd
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/nvs.h
@@ -0,0 +1,70 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_NVS_H_
+#define _BROADWELL_NVS_H_
+
+#include <vendorcode/google/chromeos/gnvs.h>
+#include <broadwell/device_nvs.h>
+
+typedef struct {
+ /* Miscellaneous */
+ u16 osys; /* 0x00 - Operating System */
+ u8 smif; /* 0x02 - SMI function call ("TRAP") */
+ u8 prm0; /* 0x03 - SMI function call parameter */
+ u8 prm1; /* 0x04 - SMI function call parameter */
+ u8 scif; /* 0x05 - SCI function call (via _L00) */
+ u8 prm2; /* 0x06 - SCI function call parameter */
+ u8 prm3; /* 0x07 - SCI function call parameter */
+ u8 lckf; /* 0x08 - Global Lock function for EC */
+ u8 prm4; /* 0x09 - Lock function parameter */
+ u8 prm5; /* 0x0a - Lock function parameter */
+ u8 pcnt; /* 0x0b - Processor Count */
+ u8 ppcm; /* 0x0c - Max PPC State */
+ u8 tmps; /* 0x0d - Temperature Sensor ID */
+ u8 tlvl; /* 0x0e - Throttle Level Limit */
+ u8 flvl; /* 0x0f - Current FAN Level */
+ u8 tcrt; /* 0x10 - Critical Threshold */
+ u8 tpsv; /* 0x11 - Passive Threshold */
+ u8 tmax; /* 0x12 - CPU Tj_max */
+ u8 tpmp; /* 0x13 - TPM Present */
+ u8 s5u0; /* 0x14 - Enable USB in S5 */
+ u8 s3u0; /* 0x15 - Enable USB in S3 */
+ u8 s33g; /* 0x16 - Enable 3G in S3 */
+ u8 lids; /* 0x17 - LID State */
+ u8 pwrs; /* 0x18 - AC Power State */
+ u32 cmem; /* 0x19 - 0x1c - CBMEM TOC */
+ u32 cbmc; /* 0x1d - 0x20 - Coreboot Memory Console */
+ u32 pm1i; /* 0x21 - 0x24 - PM1 wake status bit */
+ u8 rsvd3[219];
+
+ /* ChromeOS specific (0x100 - 0xfff) */
+ chromeos_acpi_t chromeos;
+
+ /* Device specific (0x1000) */
+ device_nvs_t dev;
+} __attribute__((packed)) global_nvs_t;
+
+#ifdef __SMM__
+/* Used in SMM to find the ACPI GNVS address */
+global_nvs_t *smm_get_gnvs(void);
+#endif
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/pch.h b/src/soc/intel/broadwell/broadwell/pch.h
new file mode 100644
index 0000000..e677215
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/pch.h
@@ -0,0 +1,52 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_PCH_H_
+#define _BROADWELL_PCH_H_
+
+/* Haswell ULT Pch (LynxPoint-LP) */
+#define PCH_LPT_LP_SAMPLE 0x9c41
+#define PCH_LPT_LP_PREMIUM 0x9c43
+#define PCH_LPT_LP_MAINSTREAM 0x9c45
+#define PCH_LPT_LP_VALUE 0x9c47
+
+/* Broadwell PCH (WildatPoint) */
+#define PCH_WPT_HSW_U_SAMPLE 0x9cc1
+#define PCH_WPT_BDW_U_SAMPLE 0x9cc2
+#define PCH_WPT_BDW_U_PREMIUM 0x9cc3
+#define PCH_WPT_BDW_U_BASE 0x9cc5
+#define PCH_WPT_BDW_Y_SAMPLE 0x9cc6
+#define PCH_WPT_BDW_Y_PREMIUM 0x9cc7
+#define PCH_WPT_BDW_Y_BASE 0x9cc9
+#define PCH_WPT_BDW_H 0x9ccb
+
+/* Power Management Control and Status */
+#define PCH_PCS 0x84
+#define PCH_PCS_PS_D3HOT 3
+
+u8 pch_revision(void);
+u16 pch_type(void);
+int pch_is_wpt(void);
+int pch_is_wpt_ulx(void);
+u32 pch_read_soft_strap(int id);
+void pch_log_state(void);
+void pch_disable_devfn(device_t dev);
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/pci_devs.h b/src/soc/intel/broadwell/broadwell/pci_devs.h
new file mode 100644
index 0000000..9c3dd06
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/pci_devs.h
@@ -0,0 +1,69 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_PCI_DEVS_H_
+#define _BROADWELL_PCI_DEVS_H_
+
+#if defined(__PRE_RAM__) || defined(__SMM__) || defined(__ROMCC__)
+#include <arch/io.h>
+#define _SA_DEV(slot) PCI_DEV(0, SA_DEV_SLOT_ ## slot, 0)
+#define _PCH_DEV(slot,func) PCI_DEV(0, PCH_DEV_SLOT_ ## slot, func)
+#else
+#include <device/device.h>
+#include <device/pci_def.h>
+#define _SA_DEV(slot) dev_find_slot(0, \
+ PCI_DEVFN(SA_DEV_SLOT_ ## slot, 0))
+#define _PCH_DEV(slot,func) dev_find_slot(0, \
+ PCI_DEVFN(PCH_DEV_SLOT_ ## slot, func))
+#endif
+
+/* System Agent Devices */
+
+#define SA_DEV_SLOT_ROOT 0x00
+#define SA_DEV_SLOT_IGD 0x02
+#define SA_DEV_SLOT_MINIHD 0x03
+
+#define SA_DEV_ROOT _SA_DEV(ROOT)
+#define SA_DEV_IGD _SA_DEV(IGD)
+#define SA_DEV_MINIHD _SA_DEV(MINIHD)
+
+/* PCH Devices */
+
+#define PCH_DEV_SLOT_XHCI 0x14
+#define PCH_DEV_SLOT_SIO 0x15
+#define PCH_DEV_SLOT_ME 0x16
+#define PCH_DEV_SLOT_HDA 0x1b
+#define PCH_DEV_SLOT_PCIE 0x1c
+#define PCH_DEV_SLOT_EHCI 0x1d
+#define PCH_DEV_SLOT_LPC 0x1f
+
+#define PCH_DEV_XHCI _PCH_DEV(XHCI, 0)
+#define PCH_DEV_UART0 _PCH_DEV(UART0, 0)
+#define PCH_DEV_UART1 _PCH_DEV(UART1, 0)
+#define PCH_DEV_ME _PCH_DEV(ME, 0)
+#define PCH_DEV_HDA _PCH_DEV(HDA, 0)
+#define PCH_DEV_EHCI _PCH_DEV(EHCI, 0)
+#define PCH_DEV_LPC _PCH_DEV(LPC, 0)
+#define PCH_DEV_IDE _PCH_DEV(LPC, 1)
+#define PCH_DEV_SATA _PCH_DEV(LPC, 2)
+#define PCH_DEV_SMBUS _PCH_DEV(LPC, 3)
+#define PCH_DEV_SATA2 _PCH_DEV(LPC, 5)
+#define PCH_DEV_THERMAL _PCH_DEV(LPC, 6)
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/pei_data.h b/src/soc/intel/broadwell/broadwell/pei_data.h
new file mode 100644
index 0000000..f8e6306
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/pei_data.h
@@ -0,0 +1,177 @@
+/*
+ * Broadwell UEFI PEI wrapper
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Google Inc. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PEI_DATA_H
+#define PEI_DATA_H
+
+#include <types.h>
+
+#define PEI_VERSION 20
+
+#define ABI_X86 __attribute__((regparm(0)))
+
+typedef void ABI_X86 (*tx_byte_func)(unsigned char byte);
+
+enum board_type {
+ BOARD_TYPE_CRB_MOBILE = 0, /* CRB Mobile */
+ BOARD_TYPE_CRB_DESKTOP, /* CRB Desktop */
+ BOARD_TYPE_USER1, /* SV mobile */
+ BOARD_TYPE_USER2, /* SV desktop */
+ BOARD_TYPE_USER3, /* SV server */
+ BOARD_TYPE_ULT, /* ULT */
+ BOARD_TYPE_CRB_EMBDEDDED, /* CRB Embedded */
+ BOARD_TYPE_UNKNOWN,
+};
+
+#define MAX_USB2_PORTS 14
+#define MAX_USB3_PORTS 6
+#define USB_OC_PIN_SKIP 8
+
+enum usb2_port_location {
+ USB_PORT_BACK_PANEL = 0,
+ USB_PORT_FRONT_PANEL,
+ USB_PORT_DOCK,
+ USB_PORT_MINI_PCIE,
+ USB_PORT_FLEX,
+ USB_PORT_INTERNAL,
+ USB_PORT_SKIP,
+ USB_PORT_NGFF_DEVICE_DOWN,
+};
+
+struct usb2_port_setting {
+ /*
+ * Usb Port Length:
+ * [16:4] = length in inches in octal format
+ * [3:0] = decimal point
+ */
+ uint16_t length;
+ uint8_t enable;
+ uint8_t oc_pin;
+ uint8_t location;
+} __attribute__((packed));
+
+struct usb3_port_setting {
+ uint8_t enable;
+ uint8_t oc_pin;
+ /*
+ * Set to 0 if trace length is > 5 inches
+ * Set to 1 if trace length is <= 5 inches
+ */
+ uint8_t fixed_eq;
+} __attribute__((packed));
+
+struct pei_data
+{
+ uint32_t pei_version;
+
+ enum board_type board_type;
+ int boot_mode;
+ int ec_present;
+ int usbdebug;
+
+ /* Base addresses */
+ uint32_t pciexbar;
+ uint16_t smbusbar;
+ uint32_t xhcibar;
+ uint32_t ehcibar;
+ uint32_t gttbar;
+ uint32_t rcba;
+ uint32_t pmbase;
+ uint32_t gpiobase;
+ uint32_t temp_mmio_base;
+ uint32_t tseg_size;
+
+ /*
+ * 0 = leave channel enabled
+ * 1 = disable dimm 0 on channel
+ * 2 = disable dimm 1 on channel
+ * 3 = disable dimm 0+1 on channel
+ */
+ int dimm_channel0_disabled;
+ int dimm_channel1_disabled;
+ /* Set to 0 for memory down */
+ uint8_t spd_addresses[4];
+ /* Enable 2x Refresh Mode */
+ int ddr_refresh_2x;
+ /* DQ pins are interleaved on board */
+ int dq_pins_interleaved;
+ /* Limit DDR3 frequency */
+ int max_ddr3_freq;
+
+ /* USB port configuration */
+ struct usb2_port_setting usb2_ports[MAX_USB2_PORTS];
+ struct usb3_port_setting usb3_ports[MAX_USB3_PORTS];
+
+ /* Console output function */
+ tx_byte_func tx_byte;
+
+ /*
+ * DIMM SPD data for memory down configurations
+ * [CHANNEL][SLOT][SPD]
+ */
+ uint8_t spd_data[2][2][512];
+
+ /*
+ * LPDDR3 DQ byte map
+ * [CHANNEL][ITERATION][2]
+ *
+ * Maps which PI clocks are used by what LPDDR DQ Bytes (from CPU side)
+ * DQByteMap[0] - ClkDQByteMap:
+ * - If clock is per rank, program to [0xFF, 0xFF]
+ * - If clock is shared by 2 ranks, program to [0xFF, 0] or [0, 0xFF]
+ * - If clock is shared by 2 ranks but does not go to all bytes,
+ * Entry[i] defines which DQ bytes Group i services
+ * DQByteMap[1] - CmdNDQByteMap: [0] is CmdN/CAA and [1] is CmdN/CAB
+ * DQByteMap[2] - CmdSDQByteMap: [0] is CmdS/CAA and [1] is CmdS/CAB
+ * DQByteMap[3] - CkeDQByteMap : [0] is CKE /CAA and [1] is CKE /CAB
+ * For DDR, DQByteMap[3:1] = [0xFF, 0]
+ * DQByteMap[4] - CtlDQByteMap : Always program to [0xFF, 0]
+ * since we have 1 CTL / rank
+ * DQByteMap[5] - CmdVDQByteMap: Always program to [0xFF, 0]
+ * since we have 1 CA Vref
+ */
+ uint8_t dq_map[2][6][2];
+
+ /*
+ * LPDDR3 Map from CPU DQS pins to SDRAM DQS pins
+ * [CHANNEL][MAX_BYTES]
+ */
+ uint8_t dqs_map[2][8];
+
+ /* Data read from flash and passed into MRC */
+ const void *saved_data;
+ int saved_data_size;
+
+ /* Data from MRC that should be saved to flash */
+ void *data_to_save;
+ int data_to_save_size;
+} __attribute__((packed));
+
+typedef struct pei_data PEI_DATA;
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/pei_wrapper.h b/src/soc/intel/broadwell/broadwell/pei_wrapper.h
new file mode 100644
index 0000000..9791fa5
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/pei_wrapper.h
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_PEI_WRAPPER_H_
+#define _BROADWELL_PEI_WRAPPER_H_
+
+#include <broadwell/pei_data.h>
+
+typedef int ABI_X86 (*pei_wrapper_entry_t)(struct pei_data *pei_data);
+
+static inline void pei_data_usb2_port(struct pei_data *pei_data, int port,
+ uint16_t length, uint8_t enable,
+ uint8_t oc_pin, uint8_t location)
+{
+ pei_data->usb2_ports[port].length = length;
+ pei_data->usb2_ports[port].enable = enable;
+ pei_data->usb2_ports[port].oc_pin = oc_pin;
+ pei_data->usb2_ports[port].location = location;
+}
+
+static inline void pei_data_usb3_port(struct pei_data *pei_data, int port,
+ uint8_t enable, uint8_t oc_pin,
+ uint8_t fixed_eq)
+{
+ pei_data->usb3_ports[port].enable = enable;
+ pei_data->usb3_ports[port].oc_pin = oc_pin;
+ pei_data->usb3_ports[port].fixed_eq = fixed_eq;
+}
+
+void broadwell_fill_pei_data(struct pei_data *pei_data);
+void mainboard_fill_pei_data(struct pei_data *pei_data);
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/pm.h b/src/soc/intel/broadwell/broadwell/pm.h
new file mode 100644
index 0000000..b2810f0
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/pm.h
@@ -0,0 +1,168 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_PM_H_
+#define _BROADWELL_PM_H_
+
+/* ACPI_BASE_ADDRESS / PMBASE */
+
+#define PM1_STS 0x00
+#define WAK_STS (1 << 15)
+#define PCIEXPWAK_STS (1 << 14)
+#define PRBTNOR_STS (1 << 11)
+#define RTC_STS (1 << 10)
+#define PWRBTN_STS (1 << 8)
+#define GBL_STS (1 << 5)
+#define BM_STS (1 << 4)
+#define TMROF_STS (1 << 0)
+#define PM1_EN 0x02
+#define PCIEXPWAK_DIS (1 << 14)
+#define RTC_EN (1 << 10)
+#define PWRBTN_EN (1 << 8)
+#define GBL_EN (1 << 5)
+#define TMROF_EN (1 << 0)
+#define PM1_CNT 0x04
+#define SLP_EN (1 << 13)
+#define SLP_TYP (7 << 10)
+#define SLP_TYP_SHIFT 10
+#define SLP_TYP_S0 0
+#define SLP_TYP_S1 1
+#define SLP_TYP_S3 5
+#define SLP_TYP_S4 6
+#define SLP_TYP_S5 7
+#define GBL_RLS (1 << 2)
+#define BM_RLD (1 << 1)
+#define SCI_EN (1 << 0)
+#define PM1_TMR 0x08
+#define SMI_EN 0x30
+#define XHCI_SMI_EN (1 << 31)
+#define ME_SMI_EN (1 << 30)
+#define GPIO_UNLOCK_SMI_EN (1 << 27)
+#define INTEL_USB2_EN (1 << 18)
+#define LEGACY_USB2_EN (1 << 17)
+#define PERIODIC_EN (1 << 14)
+#define TCO_EN (1 << 13)
+#define MCSMI_EN (1 << 11)
+#define BIOS_RLS (1 << 7)
+#define SWSMI_TMR_EN (1 << 6)
+#define APMC_EN (1 << 5)
+#define SLP_SMI_EN (1 << 4)
+#define LEGACY_USB_EN (1 << 3)
+#define BIOS_EN (1 << 2)
+#define EOS (1 << 1)
+#define GBL_SMI_EN (1 << 0)
+#define SMI_STS 0x34
+#define UPWRC 0x3c
+#define UPWRC_WS (1 << 8)
+#define UPWRC_WE (1 << 1)
+#define UPWRC_SMI (1 << 0)
+#define GPE_CNTL 0x42
+#define SWGPE_CTRL (1 << 1)
+#define DEVACT_STS 0x44
+#define PM2_CNT 0x50
+#define TCO1_CNT 0x60
+#define TCO_TMR_HLT (1 << 11)
+#define TCO1_STS 0x64
+#define DMISCI_STS (1 << 9)
+#define TCO2_STS 0x66
+#define TCO2_STS_SECOND_TO (1 << 1)
+
+#define GPE0_STS(x) (0x80 + x)
+#define GPE_31_0 0 /* 0x80/0x90 = GPE[31:0] */
+#define GPE_63_32 1 /* 0x80/0x90 = GPE[63:32] */
+#define GPE_94_64 2 /* 0x80/0x90 = GPE[94:64] */
+#define GPE_STD 3 /* 0x80/0x90 = Standard GPE */
+#define WADT_STS (1 << 18)
+#define GP27_STS (1 << 16)
+#define PME_B0_STS (1 << 13)
+#define ME_SCI_STS (1 << 12)
+#define PME_STS (1 << 11)
+#define BATLOW_STS (1 << 10)
+#define PCI_EXP_STS (1 << 9)
+#define SMB_WAK_STS (1 << 7)
+#define TCOSCI_STS (1 << 6)
+#define SWGPE_STS (1 << 2)
+#define HOT_PLUG_STS (1 << 1)
+#define GPE0_EN(x) (0x90 + x)
+#define WADT_en (1 << 18)
+#define GP27_EN (1 << 16)
+#define PME_B0_EN (1 << 13)
+#define ME_SCI_EN (1 << 12)
+#define PME_EN (1 << 11)
+#define BATLOW_EN (1 << 10)
+#define PCI_EXP_EN (1 << 9)
+#define TCOSCI_EN (1 << 6)
+#define SWGPE_EN (1 << 2)
+#define HOT_PLUG_EN (1 << 1)
+
+#define MAINBOARD_POWER_OFF 0
+#define MAINBOARD_POWER_ON 1
+#define MAINBOARD_POWER_KEEP 2
+
+#define SLEEP_STATE_S0 0
+#define SLEEP_STATE_S3 3
+#define SLEEP_STATE_S5 5
+
+struct chipset_power_state {
+ uint16_t pm1_sts;
+ uint16_t pm1_en;
+ uint32_t pm1_cnt;
+ uint32_t tco1_sts;
+ uint32_t tco2_sts;
+ uint32_t gpe0_sts[4];
+ uint32_t gpe0_en[4];
+ uint16_t gen_pmcon1;
+ uint16_t gen_pmcon2;
+ uint16_t gen_pmcon3;
+ int prev_sleep_state;
+};
+
+/* PM1_CNT */
+void enable_pm1_control(uint32_t mask);
+void disable_pm1_control(uint32_t mask);
+
+/* PM1 */
+uint16_t clear_pm1_status(void);
+void enable_pm1(uint16_t events);
+uint32_t clear_smi_status(void);
+
+/* SMI */
+void enable_smi(uint32_t mask);
+void disable_smi(uint32_t mask);
+
+/* ALT_GP_SMI */
+uint32_t clear_alt_smi_status(void);
+void enable_alt_smi(uint32_t mask);
+
+/* TCO */
+uint32_t clear_tco_status(void);
+void enable_tco_sci(void);
+
+/* GPE0 */
+uint32_t clear_gpe_status(void);
+void clear_gpe_enable(void);
+void enable_all_gpe(uint32_t set1, uint32_t set2, uint32_t set3, uint32_t set4);
+void disable_all_gpe(void);
+void enable_gpe(uint32_t mask);
+void disable_gpe(uint32_t mask);
+
+/* Return the selected ACPI SCI IRQ */
+int acpi_sci_irq(void);
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/ramstage.h b/src/soc/intel/broadwell/broadwell/ramstage.h
new file mode 100644
index 0000000..685de14
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/ramstage.h
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_RAMSTAGE_H_
+#define _BROADWELL_RAMSTAGE_H_
+
+#include <device/device.h>
+#include <chip.h>
+
+void broadwell_init_pre_device(void *chip_info);
+void broadwell_init_cpus(device_t dev);
+void broadwell_pch_enable_dev(device_t dev);
+
+#if CONFIG_HAVE_REFCODE_BLOB
+void broadwell_run_reference_code(void);
+#else
+static inline void broadwell_run_reference_code(void) { }
+#endif
+
+extern struct pci_operations broadwell_pci_ops;
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/rcba.h b/src/soc/intel/broadwell/broadwell/rcba.h
new file mode 100644
index 0000000..f2c7343
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/rcba.h
@@ -0,0 +1,166 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_RCBA_H_
+#define _BROADWELL_RCBA_H_
+
+#include <broadwell/iomap.h>
+
+#define RCBA8(x) *((volatile u8 *)(RCBA_BASE_ADDRESS + x))
+#define RCBA16(x) *((volatile u16 *)(RCBA_BASE_ADDRESS + x))
+#define RCBA32(x) *((volatile u32 *)(RCBA_BASE_ADDRESS + x))
+
+#define RCBA_AND_OR(bits, x, and, or) \
+ RCBA##bits(x) = ((RCBA##bits(x) & (and)) | (or))
+#define RCBA8_AND_OR(x, and, or) RCBA_AND_OR(8, x, and, or)
+#define RCBA16_AND_OR(x, and, or) RCBA_AND_OR(16, x, and, or)
+#define RCBA32_AND_OR(x, and, or) RCBA_AND_OR(32, x, and, or)
+#define RCBA32_OR(x, or) RCBA_AND_OR(32, x, ~0UL, or)
+
+#define RPC 0x0400 /* 32bit */
+#define RPFN 0x0404 /* 32bit */
+
+/* Root Port configuratinon space hide */
+#define RPFN_HIDE(port) (1 << (((port) * 4) + 3))
+/* Get the function number assigned to a Root Port */
+#define RPFN_FNGET(reg,port) (((reg) >> ((port) * 4)) & 7)
+/* Set the function number for a Root Port */
+#define RPFN_FNSET(port,func) (((func) & 7) << ((port) * 4))
+/* Root Port function number mask */
+#define RPFN_FNMASK(port) (7 << ((port) * 4))
+
+#define NOINT 0
+#define INTA 1
+#define INTB 2
+#define INTC 3
+#define INTD 4
+
+#define DIR_IDR 12 /* Interrupt D Pin Offset */
+#define DIR_ICR 8 /* Interrupt C Pin Offset */
+#define DIR_IBR 4 /* Interrupt B Pin Offset */
+#define DIR_IAR 0 /* Interrupt A Pin Offset */
+
+#define PIRQA 0
+#define PIRQB 1
+#define PIRQC 2
+#define PIRQD 3
+#define PIRQE 4
+#define PIRQF 5
+#define PIRQG 6
+#define PIRQH 7
+
+/* IO Buffer Programming */
+#define IOBPIRI 0x2330
+#define IOBPD 0x2334
+#define IOBPS 0x2338
+#define IOBPS_READY 0x0001
+#define IOBPS_TX_MASK 0x0006
+#define IOBPS_MASK 0xff00
+#define IOBPS_READ 0x0600
+#define IOBPS_WRITE 0x0700
+#define IOBPU 0x233a
+#define IOBPU_MAGIC 0xf000
+
+#define D31IP 0x3100 /* 32bit */
+#define D31IP_TTIP 24 /* Thermal Throttle Pin */
+#define D31IP_SIP2 20 /* SATA Pin 2 */
+#define D31IP_SMIP 12 /* SMBUS Pin */
+#define D31IP_SIP 8 /* SATA Pin */
+#define D30IP 0x3104 /* 32bit */
+#define D30IP_PIP 0 /* PCI Bridge Pin */
+#define D29IP 0x3108 /* 32bit */
+#define D29IP_E1P 0 /* EHCI #1 Pin */
+#define D28IP 0x310c /* 32bit */
+#define D28IP_P8IP 28 /* PCI Express Port 8 */
+#define D28IP_P7IP 24 /* PCI Express Port 7 */
+#define D28IP_P6IP 20 /* PCI Express Port 6 */
+#define D28IP_P5IP 16 /* PCI Express Port 5 */
+#define D28IP_P4IP 12 /* PCI Express Port 4 */
+#define D28IP_P3IP 8 /* PCI Express Port 3 */
+#define D28IP_P2IP 4 /* PCI Express Port 2 */
+#define D28IP_P1IP 0 /* PCI Express Port 1 */
+#define D27IP 0x3110 /* 32bit */
+#define D27IP_ZIP 0 /* HD Audio Pin */
+#define D26IP 0x3114 /* 32bit */
+#define D26IP_E2P 0 /* EHCI #2 Pin */
+#define D25IP 0x3118 /* 32bit */
+#define D25IP_LIP 0 /* GbE LAN Pin */
+#define D22IP 0x3124 /* 32bit */
+#define D22IP_KTIP 12 /* KT Pin */
+#define D22IP_IDERIP 8 /* IDE-R Pin */
+#define D22IP_MEI2IP 4 /* MEI #2 Pin */
+#define D22IP_MEI1IP 0 /* MEI #1 Pin */
+#define D20IP 0x3128 /* 32bit */
+#define D20IP_XHCI 0 /* XHCI Pin */
+#define D31IR 0x3140 /* 16bit */
+#define D30IR 0x3142 /* 16bit */
+#define D29IR 0x3144 /* 16bit */
+#define D28IR 0x3146 /* 16bit */
+#define D27IR 0x3148 /* 16bit */
+#define D26IR 0x314c /* 16bit */
+#define D25IR 0x3150 /* 16bit */
+#define D23IR 0x3158 /* 16bit */
+#define D22IR 0x315c /* 16bit */
+#define D20IR 0x3160 /* 16bit */
+#define D21IR 0x3164 /* 16bit */
+#define D19IR 0x3168 /* 16bit */
+#define ACPIIRQEN 0x31e0 /* 32bit */
+#define OIC 0x31fe /* 16bit */
+#define PMSYNC_CONFIG 0x33c4 /* 32bit */
+#define PMSYNC_CONFIG2 0x33cc /* 32bit */
+#define SOFT_RESET_CTRL 0x38f4
+#define SOFT_RESET_DATA 0x38f8
+
+#define DIR_ROUTE(a,b,c,d) \
+ (((d) << DIR_IDR) | ((c) << DIR_ICR) | \
+ ((b) << DIR_IBR) | ((a) << DIR_IAR))
+
+#define RC 0x3400 /* 32bit */
+#define HPTC 0x3404 /* 32bit */
+#define GCS 0x3410 /* 32bit */
+#define BUC 0x3414 /* 32bit */
+#define PCH_DISABLE_GBE (1 << 5)
+#define FD 0x3418 /* 32bit */
+#define FDSW 0x3420 /* 8bit */
+#define DISPBDF 0x3424 /* 16bit */
+#define FD2 0x3428 /* 32bit */
+#define CG 0x341c /* 32bit */
+
+/* Function Disable 1 RCBA 0x3418 */
+#define PCH_DISABLE_ALWAYS (1 << 0)
+#define PCH_DISABLE_ADSPD (1 << 1)
+#define PCH_DISABLE_SATA1 (1 << 2)
+#define PCH_DISABLE_SMBUS (1 << 3)
+#define PCH_DISABLE_HD_AUDIO (1 << 4)
+#define PCH_DISABLE_EHCI2 (1 << 13)
+#define PCH_DISABLE_LPC (1 << 14)
+#define PCH_DISABLE_EHCI1 (1 << 15)
+#define PCH_DISABLE_PCIE(x) (1 << (16 + x))
+#define PCH_DISABLE_THERMAL (1 << 24)
+#define PCH_DISABLE_SATA2 (1 << 25)
+#define PCH_DISABLE_XHCI (1 << 27)
+
+/* Function Disable 2 RCBA 0x3428 */
+#define PCH_DISABLE_KT (1 << 4)
+#define PCH_DISABLE_IDER (1 << 3)
+#define PCH_DISABLE_MEI2 (1 << 2)
+#define PCH_DISABLE_MEI1 (1 << 1)
+#define PCH_ENABLE_DBDF (1 << 0)
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/reset.h b/src/soc/intel/broadwell/broadwell/reset.h
new file mode 100644
index 0000000..6f21181
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/reset.h
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_RESET_H_
+#define _BROADWELL_RESET_H_
+
+void reset_system(void);
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/romstage.h b/src/soc/intel/broadwell/broadwell/romstage.h
new file mode 100644
index 0000000..d48ec13
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/romstage.h
@@ -0,0 +1,63 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_ROMSTAGE_H_
+#define _BROADWELL_ROMSTAGE_H_
+
+#include <stdint.h>
+#include <arch/cpu.h>
+
+#define NUM_ROMSTAGE_TS 4
+struct romstage_timestamps {
+ uint64_t times[NUM_ROMSTAGE_TS];
+ int count;
+};
+
+struct romstage_params {
+ struct romstage_timestamps ts;
+ unsigned long bist;
+ struct pei_data *pei_data;
+};
+
+void mainboard_romstage_entry(struct romstage_params *params);
+void romstage_common(struct romstage_params *params);
+void *asmlinkage romstage_main(unsigned long bist, uint32_t tsc_lo,
+ uint32_t tsc_high);
+void asmlinkage romstage_after_car(void);
+void raminit(struct pei_data *pei_data);
+void *setup_stack_and_mttrs(void);
+
+struct chipset_power_state;
+struct chipset_power_state *fill_power_state(void);
+void report_platform_info(void);
+void report_memory_config(void);
+
+void set_max_freq(void);
+
+void systemagent_early_init(void);
+void pch_early_init(void);
+void intel_early_me_status(void);
+
+void enable_smbus(void);
+int smbus_read_byte(unsigned device, unsigned address);
+
+int early_spi_read(u32 offset, u32 size, u8 *buffer);
+int early_spi_read_wpsr(u8 *sr);
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/sata.h b/src/soc/intel/broadwell/broadwell/sata.h
new file mode 100644
index 0000000..357fe58
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/sata.h
@@ -0,0 +1,85 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_SATA_H_
+#define _BROADWELL_SATA_H_
+
+#define SATA_SIRI 0xa0 /* SATA Indexed Register Index */
+#define SATA_SIRD 0xa4 /* SATA Indexed Register Data */
+#define SATA_SP 0xd0 /* Scratchpad */
+
+/* SATA IOBP Registers */
+#define SATA_IOBP_SP0G3IR 0xea000151
+#define SATA_IOBP_SP1G3IR 0xea000051
+#define SATA_IOBP_SP0DTLE_DATA 0xea002550
+#define SATA_IOBP_SP0DTLE_EDGE 0xea002554
+#define SATA_IOBP_SP1DTLE_DATA 0xea002750
+#define SATA_IOBP_SP1DTLE_EDGE 0xea002754
+
+#define SATA_DTLE_MASK 0xF
+#define SATA_DTLE_DATA_SHIFT 24
+#define SATA_DTLE_EDGE_SHIFT 16
+
+/* PCI Configuration Space (D31:F1): IDE */
+#define INTR_LN 0x3c
+#define IDE_TIM_PRI 0x40 /* IDE timings, primary */
+#define IDE_DECODE_ENABLE (1 << 15)
+#define IDE_SITRE (1 << 14)
+#define IDE_ISP_5_CLOCKS (0 << 12)
+#define IDE_ISP_4_CLOCKS (1 << 12)
+#define IDE_ISP_3_CLOCKS (2 << 12)
+#define IDE_RCT_4_CLOCKS (0 << 8)
+#define IDE_RCT_3_CLOCKS (1 << 8)
+#define IDE_RCT_2_CLOCKS (2 << 8)
+#define IDE_RCT_1_CLOCKS (3 << 8)
+#define IDE_DTE1 (1 << 7)
+#define IDE_PPE1 (1 << 6)
+#define IDE_IE1 (1 << 5)
+#define IDE_TIME1 (1 << 4)
+#define IDE_DTE0 (1 << 3)
+#define IDE_PPE0 (1 << 2)
+#define IDE_IE0 (1 << 1)
+#define IDE_TIME0 (1 << 0)
+#define IDE_TIM_SEC 0x42 /* IDE timings, secondary */
+
+#define IDE_SDMA_CNT 0x48 /* Synchronous DMA control */
+#define IDE_SSDE1 (1 << 3)
+#define IDE_SSDE0 (1 << 2)
+#define IDE_PSDE1 (1 << 1)
+#define IDE_PSDE0 (1 << 0)
+
+#define IDE_SDMA_TIM 0x4a
+
+#define IDE_CONFIG 0x54 /* IDE I/O Configuration Register */
+#define SIG_MODE_SEC_NORMAL (0 << 18)
+#define SIG_MODE_SEC_TRISTATE (1 << 18)
+#define SIG_MODE_SEC_DRIVELOW (2 << 18)
+#define SIG_MODE_PRI_NORMAL (0 << 16)
+#define SIG_MODE_PRI_TRISTATE (1 << 16)
+#define SIG_MODE_PRI_DRIVELOW (2 << 16)
+#define FAST_SCB1 (1 << 15)
+#define FAST_SCB0 (1 << 14)
+#define FAST_PCB1 (1 << 13)
+#define FAST_PCB0 (1 << 12)
+#define SCB1 (1 << 3)
+#define SCB0 (1 << 2)
+#define PCB1 (1 << 1)
+#define PCB0 (1 << 0)
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/serialio.h b/src/soc/intel/broadwell/broadwell/serialio.h
new file mode 100644
index 0000000..2fd6dca
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/serialio.h
@@ -0,0 +1,94 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_SERIALIO_H_
+#define _BROADWELL_SERIALIO_H_
+
+/* Serial IO IOBP Registers */
+#define SIO_IOBP_PORTCTRL0 0xcb000000 /* SDIO D23:F0 */
+#define SIO_IOBP_PORTCTRL0_ACPI_IRQ_EN (1 << 5)
+#define SIO_IOBP_PORTCTRL0_PCI_CONF_DIS (1 << 4)
+#define SIO_IOBP_PORTCTRL1 0xcb000014 /* SDIO D23:F0 */
+#define SIO_IOBP_PORTCTRL1_SNOOP_SELECT(x) (((x) & 3) << 13)
+#define SIO_IOBP_GPIODF 0xcb000154
+#define SIO_IOBP_GPIODF_SDIO_IDLE_DET_EN (1 << 4)
+#define SIO_IOBP_GPIODF_DMA_IDLE_DET_EN (1 << 3)
+#define SIO_IOBP_GPIODF_UART_IDLE_DET_EN (1 << 2)
+#define SIO_IOBP_GPIODF_I2C_IDLE_DET_EN (1 << 1)
+#define SIO_IOBP_GPIODF_SPI_IDLE_DET_EN (1 << 0)
+#define SIO_IOBP_GPIODF_UART0_BYTE_ACCESS (1 << 10)
+#define SIO_IOBP_GPIODF_UART1_BYTE_ACCESS (1 << 11)
+#define SIO_IOBP_PORTCTRL2 0xcb000240 /* DMA D21:F0 */
+#define SIO_IOBP_PORTCTRL3 0xcb000248 /* I2C0 D21:F1 */
+#define SIO_IOBP_PORTCTRL4 0xcb000250 /* I2C1 D21:F2 */
+#define SIO_IOBP_PORTCTRL5 0xcb000258 /* SPI0 D21:F3 */
+#define SIO_IOBP_PORTCTRL6 0xcb000260 /* SPI1 D21:F4 */
+#define SIO_IOBP_PORTCTRL7 0xcb000268 /* UART0 D21:F5 */
+#define SIO_IOBP_PORTCTRL8 0xcb000270 /* UART1 D21:F6 */
+#define SIO_IOBP_PORTCTRLX(x) (0xcb000240 + ((x) * 8))
+/* PORTCTRL 2-8 have the same layout */
+#define SIO_IOBP_PORTCTRL_ACPI_IRQ_EN (1 << 21)
+#define SIO_IOBP_PORTCTRL_PCI_CONF_DIS (1 << 20)
+#define SIO_IOBP_PORTCTRL_SNOOP_SELECT(x) (((x) & 3) << 18)
+#define SIO_IOBP_PORTCTRL_INT_PIN(x) (((x) & 0xf) << 2)
+#define SIO_IOBP_PORTCTRL_PM_CAP_PRSNT (1 << 1)
+#define SIO_IOBP_FUNCDIS0 0xce00aa07 /* DMA D21:F0 */
+#define SIO_IOBP_FUNCDIS1 0xce00aa47 /* I2C0 D21:F1 */
+#define SIO_IOBP_FUNCDIS2 0xce00aa87 /* I2C1 D21:F2 */
+#define SIO_IOBP_FUNCDIS3 0xce00aac7 /* SPI0 D21:F3 */
+#define SIO_IOBP_FUNCDIS4 0xce00ab07 /* SPI1 D21:F4 */
+#define SIO_IOBP_FUNCDIS5 0xce00ab47 /* UART0 D21:F5 */
+#define SIO_IOBP_FUNCDIS6 0xce00ab87 /* UART1 D21:F6 */
+#define SIO_IOBP_FUNCDIS7 0xce00ae07 /* SDIO D23:F0 */
+#define SIO_IOBP_FUNCDIS_DIS (1 << 8)
+
+/* Serial IO Devices */
+#define SIO_ID_SDMA 0 /* D21:F0 */
+#define SIO_ID_I2C0 1 /* D21:F1 */
+#define SIO_ID_I2C1 2 /* D21:F2 */
+#define SIO_ID_SPI0 3 /* D21:F3 */
+#define SIO_ID_SPI1 4 /* D21:F4 */
+#define SIO_ID_UART0 5 /* D21:F5 */
+#define SIO_ID_UART1 6 /* D21:F6 */
+#define SIO_ID_SDIO 7 /* D23:F0 */
+
+#define SIO_REG_PPR_CLOCK 0x800
+#define SIO_REG_PPR_CLOCK_EN (1 << 0)
+#define SIO_REG_PPR_CLOCK_UPDATE (1 << 31)
+#define SIO_REG_PPR_CLOCK_M_DIV 0x25a
+#define SIO_REG_PPR_CLOCK_N_DIV 0x7fff
+#define SIO_REG_PPR_RST 0x804
+#define SIO_REG_PPR_RST_ASSERT 0x3
+#define SIO_REG_PPR_GEN 0x808
+#define SIO_REG_PPR_GEN_LTR_MODE_MASK (1 << 2)
+#define SIO_REG_PPR_GEN_VOLTAGE_MASK (1 << 3)
+#define SIO_REG_PPR_GEN_VOLTAGE(x) ((x & 1) << 3)
+#define SIO_REG_AUTO_LTR 0x814
+
+#define SIO_REG_SDIO_PPR_GEN 0x1008
+#define SIO_REG_SDIO_PPR_SW_LTR 0x1010
+#define SIO_REG_SDIO_PPR_CMD12 0x3c
+#define SIO_REG_SDIO_PPR_CMD12_B30 (1 << 30)
+
+#define SIO_PIN_INTA 1 /* IRQ5 in ACPI mode */
+#define SIO_PIN_INTB 2 /* IRQ6 in ACPI mode */
+#define SIO_PIN_INTC 3 /* IRQ7 in ACPI mode */
+#define SIO_PIN_INTD 4 /* IRQ13 in ACPI mode */
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/smbus.h b/src/soc/intel/broadwell/broadwell/smbus.h
new file mode 100644
index 0000000..fb13c2d
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/smbus.h
@@ -0,0 +1,52 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2005 Yinghai Lu <yinghailu(a)gmail.com>
+ * Copyright (C) 2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_SMBUS_H_
+#define _BROADWELL_SMBUS_H_
+
+/* PCI Configuration Space (D31:F3): SMBus */
+#define SMB_BASE 0x20
+#define HOSTC 0x40
+#define HST_EN (1 << 0)
+#define SMB_RCV_SLVA 0x09
+
+/* SMBus I/O bits. */
+#define SMBHSTSTAT 0x0
+#define SMBHSTCTL 0x2
+#define SMBHSTCMD 0x3
+#define SMBXMITADD 0x4
+#define SMBHSTDAT0 0x5
+#define SMBHSTDAT1 0x6
+#define SMBBLKDAT 0x7
+#define SMBTRNSADD 0x9
+#define SMBSLVDATA 0xa
+#define SMLINK_PIN_CTL 0xe
+#define SMBUS_PIN_CTL 0xf
+
+#define SMBUS_TIMEOUT (10 * 1000 * 100)
+#define SMBUS_SLAVE_ADDR 0x24
+
+int do_smbus_read_byte(unsigned smbus_base, unsigned device,
+ unsigned address);
+int do_smbus_write_byte(unsigned smbus_base, unsigned device,
+ unsigned address, unsigned data);
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/smm.h b/src/soc/intel/broadwell/broadwell/smm.h
new file mode 100644
index 0000000..a6d896f
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/smm.h
@@ -0,0 +1,73 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_SMM_H_
+#define _BROADWELL_SMM_H_
+
+#include <stdint.h>
+#include <cpu/x86/msr.h>
+
+struct ied_header {
+ char signature[10];
+ u32 size;
+ u8 reserved[34];
+} __attribute__ ((packed));
+
+struct smm_relocation_params {
+ u32 smram_base;
+ u32 smram_size;
+ u32 ied_base;
+ u32 ied_size;
+ msr_t smrr_base;
+ msr_t smrr_mask;
+ msr_t emrr_base;
+ msr_t emrr_mask;
+ msr_t uncore_emrr_base;
+ msr_t uncore_emrr_mask;
+ /* The smm_save_state_in_msrs field indicates if SMM save state
+ * locations live in MSRs. This indicates to the CPUs how to adjust
+ * the SMMBASE and IEDBASE */
+ int smm_save_state_in_msrs;
+};
+
+/* There is a bug in the order of Kconfig includes in that arch/x86/Kconfig
+ * is included after chipset code. This causes the chipset's Kconfig to be
+ * cloberred by the arch/x86/Kconfig if they have the same name. */
+static inline int smm_region_size(void)
+{
+ /* Make it 8MiB by default. */
+ if (CONFIG_SMM_TSEG_SIZE == 0)
+ return (8 << 20);
+ return CONFIG_SMM_TSEG_SIZE;
+}
+
+int smm_initialize(void);
+void smm_relocate(void);
+
+/* These helpers are for performing SMM relocation. */
+void southbridge_trigger_smi(void);
+void southbridge_clear_smi_status(void);
+
+/* The initialization of the southbridge is split into 2 compoments. One is
+ * for clearing the state in the SMM registers. The other is for enabling
+ * SMIs. They are split so that other work between the 2 actions. */
+void southbridge_smm_clear_state(void);
+void southbridge_smm_enable_smi(void);
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/spi.h b/src/soc/intel/broadwell/broadwell/spi.h
new file mode 100644
index 0000000..8884525
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/spi.h
@@ -0,0 +1,100 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_SPI_H_
+#define _BROADWELL_SPI_H_
+
+/*
+ * SPI Opcode Menu setup for SPIBAR lockdown
+ * should support most common flash chips.
+ */
+
+#define SPIBAR_OFFSET 0x3800
+#define SPIBAR8(x) RCBA8(x + SPIBAR_OFFSET)
+#define SPIBAR16(x) RCBA16(x + SPIBAR_OFFSET)
+#define SPIBAR32(x) RCBA32(x + SPIBAR_OFFSET)
+
+/* Reigsters within the SPIBAR */
+#define SPIBAR_SSFC 0x91
+#define SPIBAR_FDOC 0xb0
+#define SPIBAR_FDOD 0xb4
+
+#define SPIBAR_PREOP 0x94
+#define SPIBAR_OPTYPE 0x96
+#define SPIBAR_OPMENU_LOWER 0x98
+#define SPIBAR_OPMENU_UPPER 0x9c
+
+#define SPI_OPMENU_0 0x01 /* WRSR: Write Status Register */
+#define SPI_OPTYPE_0 0x01 /* Write, no address */
+
+#define SPI_OPMENU_1 0x02 /* BYPR: Byte Program */
+#define SPI_OPTYPE_1 0x03 /* Write, address required */
+
+#define SPI_OPMENU_2 0x03 /* READ: Read Data */
+#define SPI_OPTYPE_2 0x02 /* Read, address required */
+
+#define SPI_OPMENU_3 0x05 /* RDSR: Read Status Register */
+#define SPI_OPTYPE_3 0x00 /* Read, no address */
+
+#define SPI_OPMENU_4 0x20 /* SE20: Sector Erase 0x20 */
+#define SPI_OPTYPE_4 0x03 /* Write, address required */
+
+#define SPI_OPMENU_5 0x9f /* RDID: Read ID */
+#define SPI_OPTYPE_5 0x00 /* Read, no address */
+
+#define SPI_OPMENU_6 0xd8 /* BED8: Block Erase 0xd8 */
+#define SPI_OPTYPE_6 0x03 /* Write, address required */
+
+#define SPI_OPMENU_7 0x0b /* FAST: Fast Read */
+#define SPI_OPTYPE_7 0x02 /* Read, address required */
+
+#define SPI_OPMENU_UPPER ((SPI_OPMENU_7 << 24) | (SPI_OPMENU_6 << 16) | \
+ (SPI_OPMENU_5 << 8) | SPI_OPMENU_4)
+#define SPI_OPMENU_LOWER ((SPI_OPMENU_3 << 24) | (SPI_OPMENU_2 << 16) | \
+ (SPI_OPMENU_1 << 8) | SPI_OPMENU_0)
+
+#define SPI_OPTYPE ((SPI_OPTYPE_7 << 14) | (SPI_OPTYPE_6 << 12) | \
+ (SPI_OPTYPE_5 << 10) | (SPI_OPTYPE_4 << 8) | \
+ (SPI_OPTYPE_3 << 6) | (SPI_OPTYPE_2 << 4) | \
+ (SPI_OPTYPE_1 << 2) | (SPI_OPTYPE_0))
+
+#define SPI_OPPREFIX ((0x50 << 8) | 0x06) /* EWSR and WREN */
+
+#define SPIBAR_HSFS 0x04 /* SPI hardware sequence status */
+#define SPIBAR_HSFS_FLOCKDN (1 << 15)/* Flash Configuration Lock-Down */
+#define SPIBAR_HSFS_SCIP (1 << 5) /* SPI Cycle In Progress */
+#define SPIBAR_HSFS_AEL (1 << 2) /* SPI Access Error Log */
+#define SPIBAR_HSFS_FCERR (1 << 1) /* SPI Flash Cycle Error */
+#define SPIBAR_HSFS_FDONE (1 << 0) /* SPI Flash Cycle Done */
+#define SPIBAR_HSFC 0x06 /* SPI hardware sequence control */
+#define SPIBAR_HSFC_BYTE_COUNT(c) (((c - 1) & 0x3f) << 8)
+#define SPIBAR_HSFC_CYCLE_READ (0 << 1) /* Read cycle */
+#define SPIBAR_HSFC_CYCLE_WRITE (2 << 1) /* Write cycle */
+#define SPIBAR_HSFC_CYCLE_ERASE (3 << 1) /* Erase cycle */
+#define SPIBAR_HSFC_GO (1 << 0) /* GO: start SPI transaction */
+#define SPIBAR_FADDR 0x08 /* SPI flash address */
+#define SPIBAR_FDATA(n) (0x10 + (4 * n)) /* SPI flash data */
+#define SPIBAR_SSFS 0x90
+#define SPIBAR_SSFS_ERROR (1 << 3)
+#define SPIBAR_SSFS_DONE (1 << 2)
+#define SPIBAR_SSFC 0x91
+#define SPIBAR_SSFC_DATA (1 << 14)
+#define SPIBAR_SSFC_GO (1 << 1)
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/systemagent.h b/src/soc/intel/broadwell/broadwell/systemagent.h
new file mode 100644
index 0000000..27c06f7
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/systemagent.h
@@ -0,0 +1,121 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2008 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_SYSTEMAGENT_H_
+#define _BROADWELL_SYSTEMAGENT_H_
+
+#include <broadwell/iomap.h>
+
+#define SA_IGD_OPROM_VENDEV 0x80860406
+
+#define IGD_HASWELL_ULT_GT1 0x0a06
+#define IGD_HASWELL_ULT_GT2 0x0a16
+#define IGD_HASWELL_ULT_GT3 0x0a26
+#define IGD_BROADWELL_U_GT1 0x1606
+#define IGD_BROADWELL_U_GT2 0x1616
+#define IGD_BROADWELL_U_GT3_15W 0x1626
+#define IGD_BROADWELL_U_GT3_28W 0x162b
+#define IGD_BROADWELL_Y_GT2 0x161e
+#define IGD_BROADWELL_H_GT2 0x1612
+#define IGD_BROADWELL_H_GT3 0x1622
+
+/* Device 0:0.0 PCI configuration space */
+
+#define EPBAR 0x40
+#define MCHBAR 0x48
+#define PCIEXBAR 0x60
+#define DMIBAR 0x68
+#define GGC 0x50 /* GMCH Graphics Control */
+#define DEVEN 0x54 /* Device Enable */
+#define DEVEN_D7EN (1 << 14)
+#define DEVEN_D4EN (1 << 7)
+#define DEVEN_D3EN (1 << 5)
+#define DEVEN_D2EN (1 << 4)
+#define DEVEN_D1F0EN (1 << 3)
+#define DEVEN_D1F1EN (1 << 2)
+#define DEVEN_D1F2EN (1 << 1)
+#define DEVEN_D0EN (1 << 0)
+
+#define PAM0 0x80
+#define PAM1 0x81
+#define PAM2 0x82
+#define PAM3 0x83
+#define PAM4 0x84
+#define PAM5 0x85
+#define PAM6 0x86
+
+#define SMRAM 0x88 /* System Management RAM Control */
+#define D_OPEN (1 << 6)
+#define D_CLS (1 << 5)
+#define D_LCK (1 << 4)
+#define G_SMRAME (1 << 3)
+#define C_BASE_SEG ((0 << 2) | (1 << 1) | (0 << 0))
+
+#define MESEG_BASE 0x70 /* Management Engine Base. */
+#define MESEG_LIMIT 0x78 /* Management Engine Limit. */
+#define REMAPBASE 0x90 /* Remap base. */
+#define REMAPLIMIT 0x98 /* Remap limit. */
+#define TOM 0xa0 /* Top of DRAM in memory controller space. */
+#define TOUUD 0xa8 /* Top of Upper Usable DRAM */
+#define BDSM 0xb0 /* Base Data Stolen Memory */
+#define BGSM 0xb4 /* Base GTT Stolen Memory */
+#define TSEG 0xb8 /* TSEG base */
+#define TOLUD 0xbc /* Top of Low Used Memory */
+#define SKPAD 0xdc /* Scratchpad Data */
+
+/* MCHBAR */
+
+#define MCHBAR8(x) *((volatile u8 *)(MCH_BASE_ADDRESS + x))
+#define MCHBAR16(x) *((volatile u16 *)(MCH_BASE_ADDRESS + x))
+#define MCHBAR32(x) *((volatile u32 *)(MCH_BASE_ADDRESS + x))
+
+#define MCHBAR_PEI_VERSION 0x5034
+#define BIOS_RESET_CPL 0x5da8
+#define EDRAMBAR 0x5408
+#define MCH_PAIR 0x5418
+#define GDXCBAR 0x5420
+
+#define MCH_PKG_POWER_LIMIT_LO 0x59a0
+#define MCH_PKG_POWER_LIMIT_HI 0x59a4
+#define MCH_DDR_POWER_LIMIT_LO 0x58e0
+#define MCH_DDR_POWER_LIMIT_HI 0x58e4
+
+/* PCODE MMIO communications live in the MCHBAR. */
+#define BIOS_MAILBOX_INTERFACE 0x5da4
+#define MAILBOX_RUN_BUSY (1 << 31)
+#define MAILBOX_BIOS_CMD_READ_PCS 1
+#define MAILBOX_BIOS_CMD_WRITE_PCS 2
+#define MAILBOX_BIOS_CMD_READ_CALIBRATION 0x509
+#define MAILBOX_BIOS_CMD_FSM_MEASURE_INTVL 0x909
+#define MAILBOX_BIOS_CMD_READ_PCH_POWER 0xa
+#define MAILBOX_BIOS_CMD_READ_PCH_POWER_EXT 0xb
+/* Errors are returned back in bits 7:0. */
+#define MAILBOX_BIOS_ERROR_NONE 0
+#define MAILBOX_BIOS_ERROR_INVALID_COMMAND 1
+#define MAILBOX_BIOS_ERROR_TIMEOUT 2
+#define MAILBOX_BIOS_ERROR_ILLEGAL_DATA 3
+#define MAILBOX_BIOS_ERROR_RESERVED 4
+#define MAILBOX_BIOS_ERROR_ILLEGAL_VR_ID 5
+#define MAILBOX_BIOS_ERROR_VR_INTERFACE_LOCKED 6
+#define MAILBOX_BIOS_ERROR_VR_ERROR 7
+/* Data is passed through bits 31:0 of the data register. */
+#define BIOS_MAILBOX_DATA 0x5da0
+
+#endif
diff --git a/src/soc/intel/broadwell/broadwell/xhci.h b/src/soc/intel/broadwell/broadwell/xhci.h
new file mode 100644
index 0000000..3f4fb4e
--- /dev/null
+++ b/src/soc/intel/broadwell/broadwell/xhci.h
@@ -0,0 +1,61 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _BROADWELL_XHCI_H_
+#define _BROADWELL_XHCI_H_
+
+/* XHCI PCI Registers */
+#define XHCI_PWR_CTL_STS 0x74
+#define XHCI_PWR_CTL_SET_MASK 0x3
+#define XHCI_PWR_CTL_SET_D0 0x0
+#define XHCI_PWR_CTL_SET_D3 0x3
+#define XHCI_PWR_CTL_ENABLE_PME (1 << 8)
+#define XHCI_PWR_CTL_STATUS_PME (1 << 15)
+#define XHCI_USB2PR 0xd0
+#define XHCI_USB2PRM 0xd4
+#define XHCI_USB2PR_HCSEL 0x7fff
+#define XHCI_USB3PR 0xd8
+#define XHCI_USB3PR_SSEN 0x3f
+#define XHCI_USB3PRM 0xdc
+#define XHCI_USB3FUS 0xe0
+#define XHCI_USB3FUS_SS_MASK 3
+#define XHCI_USB3FUS_SS_SHIFT 3
+#define XHCI_USB3PDO 0xe8
+
+/* XHCI Memory Registers */
+#define XHCI_USB3_PORTSC(port) (0x510 + (port * 0x10))
+#define XHCI_USB3_PORTSC_CHST (0x7f << 17)
+#define XHCI_USB3_PORTSC_WCE (1 << 25) /* Wake on Connect */
+#define XHCI_USB3_PORTSC_WDE (1 << 26) /* Wake on Disconnect */
+#define XHCI_USB3_PORTSC_WOE (1 << 27) /* Wake on Overcurrent */
+#define XHCI_USB3_PORTSC_WRC (1 << 19) /* Warm Reset Complete */
+#define XHCI_USB3_PORTSC_LWS (1 << 16) /* Link Write Strobe */
+#define XHCI_USB3_PORTSC_PED (1 << 1) /* Port Enabled/Disabled */
+#define XHCI_USB3_PORTSC_WPR (1 << 31) /* Warm Port Reset */
+#define XHCI_USB3_PORTSC_PLS (0xf << 5) /* Port Link State */
+#define XHCI_PLSR_DISABLED (4 << 5) /* Port is disabled */
+#define XHCI_PLSR_RXDETECT (5 << 5) /* Port is disconnected */
+#define XHCI_PLSR_POLLING (7 << 5) /* Port is polling */
+#define XHCI_PLSW_ENABLE (5 << 5) /* Transition from disabled */
+
+#ifdef __SMM__
+void usb_xhci_sleep_prepare(device_t dev, u8 slp_typ);
+#endif
+
+#endif
diff --git a/src/soc/intel/broadwell/chip.c b/src/soc/intel/broadwell/chip.c
new file mode 100644
index 0000000..94f7893
--- /dev/null
+++ b/src/soc/intel/broadwell/chip.c
@@ -0,0 +1,82 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/ramstage.h>
+#include <chip.h>
+
+static void pci_domain_set_resources(device_t dev)
+{
+ assign_resources(dev->link_list);
+}
+
+static struct device_operations pci_domain_ops = {
+ .read_resources = &pci_domain_read_resources,
+ .set_resources = &pci_domain_set_resources,
+ .scan_bus = &pci_domain_scan_bus,
+ .ops_pci_bus = &pci_ops_mmconf,
+};
+
+static void cpu_bus_noop(device_t dev) { }
+
+static struct device_operations cpu_bus_ops = {
+ .read_resources = &cpu_bus_noop,
+ .set_resources = &cpu_bus_noop,
+ .enable_resources = &cpu_bus_noop,
+ .init = &broadwell_init_cpus,
+};
+
+static void broadwell_enable(device_t dev)
+{
+ /* Set the operations if it is a special bus type */
+ if (dev->path.type == DEVICE_PATH_DOMAIN) {
+ dev->ops = &pci_domain_ops;
+ } else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
+ dev->ops = &cpu_bus_ops;
+ } else if (dev->path.type == DEVICE_PATH_PCI) {
+ /* Handle PCH device enable */
+ if (PCI_SLOT(dev->path.pci.devfn) > SA_DEV_SLOT_MINIHD &&
+ (dev->ops == NULL || dev->ops->enable == NULL)) {
+ broadwell_pch_enable_dev(dev);
+ }
+ }
+}
+
+struct chip_operations soc_intel_broadwell_ops = {
+ CHIP_NAME("Intel Broadwell")
+ .enable_dev = &broadwell_enable,
+ .init = &broadwell_init_pre_device,
+};
+
+static void pci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
+{
+ if (!vendor || !device)
+ pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
+ pci_read_config32(dev, PCI_VENDOR_ID));
+ else
+ pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
+ (device << 16) | vendor);
+}
+
+struct pci_operations broadwell_pci_ops = {
+ .set_subsystem = &pci_set_subsystem
+};
diff --git a/src/soc/intel/broadwell/chip.h b/src/soc/intel/broadwell/chip.h
new file mode 100644
index 0000000..a3b716b
--- /dev/null
+++ b/src/soc/intel/broadwell/chip.h
@@ -0,0 +1,137 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2008 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _SOC_INTEL_BROADWELL_CHIP_H_
+#define _SOC_INTEL_BROADWELL_CHIP_H_
+
+struct soc_intel_broadwell_config {
+ /*
+ * Interrupt Routing configuration
+ * If bit7 is 1, the interrupt is disabled.
+ */
+ uint8_t pirqa_routing;
+ uint8_t pirqb_routing;
+ uint8_t pirqc_routing;
+ uint8_t pirqd_routing;
+ uint8_t pirqe_routing;
+ uint8_t pirqf_routing;
+ uint8_t pirqg_routing;
+ uint8_t pirqh_routing;
+
+ /* GPE configuration */
+ uint32_t gpe0_en_1;
+ uint32_t gpe0_en_2;
+ uint32_t gpe0_en_3;
+ uint32_t gpe0_en_4;
+
+ /* GPIO SMI configuration */
+ uint32_t alt_gp_smi_en;
+
+ /* IDE configuration */
+ uint8_t sata_port_map;
+ uint32_t sata_port0_gen3_tx;
+ uint32_t sata_port1_gen3_tx;
+ uint32_t sata_port0_gen3_dtle;
+ uint32_t sata_port1_gen3_dtle;
+
+ /*
+ * SATA DEVSLP Mux
+ * 0 = port 0 DEVSLP on DEVSLP0/GPIO33
+ * 1 = port 3 DEVSLP on DEVSLP0/GPIO33
+ */
+ uint8_t sata_devslp_mux;
+
+ /*
+ * DEVSLP Disable
+ * 0: DEVSLP is enabled
+ * 1: DEVSLP is disabled
+ */
+ uint8_t sata_devslp_disable;
+
+ /* Generic IO decode ranges */
+ uint32_t gen1_dec;
+ uint32_t gen2_dec;
+ uint32_t gen3_dec;
+ uint32_t gen4_dec;
+
+ /* Enable linear PCIe Root Port function numbers starting at zero */
+ uint8_t pcie_port_coalesce;
+
+ /* Force root port ASPM configuration with port bitmap */
+ uint8_t pcie_port_force_aspm;
+
+ /* Put SerialIO devices into ACPI mode instead of a PCI device */
+ uint8_t sio_acpi_mode;
+
+ /* I2C voltage select: 0=3.3V 1=1.8V */
+ uint8_t sio_i2c0_voltage;
+ uint8_t sio_i2c1_voltage;
+
+ /*
+ * Clock Disable Map:
+ * [21:16] = CLKOUT_PCIE# 5-0
+ * [24] = CLKOUT_ITPXDP
+ */
+ uint32_t icc_clock_disable;
+
+ /*
+ * Digital Port Hotplug Enable:
+ * 0x04 = Enabled, 2ms short pulse
+ * 0x05 = Enabled, 4.5ms short pulse
+ * 0x06 = Enabled, 6ms short pulse
+ * 0x07 = Enabled, 100ms short pulse
+ */
+ u8 gpu_dp_b_hotplug;
+ u8 gpu_dp_c_hotplug;
+ u8 gpu_dp_d_hotplug;
+
+ /* Panel power sequence timings */
+ u8 gpu_panel_port_select;
+ u8 gpu_panel_power_cycle_delay;
+ u16 gpu_panel_power_up_delay;
+ u16 gpu_panel_power_down_delay;
+ u16 gpu_panel_power_backlight_on_delay;
+ u16 gpu_panel_power_backlight_off_delay;
+
+ /* Panel backlight settings */
+ u32 gpu_cpu_backlight;
+ u32 gpu_pch_backlight;
+
+ /*
+ * Graphics CD Clock Frequency
+ * 0 = 337.5MHz
+ * 1 = 450MHz
+ * 2 = 540MHz
+ * 3 = 675MHz
+ */
+ int cdclk;
+
+ /* Enable S0iX support */
+ int s0ix_enable;
+
+ /* TCC activation offset */
+ int tcc_offset;
+};
+
+typedef struct soc_intel_broadwell_config config_t;
+
+extern struct chip_operations soc_ops;
+
+#endif
diff --git a/src/soc/intel/broadwell/cpu.c b/src/soc/intel/broadwell/cpu.c
new file mode 100644
index 0000000..3676865
--- /dev/null
+++ b/src/soc/intel/broadwell/cpu.c
@@ -0,0 +1,722 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <string.h>
+#include <arch/acpi.h>
+#include <cpu/cpu.h>
+#include <cpu/x86/mtrr.h>
+#include <cpu/x86/msr.h>
+#include <cpu/x86/lapic.h>
+#include <cpu/x86/mp.h>
+#include <cpu/intel/microcode.h>
+#include <cpu/intel/speedstep.h>
+#include <cpu/intel/turbo.h>
+#include <cpu/x86/cache.h>
+#include <cpu/x86/name.h>
+#include <cpu/x86/smm.h>
+#include <delay.h>
+#include <pc80/mc146818rtc.h>
+#include <usbdebug.h>
+#include <broadwell/cpu.h>
+#include <broadwell/msr.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/ramstage.h>
+#include <broadwell/rcba.h>
+#include <broadwell/smm.h>
+#include <broadwell/systemagent.h>
+#include <chip.h>
+
+/* Convert time in seconds to POWER_LIMIT_1_TIME MSR value */
+static const u8 power_limit_time_sec_to_msr[] = {
+ [0] = 0x00,
+ [1] = 0x0a,
+ [2] = 0x0b,
+ [3] = 0x4b,
+ [4] = 0x0c,
+ [5] = 0x2c,
+ [6] = 0x4c,
+ [7] = 0x6c,
+ [8] = 0x0d,
+ [10] = 0x2d,
+ [12] = 0x4d,
+ [14] = 0x6d,
+ [16] = 0x0e,
+ [20] = 0x2e,
+ [24] = 0x4e,
+ [28] = 0x6e,
+ [32] = 0x0f,
+ [40] = 0x2f,
+ [48] = 0x4f,
+ [56] = 0x6f,
+ [64] = 0x10,
+ [80] = 0x30,
+ [96] = 0x50,
+ [112] = 0x70,
+ [128] = 0x11,
+};
+
+/* Convert POWER_LIMIT_1_TIME MSR value to seconds */
+static const u8 power_limit_time_msr_to_sec[] = {
+ [0x00] = 0,
+ [0x0a] = 1,
+ [0x0b] = 2,
+ [0x4b] = 3,
+ [0x0c] = 4,
+ [0x2c] = 5,
+ [0x4c] = 6,
+ [0x6c] = 7,
+ [0x0d] = 8,
+ [0x2d] = 10,
+ [0x4d] = 12,
+ [0x6d] = 14,
+ [0x0e] = 16,
+ [0x2e] = 20,
+ [0x4e] = 24,
+ [0x6e] = 28,
+ [0x0f] = 32,
+ [0x2f] = 40,
+ [0x4f] = 48,
+ [0x6f] = 56,
+ [0x10] = 64,
+ [0x30] = 80,
+ [0x50] = 96,
+ [0x70] = 112,
+ [0x11] = 128,
+};
+
+u32 cpu_family_model(void)
+{
+ return cpuid_eax(1) & 0x0fff0ff0;
+}
+
+u32 cpu_stepping(void)
+{
+ return cpuid_eax(1) & 0xf;
+}
+
+/* Dynamically determine if the part is ULT. */
+int cpu_is_ult(void)
+{
+ static int ult = -1;
+
+ if (ult < 0) {
+ u32 fm = cpu_family_model();
+ if (fm == BROADWELL_FAMILY_ULT || fm == HASWELL_FAMILY_ULT)
+ ult = 1;
+ else
+ ult = 0;
+ }
+
+ return ult;
+}
+
+/* The core 100MHz BLCK is disabled in deeper c-states. One needs to calibrate
+ * the 100MHz BCLCK against the 24MHz BLCK to restore the clocks properly
+ * when a core is woken up. */
+static int pcode_ready(void)
+{
+ int wait_count;
+ const int delay_step = 10;
+
+ wait_count = 0;
+ do {
+ if (!(MCHBAR32(BIOS_MAILBOX_INTERFACE) & MAILBOX_RUN_BUSY))
+ return 0;
+ wait_count += delay_step;
+ udelay(delay_step);
+ } while (wait_count < 1000);
+
+ return -1;
+}
+
+static void calibrate_24mhz_bclk(void)
+{
+ int err_code;
+
+ if (pcode_ready() < 0) {
+ printk(BIOS_ERR, "PCODE: mailbox timeout on wait ready.\n");
+ return;
+ }
+
+ /* A non-zero value initiates the PCODE calibration. */
+ MCHBAR32(BIOS_MAILBOX_DATA) = ~0;
+ MCHBAR32(BIOS_MAILBOX_INTERFACE) =
+ MAILBOX_RUN_BUSY | MAILBOX_BIOS_CMD_FSM_MEASURE_INTVL;
+
+ if (pcode_ready() < 0) {
+ printk(BIOS_ERR, "PCODE: mailbox timeout on completion.\n");
+ return;
+ }
+
+ err_code = MCHBAR32(BIOS_MAILBOX_INTERFACE) & 0xff;
+
+ printk(BIOS_DEBUG, "PCODE: 24MHz BLCK calibration response: %d\n",
+ err_code);
+
+ /* Read the calibrated value. */
+ MCHBAR32(BIOS_MAILBOX_INTERFACE) =
+ MAILBOX_RUN_BUSY | MAILBOX_BIOS_CMD_READ_CALIBRATION;
+
+ if (pcode_ready() < 0) {
+ printk(BIOS_ERR, "PCODE: mailbox timeout on read.\n");
+ return;
+ }
+
+ printk(BIOS_DEBUG, "PCODE: 24MHz BLCK calibration value: 0x%08x\n",
+ MCHBAR32(BIOS_MAILBOX_DATA));
+}
+
+static u32 pcode_mailbox_read(u32 command)
+{
+ if (pcode_ready() < 0) {
+ printk(BIOS_ERR, "PCODE: mailbox timeout on wait ready.\n");
+ return 0;
+ }
+
+ /* Send command and start transaction */
+ MCHBAR32(BIOS_MAILBOX_INTERFACE) = command | MAILBOX_RUN_BUSY;
+
+ if (pcode_ready() < 0) {
+ printk(BIOS_ERR, "PCODE: mailbox timeout on completion.\n");
+ return 0;
+ }
+
+ /* Read mailbox */
+ return MCHBAR32(BIOS_MAILBOX_DATA);
+}
+
+static void initialize_vr_config(void)
+{
+ msr_t msr;
+
+ printk(BIOS_DEBUG, "Initializing VR config.\n");
+
+ /* Configure VR_CURRENT_CONFIG. */
+ msr = rdmsr(MSR_VR_CURRENT_CONFIG);
+ /* Preserve bits 63 and 62. Bit 62 is PSI4 enable, but it is only valid
+ * on ULT systems. */
+ msr.hi &= 0xc0000000;
+ msr.hi |= (0x01 << (52 - 32)); /* PSI3 threshold - 1A. */
+ msr.hi |= (0x05 << (42 - 32)); /* PSI2 threshold - 5A. */
+ msr.hi |= (0x0f << (32 - 32)); /* PSI1 threshold - 15A. */
+ msr.hi |= (1 << (62 - 32)); /* Enable PSI4 */
+ /* Leave the max instantaneous current limit (12:0) to default. */
+ wrmsr(MSR_VR_CURRENT_CONFIG, msr);
+
+ /* Configure VR_MISC_CONFIG MSR. */
+ msr = rdmsr(MSR_VR_MISC_CONFIG);
+ /* Set the IOUT_SLOPE scalar applied to dIout in U10.1.9 format. */
+ msr.hi &= ~(0x3ff << (40 - 32));
+ msr.hi |= (0x200 << (40 - 32)); /* 1.0 */
+ /* Set IOUT_OFFSET to 0. */
+ msr.hi &= ~0xff;
+ /* Set exit ramp rate to fast. */
+ msr.hi |= (1 << (50 - 32));
+ /* Set entry ramp rate to slow. */
+ msr.hi &= ~(1 << (51 - 32));
+ /* Enable decay mode on C-state entry. */
+ msr.hi |= (1 << (52 - 32));
+ /* Set the slow ramp rate to be fast ramp rate / 4 */
+ msr.hi &= ~(0x3 << (53 - 32));
+ msr.hi |= (0x01 << (53 - 32));
+ /* Set MIN_VID (31:24) to allow CPU to have full control. */
+ msr.lo &= ~0xff000000;
+ wrmsr(MSR_VR_MISC_CONFIG, msr);
+
+ /* Configure VR_MISC_CONFIG2 MSR. */
+ msr = rdmsr(MSR_VR_MISC_CONFIG2);
+ msr.lo &= ~0xffff;
+ /* Allow CPU to control minimum voltage completely (15:8) and
+ * set the fast ramp voltage to 1110mV (0x6f in 10mV steps). */
+ msr.lo |= 0x006f;
+ wrmsr(MSR_VR_MISC_CONFIG2, msr);
+}
+
+static void configure_pch_power_sharing(void)
+{
+ u32 pch_power, pch_power_ext, pmsync, pmsync2;
+ int i;
+
+ /* Read PCH Power levels from PCODE */
+ pch_power = pcode_mailbox_read(MAILBOX_BIOS_CMD_READ_PCH_POWER);
+ pch_power_ext = pcode_mailbox_read(MAILBOX_BIOS_CMD_READ_PCH_POWER_EXT);
+
+ printk(BIOS_INFO, "PCH Power: PCODE Levels 0x%08x 0x%08x\n",
+ pch_power, pch_power_ext);
+
+ pmsync = RCBA32(PMSYNC_CONFIG);
+ pmsync2 = RCBA32(PMSYNC_CONFIG2);
+
+ /* Program PMSYNC_TPR_CONFIG PCH power limit values
+ * pmsync[0:4] = mailbox[0:5]
+ * pmsync[8:12] = mailbox[6:11]
+ * pmsync[16:20] = mailbox[12:17]
+ */
+ for (i = 0; i < 3; i++) {
+ u32 level = pch_power & 0x3f;
+ pch_power >>= 6;
+ pmsync &= ~(0x1f << (i * 8));
+ pmsync |= (level & 0x1f) << (i * 8);
+ }
+ RCBA32(PMSYNC_CONFIG) = pmsync;
+
+ /* Program PMSYNC_TPR_CONFIG2 Extended PCH power limit values
+ * pmsync2[0:4] = mailbox[23:18]
+ * pmsync2[8:12] = mailbox_ext[6:11]
+ * pmsync2[16:20] = mailbox_ext[12:17]
+ * pmsync2[24:28] = mailbox_ext[18:22]
+ */
+ pmsync2 &= ~0x1f;
+ pmsync2 |= pch_power & 0x1f;
+
+ for (i = 1; i < 4; i++) {
+ u32 level = pch_power_ext & 0x3f;
+ pch_power_ext >>= 6;
+ pmsync2 &= ~(0x1f << (i * 8));
+ pmsync2 |= (level & 0x1f) << (i * 8);
+ }
+ RCBA32(PMSYNC_CONFIG2) = pmsync2;
+}
+
+int cpu_config_tdp_levels(void)
+{
+ msr_t platform_info;
+
+ /* Bits 34:33 indicate how many levels supported */
+ platform_info = rdmsr(MSR_PLATFORM_INFO);
+ return (platform_info.hi >> 1) & 3;
+}
+
+/*
+ * Configure processor power limits if possible
+ * This must be done AFTER set of BIOS_RESET_CPL
+ */
+void set_power_limits(u8 power_limit_1_time)
+{
+ msr_t msr = rdmsr(MSR_PLATFORM_INFO);
+ msr_t limit;
+ unsigned power_unit;
+ unsigned tdp, min_power, max_power, max_time;
+ u8 power_limit_1_val;
+
+ if (power_limit_1_time > ARRAY_SIZE(power_limit_time_sec_to_msr))
+ power_limit_1_time = 28;
+
+ if (!(msr.lo & PLATFORM_INFO_SET_TDP))
+ return;
+
+ /* Get units */
+ msr = rdmsr(MSR_PKG_POWER_SKU_UNIT);
+ power_unit = 2 << ((msr.lo & 0xf) - 1);
+
+ /* Get power defaults for this SKU */
+ msr = rdmsr(MSR_PKG_POWER_SKU);
+ tdp = msr.lo & 0x7fff;
+ min_power = (msr.lo >> 16) & 0x7fff;
+ max_power = msr.hi & 0x7fff;
+ max_time = (msr.hi >> 16) & 0x7f;
+
+ printk(BIOS_DEBUG, "CPU TDP: %u Watts\n", tdp / power_unit);
+
+ if (power_limit_time_msr_to_sec[max_time] > power_limit_1_time)
+ power_limit_1_time = power_limit_time_msr_to_sec[max_time];
+
+ if (min_power > 0 && tdp < min_power)
+ tdp = min_power;
+
+ if (max_power > 0 && tdp > max_power)
+ tdp = max_power;
+
+ power_limit_1_val = power_limit_time_sec_to_msr[power_limit_1_time];
+
+ /* Set long term power limit to TDP */
+ limit.lo = 0;
+ limit.lo |= tdp & PKG_POWER_LIMIT_MASK;
+ limit.lo |= PKG_POWER_LIMIT_EN;
+ limit.lo |= (power_limit_1_val & PKG_POWER_LIMIT_TIME_MASK) <<
+ PKG_POWER_LIMIT_TIME_SHIFT;
+
+ /* Set short term power limit to 1.25 * TDP */
+ limit.hi = 0;
+ limit.hi |= ((tdp * 125) / 100) & PKG_POWER_LIMIT_MASK;
+ limit.hi |= PKG_POWER_LIMIT_EN;
+ /* Power limit 2 time is only programmable on server SKU */
+
+ wrmsr(MSR_PKG_POWER_LIMIT, limit);
+
+ /* Set power limit values in MCHBAR as well */
+ MCHBAR32(MCH_PKG_POWER_LIMIT_LO) = limit.lo;
+ MCHBAR32(MCH_PKG_POWER_LIMIT_HI) = limit.hi;
+
+ /* Set DDR RAPL power limit by copying from MMIO to MSR */
+ msr.lo = MCHBAR32(MCH_DDR_POWER_LIMIT_LO);
+ msr.hi = MCHBAR32(MCH_DDR_POWER_LIMIT_HI);
+ wrmsr(MSR_DDR_RAPL_LIMIT, msr);
+
+ /* Use nominal TDP values for CPUs with configurable TDP */
+ if (cpu_config_tdp_levels()) {
+ msr = rdmsr(MSR_CONFIG_TDP_NOMINAL);
+ limit.hi = 0;
+ limit.lo = msr.lo & 0xff;
+ wrmsr(MSR_TURBO_ACTIVATION_RATIO, limit);
+ }
+}
+
+static void configure_c_states(void)
+{
+ msr_t msr;
+
+ msr = rdmsr(MSR_PMG_CST_CONFIG_CONTROL);
+ msr.lo |= (1 << 30); // Package c-state Undemotion Enable
+ msr.lo |= (1 << 29); // Package c-state Demotion Enable
+ msr.lo |= (1 << 28); // C1 Auto Undemotion Enable
+ msr.lo |= (1 << 27); // C3 Auto Undemotion Enable
+ msr.lo |= (1 << 26); // C1 Auto Demotion Enable
+ msr.lo |= (1 << 25); // C3 Auto Demotion Enable
+ msr.lo &= ~(1 << 10); // Disable IO MWAIT redirection
+ /* The deepest package c-state defaults to factory-configured value. */
+ wrmsr(MSR_PMG_CST_CONFIG_CONTROL, msr);
+
+ msr = rdmsr(MSR_MISC_PWR_MGMT);
+ msr.lo &= ~(1 << 0); // Enable P-state HW_ALL coordination
+ wrmsr(MSR_MISC_PWR_MGMT, msr);
+
+ msr = rdmsr(MSR_POWER_CTL);
+ msr.lo |= (1 << 18); // Enable Energy Perf Bias MSR 0x1b0
+ msr.lo |= (1 << 1); // C1E Enable
+ msr.lo |= (1 << 0); // Bi-directional PROCHOT#
+ wrmsr(MSR_POWER_CTL, msr);
+
+ /* C-state Interrupt Response Latency Control 0 - package C3 latency */
+ msr.hi = 0;
+ msr.lo = IRTL_VALID | IRTL_1024_NS | C_STATE_LATENCY_CONTROL_0_LIMIT;
+ wrmsr(MSR_C_STATE_LATENCY_CONTROL_0, msr);
+
+ /* C-state Interrupt Response Latency Control 1 */
+ msr.hi = 0;
+ msr.lo = IRTL_VALID | IRTL_1024_NS | C_STATE_LATENCY_CONTROL_1_LIMIT;
+ wrmsr(MSR_C_STATE_LATENCY_CONTROL_1, msr);
+
+ /* C-state Interrupt Response Latency Control 2 - package C6/C7 short */
+ msr.hi = 0;
+ msr.lo = IRTL_VALID | IRTL_1024_NS | C_STATE_LATENCY_CONTROL_2_LIMIT;
+ wrmsr(MSR_C_STATE_LATENCY_CONTROL_2, msr);
+
+ /* C-state Interrupt Response Latency Control 3 - package C8 */
+ msr.hi = 0;
+ msr.lo = IRTL_VALID | IRTL_1024_NS |
+ C_STATE_LATENCY_CONTROL_3_LIMIT;
+ wrmsr(MSR_C_STATE_LATENCY_CONTROL_3, msr);
+
+ /* C-state Interrupt Response Latency Control 4 - package C9 */
+ msr.hi = 0;
+ msr.lo = IRTL_VALID | IRTL_1024_NS |
+ C_STATE_LATENCY_CONTROL_4_LIMIT;
+ wrmsr(MSR_C_STATE_LATENCY_CONTROL_4, msr);
+
+ /* C-state Interrupt Response Latency Control 5 - package C10 */
+ msr.hi = 0;
+ msr.lo = IRTL_VALID | IRTL_1024_NS |
+ C_STATE_LATENCY_CONTROL_5_LIMIT;
+ wrmsr(MSR_C_STATE_LATENCY_CONTROL_5, msr);
+}
+
+static void configure_thermal_target(void)
+{
+ device_t dev = SA_DEV_ROOT;
+ config_t *conf = dev->chip_info;
+ msr_t msr;
+
+ /* Set TCC activaiton offset if supported */
+ msr = rdmsr(MSR_PLATFORM_INFO);
+ if ((msr.lo & (1 << 30)) && conf->tcc_offset) {
+ msr = rdmsr(MSR_TEMPERATURE_TARGET);
+ msr.lo &= ~(0xf << 24); /* Bits 27:24 */
+ msr.lo |= (conf->tcc_offset & 0xf) << 24;
+ wrmsr(MSR_TEMPERATURE_TARGET, msr);
+ }
+}
+
+static void configure_misc(void)
+{
+ msr_t msr;
+
+ msr = rdmsr(IA32_MISC_ENABLE);
+ msr.lo |= (1 << 0); /* Fast String enable */
+ msr.lo |= (1 << 3); /* TM1/TM2/EMTTM enable */
+ msr.lo |= (1 << 16); /* Enhanced SpeedStep Enable */
+ wrmsr(IA32_MISC_ENABLE, msr);
+
+ /* Disable Thermal interrupts */
+ msr.lo = 0;
+ msr.hi = 0;
+ wrmsr(IA32_THERM_INTERRUPT, msr);
+
+ /* Enable package critical interrupt only */
+ msr.lo = 1 << 4;
+ msr.hi = 0;
+ wrmsr(IA32_PACKAGE_THERM_INTERRUPT, msr);
+}
+
+static void enable_lapic_tpr(void)
+{
+ msr_t msr;
+
+ msr = rdmsr(MSR_PIC_MSG_CONTROL);
+ msr.lo &= ~(1 << 10); /* Enable APIC TPR updates */
+ wrmsr(MSR_PIC_MSG_CONTROL, msr);
+}
+
+static void configure_dca_cap(void)
+{
+ struct cpuid_result cpuid_regs;
+ msr_t msr;
+
+ /* Check feature flag in CPUID.(EAX=1):ECX[18]==1 */
+ cpuid_regs = cpuid(1);
+ if (cpuid_regs.ecx & (1 << 18)) {
+ msr = rdmsr(IA32_PLATFORM_DCA_CAP);
+ msr.lo |= 1;
+ wrmsr(IA32_PLATFORM_DCA_CAP, msr);
+ }
+}
+
+static void set_max_ratio(void)
+{
+ msr_t msr, perf_ctl;
+
+ perf_ctl.hi = 0;
+
+ /* Check for configurable TDP option */
+ if (cpu_config_tdp_levels()) {
+ /* Set to nominal TDP ratio */
+ msr = rdmsr(MSR_CONFIG_TDP_NOMINAL);
+ perf_ctl.lo = (msr.lo & 0xff) << 8;
+ } else {
+ /* Platform Info bits 15:8 give max ratio */
+ msr = rdmsr(MSR_PLATFORM_INFO);
+ perf_ctl.lo = msr.lo & 0xff00;
+ }
+ wrmsr(IA32_PERF_CTL, perf_ctl);
+
+ printk(BIOS_DEBUG, "cpu: frequency set to %d\n",
+ ((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK);
+}
+
+static void set_energy_perf_bias(u8 policy)
+{
+ msr_t msr;
+ int ecx;
+
+ /* Determine if energy efficient policy is supported. */
+ ecx = cpuid_ecx(0x6);
+ if (!(ecx & (1 << 3)))
+ return;
+
+ /* Energy Policy is bits 3:0 */
+ msr = rdmsr(IA32_ENERGY_PERFORMANCE_BIAS);
+ msr.lo &= ~0xf;
+ msr.lo |= policy & 0xf;
+ wrmsr(IA32_ENERGY_PERFORMANCE_BIAS, msr);
+
+ printk(BIOS_DEBUG, "cpu: energy policy set to %u\n", policy);
+}
+
+static void configure_mca(void)
+{
+ msr_t msr;
+ const unsigned int mcg_cap_msr = 0x179;
+ int i;
+ int num_banks;
+
+ msr = rdmsr(mcg_cap_msr);
+ num_banks = msr.lo & 0xff;
+ msr.lo = msr.hi = 0;
+ /* TODO(adurbin): This should only be done on a cold boot. Also, some
+ * of these banks are core vs package scope. For now every CPU clears
+ * every bank. */
+ for (i = 0; i < num_banks; i++)
+ wrmsr(IA32_MC0_STATUS + (i * 4), msr);
+}
+
+#if CONFIG_USBDEBUG
+static unsigned ehci_debug_addr;
+#endif
+
+static void bsp_init_before_ap_bringup(struct bus *cpu_bus)
+{
+#if CONFIG_USBDEBUG
+ if(!ehci_debug_addr)
+ ehci_debug_addr = get_ehci_debug();
+ set_ehci_debug(0);
+#endif
+
+ /* Setup MTRRs based on physical address size. */
+ x86_setup_fixed_mtrrs();
+ x86_setup_var_mtrrs(cpuid_eax(0x80000008) & 0xff, 2);
+ x86_mtrr_check();
+
+#if CONFIG_USBDEBUG
+ set_ehci_debug(ehci_debug_addr);
+#endif
+
+ initialize_vr_config();
+ calibrate_24mhz_bclk();
+ configure_pch_power_sharing();
+}
+
+/* All CPUs including BSP will run the following function. */
+static void cpu_core_init(device_t cpu)
+{
+ /* Clear out pending MCEs */
+ configure_mca();
+
+ /* Enable the local cpu apics */
+ enable_lapic_tpr();
+ setup_lapic();
+
+ /* Configure C States */
+ configure_c_states();
+
+ /* Configure Enhanced SpeedStep and Thermal Sensors */
+ configure_misc();
+
+ /* Thermal throttle activation offset */
+ configure_thermal_target();
+
+ /* Enable Direct Cache Access */
+ configure_dca_cap();
+
+ /* Set energy policy */
+ set_energy_perf_bias(ENERGY_POLICY_NORMAL);
+
+ /* Set Max Ratio */
+ set_max_ratio();
+
+ /* Enable Turbo */
+ enable_turbo();
+}
+
+/* MP initialization support. */
+static const void *microcode_patch;
+int ht_disabled;
+
+static int adjust_apic_id_ht_disabled(int index, int apic_id)
+{
+ return 2 * index;
+}
+
+static void relocate_and_load_microcode(void *unused)
+{
+ /* Relocate the SMM handler. */
+ smm_relocate();
+
+ /* After SMM relocation a 2nd microcode load is required. */
+ intel_microcode_load_unlocked(microcode_patch);
+}
+
+static void enable_smis(void *unused)
+{
+ /* Now that all APs have been relocated as well as the BSP let SMIs
+ * start flowing. */
+ southbridge_smm_enable_smi();
+
+ /* Lock down the SMRAM space. */
+ smm_lock();
+}
+
+static struct mp_flight_record mp_steps[] = {
+ MP_FR_NOBLOCK_APS(relocate_and_load_microcode, NULL,
+ relocate_and_load_microcode, NULL),
+ MP_FR_BLOCK_APS(mp_initialize_cpu, NULL, mp_initialize_cpu, NULL),
+ /* Wait for APs to finish initialization before proceeding. */
+ MP_FR_BLOCK_APS(NULL, NULL, enable_smis, NULL),
+};
+
+static struct device_operations cpu_dev_ops = {
+ .init = cpu_core_init,
+};
+
+static struct cpu_device_id cpu_table[] = {
+ { X86_VENDOR_INTEL, CPUID_HASWELL_ULT },
+ { X86_VENDOR_INTEL, CPUID_BROADWELL_C0 },
+ { X86_VENDOR_INTEL, CPUID_BROADWELL_D0 },
+ { 0, 0 },
+};
+
+static const struct cpu_driver driver __cpu_driver = {
+ .ops = &cpu_dev_ops,
+ .id_table = cpu_table,
+};
+
+void broadwell_init_cpus(device_t dev)
+{
+ struct bus *cpu_bus = dev->link_list;
+ int num_threads;
+ int num_cores;
+ msr_t msr;
+ struct mp_params mp_params;
+ void *smm_save_area;
+
+ msr = rdmsr(CORE_THREAD_COUNT_MSR);
+ num_threads = (msr.lo >> 0) & 0xffff;
+ num_cores = (msr.lo >> 16) & 0xffff;
+ printk(BIOS_DEBUG, "CPU has %u cores, %u threads enabled.\n",
+ num_cores, num_threads);
+
+ ht_disabled = num_threads == num_cores;
+
+ /* Perform any necesarry BSP initialization before APs are brought up.
+ * This call alos allows the BSP to prepare for any secondary effects
+ * from calling cpu_initialize() such as smm_init(). */
+ bsp_init_before_ap_bringup(cpu_bus);
+
+ microcode_patch = intel_microcode_find();
+
+ /* Save default SMM area before relocation occurs. */
+ smm_save_area = backup_default_smm_area();
+
+ mp_params.num_cpus = num_threads;
+ mp_params.parallel_microcode_load = 1;
+ if (ht_disabled)
+ mp_params.adjust_apic_id = adjust_apic_id_ht_disabled;
+ else
+ mp_params.adjust_apic_id = NULL;
+ mp_params.flight_plan = &mp_steps[0];
+ mp_params.num_records = ARRAY_SIZE(mp_steps);
+ mp_params.microcode_pointer = microcode_patch;
+
+ /* Load relocation and permeanent handlers. Then initiate relocation. */
+ if (smm_initialize())
+ printk(BIOS_CRIT, "SMM Initialiazation failed...\n");
+
+ if (mp_init(cpu_bus, &mp_params)) {
+ printk(BIOS_ERR, "MP initialization failure.\n");
+ }
+
+ /* Restore the default SMM region. */
+ restore_default_smm_area(smm_save_area);
+
+ /* Enable ROM caching if option was selected. */
+ x86_mtrr_enable_rom_caching();
+}
diff --git a/src/soc/intel/broadwell/ehci.c b/src/soc/intel/broadwell/ehci.c
new file mode 100644
index 0000000..e27c8e5
--- /dev/null
+++ b/src/soc/intel/broadwell/ehci.c
@@ -0,0 +1,94 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <delay.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <usbdebug.h>
+#include <arch/io.h>
+#include <broadwell/ehci.h>
+
+static void usb_ehci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
+{
+ u8 access_cntl;
+
+ access_cntl = pci_read_config8(dev, 0x80);
+
+ /* Enable writes to protected registers. */
+ pci_write_config8(dev, 0x80, access_cntl | 1);
+
+ if (!vendor || !device) {
+ pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
+ pci_read_config32(dev, PCI_VENDOR_ID));
+ } else {
+ pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
+ ((device & 0xffff) << 16) | (vendor & 0xffff));
+ }
+
+ /* Restore protection. */
+ pci_write_config8(dev, 0x80, access_cntl);
+}
+
+static void usb_ehci_set_resources(struct device *dev)
+{
+#if CONFIG_USBDEBUG
+ struct resource *res;
+ u32 base;
+ u32 usb_debug;
+
+ usb_debug = get_ehci_debug();
+ set_ehci_debug(0);
+#endif
+ pci_dev_set_resources(dev);
+
+#if CONFIG_USBDEBUG
+ res = find_resource(dev, 0x10);
+ set_ehci_debug(usb_debug);
+ if (!res) return;
+ base = res->base;
+ set_ehci_base(base);
+ report_resource_stored(dev, res, "");
+#endif
+}
+
+static struct pci_operations ehci_ops_pci = {
+ .set_subsystem = &usb_ehci_set_subsystem,
+};
+
+static struct device_operations usb_ehci_ops = {
+ .read_resources = &pci_dev_read_resources,
+ .set_resources = &usb_ehci_set_resources,
+ .enable_resources = &pci_dev_enable_resources,
+ .ops_pci = &ehci_ops_pci,
+};
+
+static const unsigned short pci_device_ids[] = {
+ 0x9c26, /* LynxPoint-LP */
+ 0x9ca6, /* WildcatPoint */
+ 0
+};
+
+static const struct pci_driver pch_usb_ehci __pci_driver = {
+ .ops = &usb_ehci_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = pci_device_ids,
+};
diff --git a/src/soc/intel/broadwell/elog.c b/src/soc/intel/broadwell/elog.c
new file mode 100644
index 0000000..a6a2813
--- /dev/null
+++ b/src/soc/intel/broadwell/elog.c
@@ -0,0 +1,138 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <bootstate.h>
+#include <cbmem.h>
+#include <console/console.h>
+#include <stdint.h>
+#include <elog.h>
+#include <broadwell/lpc.h>
+#include <broadwell/pm.h>
+
+static void pch_log_gpio_gpe(u32 gpe0_sts, u32 gpe0_en, int start)
+{
+ int i;
+
+ gpe0_sts &= gpe0_en;
+
+ for (i = 0; i <= 31; i++) {
+ if (gpe0_sts & (1 << i))
+ elog_add_event_wake(ELOG_WAKE_SOURCE_GPIO, i + start);
+ }
+}
+
+static void pch_log_wake_source(struct chipset_power_state *ps)
+{
+ /* Power Button */
+ if (ps->pm1_sts & PWRBTN_STS)
+ elog_add_event_wake(ELOG_WAKE_SOURCE_PWRBTN, 0);
+
+ /* RTC */
+ if (ps->pm1_sts & RTC_STS)
+ elog_add_event_wake(ELOG_WAKE_SOURCE_RTC, 0);
+
+ /* PCI Express (TODO: determine wake device) */
+ if (ps->pm1_sts & PCIEXPWAK_STS)
+ elog_add_event_wake(ELOG_WAKE_SOURCE_PCIE, 0);
+
+ /* PME (TODO: determine wake device) */
+ if (ps->gpe0_sts[GPE_STD] & PME_STS)
+ elog_add_event_wake(ELOG_WAKE_SOURCE_PME, 0);
+
+ /* Internal PME (TODO: determine wake device) */
+ if (ps->gpe0_sts[GPE_STD] & PME_B0_STS)
+ elog_add_event_wake(ELOG_WAKE_SOURCE_PME_INTERNAL, 0);
+
+ /* SMBUS Wake */
+ if (ps->gpe0_sts[GPE_STD] & SMB_WAK_STS)
+ elog_add_event_wake(ELOG_WAKE_SOURCE_SMBUS, 0);
+
+ /* Log GPIO events in set 1-3 */
+ pch_log_gpio_gpe(ps->gpe0_sts[GPE_31_0], ps->gpe0_en[GPE_31_0], 0);
+ pch_log_gpio_gpe(ps->gpe0_sts[GPE_63_32], ps->gpe0_en[GPE_63_32], 32);
+ pch_log_gpio_gpe(ps->gpe0_sts[GPE_94_64], ps->gpe0_en[GPE_94_64], 64);
+}
+
+static void pch_log_power_and_resets(struct chipset_power_state *ps)
+{
+ /* Thermal Trip Status */
+ if (ps->gen_pmcon2 & THERMTRIP_STS)
+ elog_add_event(ELOG_TYPE_THERM_TRIP);
+
+ /* PWR_FLR Power Failure */
+ if (ps->gen_pmcon2 & PWROK_FLR)
+ elog_add_event(ELOG_TYPE_POWER_FAIL);
+
+ /* SUS Well Power Failure */
+ if (ps->gen_pmcon3 & SUS_PWR_FLR)
+ elog_add_event(ELOG_TYPE_SUS_POWER_FAIL);
+
+ /* SYS_PWROK Failure */
+ if (ps->gen_pmcon2 & SYSPWR_FLR)
+ elog_add_event(ELOG_TYPE_SYS_PWROK_FAIL);
+
+ /* PWROK Failure */
+ if (ps->gen_pmcon2 & PWROK_FLR)
+ elog_add_event(ELOG_TYPE_PWROK_FAIL);
+
+ /* Second TCO Timeout */
+ if (ps->tco2_sts & TCO2_STS_SECOND_TO)
+ elog_add_event(ELOG_TYPE_TCO_RESET);
+
+ /* Power Button Override */
+ if (ps->pm1_sts & PRBTNOR_STS)
+ elog_add_event(ELOG_TYPE_POWER_BUTTON_OVERRIDE);
+
+ /* RTC reset */
+ if (ps->gen_pmcon3 & RTC_BATTERY_DEAD)
+ elog_add_event(ELOG_TYPE_RTC_RESET);
+
+ /* System Reset Status (reset button pushed) */
+ if (ps->gen_pmcon2 & SYSTEM_RESET_STS)
+ elog_add_event(ELOG_TYPE_RESET_BUTTON);
+
+ /* General Reset Status */
+ if (ps->gen_pmcon3 & GEN_RST_STS)
+ elog_add_event(ELOG_TYPE_SYSTEM_RESET);
+
+ /* ACPI Wake Event */
+ if (ps->prev_sleep_state != SLEEP_STATE_S0)
+ elog_add_event_byte(ELOG_TYPE_ACPI_WAKE, ps->prev_sleep_state);
+}
+
+static void pch_log_state(void *unused)
+{
+ struct chipset_power_state *ps = cbmem_find(CBMEM_ID_POWER_STATE);
+
+ if (ps == NULL) {
+ printk(BIOS_ERR, "Not logging power state information. "
+ "Power state not found in cbmem.\n");
+ return;
+ }
+
+ /* Power and Reset */
+ pch_log_power_and_resets(ps);
+
+ /* Wake Sources */
+ pch_log_wake_source(ps);
+}
+
+BOOT_STATE_INIT_ENTRIES(pch_log) = {
+ BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_ENTRY, pch_log_state, NULL)
+};
diff --git a/src/soc/intel/broadwell/finalize.c b/src/soc/intel/broadwell/finalize.c
new file mode 100644
index 0000000..67cba66
--- /dev/null
+++ b/src/soc/intel/broadwell/finalize.c
@@ -0,0 +1,127 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <bootstate.h>
+#include <console/console.h>
+#include <console/post_codes.h>
+#include <cpu/x86/smm.h>
+#include <reg_script.h>
+#include <spi-generic.h>
+#include <stdlib.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/lpc.h>
+#include <broadwell/me.h>
+#include <broadwell/rcba.h>
+#include <broadwell/spi.h>
+#include <broadwell/systemagent.h>
+
+const struct reg_script system_agent_finalize_script[] = {
+ REG_PCI_OR16(0x50, 1 << 0), /* GGC */
+ REG_PCI_OR32(0x5c, 1 << 0), /* DPR */
+ REG_PCI_OR32(0x78, 1 << 10), /* ME */
+ REG_PCI_OR32(0x90, 1 << 0), /* REMAPBASE */
+ REG_PCI_OR32(0x98, 1 << 0), /* REMAPLIMIT */
+ REG_PCI_OR32(0xa0, 1 << 0), /* TOM */
+ REG_PCI_OR32(0xa8, 1 << 0), /* TOUUD */
+ REG_PCI_OR32(0xb0, 1 << 0), /* BDSM */
+ REG_PCI_OR32(0xb4, 1 << 0), /* BGSM */
+ REG_PCI_OR32(0xb8, 1 << 0), /* TSEGMB */
+ REG_PCI_OR32(0xbc, 1 << 0), /* TOLUD */
+ REG_MMIO_OR32(MCH_BASE_ADDRESS + 0x5500, 1 << 0), /* PAVP */
+ REG_MMIO_OR32(MCH_BASE_ADDRESS + 0x5f00, 1 << 31), /* SA PM */
+ REG_MMIO_OR32(MCH_BASE_ADDRESS + 0x6020, 1 << 0), /* UMA GFX */
+ REG_MMIO_OR32(MCH_BASE_ADDRESS + 0x63fc, 1 << 0), /* VTDTRK */
+ REG_MMIO_OR32(MCH_BASE_ADDRESS + 0x6800, 1 << 31),
+ REG_MMIO_OR32(MCH_BASE_ADDRESS + 0x7000, 1 << 31),
+ REG_MMIO_OR32(MCH_BASE_ADDRESS + 0x77fc, 1 << 0),
+ REG_MMIO_WRITE8(MCH_BASE_ADDRESS + 0x50fc, 0x8f), /* MC */
+
+ REG_SCRIPT_END
+};
+
+const struct reg_script pch_finalize_script[] = {
+ /* Set SPI opcode menu */
+ REG_MMIO_WRITE16(RCBA_BASE_ADDRESS + SPIBAR_OFFSET + SPIBAR_PREOP,
+ SPI_OPPREFIX),
+ REG_MMIO_WRITE16(RCBA_BASE_ADDRESS + SPIBAR_OFFSET + SPIBAR_OPTYPE,
+ SPI_OPTYPE),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + SPIBAR_OFFSET +
+ SPIBAR_OPMENU_LOWER, SPI_OPMENU_LOWER),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + SPIBAR_OFFSET +
+ SPIBAR_OPMENU_UPPER, SPI_OPMENU_UPPER),
+
+ /* Lock SPIBAR */
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + SPIBAR_OFFSET + SPIBAR_HSFS,
+ SPIBAR_HSFS_FLOCKDN),
+
+ /* TC Lockdown */
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + 0x0050, (1 << 31)),
+
+ /* BIOS Interface Lockdown */
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + GCS, (1 << 0)),
+
+ /* Function Disable SUS Well Lockdown */
+ REG_MMIO_OR8(RCBA_BASE_ADDRESS + FDSW, (1 << 7)),
+
+ /* Global SMI Lock */
+ REG_PCI_OR16(GEN_PMCON_1, SMI_LOCK),
+
+ /* GEN_PMCON Lock */
+ REG_PCI_OR8(GEN_PMCON_LOCK, SLP_STR_POL_LOCK | ACPI_BASE_LOCK),
+
+ /* PMSYNC */
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + PMSYNC_CONFIG, (1 << 31)),
+
+
+ REG_SCRIPT_END
+};
+
+static void broadwell_finalize(void *unused)
+{
+ printk(BIOS_DEBUG, "Finalizing chipset.\n");
+
+ reg_script_run_on_dev(SA_DEV_ROOT, system_agent_finalize_script);
+ reg_script_run_on_dev(PCH_DEV_LPC, pch_finalize_script);
+
+ /* Read+Write the following registers */
+ MCHBAR32(0x6030) = MCHBAR32(0x6030);
+ MCHBAR32(0x6034) = MCHBAR32(0x6034);
+ MCHBAR32(0x6008) = MCHBAR32(0x6008);
+ RCBA32(0x21a4) = RCBA32(0x21a4);
+
+ /* Re-init SPI after lockdown */
+ spi_init();
+
+ /* Lock down management engine */
+ intel_me_finalize();
+
+ printk(BIOS_DEBUG, "Finalizing SMM.\n");
+ outb(APM_CNT_FINALIZE, APM_CNT);
+
+ /* Indicate finalize step with post code */
+ post_code(POST_OS_BOOT);
+}
+
+BOOT_STATE_INIT_ENTRIES(finalize) = {
+ BOOT_STATE_INIT_ENTRY(BS_OS_RESUME, BS_ON_ENTRY,
+ broadwell_finalize, NULL),
+ BOOT_STATE_INIT_ENTRY(BS_PAYLOAD_LOAD, BS_ON_EXIT,
+ broadwell_finalize, NULL),
+};
diff --git a/src/soc/intel/broadwell/gpio.c b/src/soc/intel/broadwell/gpio.c
new file mode 100644
index 0000000..92699d2
--- /dev/null
+++ b/src/soc/intel/broadwell/gpio.c
@@ -0,0 +1,199 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdint.h>
+#include <string.h>
+#include <arch/io.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <broadwell/gpio.h>
+#include <broadwell/iomap.h>
+#include <broadwell/pm.h>
+
+/*
+ * This function will return a number that indicates which PIRQ
+ * this GPIO maps to. If this is not a PIRQ capable GPIO then
+ * it will return -1. The GPIO to PIRQ mapping is not linear.
+ */
+static int gpio_to_pirq(int gpio)
+{
+ switch (gpio) {
+ case 8: return 0; /* PIRQI */
+ case 9: return 1; /* PIRQJ */
+ case 10: return 2; /* PIRQK */
+ case 13: return 3; /* PIRQL */
+ case 14: return 4; /* PIRQM */
+ case 45: return 5; /* PIRQN */
+ case 46: return 6; /* PIRQO */
+ case 47: return 7; /* PIRQP */
+ case 48: return 8; /* PIRQQ */
+ case 49: return 9; /* PIRQR */
+ case 50: return 10; /* PIRQS */
+ case 51: return 11; /* PIRQT */
+ case 52: return 12; /* PIRQU */
+ case 53: return 13; /* PIRQV */
+ case 54: return 14; /* PIRQW */
+ case 55: return 15; /* PIRQX */
+ default: return -1;
+ };
+}
+
+void init_one_gpio(int gpio_num, struct gpio_config *config)
+{
+ u32 owner, route, irqen, reset;
+ int set, bit;
+
+ if (gpio_num > MAX_GPIO_NUMBER || !config)
+ return;
+
+ outl(config->conf0, GPIO_BASE_ADDRESS + GPIO_CONFIG0(gpio_num));
+ outl(config->conf1, GPIO_BASE_ADDRESS + GPIO_CONFIG1(gpio_num));
+
+ /* Determine set and bit based on GPIO number */
+ set = gpio_num >> 5;
+ bit = gpio_num % 32;
+
+ /* Save settings from current GPIO config */
+ owner = inl(GPIO_BASE_ADDRESS + GPIO_OWNER(set));
+ route = inl(GPIO_BASE_ADDRESS + GPIO_ROUTE(set));
+ irqen = inl(GPIO_BASE_ADDRESS + GPIO_IRQ_IE(set));
+ reset = inl(GPIO_BASE_ADDRESS + GPIO_RESET(set));
+
+ owner |= config->owner << bit;
+ route |= config->route << bit;
+ irqen |= config->irqen << bit;
+ reset |= config->reset << bit;
+
+ outl(owner, GPIO_BASE_ADDRESS + GPIO_OWNER(set));
+ outl(route, GPIO_BASE_ADDRESS + GPIO_ROUTE(set));
+ outl(irqen, GPIO_BASE_ADDRESS + GPIO_IRQ_IE(set));
+ outl(reset, GPIO_BASE_ADDRESS + GPIO_RESET(set));
+
+ if (set == 0) {
+ u32 blink = inl(GPIO_BASE_ADDRESS + GPIO_BLINK);
+ blink |= config->blink << bit;
+ outl(blink, GPIO_BASE_ADDRESS + GPIO_BLINK);
+ }
+
+ /* PIRQ to IO-APIC map */
+ if (config->pirq == GPIO_PIRQ_APIC_ROUTE) {
+ u32 pirq2apic = inl(GPIO_BASE_ADDRESS + GPIO_PIRQ_APIC_EN);
+ set = gpio_to_pirq(gpio_num);
+ if (set >= 0) {
+ pirq2apic |= 1 << set;
+ outl(pirq2apic, GPIO_BASE_ADDRESS + GPIO_PIRQ_APIC_EN);
+ }
+ }
+}
+
+void init_gpios(const struct gpio_config config[])
+{
+ const struct gpio_config *entry;
+ u32 owner[3] = {0};
+ u32 route[3] = {0};
+ u32 irqen[3] = {0};
+ u32 reset[3] = {0};
+ u32 blink = 0;
+ u16 pirq2apic = 0;
+ int set, bit, gpio = 0;
+
+ for (entry = config; entry->conf0 != GPIO_LIST_END; entry++, gpio++) {
+ if (gpio > MAX_GPIO_NUMBER)
+ break;
+
+ /* Setup Configuration registers 1 and 2 */
+ outl(entry->conf0, GPIO_BASE_ADDRESS + GPIO_CONFIG0(gpio));
+ outl(entry->conf1, GPIO_BASE_ADDRESS + GPIO_CONFIG1(gpio));
+
+ /* Determine set and bit based on GPIO number */
+ set = gpio >> 5;
+ bit = gpio % 32;
+
+ /* Apply settings to set specific bits */
+ owner[set] |= entry->owner << bit;
+ route[set] |= entry->route << bit;
+ irqen[set] |= entry->irqen << bit;
+ reset[set] |= entry->reset << bit;
+
+ if (set == 0)
+ blink |= entry->blink << bit;
+
+ /* PIRQ to IO-APIC map */
+ if (entry->pirq == GPIO_PIRQ_APIC_ROUTE) {
+ set = gpio_to_pirq(gpio);
+ if (set >= 0)
+ pirq2apic |= 1 << set;
+ }
+ }
+
+ for (set = 0; set <= 2; set++) {
+ outl(owner[set], GPIO_BASE_ADDRESS + GPIO_OWNER(set));
+ outl(route[set], GPIO_BASE_ADDRESS + GPIO_ROUTE(set));
+ outl(irqen[set], GPIO_BASE_ADDRESS + GPIO_IRQ_IE(set));
+ outl(reset[set], GPIO_BASE_ADDRESS + GPIO_RESET(set));
+ }
+
+ outl(blink, GPIO_BASE_ADDRESS + GPIO_BLINK);
+ outl(pirq2apic, GPIO_BASE_ADDRESS + GPIO_PIRQ_APIC_EN);
+}
+
+int get_gpio(int gpio_num)
+{
+ if (gpio_num > MAX_GPIO_NUMBER)
+ return 0;
+
+ return !!(inl(GPIO_BASE_ADDRESS + GPIO_CONFIG0(gpio_num)) & GPI_LEVEL);
+}
+
+/*
+ * get a number comprised of multiple GPIO values. gpio_num_array points to
+ * the array of gpio pin numbers to scan, terminated by -1.
+ */
+unsigned get_gpios(const int *gpio_num_array)
+{
+ int gpio;
+ unsigned bitmask = 1;
+ unsigned vector = 0;
+
+ while (bitmask &&
+ ((gpio = *gpio_num_array++) != -1)) {
+ if (get_gpio(gpio))
+ vector |= bitmask;
+ bitmask <<= 1;
+ }
+ return vector;
+}
+
+void set_gpio(int gpio_num, int value)
+{
+ u32 conf0;
+
+ if (gpio_num > MAX_GPIO_NUMBER)
+ return;
+
+ conf0 = inl(GPIO_BASE_ADDRESS + GPIO_CONFIG0(gpio_num));
+ conf0 &= ~GPO_LEVEL_MASK;
+ conf0 |= value << GPO_LEVEL_SHIFT;
+ outl(conf0, GPIO_BASE_ADDRESS + GPIO_CONFIG0(gpio_num));
+}
+
+int gpio_is_native(int gpio_num)
+{
+ return !(inl(GPIO_BASE_ADDRESS + GPIO_CONFIG0(gpio_num)) & 1);
+}
diff --git a/src/soc/intel/broadwell/hda.c b/src/soc/intel/broadwell/hda.c
new file mode 100644
index 0000000..9a9225b
--- /dev/null
+++ b/src/soc/intel/broadwell/hda.c
@@ -0,0 +1,155 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008 Advanced Micro Devices, Inc.
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <device/pci_ops.h>
+#include <arch/io.h>
+#include <delay.h>
+#include <soc/intel/common/hda_verb.h>
+#include <broadwell/ramstage.h>
+#include <broadwell/rcba.h>
+
+const u32 * cim_verb_data = NULL;
+u32 cim_verb_data_size = 0;
+const u32 * pc_beep_verbs = NULL;
+u32 pc_beep_verbs_size = 0;
+
+static void codecs_init(u32 base, u32 codec_mask)
+{
+ int i;
+
+ /* Can support up to 4 codecs */
+ for (i = 3; i >= 0; i--) {
+ if (codec_mask & (1 << i))
+ hda_codec_init(base, i,
+ cim_verb_data_size,
+ cim_verb_data);
+ }
+
+ if (pc_beep_verbs_size && pc_beep_verbs)
+ hda_codec_write(base, pc_beep_verbs_size, pc_beep_verbs);
+}
+
+static void hda_pch_init(struct device *dev, u32 base)
+{
+ u8 reg8;
+ u16 reg16;
+ u32 reg32;
+
+ if (RCBA32(0x2030) & (1 << 31)) {
+ reg32 = pci_read_config32(dev, 0x120);
+ reg32 &= 0xf8ffff01;
+ reg32 |= (1 << 25);
+ reg32 |= RCBA32(0x2030) & 0xfe;
+ pci_write_config32(dev, 0x120, reg32);
+ } else
+ printk(BIOS_DEBUG, "HDA: V1CTL disabled.\n");
+
+ reg32 = pci_read_config32(dev, 0x114);
+ reg32 &= ~0xfe;
+ pci_write_config32(dev, 0x114, reg32);
+
+ // Set VCi enable bit
+ if (pci_read_config32(dev, 0x120) & ((1 << 24) |
+ (1 << 25) | (1 << 26))) {
+ reg32 = pci_read_config32(dev, 0x120);
+ reg32 &= ~(1 << 31);
+ pci_write_config32(dev, 0x120, reg32);
+ }
+
+ reg8 = pci_read_config8(dev, 0x43);
+ reg8 &= ~(1 << 6);
+ pci_write_config8(dev, 0x43, reg8);
+
+ /* Additional programming steps */
+ reg32 = pci_read_config32(dev, 0xc4);
+ reg32 |= (1 << 24);
+ pci_write_config32(dev, 0xc4, reg32);
+
+ reg8 = pci_read_config8(dev, 0x40); // Audio Control
+ reg8 |= 1; // Select HDA mode
+ pci_write_config8(dev, 0x40, reg8);
+
+ reg8 = pci_read_config8(dev, 0x4d); // Docking Status
+ reg8 &= ~(1 << 7); // Docking not supported
+ pci_write_config8(dev, 0x4d, reg8);
+
+ reg16 = read32(base + 0x0012);
+ reg16 |= (1 << 0);
+ write32(base + 0x0012, reg16);
+
+ /* disable Auto Voltage Detector */
+ reg8 = pci_read_config8(dev, 0x42);
+ reg8 |= (1 << 2);
+ pci_write_config8(dev, 0x42, reg8);
+}
+
+static void hda_init(struct device *dev)
+{
+ u32 base;
+ struct resource *res;
+ u32 codec_mask;
+ u32 reg32;
+
+ /* Find base address */
+ res = find_resource(dev, PCI_BASE_ADDRESS_0);
+ if (!res)
+ return;
+
+ base = (u32)res->base;
+ printk(BIOS_DEBUG, "HDA: base = %08x\n", (u32)base);
+
+ /* Set Bus Master */
+ reg32 = pci_read_config32(dev, PCI_COMMAND);
+ pci_write_config32(dev, PCI_COMMAND, reg32 | PCI_COMMAND_MASTER);
+
+ hda_pch_init(dev, base);
+
+ codec_mask = hda_codec_detect(base);
+
+ if (codec_mask) {
+ printk(BIOS_DEBUG, "HDA: codec_mask = %02x\n", codec_mask);
+ codecs_init(base, codec_mask);
+ }
+}
+
+static struct device_operations hda_ops = {
+ .read_resources = &pci_dev_read_resources,
+ .set_resources = &pci_dev_set_resources,
+ .enable_resources = &pci_dev_enable_resources,
+ .init = &hda_init,
+ .ops_pci = &broadwell_pci_ops,
+};
+
+static const unsigned short pci_device_ids[] = {
+ 0x9c20, /* LynxPoint-LP */
+ 0x9ca0, /* WildcatPoint */
+ 0
+};
+
+static const struct pci_driver pch_hda __pci_driver = {
+ .ops = &hda_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = pci_device_ids,
+};
diff --git a/src/soc/intel/broadwell/igd.c b/src/soc/intel/broadwell/igd.c
new file mode 100644
index 0000000..8235b3f
--- /dev/null
+++ b/src/soc/intel/broadwell/igd.c
@@ -0,0 +1,558 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <console/console.h>
+#include <delay.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <stdlib.h>
+#include <string.h>
+#include <reg_script.h>
+#include <drivers/intel/gma/i915_reg.h>
+#include <broadwell/cpu.h>
+#include <broadwell/ramstage.h>
+#include <broadwell/systemagent.h>
+#include <chip.h>
+
+#define GT_RETRY 1000
+#define GT_CDCLK_337 0
+#define GT_CDCLK_450 1
+#define GT_CDCLK_540 2
+#define GT_CDCLK_675 3
+
+struct reg_script haswell_early_init_script[] = {
+ /* Enable Force Wake */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa180, 0x00000020),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa188, 0x00010001),
+ REG_RES_POLL32(PCI_BASE_ADDRESS_0, 0x130044, 1, 1, GT_RETRY),
+
+ /* Enable Counters */
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa248, 0x00000016),
+
+ /* GFXPAUSE settings */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa000, 0x00070020),
+
+ /* ECO Settings */
+ REG_RES_RMW32(PCI_BASE_ADDRESS_0, 0xa180, 0xff3fffff, 0x15000000),
+
+ /* Enable DOP Clock Gating */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x9424, 0x000003fd),
+
+ /* Enable Unit Level Clock Gating */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x9400, 0x00000080),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x9404, 0x40401000),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x9408, 0x00000000),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x940c, 0x02000001),
+
+ /*
+ * RC6 Settings
+ */
+
+ /* Wake Rate Limits */
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa090, 0x00000000),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa098, 0x03e80000),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa09c, 0x00280000),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa0a8, 0x0001e848),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa0ac, 0x00000019),
+
+ /* Render/Video/Blitter Idle Max Count */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x02054, 0x0000000a),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x12054, 0x0000000a),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x22054, 0x0000000a),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x1a054, 0x0000000a),
+
+ /* RC Sleep / RCx Thresholds */
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa0b0, 0x00000000),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa0b4, 0x000003e8),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa0b8, 0x0000c350),
+
+ /* RP Settings */
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa010, 0x000f4240),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa014, 0x12060000),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa02c, 0x0000e808),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa030, 0x0003bd08),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa068, 0x000101d0),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa06c, 0x00055730),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0xa070, 0x0000000a),
+
+ /* RP Control */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa024, 0x00000b92),
+
+ /* HW RC6 Control */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa090, 0x88040000),
+
+ /* Video Frequency Request */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa00c, 0x08000000),
+
+ /* Set RC6 VIDs */
+ REG_RES_POLL32(PCI_BASE_ADDRESS_0, 0x138124, (1 << 31), 0, GT_RETRY),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x138128, 0),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x138124, 0x80000004),
+ REG_RES_POLL32(PCI_BASE_ADDRESS_0, 0x138124, (1 << 31), 0, GT_RETRY),
+
+ /* Enable PM Interrupts */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x4402c, 0x03000076),
+
+ /* Enable RC6 in idle */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa094, 0x00040000),
+
+ REG_SCRIPT_END
+};
+
+static const struct reg_script haswell_late_init_script[] = {
+ /* Lock settings */
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a248, (1 << 31)),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a004, (1 << 4)),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a080, (1 << 2)),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a180, (1 << 31)),
+
+ /* Disable Force Wake */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa188, 0x00010000),
+ REG_RES_POLL32(PCI_BASE_ADDRESS_0, 0x130044, 1, 0, GT_RETRY),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa188, 0x00000001),
+
+ /* Enable power well for DP and Audio */
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x45400, (1 << 31)),
+ REG_RES_POLL32(PCI_BASE_ADDRESS_0, 0x45400,
+ (1 << 30), (1 << 30), GT_RETRY),
+
+ REG_SCRIPT_END
+};
+
+static const struct reg_script broadwell_early_init_script[] = {
+ /* Enable Force Wake */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa188, 0x00010001),
+ REG_RES_POLL32(PCI_BASE_ADDRESS_0, 0x130044, 1, 1, GT_RETRY),
+
+ /* Enable push bus metric control and shift */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa248, 0x00000004),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa250, 0x000000ff),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa25c, 0x00000010),
+
+ /* GFXPAUSE settings */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa000, 0x00030020),
+
+ /* ECO Settings */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa180, 0x45200000),
+
+ /* Enable DOP Clock Gating */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x9424, 0x000000fd),
+
+ /* Enable Unit Level Clock Gating */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x9400, 0x00000000),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x9404, 0x40401000),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x9408, 0x00000000),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x940c, 0x02000001),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x1a054, 0x0000000a),
+
+ /* Video Frequency Request */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa00c, 0x08000000),
+
+ /*
+ * RC6 Settings
+ */
+
+ /* Wake Rate Limits */
+ REG_RES_RMW32(PCI_BASE_ADDRESS_0, 0x0a090, 0, 0),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a098, 0x03e80000),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a09c, 0x00280000),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a0a8, 0x0001e848),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a0ac, 0x00000019),
+
+ /* Render/Video/Blitter Idle Max Count */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x02054, 0x0000000a),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x12054, 0x0000000a),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x22054, 0x0000000a),
+
+ /* RC Sleep / RCx Thresholds */
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a0b0, 0x00000000),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a0b8, 0x00000271),
+
+ /* RP Settings */
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a010, 0x000f4240),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a014, 0x12060000),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a02c, 0x0000e808),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a030, 0x0003bd08),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a068, 0x000101d0),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a06c, 0x00055730),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a070, 0x0000000a),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a168, 0x00000006),
+
+ /* RP Control */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa024, 0x00000b92),
+
+ /* HW RC6 Control */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa090, 0x90040000),
+
+ /* Set RC6 VIDs */
+ REG_RES_POLL32(PCI_BASE_ADDRESS_0, 0x138124, (1 << 31), 0, GT_RETRY),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x138128, 0),
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x138124, 0x80000004),
+ REG_RES_POLL32(PCI_BASE_ADDRESS_0, 0x138124, (1 << 31), 0, GT_RETRY),
+
+ /* Enable PM Interrupts */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x4402c, 0x03000076),
+
+ /* Enable RC6 in idle */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa094, 0x00040000),
+
+ REG_SCRIPT_END
+};
+
+static const struct reg_script broadwell_late_init_script[] = {
+ /* Lock settings */
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a248, (1 << 31)),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a000, (1 << 18)),
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x0a180, (1 << 31)),
+
+ /* Disable Force Wake */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0xa188, 0x00010000),
+ REG_RES_POLL32(PCI_BASE_ADDRESS_0, 0x130044, 1, 0, GT_RETRY),
+
+ /* Enable power well for DP and Audio */
+ REG_RES_OR32(PCI_BASE_ADDRESS_0, 0x45400, (1 << 31)),
+ REG_RES_POLL32(PCI_BASE_ADDRESS_0, 0x45400,
+ (1 << 30), (1 << 30), GT_RETRY),
+
+ REG_SCRIPT_END
+};
+
+u32 map_oprom_vendev(u32 vendev)
+{
+ return SA_IGD_OPROM_VENDEV;
+}
+
+static struct resource *gtt_res = NULL;
+
+static unsigned long gtt_read(unsigned long reg)
+{
+ u32 val;
+ val = read32(gtt_res->base + reg);
+ return val;
+
+}
+
+static void gtt_write(unsigned long reg, unsigned long data)
+{
+ write32(gtt_res->base + reg, data);
+}
+
+static inline void gtt_rmw(u32 reg, u32 andmask, u32 ormask)
+{
+ u32 val = gtt_read(reg);
+ val &= andmask;
+ val |= ormask;
+ gtt_write(reg, val);
+}
+
+static int gtt_poll(u32 reg, u32 mask, u32 value)
+{
+ unsigned try = GT_RETRY;
+ u32 data;
+
+ while (try--) {
+ data = gtt_read(reg);
+ if ((data & mask) == value)
+ return 1;
+ udelay(10);
+ }
+
+ printk(BIOS_ERR, "GT init timeout\n");
+ return 0;
+}
+
+static void igd_setup_panel(struct device *dev)
+{
+ config_t *conf = dev->chip_info;
+ u32 reg32;
+
+ /* Setup Digital Port Hotplug */
+ reg32 = gtt_read(PCH_PORT_HOTPLUG);
+ if (!reg32) {
+ reg32 = (conf->gpu_dp_b_hotplug & 0x7) << 2;
+ reg32 |= (conf->gpu_dp_c_hotplug & 0x7) << 10;
+ reg32 |= (conf->gpu_dp_d_hotplug & 0x7) << 18;
+ gtt_write(PCH_PORT_HOTPLUG, reg32);
+ }
+
+ /* Setup Panel Power On Delays */
+ reg32 = gtt_read(PCH_PP_ON_DELAYS);
+ if (!reg32) {
+ reg32 = (conf->gpu_panel_port_select & 0x3) << 30;
+ reg32 |= (conf->gpu_panel_power_up_delay & 0x1fff) << 16;
+ reg32 |= (conf->gpu_panel_power_backlight_on_delay & 0x1fff);
+ gtt_write(PCH_PP_ON_DELAYS, reg32);
+ }
+
+ /* Setup Panel Power Off Delays */
+ reg32 = gtt_read(PCH_PP_OFF_DELAYS);
+ if (!reg32) {
+ reg32 = (conf->gpu_panel_power_down_delay & 0x1fff) << 16;
+ reg32 |= (conf->gpu_panel_power_backlight_off_delay & 0x1fff);
+ gtt_write(PCH_PP_OFF_DELAYS, reg32);
+ }
+
+ /* Setup Panel Power Cycle Delay */
+ if (conf->gpu_panel_power_cycle_delay) {
+ reg32 = gtt_read(PCH_PP_DIVISOR);
+ reg32 &= ~0xff;
+ reg32 |= conf->gpu_panel_power_cycle_delay & 0xff;
+ gtt_write(PCH_PP_DIVISOR, reg32);
+ }
+
+ /* Enable Backlight if needed */
+ if (conf->gpu_cpu_backlight) {
+ gtt_write(BLC_PWM_CPU_CTL2, BLC_PWM2_ENABLE);
+ gtt_write(BLC_PWM_CPU_CTL, conf->gpu_cpu_backlight);
+ }
+ if (conf->gpu_pch_backlight) {
+ gtt_write(BLC_PWM_PCH_CTL1, BLM_PCH_PWM_ENABLE);
+ gtt_write(BLC_PWM_PCH_CTL2, conf->gpu_pch_backlight);
+ }
+}
+
+static void igd_cdclk_init_haswell(struct device *dev)
+{
+ config_t *conf = dev->chip_info;
+ int cdclk = conf->cdclk;
+ int devid = pci_read_config16(dev, PCI_DEVICE_ID);
+ int gpu_is_ulx = 0;
+ u32 dpdiv, lpcll;
+
+ /* Check for ULX GT1 or GT2 */
+ if (devid == 0x0a0e || devid == 0x0a1e)
+ gpu_is_ulx = 1;
+
+ /* 675MHz is not supported on haswell */
+ if (cdclk == GT_CDCLK_675)
+ cdclk = GT_CDCLK_337;
+
+ /* If CD clock is fixed or ULT then set to 450MHz */
+ if ((gtt_read(0x42014) & 0x1000000) || cpu_is_ult())
+ cdclk = GT_CDCLK_450;
+
+ /* 540MHz is not supported on ULX */
+ if (gpu_is_ulx && cdclk == GT_CDCLK_540)
+ cdclk = GT_CDCLK_337;
+
+ /* 337.5MHz is not supported on non-ULT/ULX */
+ if (!gpu_is_ulx && !cpu_is_ult() && cdclk == GT_CDCLK_337)
+ cdclk = GT_CDCLK_450;
+
+ /* Set variables based on CD Clock setting */
+ switch (cdclk) {
+ case GT_CDCLK_337:
+ dpdiv = 169;
+ lpcll = (1 << 26);
+ break;
+ case GT_CDCLK_450:
+ dpdiv = 225;
+ lpcll = 0;
+ break;
+ case GT_CDCLK_540:
+ dpdiv = 270;
+ lpcll = (1 << 26);
+ break;
+ default:
+ return;
+ }
+
+ /* Set LPCLL_CTL CD Clock Frequency Select */
+ gtt_rmw(0x130040, 0xf3ffffff, lpcll);
+
+ /* ULX: Inform power controller of selected frequency */
+ if (gpu_is_ulx) {
+ if (cdclk == GT_CDCLK_450)
+ gtt_write(0x138128, 0x00000000); /* 450MHz */
+ else
+ gtt_write(0x138128, 0x00000001); /* 337.5MHz */
+ gtt_write(0x13812c, 0x00000000);
+ gtt_write(0x138124, 0x80000017);
+ }
+
+ /* Set CPU DP AUX 2X bit clock dividers */
+ gtt_rmw(0x64010, 0xfffff800, dpdiv);
+ gtt_rmw(0x64810, 0xfffff800, dpdiv);
+}
+
+static void igd_cdclk_init_broadwell(struct device *dev)
+{
+ config_t *conf = dev->chip_info;
+ int cdclk = conf->cdclk;
+ u32 dpdiv, lpcll, pwctl, cdset;
+
+ /* Inform power controller of upcoming frequency change */
+ gtt_write(0x138128, 0);
+ gtt_write(0x13812c, 0);
+ gtt_write(0x138124, 0x80000018);
+
+ /* Poll GT driver mailbox for run/busy clear */
+ if (!gtt_poll(0x138124, (1 << 31), (0 << 31)))
+ cdclk = GT_CDCLK_450;
+
+ if (gtt_read(0x42014) & 0x1000000) {
+ /* If CD clock is fixed then set to 450MHz */
+ cdclk = GT_CDCLK_450;
+ } else {
+ /* Program CD clock to highest supported freq */
+ if (cpu_is_ult())
+ cdclk = GT_CDCLK_540;
+ else
+ cdclk = GT_CDCLK_675;
+ }
+
+ /* CD clock frequency 675MHz not supported on ULT */
+ if (cpu_is_ult() && cdclk == GT_CDCLK_675)
+ cdclk = GT_CDCLK_540;
+
+ /* Set variables based on CD Clock setting */
+ switch (cdclk) {
+ case GT_CDCLK_337:
+ cdset = 337;
+ lpcll = (1 << 27);
+ pwctl = 2;
+ dpdiv = 169;
+ break;
+ case GT_CDCLK_450:
+ cdset = 449;
+ lpcll = 0;
+ pwctl = 0;
+ dpdiv = 225;
+ break;
+ case GT_CDCLK_540:
+ cdset = 539;
+ lpcll = (1 << 26);
+ pwctl = 1;
+ dpdiv = 270;
+ break;
+ case GT_CDCLK_675:
+ cdset = 674;
+ lpcll = (1 << 26) | (1 << 27);
+ pwctl = 3;
+ dpdiv = 338;
+ default:
+ return;
+ }
+
+ /* Set LPCLL_CTL CD Clock Frequency Select */
+ gtt_rmw(0x130040, 0xf3ffffff, lpcll);
+
+ /* Inform power controller of selected frequency */
+ gtt_write(0x138128, pwctl);
+ gtt_write(0x13812c, 0);
+ gtt_write(0x138124, 0x80000017);
+
+ /* Program CD Clock Frequency */
+ gtt_rmw(0x46200, 0xfffffc00, cdset);
+
+ /* Set CPU DP AUX 2X bit clock dividers */
+ gtt_rmw(0x64010, 0xfffff800, dpdiv);
+ gtt_rmw(0x64810, 0xfffff800, dpdiv);
+}
+
+static void igd_init(struct device *dev)
+{
+ int is_broadwell = !!(cpu_family_model() == BROADWELL_FAMILY_ULT);
+ u32 rp1_gfx_freq;
+
+ /* IGD needs to be Bus Master */
+ u32 reg32 = pci_read_config32(dev, PCI_COMMAND);
+ reg32 |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY | PCI_COMMAND_IO;
+ pci_write_config32(dev, PCI_COMMAND, reg32);
+
+ gtt_res = find_resource(dev, PCI_BASE_ADDRESS_0);
+ if (!gtt_res || !gtt_res->base)
+ return;
+
+ /* Wait for any configured pre-graphics delay */
+ mdelay(CONFIG_PRE_GRAPHICS_DELAY);
+
+ /* Early init steps */
+ if (is_broadwell) {
+ reg_script_run_on_dev(dev, broadwell_early_init_script);
+ } else {
+ reg_script_run_on_dev(dev, haswell_early_init_script);
+ }
+
+ /* Set RP1 graphics frequency */
+ rp1_gfx_freq = (MCHBAR32(0x5998) >> 8) & 0xff;
+ gtt_write(0xa008, rp1_gfx_freq << 24);
+
+ /* Post VBIOS panel setup */
+ igd_setup_panel(dev);
+
+ /* Initialize PCI device, load/execute BIOS Option ROM */
+ pci_dev_init(dev);
+
+ /* Late init steps */
+ if (is_broadwell) {
+ igd_cdclk_init_broadwell(dev);
+ reg_script_run_on_dev(dev, broadwell_late_init_script);
+ } else {
+ igd_cdclk_init_haswell(dev);
+ reg_script_run_on_dev(dev, haswell_late_init_script);
+ }
+}
+
+static void igd_read_resources(struct device *dev)
+{
+ pci_dev_read_resources(dev);
+
+#if CONFIG_MARK_GRAPHICS_MEM_WRCOMB
+ struct resource *res;
+
+ /* Set the graphics memory to write combining. */
+ res = find_resource(dev, PCI_BASE_ADDRESS_2);
+ if (res == NULL) {
+ printk(BIOS_DEBUG, "gma: memory resource not found.\n");
+ return;
+ }
+ res->flags |= IORESOURCE_WRCOMB;
+#endif
+}
+
+static struct device_operations igd_ops = {
+ .read_resources = &igd_read_resources,
+ .set_resources = &pci_dev_set_resources,
+ .enable_resources = &pci_dev_enable_resources,
+ .init = &igd_init,
+ .ops_pci = &broadwell_pci_ops,
+};
+
+static const unsigned short pci_device_ids[] = {
+ IGD_HASWELL_ULT_GT1,
+ IGD_HASWELL_ULT_GT2,
+ IGD_HASWELL_ULT_GT3,
+ IGD_BROADWELL_U_GT1,
+ IGD_BROADWELL_U_GT2,
+ IGD_BROADWELL_U_GT3_15W,
+ IGD_BROADWELL_U_GT3_28W,
+ IGD_BROADWELL_Y_GT2,
+ IGD_BROADWELL_H_GT2,
+ IGD_BROADWELL_H_GT3,
+ 0,
+};
+
+static const struct pci_driver igd_driver __pci_driver = {
+ .ops = &igd_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = pci_device_ids,
+};
diff --git a/src/soc/intel/broadwell/iobp.c b/src/soc/intel/broadwell/iobp.c
new file mode 100644
index 0000000..2bdd131
--- /dev/null
+++ b/src/soc/intel/broadwell/iobp.c
@@ -0,0 +1,125 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <delay.h>
+#include <arch/io.h>
+#include <broadwell/iobp.h>
+#include <broadwell/rcba.h>
+
+#define IOBP_RETRY 1000
+
+static inline int iobp_poll(void)
+{
+ unsigned try;
+
+ for (try = IOBP_RETRY; try > 0; try--) {
+ u16 status = RCBA16(IOBPS);
+ if ((status & IOBPS_READY) == 0)
+ return 1;
+ udelay(10);
+ }
+
+ printk(BIOS_ERR, "IOBP: timeout waiting for transaction to complete\n");
+ return 0;
+}
+
+u32 pch_iobp_read(u32 address)
+{
+ u16 status;
+
+ if (!iobp_poll())
+ return 0;
+
+ /* Set the address */
+ RCBA32(IOBPIRI) = address;
+
+ /* READ OPCODE */
+ status = RCBA16(IOBPS);
+ status &= ~IOBPS_MASK;
+ status |= IOBPS_READ;
+ RCBA16(IOBPS) = status;
+
+ /* Undocumented magic */
+ RCBA16(IOBPU) = IOBPU_MAGIC;
+
+ /* Set ready bit */
+ status = RCBA16(IOBPS);
+ status |= IOBPS_READY;
+ RCBA16(IOBPS) = status;
+
+ if (!iobp_poll())
+ return 0;
+
+ /* Check for successful transaction */
+ status = RCBA16(IOBPS);
+ if (status & IOBPS_TX_MASK) {
+ printk(BIOS_ERR, "IOBP: read 0x%08x failed\n", address);
+ return 0;
+ }
+
+ /* Read IOBP data */
+ return RCBA32(IOBPD);
+}
+
+void pch_iobp_write(u32 address, u32 data)
+{
+ u16 status;
+
+ if (!iobp_poll())
+ return;
+
+ /* Set the address */
+ RCBA32(IOBPIRI) = address;
+
+ /* WRITE OPCODE */
+ status = RCBA16(IOBPS);
+ status &= ~IOBPS_MASK;
+ status |= IOBPS_WRITE;
+ RCBA16(IOBPS) = status;
+
+ RCBA32(IOBPD) = data;
+
+ /* Undocumented magic */
+ RCBA16(IOBPU) = IOBPU_MAGIC;
+
+ /* Set ready bit */
+ status = RCBA16(IOBPS);
+ status |= IOBPS_READY;
+ RCBA16(IOBPS) = status;
+
+ if (!iobp_poll())
+ return;
+
+ /* Check for successful transaction */
+ status = RCBA16(IOBPS);
+ if (status & IOBPS_TX_MASK)
+ printk(BIOS_ERR, "IOBP: write 0x%08x failed\n", address);
+}
+
+void pch_iobp_update(u32 address, u32 andvalue, u32 orvalue)
+{
+ u32 data = pch_iobp_read(address);
+
+ /* Update the data */
+ data &= andvalue;
+ data |= orvalue;
+
+ pch_iobp_write(address, data);
+}
diff --git a/src/soc/intel/broadwell/lpc.c b/src/soc/intel/broadwell/lpc.c
new file mode 100644
index 0000000..4b21326
--- /dev/null
+++ b/src/soc/intel/broadwell/lpc.c
@@ -0,0 +1,584 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <delay.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <pc80/mc146818rtc.h>
+#include <pc80/isa-dma.h>
+#include <pc80/i8259.h>
+#include <arch/io.h>
+#include <arch/ioapic.h>
+#include <arch/acpi.h>
+#include <cpu/cpu.h>
+#include <cpu/x86/smm.h>
+#include <cbmem.h>
+#include <reg_script.h>
+#include <string.h>
+#include <broadwell/gpio.h>
+#include <broadwell/iobp.h>
+#include <broadwell/iomap.h>
+#include <broadwell/lpc.h>
+#include <broadwell/nvs.h>
+#include <broadwell/pch.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/pm.h>
+#include <broadwell/ramstage.h>
+#include <broadwell/rcba.h>
+#include <chip.h>
+
+static void pch_enable_ioapic(struct device *dev)
+{
+ u32 reg32;
+
+ set_ioapic_id(IO_APIC_ADDR, 0x02);
+
+ /* affirm full set of redirection table entries ("write once") */
+ reg32 = io_apic_read(IO_APIC_ADDR, 0x01);
+
+ /* PCH-LP has 39 redirection entries */
+ reg32 &= ~0x00ff0000;
+ reg32 |= 0x00270000;
+
+ io_apic_write(IO_APIC_ADDR, 0x01, reg32);
+
+ /*
+ * Select Boot Configuration register (0x03) and
+ * use Processor System Bus (0x01) to deliver interrupts.
+ */
+ io_apic_write(IO_APIC_ADDR, 0x03, 0x01);
+}
+
+/* PIRQ[n]_ROUT[3:0] - PIRQ Routing Control
+ * 0x00 - 0000 = Reserved
+ * 0x01 - 0001 = Reserved
+ * 0x02 - 0010 = Reserved
+ * 0x03 - 0011 = IRQ3
+ * 0x04 - 0100 = IRQ4
+ * 0x05 - 0101 = IRQ5
+ * 0x06 - 0110 = IRQ6
+ * 0x07 - 0111 = IRQ7
+ * 0x08 - 1000 = Reserved
+ * 0x09 - 1001 = IRQ9
+ * 0x0A - 1010 = IRQ10
+ * 0x0B - 1011 = IRQ11
+ * 0x0C - 1100 = IRQ12
+ * 0x0D - 1101 = Reserved
+ * 0x0E - 1110 = IRQ14
+ * 0x0F - 1111 = IRQ15
+ * PIRQ[n]_ROUT[7] - PIRQ Routing Control
+ * 0x80 - The PIRQ is not routed.
+ */
+
+static void pch_pirq_init(device_t dev)
+{
+ device_t irq_dev;
+ config_t *config = dev->chip_info;
+
+ pci_write_config8(dev, PIRQA_ROUT, config->pirqa_routing);
+ pci_write_config8(dev, PIRQB_ROUT, config->pirqb_routing);
+ pci_write_config8(dev, PIRQC_ROUT, config->pirqc_routing);
+ pci_write_config8(dev, PIRQD_ROUT, config->pirqd_routing);
+
+ pci_write_config8(dev, PIRQE_ROUT, config->pirqe_routing);
+ pci_write_config8(dev, PIRQF_ROUT, config->pirqf_routing);
+ pci_write_config8(dev, PIRQG_ROUT, config->pirqg_routing);
+ pci_write_config8(dev, PIRQH_ROUT, config->pirqh_routing);
+
+ for(irq_dev = all_devices; irq_dev; irq_dev = irq_dev->next) {
+ u8 int_pin=0, int_line=0;
+
+ if (!irq_dev->enabled || irq_dev->path.type != DEVICE_PATH_PCI)
+ continue;
+
+ int_pin = pci_read_config8(irq_dev, PCI_INTERRUPT_PIN);
+
+ switch (int_pin) {
+ case 1: /* INTA# */ int_line = config->pirqa_routing; break;
+ case 2: /* INTB# */ int_line = config->pirqb_routing; break;
+ case 3: /* INTC# */ int_line = config->pirqc_routing; break;
+ case 4: /* INTD# */ int_line = config->pirqd_routing; break;
+ }
+
+ if (!int_line)
+ continue;
+
+ pci_write_config8(irq_dev, PCI_INTERRUPT_LINE, int_line);
+ }
+}
+
+static void pch_power_options(device_t dev)
+{
+ u16 reg16;
+ const char *state;
+ /* Get the chip configuration */
+ config_t *config = dev->chip_info;
+ int pwr_on=CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL;
+
+ /* Which state do we want to goto after g3 (power restored)?
+ * 0 == S0 Full On
+ * 1 == S5 Soft Off
+ *
+ * If the option is not existent (Laptops), use Kconfig setting.
+ */
+ get_option(&pwr_on, "power_on_after_fail");
+
+ reg16 = pci_read_config16(dev, GEN_PMCON_3);
+ reg16 &= 0xfffe;
+ switch (pwr_on) {
+ case MAINBOARD_POWER_OFF:
+ reg16 |= 1;
+ state = "off";
+ break;
+ case MAINBOARD_POWER_ON:
+ reg16 &= ~1;
+ state = "on";
+ break;
+ case MAINBOARD_POWER_KEEP:
+ reg16 &= ~1;
+ state = "state keep";
+ break;
+ default:
+ state = "undefined";
+ }
+ pci_write_config16(dev, GEN_PMCON_3, reg16);
+ printk(BIOS_INFO, "Set power %s after power failure.\n", state);
+
+ /* GPE setup based on device tree configuration */
+ enable_all_gpe(config->gpe0_en_1, config->gpe0_en_2,
+ config->gpe0_en_3, config->gpe0_en_4);
+
+ /* SMI setup based on device tree configuration */
+ enable_alt_smi(config->alt_gp_smi_en);
+}
+
+static void pch_rtc_init(struct device *dev)
+{
+ u8 reg8;
+ int rtc_failed;
+
+ reg8 = pci_read_config8(dev, GEN_PMCON_3);
+ rtc_failed = reg8 & RTC_BATTERY_DEAD;
+ if (rtc_failed) {
+ reg8 &= ~RTC_BATTERY_DEAD;
+ pci_write_config8(dev, GEN_PMCON_3, reg8);
+ printk(BIOS_DEBUG, "rtc_failed = 0x%x\n", rtc_failed);
+ }
+
+ cmos_init(rtc_failed);
+}
+
+static const struct reg_script pch_misc_init_script[] = {
+ /* Setup SLP signal assertion, SLP_S4=4s, SLP_S3=50ms */
+ REG_PCI_RMW16(GEN_PMCON_3, ~((3 << 4)|(1 << 10)),
+ (1 << 3)|(1 << 11)|(1 << 12)),
+ /* Prepare sleep mode */
+ REG_IO_RMW32(ACPI_BASE_ADDRESS + PM1_CNT, ~SLP_TYP, SCI_EN),
+ /* Setup NMI on errors, disable SERR */
+ REG_IO_RMW8(0x61, ~0xf0, (1 << 2)),
+ /* Disable NMI sources */
+ REG_IO_OR8(0x70, (1 << 7)),
+ /* Indicate DRAM init done for MRC */
+ REG_PCI_OR8(GEN_PMCON_2, (1 << 7)),
+ /* Enable BIOS updates outside of SMM */
+ REG_PCI_RMW8(0xdc, ~(1 << 5), 0),
+ /* Clear status bits to prevent unexpected wake */
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + 0x3310, 0x00000031),
+ REG_MMIO_RMW32(RCBA_BASE_ADDRESS + 0x3f02, ~0x0000000f, 0),
+ /* Setup SERIRQ, enable continuous mode */
+ REG_PCI_OR8(SERIRQ_CNTL, (1 << 7) | (1 << 6)),
+#if !CONFIG_SERIRQ_CONTINUOUS_MODE
+ REG_PCI_RMW8(SERIRQ_CNTL, ~(1 << 6), 0),
+#endif
+ REG_SCRIPT_END
+};
+
+/* Magic register settings for power management */
+static const struct reg_script pch_pm_init_script[] = {
+ REG_PCI_WRITE8(0xa9, 0x46),
+ REG_MMIO_RMW32(RCBA_BASE_ADDRESS + 0x232c, ~1, 0),
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + 0x1100, 0x0000c13f),
+ REG_MMIO_RMW32(RCBA_BASE_ADDRESS + 0x2320, ~0x60, 0x10),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3314, 0x00012fff),
+ REG_MMIO_RMW32(RCBA_BASE_ADDRESS + 0x3318, ~0x000f0330, 0x0dcf0400),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3324, 0x04000000),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3368, 0x00041400),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3388, 0x3f8ddbff),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x33ac, 0x00007001),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x33b0, 0x00181900),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x33c0, 0x00060A00),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x33d0, 0x06200840),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3a28, 0x01010101),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3a2c, 0x040c0404),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3a9c, 0x9000000a),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x2b1c, 0x03808033),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x2b34, 0x80000009),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3348, 0x022ddfff),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x334c, 0x00000001),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3358, 0x0001c000),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3380, 0x3f8ddbff),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3384, 0x0001c7e1),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x338c, 0x0001c7e1),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3398, 0x0001c000),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x33a8, 0x00181900),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x33dc, 0x00080000),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x33e0, 0x00000001),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3a20, 0x0000040c),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3a24, 0x01010101),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3a30, 0x01010101),
+ REG_PCI_RMW32(0xac, ~0x00200000, 0),
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + 0x0410, 0x00000003),
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + 0x2618, 0x08000000),
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + 0x2300, 0x00000002),
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + 0x2600, 0x00000008),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x33b4, 0x00007001),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3350, 0x022ddfff),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3354, 0x00000001),
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + 0x33d4, 0x08000000),
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + 0x33c8, 0x08000080),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x2b10, 0x0000883c),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x2b14, 0x1e0a4616),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x2b24, 0x40000005),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x2b20, 0x0005db01),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3a80, 0x05145005),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + 0x3a84, 0x00001005),
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + 0x33d4, 0x2fff2fb1),
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + 0x33c8, 0x00008000),
+ REG_SCRIPT_END
+};
+
+static void pch_enable_mphy(void)
+{
+ u32 gpio71_native = gpio_is_native(71);
+ u32 data_and = 0xffffffff;
+ u32 data_or = (1 << 14) | (1 << 13) | (1 << 12);
+
+ if (gpio71_native) {
+ data_or |= (1 << 0);
+ if (pch_is_wpt()) {
+ data_and &= ~((1 << 7) | (1 << 6) | (1 << 3));
+ data_or |= (1 << 5) | (1 << 4);
+
+ if (pch_is_wpt_ulx()) {
+ /* Check if SATA and USB3 MPHY are enabled */
+ u32 strap19 = pch_read_soft_strap(19);
+ strap19 &= ((1 << 31) | (1 << 30));
+ strap19 >>= 30;
+ if (strap19 == 3) {
+ data_or |= (1 << 3);
+ printk(BIOS_DEBUG, "Enable ULX MPHY PG "
+ "control in single domain\n");
+ } else if (strap19 == 0) {
+ printk(BIOS_DEBUG, "Enable ULX MPHY PG "
+ "control in split domains\n");
+ } else {
+ printk(BIOS_DEBUG, "Invalid PCH Soft "
+ "Strap 19 configuration\n");
+ }
+ } else {
+ data_or |= (1 << 3);
+ }
+ }
+ }
+
+ pch_iobp_update(0xCF000000, data_and, data_or);
+}
+
+/* Power Management init */
+static void pch_pm_init(struct device *dev)
+{
+ printk(BIOS_DEBUG, "PCH PM init\n");
+
+ pch_enable_mphy();
+
+ reg_script_run_on_dev(dev, pch_pm_init_script);
+
+ if (pch_is_wpt())
+ RCBA32_OR(0x33e0, (1 << 4) | (1 << 1));
+
+ pch_iobp_update(0xCA000000, ~0UL, 0x00000009);
+
+ /* Set RCBA 0x2b1c[29]=1 if DSP disabled */
+ if (RCBA32(FD) & PCH_DISABLE_ADSPD)
+ RCBA32_OR(0x2b1c, (1 << 29));
+
+ /* Lock */
+ RCBA32_OR(0x3a6c, 0x00000001);
+}
+
+static void pch_cg_init(device_t dev)
+{
+ u32 reg32;
+ u16 reg16;
+
+ /* DMI */
+ RCBA32_OR(0x2234, 0xf);
+
+ reg16 = pci_read_config16(dev, GEN_PMCON_1);
+ reg16 &= ~(1 << 10); /* Disable BIOS_PCI_EXP_EN for native PME */
+ if (pch_is_wpt())
+ reg16 &= ~(1 << 11);
+ else
+ reg16 |= (1 << 11);
+ reg16 |= (1 << 5) | (1 << 6) | (1 << 7) | (1 << 12);
+ reg16 |= (1 << 2); // PCI CLKRUN# Enable
+ pci_write_config16(dev, GEN_PMCON_1, reg16);
+
+ /*
+ * RCBA + 0x2614[27:25,14:13,10,8] = 101,11,1,1
+ * RCBA + 0x2614[23:16] = 0x20
+ * RCBA + 0x2614[30:28] = 0x0
+ * RCBA + 0x2614[26] = 1 (IF 0:2.0@0x08 >= 0x0b)
+ */
+ RCBA32_AND_OR(0x2614, 0x8bffffff, 0x0a206500);
+
+ /* Check for 0:2.0@0x08 >= 0x0b */
+ if (pci_read_config8(SA_DEV_IGD, 0x8) >= 0x0b)
+ RCBA32_OR(0x2614, (1 << 26));
+
+ RCBA32_OR(0x900, 0x0000031f);
+
+ reg32 = RCBA32(CG);
+ if (RCBA32(0x3454) & (1 << 4))
+ reg32 &= ~(1 << 29); // LPC Dynamic
+ else
+ reg32 |= (1 << 29); // LPC Dynamic
+ reg32 |= (1 << 31); // LP LPC
+ reg32 |= (1 << 30); // LP BLA
+ reg32 |= (1 << 28); // GPIO Dynamic
+ reg32 |= (1 << 27); // HPET Dynamic
+ reg32 |= (1 << 26); // Generic Platform Event Clock
+ if (RCBA32(BUC) & PCH_DISABLE_GBE)
+ reg32 |= (1 << 23); // GbE Static
+ reg32 |= (1 << 22); // HDA Dynamic
+ reg32 |= (1 << 16); // PCI Dynamic
+ RCBA32(CG) = reg32;
+
+ /* PCH-LP LPC */
+ if (pch_is_wpt())
+ RCBA32_AND_OR(0x3434, ~0x1f, 0x17);
+ else
+ RCBA32_OR(0x3434, 0x7);
+
+ /* SATA */
+ RCBA32_AND_OR(0x333c, 0xffcfffff, 0x00c00000);
+
+ /* SPI */
+ RCBA32_OR(0x38c0, 0x3c07);
+
+ pch_iobp_update(0xCE00C000, ~1UL, 0x00000000);
+}
+
+static void pch_set_acpi_mode(void)
+{
+#if CONFIG_HAVE_SMI_HANDLER
+ if (acpi_slp_type != 3) {
+ printk(BIOS_DEBUG, "Disabling ACPI via APMC:\n");
+ outb(APM_CNT_ACPI_DISABLE, APM_CNT);
+ printk(BIOS_DEBUG, "done.\n");
+ }
+#endif /* CONFIG_HAVE_SMI_HANDLER */
+}
+
+static void lpc_init(struct device *dev)
+{
+ /* Legacy initialization */
+ isa_dma_init();
+ pch_rtc_init(dev);
+ reg_script_run_on_dev(dev, pch_misc_init_script);
+
+ /* Interrupt configuration */
+ pch_enable_ioapic(dev);
+ pch_pirq_init(dev);
+ setup_i8259();
+ i8259_configure_irq_trigger(9, 1);
+
+ /* Initialize power management */
+ pch_power_options(dev);
+ pch_pm_init(dev);
+ pch_cg_init(dev);
+
+ pch_set_acpi_mode();
+}
+
+static void pch_lpc_add_mmio_resources(device_t dev)
+{
+ u32 reg;
+ struct resource *res;
+ const u32 default_decode_base = IO_APIC_ADDR;
+
+ /*
+ * Just report all resources from IO-APIC base to 4GiB. Don't mark
+ * them reserved as that may upset the OS if this range is marked
+ * as reserved in the e820.
+ */
+ res = new_resource(dev, OIC);
+ res->base = default_decode_base;
+ res->size = 0 - default_decode_base;
+ res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
+
+ /* RCBA */
+ if (RCBA_BASE_ADDRESS < default_decode_base) {
+ res = new_resource(dev, RCBA);
+ res->base = RCBA_BASE_ADDRESS;
+ res->size = 16 * 1024;
+ res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED |
+ IORESOURCE_FIXED | IORESOURCE_RESERVE;
+ }
+
+ /* Check LPC Memory Decode register. */
+ reg = pci_read_config32(dev, LGMR);
+ if (reg & 1) {
+ reg &= ~0xffff;
+ if (reg < default_decode_base) {
+ res = new_resource(dev, LGMR);
+ res->base = reg;
+ res->size = 16 * 1024;
+ res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED |
+ IORESOURCE_FIXED | IORESOURCE_RESERVE;
+ }
+ }
+}
+
+/* Default IO range claimed by the LPC device. The upper bound is exclusive. */
+#define LPC_DEFAULT_IO_RANGE_LOWER 0
+#define LPC_DEFAULT_IO_RANGE_UPPER 0x1000
+
+static inline int pch_io_range_in_default(u16 base, u16 size)
+{
+ /* Does it start above the range? */
+ if (base >= LPC_DEFAULT_IO_RANGE_UPPER)
+ return 0;
+
+ /* Is it entirely contained? */
+ if (base >= LPC_DEFAULT_IO_RANGE_LOWER &&
+ (base + size) < LPC_DEFAULT_IO_RANGE_UPPER)
+ return 1;
+
+ /* This will return not in range for partial overlaps. */
+ return 0;
+}
+
+/*
+ * Note: this function assumes there is no overlap with the default LPC device's
+ * claimed range: LPC_DEFAULT_IO_RANGE_LOWER -> LPC_DEFAULT_IO_RANGE_UPPER.
+ */
+static void pch_lpc_add_io_resource(device_t dev, u16 base, u16 size, int index)
+{
+ struct resource *res;
+
+ if (pch_io_range_in_default(base, size))
+ return;
+
+ res = new_resource(dev, index);
+ res->base = base;
+ res->size = size;
+ res->flags = IORESOURCE_IO | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
+}
+
+static void pch_lpc_add_gen_io_resources(device_t dev, int reg_value, int index)
+{
+ /*
+ * Check if the register is enabled. If so and the base exceeds the
+ * device's deafult claim range add the resoure.
+ */
+ if (reg_value & 1) {
+ u16 base = reg_value & 0xfffc;
+ u16 size = (0x3 | ((reg_value >> 16) & 0xfc)) + 1;
+ pch_lpc_add_io_resource(dev, base, size, index);
+ }
+}
+
+static void pch_lpc_add_io_resources(device_t dev)
+{
+ struct resource *res;
+ config_t *config = dev->chip_info;
+
+ /* Add the default claimed IO range for the LPC device. */
+ res = new_resource(dev, 0);
+ res->base = LPC_DEFAULT_IO_RANGE_LOWER;
+ res->size = LPC_DEFAULT_IO_RANGE_UPPER - LPC_DEFAULT_IO_RANGE_LOWER;
+ res->flags = IORESOURCE_IO | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
+
+ /* GPIOBASE */
+ pch_lpc_add_io_resource(dev, GPIO_BASE_ADDRESS,
+ GPIO_BASE_SIZE, GPIO_BASE);
+
+ /* PMBASE */
+ pch_lpc_add_io_resource(dev, ACPI_BASE_ADDRESS, ACPI_BASE_SIZE, PMBASE);
+
+ /* LPC Generic IO Decode range. */
+ pch_lpc_add_gen_io_resources(dev, config->gen1_dec, LPC_GEN1_DEC);
+ pch_lpc_add_gen_io_resources(dev, config->gen2_dec, LPC_GEN2_DEC);
+ pch_lpc_add_gen_io_resources(dev, config->gen3_dec, LPC_GEN3_DEC);
+ pch_lpc_add_gen_io_resources(dev, config->gen4_dec, LPC_GEN4_DEC);
+}
+
+static void pch_lpc_read_resources(device_t dev)
+{
+ global_nvs_t *gnvs;
+
+ /* Get the normal PCI resources of this device. */
+ pci_dev_read_resources(dev);
+
+ /* Add non-standard MMIO resources. */
+ pch_lpc_add_mmio_resources(dev);
+
+ /* Add IO resources. */
+ pch_lpc_add_io_resources(dev);
+
+ /* Allocate ACPI NVS in CBMEM */
+ gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(global_nvs_t));
+ if (acpi_slp_type != 3 && gnvs)
+ memset(gnvs, 0, sizeof(global_nvs_t));
+}
+
+static struct device_operations device_ops = {
+ .read_resources = &pch_lpc_read_resources,
+ .set_resources = &pci_dev_set_resources,
+ .enable_resources = &pci_dev_enable_resources,
+ .init = &lpc_init,
+ .scan_bus = &scan_static_bus,
+ .ops_pci = &broadwell_pci_ops,
+};
+
+static const unsigned short pci_device_ids[] = {
+ PCH_LPT_LP_SAMPLE,
+ PCH_LPT_LP_PREMIUM,
+ PCH_LPT_LP_MAINSTREAM,
+ PCH_LPT_LP_VALUE,
+ PCH_WPT_HSW_U_SAMPLE,
+ PCH_WPT_BDW_U_SAMPLE,
+ PCH_WPT_BDW_U_PREMIUM,
+ PCH_WPT_BDW_U_BASE,
+ PCH_WPT_BDW_Y_SAMPLE,
+ PCH_WPT_BDW_Y_PREMIUM,
+ PCH_WPT_BDW_Y_BASE,
+ PCH_WPT_BDW_H,
+ 0
+};
+
+static const struct pci_driver pch_lpc __pci_driver = {
+ .ops = &device_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = pci_device_ids,
+};
diff --git a/src/soc/intel/broadwell/me.c b/src/soc/intel/broadwell/me.c
new file mode 100644
index 0000000..15bcc34
--- /dev/null
+++ b/src/soc/intel/broadwell/me.c
@@ -0,0 +1,1007 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * This is a ramstage driver for the Intel Management Engine found in the
+ * southbridge. It handles the required boot-time messages over the
+ * MMIO-based Management Engine Interface to tell the ME that the BIOS is
+ * finished with POST. Additional messages are defined for debug but are
+ * not used unless the console loglevel is high enough.
+ */
+
+#include <arch/acpi.h>
+#include <arch/hlt.h>
+#include <arch/io.h>
+#include <console/console.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <device/pci_def.h>
+#include <string.h>
+#include <delay.h>
+#include <elog.h>
+#include <broadwell/me.h>
+#include <broadwell/lpc.h>
+#include <broadwell/pch.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/ramstage.h>
+#include <broadwell/rcba.h>
+#include <chip.h>
+
+#if CONFIG_CHROMEOS
+#include <vendorcode/google/chromeos/chromeos.h>
+#include <vendorcode/google/chromeos/gnvs.h>
+#endif
+
+/* Path that the BIOS should take based on ME state */
+static const char *me_bios_path_values[] = {
+ [ME_NORMAL_BIOS_PATH] = "Normal",
+ [ME_S3WAKE_BIOS_PATH] = "S3 Wake",
+ [ME_ERROR_BIOS_PATH] = "Error",
+ [ME_RECOVERY_BIOS_PATH] = "Recovery",
+ [ME_DISABLE_BIOS_PATH] = "Disable",
+ [ME_FIRMWARE_UPDATE_BIOS_PATH] = "Firmware Update",
+};
+static int intel_me_read_mbp(me_bios_payload *mbp_data, device_t dev);
+
+/* MMIO base address for MEI interface */
+static u32 mei_base_address;
+void intel_me_mbp_clear(device_t dev);
+
+#if CONFIG_DEBUG_INTEL_ME
+static void mei_dump(void *ptr, int dword, int offset, const char *type)
+{
+ struct mei_csr *csr;
+
+ printk(BIOS_SPEW, "%-9s[%02x] : ", type, offset);
+
+ switch (offset) {
+ case MEI_H_CSR:
+ case MEI_ME_CSR_HA:
+ csr = ptr;
+ if (!csr) {
+ printk(BIOS_SPEW, "ERROR: 0x%08x\n", dword);
+ break;
+ }
+ printk(BIOS_SPEW, "cbd=%u cbrp=%02u cbwp=%02u ready=%u "
+ "reset=%u ig=%u is=%u ie=%u\n", csr->buffer_depth,
+ csr->buffer_read_ptr, csr->buffer_write_ptr,
+ csr->ready, csr->reset, csr->interrupt_generate,
+ csr->interrupt_status, csr->interrupt_enable);
+ break;
+ case MEI_ME_CB_RW:
+ case MEI_H_CB_WW:
+ printk(BIOS_SPEW, "CB: 0x%08x\n", dword);
+ break;
+ default:
+ printk(BIOS_SPEW, "0x%08x\n", offset);
+ break;
+ }
+}
+#else
+# define mei_dump(ptr,dword,offset,type) do {} while (0)
+#endif
+
+/*
+ * ME/MEI access helpers using memcpy to avoid aliasing.
+ */
+
+static inline void mei_read_dword_ptr(void *ptr, int offset)
+{
+ u32 dword = read32(mei_base_address + offset);
+ memcpy(ptr, &dword, sizeof(dword));
+ mei_dump(ptr, dword, offset, "READ");
+}
+
+static inline void mei_write_dword_ptr(void *ptr, int offset)
+{
+ u32 dword = 0;
+ memcpy(&dword, ptr, sizeof(dword));
+ write32(mei_base_address + offset, dword);
+ mei_dump(ptr, dword, offset, "WRITE");
+}
+
+static inline void pci_read_dword_ptr(device_t dev, void *ptr, int offset)
+{
+ u32 dword = pci_read_config32(dev, offset);
+ memcpy(ptr, &dword, sizeof(dword));
+ mei_dump(ptr, dword, offset, "PCI READ");
+}
+
+static inline void read_host_csr(struct mei_csr *csr)
+{
+ mei_read_dword_ptr(csr, MEI_H_CSR);
+}
+
+static inline void write_host_csr(struct mei_csr *csr)
+{
+ mei_write_dword_ptr(csr, MEI_H_CSR);
+}
+
+static inline void read_me_csr(struct mei_csr *csr)
+{
+ mei_read_dword_ptr(csr, MEI_ME_CSR_HA);
+}
+
+static inline void write_cb(u32 dword)
+{
+ write32(mei_base_address + MEI_H_CB_WW, dword);
+ mei_dump(NULL, dword, MEI_H_CB_WW, "WRITE");
+}
+
+static inline u32 read_cb(void)
+{
+ u32 dword = read32(mei_base_address + MEI_ME_CB_RW);
+ mei_dump(NULL, dword, MEI_ME_CB_RW, "READ");
+ return dword;
+}
+
+/* Wait for ME ready bit to be asserted */
+static int mei_wait_for_me_ready(void)
+{
+ struct mei_csr me;
+ unsigned try = ME_RETRY;
+
+ while (try--) {
+ read_me_csr(&me);
+ if (me.ready)
+ return 0;
+ udelay(ME_DELAY);
+ }
+
+ printk(BIOS_ERR, "ME: failed to become ready\n");
+ return -1;
+}
+
+static void mei_reset(void)
+{
+ struct mei_csr host;
+
+ if (mei_wait_for_me_ready() < 0)
+ return;
+
+ /* Reset host and ME circular buffers for next message */
+ read_host_csr(&host);
+ host.reset = 1;
+ host.interrupt_generate = 1;
+ write_host_csr(&host);
+
+ if (mei_wait_for_me_ready() < 0)
+ return;
+
+ /* Re-init and indicate host is ready */
+ read_host_csr(&host);
+ host.interrupt_generate = 1;
+ host.ready = 1;
+ host.reset = 0;
+ write_host_csr(&host);
+}
+
+static int mei_send_packet(struct mei_header *mei, void *req_data)
+{
+ struct mei_csr host;
+ unsigned ndata, n;
+ u32 *data;
+
+ /* Number of dwords to write */
+ ndata = mei->length >> 2;
+
+ /* Pad non-dword aligned request message length */
+ if (mei->length & 3)
+ ndata++;
+ if (!ndata) {
+ printk(BIOS_DEBUG, "ME: request has no data\n");
+ return -1;
+ }
+ ndata++; /* Add MEI header */
+
+ /*
+ * Make sure there is still room left in the circular buffer.
+ * Reset the buffer pointers if the requested message will not fit.
+ */
+ read_host_csr(&host);
+ if ((host.buffer_depth - host.buffer_write_ptr) < ndata) {
+ printk(BIOS_ERR, "ME: circular buffer full, resetting...\n");
+ mei_reset();
+ read_host_csr(&host);
+ }
+
+ /* Ensure the requested length will fit in the circular buffer. */
+ if ((host.buffer_depth - host.buffer_write_ptr) < ndata) {
+ printk(BIOS_ERR, "ME: message (%u) too large for buffer (%u)\n",
+ ndata + 2, host.buffer_depth);
+ return -1;
+ }
+
+ /* Write MEI header */
+ mei_write_dword_ptr(mei, MEI_H_CB_WW);
+ ndata--;
+
+ /* Write message data */
+ data = req_data;
+ for (n = 0; n < ndata; ++n)
+ write_cb(*data++);
+
+ /* Generate interrupt to the ME */
+ read_host_csr(&host);
+ host.interrupt_generate = 1;
+ write_host_csr(&host);
+
+ /* Make sure ME is ready after sending request data */
+ return mei_wait_for_me_ready();
+}
+
+static int mei_send_data(u8 me_address, u8 host_address,
+ void *req_data, int req_bytes)
+{
+ struct mei_header header = {
+ .client_address = me_address,
+ .host_address = host_address,
+ };
+ struct mei_csr host;
+ int current = 0;
+ u8 *req_ptr = req_data;
+
+ while (!header.is_complete) {
+ int remain = req_bytes - current;
+ int buf_len;
+
+ read_host_csr(&host);
+ buf_len = host.buffer_depth - host.buffer_write_ptr;
+
+ if (buf_len > remain) {
+ /* Send all remaining data as final message */
+ header.length = req_bytes - current;
+ header.is_complete = 1;
+ } else {
+ /* Send as much data as the buffer can hold */
+ header.length = buf_len;
+ }
+
+ mei_send_packet(&header, req_ptr);
+
+ req_ptr += header.length;
+ current += header.length;
+ }
+
+ return 0;
+}
+
+static int mei_send_header(u8 me_address, u8 host_address,
+ void *header, int header_len, int complete)
+{
+ struct mei_header mei = {
+ .client_address = me_address,
+ .host_address = host_address,
+ .length = header_len,
+ .is_complete = complete,
+ };
+ return mei_send_packet(&mei, header);
+}
+
+static int mei_recv_msg(void *header, int header_bytes,
+ void *rsp_data, int rsp_bytes)
+{
+ struct mei_header mei_rsp;
+ struct mei_csr me, host;
+ unsigned ndata, n;
+ unsigned expected;
+ u32 *data;
+
+ /* Total number of dwords to read from circular buffer */
+ expected = (rsp_bytes + sizeof(mei_rsp) + header_bytes) >> 2;
+ if (rsp_bytes & 3)
+ expected++;
+
+ if (mei_wait_for_me_ready() < 0)
+ return -1;
+
+ /*
+ * The interrupt status bit does not appear to indicate that the
+ * message has actually been received. Instead we wait until the
+ * expected number of dwords are present in the circular buffer.
+ */
+ for (n = ME_RETRY; n; --n) {
+ read_me_csr(&me);
+ if ((me.buffer_write_ptr - me.buffer_read_ptr) >= expected)
+ break;
+ udelay(ME_DELAY);
+ }
+ if (!n) {
+ printk(BIOS_ERR, "ME: timeout waiting for data: expected "
+ "%u, available %u\n", expected,
+ me.buffer_write_ptr - me.buffer_read_ptr);
+ return -1;
+ }
+
+ /* Read and verify MEI response header from the ME */
+ mei_read_dword_ptr(&mei_rsp, MEI_ME_CB_RW);
+ if (!mei_rsp.is_complete) {
+ printk(BIOS_ERR, "ME: response is not complete\n");
+ return -1;
+ }
+
+ /* Handle non-dword responses and expect at least the header */
+ ndata = mei_rsp.length >> 2;
+ if (mei_rsp.length & 3)
+ ndata++;
+ if (ndata != (expected - 1)) {
+ printk(BIOS_ERR, "ME: response is missing data %d != %d\n",
+ ndata, (expected - 1));
+ return -1;
+ }
+
+ /* Read response header from the ME */
+ data = header;
+ for (n = 0; n < (header_bytes >> 2); ++n)
+ *data++ = read_cb();
+ ndata -= header_bytes >> 2;
+
+ /* Make sure caller passed a buffer with enough space */
+ if (ndata != (rsp_bytes >> 2)) {
+ printk(BIOS_ERR, "ME: not enough room in response buffer: "
+ "%u != %u\n", ndata, rsp_bytes >> 2);
+ return -1;
+ }
+
+ /* Read response data from the circular buffer */
+ data = rsp_data;
+ for (n = 0; n < ndata; ++n)
+ *data++ = read_cb();
+
+ /* Tell the ME that we have consumed the response */
+ read_host_csr(&host);
+ host.interrupt_status = 1;
+ host.interrupt_generate = 1;
+ write_host_csr(&host);
+
+ return mei_wait_for_me_ready();
+}
+
+static inline int mei_sendrecv_mkhi(struct mkhi_header *mkhi,
+ void *req_data, int req_bytes,
+ void *rsp_data, int rsp_bytes)
+{
+ struct mkhi_header mkhi_rsp;
+
+ /* Send header */
+ if (mei_send_header(MEI_ADDRESS_MKHI, MEI_HOST_ADDRESS,
+ mkhi, sizeof(*mkhi), req_bytes ? 0 : 1) < 0)
+ return -1;
+
+ /* Send data if available */
+ if (req_bytes && mei_send_data(MEI_ADDRESS_MKHI, MEI_HOST_ADDRESS,
+ req_data, req_bytes) < 0)
+ return -1;
+
+ /* Return now if no response expected */
+ if (!rsp_bytes)
+ return 0;
+
+ /* Read header and data */
+ if (mei_recv_msg(&mkhi_rsp, sizeof(mkhi_rsp),
+ rsp_data, rsp_bytes) < 0)
+ return -1;
+
+ if (!mkhi_rsp.is_response ||
+ mkhi->group_id != mkhi_rsp.group_id ||
+ mkhi->command != mkhi_rsp.command) {
+ printk(BIOS_ERR, "ME: invalid response, group %u ?= %u,"
+ "command %u ?= %u, is_response %u\n", mkhi->group_id,
+ mkhi_rsp.group_id, mkhi->command, mkhi_rsp.command,
+ mkhi_rsp.is_response);
+ return -1;
+ }
+
+ return 0;
+}
+
+static inline int mei_sendrecv_icc(struct icc_header *icc,
+ void *req_data, int req_bytes,
+ void *rsp_data, int rsp_bytes)
+{
+ struct icc_header icc_rsp;
+
+ /* Send header */
+ if (mei_send_header(MEI_ADDRESS_ICC, MEI_HOST_ADDRESS,
+ icc, sizeof(*icc), req_bytes ? 0 : 1) < 0)
+ return -1;
+
+ /* Send data if available */
+ if (req_bytes && mei_send_data(MEI_ADDRESS_ICC, MEI_HOST_ADDRESS,
+ req_data, req_bytes) < 0)
+ return -1;
+
+ /* Read header and data, if needed */
+ if (rsp_bytes && mei_recv_msg(&icc_rsp, sizeof(icc_rsp),
+ rsp_data, rsp_bytes) < 0)
+ return -1;
+
+ return 0;
+}
+
+/*
+ * mbp give up routine. This path is taken if hfs.mpb_rdy is 0 or the read
+ * state machine on the BIOS end doesn't match the ME's state machine.
+ */
+static void intel_me_mbp_give_up(device_t dev)
+{
+ struct mei_csr csr;
+
+ pci_write_config32(dev, PCI_ME_H_GS2, PCI_ME_MBP_GIVE_UP);
+
+ read_host_csr(&csr);
+ csr.reset = 1;
+ csr.interrupt_generate = 1;
+ write_host_csr(&csr);
+}
+
+/*
+ * mbp clear routine. This will wait for the ME to indicate that
+ * the MBP has been read and cleared.
+ */
+void intel_me_mbp_clear(device_t dev)
+{
+ int count;
+ struct me_hfs2 hfs2;
+
+ /* Wait for the mbp_cleared indicator */
+ for (count = ME_RETRY; count > 0; --count) {
+ pci_read_dword_ptr(dev, &hfs2, PCI_ME_HFS2);
+ if (hfs2.mbp_cleared)
+ break;
+ udelay(ME_DELAY);
+ }
+
+ if (count == 0) {
+ printk(BIOS_WARNING, "ME: Timeout waiting for mbp_cleared\n");
+ intel_me_mbp_give_up(dev);
+ } else {
+ printk(BIOS_INFO, "ME: MBP cleared\n");
+ }
+}
+
+#if (CONFIG_DEFAULT_CONSOLE_LOGLEVEL >= BIOS_DEBUG)
+static inline void print_cap(const char *name, int state)
+{
+ printk(BIOS_DEBUG, "ME Capability: %-41s : %sabled\n",
+ name, state ? " en" : "dis");
+}
+
+static void me_print_fw_version(mbp_fw_version_name *vers_name)
+{
+ if (!vers_name) {
+ printk(BIOS_ERR, "ME: mbp missing version report\n");
+ return;
+ }
+
+ printk(BIOS_DEBUG, "ME: found version %d.%d.%d.%d\n",
+ vers_name->major_version, vers_name->minor_version,
+ vers_name->hotfix_version, vers_name->build_version);
+}
+
+#if CONFIG_DEBUG_INTEL_ME
+/* Get ME Firmware Capabilities */
+static int mkhi_get_fwcaps(mbp_mefwcaps *cap)
+{
+ u32 rule_id = 0;
+ struct me_fwcaps cap_msg;
+ struct mkhi_header mkhi = {
+ .group_id = MKHI_GROUP_ID_FWCAPS,
+ .command = MKHI_FWCAPS_GET_RULE,
+ };
+
+ /* Send request and wait for response */
+ if (mei_sendrecv_mkhi(&mkhi, &rule_id, sizeof(u32),
+ &cap_msg, sizeof(cap_msg)) < 0) {
+ printk(BIOS_ERR, "ME: GET FWCAPS message failed\n");
+ return -1;
+ }
+ *cap = cap_msg.caps_sku;
+ return 0;
+}
+
+/* Get ME Firmware Capabilities */
+static void me_print_fwcaps(mbp_mefwcaps *cap)
+{
+ mbp_mefwcaps local_caps;
+ if (!cap) {
+ cap = &local_caps;
+ printk(BIOS_ERR, "ME: mbp missing fwcaps report\n");
+ if (mkhi_get_fwcaps(cap))
+ return;
+ }
+
+ print_cap("Full Network manageability", cap->full_net);
+ print_cap("Regular Network manageability", cap->std_net);
+ print_cap("Manageability", cap->manageability);
+ print_cap("IntelR Anti-Theft (AT)", cap->intel_at);
+ print_cap("IntelR Capability Licensing Service (CLS)", cap->intel_cls);
+ print_cap("IntelR Power Sharing Technology (MPC)", cap->intel_mpc);
+ print_cap("ICC Over Clocking", cap->icc_over_clocking);
+ print_cap("Protected Audio Video Path (PAVP)", cap->pavp);
+ print_cap("IPV6", cap->ipv6);
+ print_cap("KVM Remote Control (KVM)", cap->kvm);
+ print_cap("Outbreak Containment Heuristic (OCH)", cap->och);
+ print_cap("Virtual LAN (VLAN)", cap->vlan);
+ print_cap("TLS", cap->tls);
+ print_cap("Wireless LAN (WLAN)", cap->wlan);
+}
+#endif
+#endif
+
+/* Send END OF POST message to the ME */
+static int mkhi_end_of_post(void)
+{
+ struct mkhi_header mkhi = {
+ .group_id = MKHI_GROUP_ID_GEN,
+ .command = MKHI_END_OF_POST,
+ };
+ u32 eop_ack;
+
+ /* Send request and wait for response */
+ printk(BIOS_NOTICE, "ME: %s\n", __FUNCTION__);
+ if (mei_sendrecv_mkhi(&mkhi, NULL, 0, &eop_ack, sizeof(eop_ack)) < 0) {
+ printk(BIOS_ERR, "ME: END OF POST message failed\n");
+ return -1;
+ }
+
+ printk(BIOS_INFO, "ME: END OF POST message successful (%d)\n", eop_ack);
+ return 0;
+}
+
+void intel_me_finalize(void)
+{
+ device_t dev = PCH_DEV_ME;
+ struct me_hfs hfs;
+ u32 reg32;
+
+ /* S3 path will have hidden this device already */
+ if (!mei_base_address || mei_base_address == 0xfffffff0)
+ return;
+
+#if CONFIG_ME_MBP_CLEAR_LATE
+ /* Wait for ME MBP Cleared indicator */
+ intel_me_mbp_clear(dev);
+#endif
+
+ /* Make sure ME is in a mode that expects EOP */
+ reg32 = pci_read_config32(dev, PCI_ME_HFS);
+ memcpy(&hfs, ®32, sizeof(u32));
+
+ /* Abort and leave device alone if not normal mode */
+ if (hfs.fpt_bad ||
+ hfs.working_state != ME_HFS_CWS_NORMAL ||
+ hfs.operation_mode != ME_HFS_MODE_NORMAL)
+ return;
+
+ /* Try to send EOP command so ME stops accepting other commands */
+ mkhi_end_of_post();
+
+ /* Make sure IO is disabled */
+ reg32 = pci_read_config32(dev, PCI_COMMAND);
+ reg32 &= ~(PCI_COMMAND_MASTER |
+ PCI_COMMAND_MEMORY | PCI_COMMAND_IO);
+ pci_write_config32(dev, PCI_COMMAND, reg32);
+
+ /* Hide the PCI device */
+ RCBA32_OR(FD2, PCH_DISABLE_MEI1);
+}
+
+static int me_icc_set_clock_enables(u32 mask)
+{
+ struct icc_clock_enables_msg clk = {
+ .clock_enables = 0, /* Turn off specified clocks */
+ .clock_mask = mask,
+ .no_response = 1, /* Do not expect response */
+ };
+ struct icc_header icc = {
+ .api_version = ICC_API_VERSION_LYNXPOINT,
+ .icc_command = ICC_SET_CLOCK_ENABLES,
+ .length = sizeof(clk),
+ };
+
+ /* Send request and wait for response */
+ if (mei_sendrecv_icc(&icc, &clk, sizeof(clk), NULL, 0) < 0) {
+ printk(BIOS_ERR, "ME: ICC SET CLOCK ENABLES message failed\n");
+ return -1;
+ } else {
+ printk(BIOS_INFO, "ME: ICC SET CLOCK ENABLES 0x%08x\n", mask);
+ }
+
+ return 0;
+}
+
+/* Determine the path that we should take based on ME status */
+static me_bios_path intel_me_path(device_t dev)
+{
+ me_bios_path path = ME_DISABLE_BIOS_PATH;
+ struct me_hfs hfs;
+ struct me_hfs2 hfs2;
+
+ /* Check and dump status */
+ intel_me_status();
+
+ pci_read_dword_ptr(dev, &hfs, PCI_ME_HFS);
+ pci_read_dword_ptr(dev, &hfs2, PCI_ME_HFS2);
+
+ /* Check Current Working State */
+ switch (hfs.working_state) {
+ case ME_HFS_CWS_NORMAL:
+ path = ME_NORMAL_BIOS_PATH;
+ break;
+ case ME_HFS_CWS_REC:
+ path = ME_RECOVERY_BIOS_PATH;
+ break;
+ default:
+ path = ME_DISABLE_BIOS_PATH;
+ break;
+ }
+
+ /* Check Current Operation Mode */
+ switch (hfs.operation_mode) {
+ case ME_HFS_MODE_NORMAL:
+ break;
+ case ME_HFS_MODE_DEBUG:
+ case ME_HFS_MODE_DIS:
+ case ME_HFS_MODE_OVER_JMPR:
+ case ME_HFS_MODE_OVER_MEI:
+ default:
+ path = ME_DISABLE_BIOS_PATH;
+ break;
+ }
+
+ /* Check for any error code and valid firmware and MBP */
+ if (hfs.error_code || hfs.fpt_bad)
+ path = ME_ERROR_BIOS_PATH;
+
+ /* Check if the MBP is ready */
+ if (!hfs2.mbp_rdy) {
+ printk(BIOS_CRIT, "%s: mbp is not ready!\n",
+ __FUNCTION__);
+ path = ME_ERROR_BIOS_PATH;
+ }
+
+#if CONFIG_ELOG
+ if (path != ME_NORMAL_BIOS_PATH) {
+ struct elog_event_data_me_extended data = {
+ .current_working_state = hfs.working_state,
+ .operation_state = hfs.operation_state,
+ .operation_mode = hfs.operation_mode,
+ .error_code = hfs.error_code,
+ .progress_code = hfs2.progress_code,
+ .current_pmevent = hfs2.current_pmevent,
+ .current_state = hfs2.current_state,
+ };
+ elog_add_event_byte(ELOG_TYPE_MANAGEMENT_ENGINE, path);
+ elog_add_event_raw(ELOG_TYPE_MANAGEMENT_ENGINE_EXT,
+ &data, sizeof(data));
+ }
+#endif
+
+ return path;
+}
+
+/* Prepare ME for MEI messages */
+static int intel_mei_setup(device_t dev)
+{
+ struct resource *res;
+ struct mei_csr host;
+ u32 reg32;
+
+ /* Find the MMIO base for the ME interface */
+ res = find_resource(dev, PCI_BASE_ADDRESS_0);
+ if (!res || res->base == 0 || res->size == 0) {
+ printk(BIOS_DEBUG, "ME: MEI resource not present!\n");
+ return -1;
+ }
+ mei_base_address = res->base;
+
+ /* Ensure Memory and Bus Master bits are set */
+ reg32 = pci_read_config32(dev, PCI_COMMAND);
+ reg32 |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
+ pci_write_config32(dev, PCI_COMMAND, reg32);
+
+ /* Clean up status for next message */
+ read_host_csr(&host);
+ host.interrupt_generate = 1;
+ host.ready = 1;
+ host.reset = 0;
+ write_host_csr(&host);
+
+ return 0;
+}
+
+/* Read the Extend register hash of ME firmware */
+static int intel_me_extend_valid(device_t dev)
+{
+ struct me_heres status;
+ u32 extend[8] = {0};
+ int i, count = 0;
+
+ pci_read_dword_ptr(dev, &status, PCI_ME_HERES);
+ if (!status.extend_feature_present) {
+ printk(BIOS_ERR, "ME: Extend Feature not present\n");
+ return -1;
+ }
+
+ if (!status.extend_reg_valid) {
+ printk(BIOS_ERR, "ME: Extend Register not valid\n");
+ return -1;
+ }
+
+ switch (status.extend_reg_algorithm) {
+ case PCI_ME_EXT_SHA1:
+ count = 5;
+ printk(BIOS_DEBUG, "ME: Extend SHA-1: ");
+ break;
+ case PCI_ME_EXT_SHA256:
+ count = 8;
+ printk(BIOS_DEBUG, "ME: Extend SHA-256: ");
+ break;
+ default:
+ printk(BIOS_ERR, "ME: Extend Algorithm %d unknown\n",
+ status.extend_reg_algorithm);
+ return -1;
+ }
+
+ for (i = 0; i < count; ++i) {
+ extend[i] = pci_read_config32(dev, PCI_ME_HER(i));
+ printk(BIOS_DEBUG, "%08x", extend[i]);
+ }
+ printk(BIOS_DEBUG, "\n");
+
+#if CONFIG_CHROMEOS
+ /* Save hash in NVS for the OS to verify */
+ chromeos_set_me_hash(extend, count);
+#endif
+
+ return 0;
+}
+
+/* Check whether ME is present and do basic init */
+static void intel_me_init(device_t dev)
+{
+ config_t *config = dev->chip_info;
+ me_bios_path path = intel_me_path(dev);
+ me_bios_payload mbp_data;
+
+ /* Do initial setup and determine the BIOS path */
+ printk(BIOS_NOTICE, "ME: BIOS path: %s\n", me_bios_path_values[path]);
+
+ if (path == ME_NORMAL_BIOS_PATH) {
+ /* Validate the extend register */
+ intel_me_extend_valid(dev);
+ }
+
+ memset(&mbp_data, 0, sizeof(mbp_data));
+
+ /*
+ * According to the ME9 BWG, BIOS is required to fetch MBP data in
+ * all boot flows except S3 Resume.
+ */
+
+ /* Prepare MEI MMIO interface */
+ if (intel_mei_setup(dev) < 0)
+ return;
+
+ if (intel_me_read_mbp(&mbp_data, dev))
+ return;
+
+#if (CONFIG_DEFAULT_CONSOLE_LOGLEVEL >= BIOS_DEBUG)
+ me_print_fw_version(mbp_data.fw_version_name);
+#if CONFIG_DEBUG_INTEL_ME
+ me_print_fwcaps(mbp_data.fw_capabilities);
+#endif
+
+ if (mbp_data.plat_time) {
+ printk(BIOS_DEBUG, "ME: Wake Event to ME Reset: %u ms\n",
+ mbp_data.plat_time->wake_event_mrst_time_ms);
+ printk(BIOS_DEBUG, "ME: ME Reset to Platform Reset: %u ms\n",
+ mbp_data.plat_time->mrst_pltrst_time_ms);
+ printk(BIOS_DEBUG, "ME: Platform Reset to CPU Reset: %u ms\n",
+ mbp_data.plat_time->pltrst_cpurst_time_ms);
+ }
+#endif
+
+ /* Set clock enables according to devicetree */
+ if (config && config->icc_clock_disable)
+ me_icc_set_clock_enables(config->icc_clock_disable);
+
+ /*
+ * Leave the ME unlocked. It will be locked via SMI command later.
+ */
+}
+
+static void intel_me_enable(device_t dev)
+{
+#if CONFIG_HAVE_ACPI_RESUME
+ /* Avoid talking to the device in S3 path */
+ if (acpi_slp_type == 3) {
+ dev->enabled = 0;
+ pch_disable_devfn(dev);
+ }
+#endif
+}
+
+static struct device_operations device_ops = {
+ .read_resources = &pci_dev_read_resources,
+ .set_resources = &pci_dev_set_resources,
+ .enable_resources = &pci_dev_enable_resources,
+ .enable = &intel_me_enable,
+ .init = &intel_me_init,
+ .ops_pci = &broadwell_pci_ops,
+};
+
+static const unsigned short pci_device_ids[] = {
+ 0x9c3a, /* Low Power */
+ 0x9cba, /* WildcatPoint */
+ 0
+};
+
+static const struct pci_driver intel_me __pci_driver = {
+ .ops = &device_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices= pci_device_ids,
+};
+
+/******************************************************************************
+ * */
+static u32 me_to_host_words_pending(void)
+{
+ struct mei_csr me;
+ read_me_csr(&me);
+ if (!me.ready)
+ return 0;
+ return (me.buffer_write_ptr - me.buffer_read_ptr) &
+ (me.buffer_depth - 1);
+}
+
+struct mbp_payload {
+ mbp_header header;
+ u32 data[0];
+};
+
+/*
+ * mbp seems to be following its own flow, let's retrieve it in a dedicated
+ * function.
+ */
+static int intel_me_read_mbp(me_bios_payload *mbp_data, device_t dev)
+{
+ mbp_header mbp_hdr;
+ u32 me2host_pending;
+ struct mei_csr host;
+ struct me_hfs2 hfs2;
+ struct mbp_payload *mbp;
+ int i;
+
+ pci_read_dword_ptr(dev, &hfs2, PCI_ME_HFS2);
+
+ if (!hfs2.mbp_rdy) {
+ printk(BIOS_ERR, "ME: MBP not ready\n");
+ goto mbp_failure;
+ }
+
+ me2host_pending = me_to_host_words_pending();
+ if (!me2host_pending) {
+ printk(BIOS_ERR, "ME: no mbp data!\n");
+ goto mbp_failure;
+ }
+
+ /* we know for sure that at least the header is there */
+ mei_read_dword_ptr(&mbp_hdr, MEI_ME_CB_RW);
+
+ if ((mbp_hdr.num_entries > (mbp_hdr.mbp_size / 2)) ||
+ (me2host_pending < mbp_hdr.mbp_size)) {
+ printk(BIOS_ERR, "ME: mbp of %d entries, total size %d words"
+ " buffer contains %d words\n",
+ mbp_hdr.num_entries, mbp_hdr.mbp_size,
+ me2host_pending);
+ goto mbp_failure;
+ }
+ mbp = malloc(mbp_hdr.mbp_size * sizeof(u32));
+ if (!mbp)
+ goto mbp_failure;
+
+ mbp->header = mbp_hdr;
+ me2host_pending--;
+
+ i = 0;
+ while (i != me2host_pending) {
+ mei_read_dword_ptr(&mbp->data[i], MEI_ME_CB_RW);
+ i++;
+ }
+
+ /* Signal to the ME that the host has finished reading the MBP. */
+ read_host_csr(&host);
+ host.interrupt_generate = 1;
+ write_host_csr(&host);
+
+#if !CONFIG_ME_MBP_CLEAR_LATE
+ /* Wait for the mbp_cleared indicator. */
+ intel_me_mbp_clear(dev);
+#endif
+
+ /* Dump out the MBP contents. */
+#if (CONFIG_DEFAULT_CONSOLE_LOGLEVEL >= BIOS_DEBUG)
+ printk(BIOS_INFO, "ME MBP: Header: items: %d, size dw: %d\n",
+ mbp->header.num_entries, mbp->header.mbp_size);
+#if CONFIG_DEBUG_INTEL_ME
+ for (i = 0; i < mbp->header.mbp_size - 1; i++) {
+ printk(BIOS_INFO, "ME MBP: %04x: 0x%08x\n", i, mbp->data[i]);
+ }
+#endif
+#endif
+
+#define ASSIGN_FIELD_PTR(field_,val_) \
+ { \
+ mbp_data->field_ = (typeof(mbp_data->field_))(void *)val_; \
+ break; \
+ }
+
+ /* Setup the pointers in the me_bios_payload structure. */
+ for (i = 0; i < mbp->header.mbp_size - 1;) {
+ mbp_item_header *item = (void *)&mbp->data[i];
+
+ switch(MBP_MAKE_IDENT(item->app_id, item->item_id)) {
+ case MBP_IDENT(KERNEL, FW_VER):
+ ASSIGN_FIELD_PTR(fw_version_name, &mbp->data[i+1]);
+
+ case MBP_IDENT(ICC, PROFILE):
+ ASSIGN_FIELD_PTR(icc_profile, &mbp->data[i+1]);
+
+ case MBP_IDENT(INTEL_AT, STATE):
+ ASSIGN_FIELD_PTR(at_state, &mbp->data[i+1]);
+
+ case MBP_IDENT(KERNEL, FW_CAP):
+ ASSIGN_FIELD_PTR(fw_capabilities, &mbp->data[i+1]);
+
+ case MBP_IDENT(KERNEL, ROM_BIST):
+ ASSIGN_FIELD_PTR(rom_bist_data, &mbp->data[i+1]);
+
+ case MBP_IDENT(KERNEL, PLAT_KEY):
+ ASSIGN_FIELD_PTR(platform_key, &mbp->data[i+1]);
+
+ case MBP_IDENT(KERNEL, FW_TYPE):
+ ASSIGN_FIELD_PTR(fw_plat_type, &mbp->data[i+1]);
+
+ case MBP_IDENT(KERNEL, MFS_FAILURE):
+ ASSIGN_FIELD_PTR(mfsintegrity, &mbp->data[i+1]);
+
+ case MBP_IDENT(KERNEL, PLAT_TIME):
+ ASSIGN_FIELD_PTR(plat_time, &mbp->data[i+1]);
+
+ case MBP_IDENT(NFC, SUPPORT_DATA):
+ ASSIGN_FIELD_PTR(nfc_data, &mbp->data[i+1]);
+
+ default:
+ printk(BIOS_ERR, "ME MBP: unknown item 0x%x @ "
+ "dw offset 0x%x\n", mbp->data[i], i);
+ break;
+ }
+ i += item->length;
+ }
+ #undef ASSIGN_FIELD_PTR
+
+ return 0;
+
+mbp_failure:
+ intel_me_mbp_give_up(dev);
+ return -1;
+}
diff --git a/src/soc/intel/broadwell/me_status.c b/src/soc/intel/broadwell/me_status.c
new file mode 100644
index 0000000..476268f
--- /dev/null
+++ b/src/soc/intel/broadwell/me_status.c
@@ -0,0 +1,278 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <console/console.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <stdlib.h>
+#include <string.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/me.h>
+
+/* HFS1[3:0] Current Working State Values */
+static const char *me_cws_values[] = {
+ [ME_HFS_CWS_RESET] = "Reset",
+ [ME_HFS_CWS_INIT] = "Initializing",
+ [ME_HFS_CWS_REC] = "Recovery",
+ [3] = "Unknown (3)",
+ [4] = "Unknown (4)",
+ [ME_HFS_CWS_NORMAL] = "Normal",
+ [ME_HFS_CWS_WAIT] = "Platform Disable Wait",
+ [ME_HFS_CWS_TRANS] = "OP State Transition",
+ [ME_HFS_CWS_INVALID] = "Invalid CPU Plugged In",
+ [9] = "Unknown (9)",
+ [10] = "Unknown (10)",
+ [11] = "Unknown (11)",
+ [12] = "Unknown (12)",
+ [13] = "Unknown (13)",
+ [14] = "Unknown (14)",
+ [15] = "Unknown (15)",
+};
+
+/* HFS1[8:6] Current Operation State Values */
+static const char *me_opstate_values[] = {
+ [ME_HFS_STATE_PREBOOT] = "Preboot",
+ [ME_HFS_STATE_M0_UMA] = "M0 with UMA",
+ [ME_HFS_STATE_M3] = "M3 without UMA",
+ [ME_HFS_STATE_M0] = "M0 without UMA",
+ [ME_HFS_STATE_BRINGUP] = "Bring up",
+ [ME_HFS_STATE_ERROR] = "M0 without UMA but with error"
+};
+
+/* HFS[19:16] Current Operation Mode Values */
+static const char *me_opmode_values[] = {
+ [ME_HFS_MODE_NORMAL] = "Normal",
+ [ME_HFS_MODE_DEBUG] = "Debug",
+ [ME_HFS_MODE_DIS] = "Soft Temporary Disable",
+ [ME_HFS_MODE_OVER_JMPR] = "Security Override via Jumper",
+ [ME_HFS_MODE_OVER_MEI] = "Security Override via MEI Message"
+};
+
+/* HFS[15:12] Error Code Values */
+static const char *me_error_values[] = {
+ [ME_HFS_ERROR_NONE] = "No Error",
+ [ME_HFS_ERROR_UNCAT] = "Uncategorized Failure",
+ [ME_HFS_ERROR_IMAGE] = "Image Failure",
+ [ME_HFS_ERROR_DEBUG] = "Debug Failure"
+};
+
+/* HFS2[31:28] ME Progress Code */
+static const char *me_progress_values[] = {
+ [ME_HFS2_PHASE_ROM] = "ROM Phase",
+ [ME_HFS2_PHASE_BUP] = "BUP Phase",
+ [ME_HFS2_PHASE_UKERNEL] = "uKernel Phase",
+ [ME_HFS2_PHASE_POLICY] = "Policy Module",
+ [ME_HFS2_PHASE_MODULE_LOAD] = "Module Loading",
+ [ME_HFS2_PHASE_UNKNOWN] = "Unknown",
+ [ME_HFS2_PHASE_HOST_COMM] = "Host Communication"
+};
+
+/* HFS2[27:24] Power Management Event */
+static const char *me_pmevent_values[] = {
+ [ME_HFS2_PMEVENT_CLEAN_MOFF_MX_WAKE] =
+ "Clean Moff->Mx wake",
+ [ME_HFS2_PMEVENT_MOFF_MX_WAKE_ERROR] =
+ "Moff->Mx wake after an error",
+ [ME_HFS2_PMEVENT_CLEAN_GLOBAL_RESET] =
+ "Clean global reset",
+ [ME_HFS2_PMEVENT_CLEAN_GLOBAL_RESET_ERROR] =
+ "Global reset after an error",
+ [ME_HFS2_PMEVENT_CLEAN_ME_RESET] =
+ "Clean Intel ME reset",
+ [ME_HFS2_PMEVENT_ME_RESET_EXCEPTION] =
+ "Intel ME reset due to exception",
+ [ME_HFS2_PMEVENT_PSEUDO_ME_RESET] =
+ "Pseudo-global reset",
+ [ME_HFS2_PMEVENT_S0MO_SXM3] =
+ "S0/M0->Sx/M3",
+ [ME_HFS2_PMEVENT_SXM3_S0M0] =
+ "Sx/M3->S0/M0",
+ [ME_HFS2_PMEVENT_NON_PWR_CYCLE_RESET] =
+ "Non-power cycle reset",
+ [ME_HFS2_PMEVENT_PWR_CYCLE_RESET_M3] =
+ "Power cycle reset through M3",
+ [ME_HFS2_PMEVENT_PWR_CYCLE_RESET_MOFF] =
+ "Power cycle reset through Moff",
+ [ME_HFS2_PMEVENT_SXMX_SXMOFF] =
+ "Sx/Mx->Sx/Moff"
+};
+
+/* Progress Code 0 states */
+static const char *me_progress_rom_values[] = {
+ [ME_HFS2_STATE_ROM_BEGIN] = "BEGIN",
+ [ME_HFS2_STATE_ROM_DISABLE] = "DISABLE"
+};
+
+/* Progress Code 1 states */
+static const char *me_progress_bup_values[] = {
+ [ME_HFS2_STATE_BUP_INIT] =
+ "Initialization starts",
+ [ME_HFS2_STATE_BUP_DIS_HOST_WAKE] =
+ "Disable the host wake event",
+ [ME_HFS2_STATE_BUP_FLOW_DET] =
+ "Flow determination start process",
+ [ME_HFS2_STATE_BUP_VSCC_ERR] =
+ "Error reading/matching the VSCC table in the descriptor",
+ [ME_HFS2_STATE_BUP_CHECK_STRAP] =
+ "Check to see if straps say ME DISABLED",
+ [ME_HFS2_STATE_BUP_PWR_OK_TIMEOUT] =
+ "Timeout waiting for PWROK",
+ [ME_HFS2_STATE_BUP_MANUF_OVRD_STRAP] =
+ "Possibly handle BUP manufacturing override strap",
+ [ME_HFS2_STATE_BUP_M3] =
+ "Bringup in M3",
+ [ME_HFS2_STATE_BUP_M0] =
+ "Bringup in M0",
+ [ME_HFS2_STATE_BUP_FLOW_DET_ERR] =
+ "Flow detection error",
+ [ME_HFS2_STATE_BUP_M3_CLK_ERR] =
+ "M3 clock switching error",
+ [ME_HFS2_STATE_BUP_CPU_RESET_DID_TIMEOUT_MEM_MISSING] =
+ "Host error - CPU reset timeout, DID timeout, memory missing",
+ [ME_HFS2_STATE_BUP_M3_KERN_LOAD] =
+ "M3 kernel load",
+ [ME_HFS2_STATE_BUP_T32_MISSING] =
+ "T34 missing - cannot program ICC",
+ [ME_HFS2_STATE_BUP_WAIT_DID] =
+ "Waiting for DID BIOS message",
+ [ME_HFS2_STATE_BUP_WAIT_DID_FAIL] =
+ "Waiting for DID BIOS message failure",
+ [ME_HFS2_STATE_BUP_DID_NO_FAIL] =
+ "DID reported no error",
+ [ME_HFS2_STATE_BUP_ENABLE_UMA] =
+ "Enabling UMA",
+ [ME_HFS2_STATE_BUP_ENABLE_UMA_ERR] =
+ "Enabling UMA error",
+ [ME_HFS2_STATE_BUP_SEND_DID_ACK] =
+ "Sending DID Ack to BIOS",
+ [ME_HFS2_STATE_BUP_SEND_DID_ACK_ERR] =
+ "Sending DID Ack to BIOS error",
+ [ME_HFS2_STATE_BUP_M0_CLK] =
+ "Switching clocks in M0",
+ [ME_HFS2_STATE_BUP_M0_CLK_ERR] =
+ "Switching clocks in M0 error",
+ [ME_HFS2_STATE_BUP_TEMP_DIS] =
+ "ME in temp disable",
+ [ME_HFS2_STATE_BUP_M0_KERN_LOAD] =
+ "M0 kernel load",
+};
+
+/* Progress Code 3 states */
+static const char *me_progress_policy_values[] = {
+ [ME_HFS2_STATE_POLICY_ENTRY] = "Entery into Policy Module",
+ [ME_HFS2_STATE_POLICY_RCVD_S3] = "Received S3 entry",
+ [ME_HFS2_STATE_POLICY_RCVD_S4] = "Received S4 entry",
+ [ME_HFS2_STATE_POLICY_RCVD_S5] = "Received S5 entry",
+ [ME_HFS2_STATE_POLICY_RCVD_UPD] = "Received UPD entry",
+ [ME_HFS2_STATE_POLICY_RCVD_PCR] = "Received PCR entry",
+ [ME_HFS2_STATE_POLICY_RCVD_NPCR] = "Received NPCR entry",
+ [ME_HFS2_STATE_POLICY_RCVD_HOST_WAKE] = "Received host wake",
+ [ME_HFS2_STATE_POLICY_RCVD_AC_DC] = "Received AC<>DC switch",
+ [ME_HFS2_STATE_POLICY_RCVD_DID] = "Received DRAM Init Done",
+ [ME_HFS2_STATE_POLICY_VSCC_NOT_FOUND] =
+ "VSCC Data not found for flash device",
+ [ME_HFS2_STATE_POLICY_VSCC_INVALID] =
+ "VSCC Table is not valid",
+ [ME_HFS2_STATE_POLICY_FPB_ERR] =
+ "Flash Partition Boundary is outside address space",
+ [ME_HFS2_STATE_POLICY_DESCRIPTOR_ERR] =
+ "ME cannot access the chipset descriptor region",
+ [ME_HFS2_STATE_POLICY_VSCC_NO_MATCH] =
+ "Required VSCC values for flash parts do not match",
+};
+
+static inline void me_read_dword_ptr(void *ptr, int offset)
+{
+ u32 dword = pci_read_config32(PCH_DEV_ME, offset);
+ memcpy(ptr, &dword, sizeof(dword));
+}
+
+void intel_me_status(void)
+{
+ struct me_hfs _hfs, *hfs = &_hfs;
+ struct me_hfs2 _hfs2, *hfs2 = &_hfs2;
+
+ me_read_dword_ptr(hfs, PCI_ME_HFS);
+ me_read_dword_ptr(hfs2, PCI_ME_HFS2);
+
+ /* Check Current States */
+ printk(BIOS_DEBUG, "ME: FW Partition Table : %s\n",
+ hfs->fpt_bad ? "BAD" : "OK");
+ printk(BIOS_DEBUG, "ME: Bringup Loader Failure : %s\n",
+ hfs->ft_bup_ld_flr ? "YES" : "NO");
+ printk(BIOS_DEBUG, "ME: Firmware Init Complete : %s\n",
+ hfs->fw_init_complete ? "YES" : "NO");
+ printk(BIOS_DEBUG, "ME: Manufacturing Mode : %s\n",
+ hfs->mfg_mode ? "YES" : "NO");
+ printk(BIOS_DEBUG, "ME: Boot Options Present : %s\n",
+ hfs->boot_options_present ? "YES" : "NO");
+ printk(BIOS_DEBUG, "ME: Update In Progress : %s\n",
+ hfs->update_in_progress ? "YES" : "NO");
+ printk(BIOS_DEBUG, "ME: Current Working State : %s\n",
+ me_cws_values[hfs->working_state]);
+ printk(BIOS_DEBUG, "ME: Current Operation State : %s\n",
+ me_opstate_values[hfs->operation_state]);
+ printk(BIOS_DEBUG, "ME: Current Operation Mode : %s\n",
+ me_opmode_values[hfs->operation_mode]);
+ printk(BIOS_DEBUG, "ME: Error Code : %s\n",
+ me_error_values[hfs->error_code]);
+ printk(BIOS_DEBUG, "ME: Progress Phase : %s\n",
+ me_progress_values[hfs2->progress_code]);
+ printk(BIOS_DEBUG, "ME: Power Management Event : %s\n",
+ me_pmevent_values[hfs2->current_pmevent]);
+
+ printk(BIOS_DEBUG, "ME: Progress Phase State : ");
+ switch (hfs2->progress_code) {
+ case ME_HFS2_PHASE_ROM: /* ROM Phase */
+ printk(BIOS_DEBUG, "%s",
+ me_progress_rom_values[hfs2->current_state]);
+ break;
+
+ case ME_HFS2_PHASE_BUP: /* Bringup Phase */
+ if (hfs2->current_state < ARRAY_SIZE(me_progress_bup_values)
+ && me_progress_bup_values[hfs2->current_state])
+ printk(BIOS_DEBUG, "%s",
+ me_progress_bup_values[hfs2->current_state]);
+ else
+ printk(BIOS_DEBUG, "0x%02x", hfs2->current_state);
+ break;
+
+ case ME_HFS2_PHASE_POLICY: /* Policy Module Phase */
+ if (hfs2->current_state < ARRAY_SIZE(me_progress_policy_values)
+ && me_progress_policy_values[hfs2->current_state])
+ printk(BIOS_DEBUG, "%s",
+ me_progress_policy_values[hfs2->current_state]);
+ else
+ printk(BIOS_DEBUG, "0x%02x", hfs2->current_state);
+ break;
+
+ case ME_HFS2_PHASE_HOST_COMM: /* Host Communication Phase */
+ if (!hfs2->current_state)
+ printk(BIOS_DEBUG, "Host communication established");
+ else
+ printk(BIOS_DEBUG, "0x%02x", hfs2->current_state);
+ break;
+
+ default:
+ printk(BIOS_DEBUG, "Unknown phase: 0x%02x sate: 0x%02x",
+ hfs2->progress_code, hfs2->current_state);
+ }
+ printk(BIOS_DEBUG, "\n");
+}
diff --git a/src/soc/intel/broadwell/memmap.c b/src/soc/intel/broadwell/memmap.c
new file mode 100644
index 0000000..c960347
--- /dev/null
+++ b/src/soc/intel/broadwell/memmap.c
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <cbmem.h>
+#include <device/pci.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/systemagent.h>
+
+static unsigned long get_top_of_ram(void)
+{
+ /*
+ * Base of TSEG is top of usable DRAM below 4GiB. The register has
+ * 1 MiB alignement.
+ */
+ u32 tom = pci_read_config32(SA_DEV_ROOT, TSEG);
+ return (unsigned long) tom & ~((1 << 20) - 1);
+}
+
+void *cbmem_top(void)
+{
+ return (void *)get_top_of_ram();
+}
diff --git a/src/soc/intel/broadwell/microcode/microcode_blob.c b/src/soc/intel/broadwell/microcode/microcode_blob.c
new file mode 100644
index 0000000..62468dd
--- /dev/null
+++ b/src/soc/intel/broadwell/microcode/microcode_blob.c
@@ -0,0 +1,23 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+unsigned microcode[] = {
+#include "microcode_blob.h"
+};
+
diff --git a/src/soc/intel/broadwell/microcode/microcode_blob.h b/src/soc/intel/broadwell/microcode/microcode_blob.h
new file mode 100644
index 0000000..a9162ec
--- /dev/null
+++ b/src/soc/intel/broadwell/microcode/microcode_blob.h
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#if CONFIG_INTEL_LYNXPOINT_LP
+#include "microcode-M7240650_ffff000a.h"
+#include "microcode-M7240651_00000015.h"
+#else
+#include "microcode-M32306c1_ffff000d.h"
+#include "microcode-M32306c2_ffff0003.h"
+#include "microcode-M32306c3_00000012.h"
+#include "microcode-M3240660_ffff000b.h"
+#endif
+ /* Dummy terminator */
+ 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0,
diff --git a/src/soc/intel/broadwell/minihd.c b/src/soc/intel/broadwell/minihd.c
new file mode 100644
index 0000000..43aeec2
--- /dev/null
+++ b/src/soc/intel/broadwell/minihd.c
@@ -0,0 +1,128 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008 Advanced Micro Devices, Inc.
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <device/pci_ops.h>
+#include <arch/io.h>
+#include <delay.h>
+#include <stdlib.h>
+#include <soc/intel/common/hda_verb.h>
+#include <broadwell/ramstage.h>
+
+static const u32 minihd_verb_table[] = {
+ /* coreboot specific header */
+ 0x80862807, // Codec Vendor / Device ID: Intel Mini-HD
+ 0x00000000, // Subsystem ID
+ 0x00000004, // Number of jacks
+
+ /* Enable 3rd Pin and Converter Widget */
+ 0x00878101,
+
+ /* Pin Widget 5 - PORT B */
+ 0x00571C10,
+ 0x00571D00,
+ 0x00571E56,
+ 0x00571F18,
+
+ /* Pin Widget 6 - PORT C */
+ 0x00671C20,
+ 0x00671D00,
+ 0x00671E56,
+ 0x00671F18,
+
+ /* Pin Widget 7 - PORT D */
+ 0x00771C30,
+ 0x00771D00,
+ 0x00771E56,
+ 0x00771F18,
+
+ /* Disable 3rd Pin and Converter Widget */
+ 0x00878100,
+
+ /* Dummy entries to fill out the table */
+ 0x00878100,
+ 0x00878100,
+};
+
+static void minihd_init(struct device *dev)
+{
+ struct resource *res;
+ u32 base, reg32;
+ int codec_mask, i;
+
+ /* Find base address */
+ res = find_resource(dev, PCI_BASE_ADDRESS_0);
+ if (!res)
+ return;
+
+ base = (u32)res->base;
+ printk(BIOS_DEBUG, "Mini-HD: base = %08x\n", (u32)base);
+
+ /* Set Bus Master */
+ reg32 = pci_read_config32(dev, PCI_COMMAND);
+ pci_write_config32(dev, PCI_COMMAND, reg32 | PCI_COMMAND_MASTER);
+
+ /* Mini-HD configuration */
+ reg32 = read32(base + 0x100c);
+ reg32 &= 0xfffc0000;
+ reg32 |= 0x4;
+ write32(base + 0x100c, reg32);
+
+ reg32 = read32(base + 0x1010);
+ reg32 &= 0xfffc0000;
+ reg32 |= 0x4b;
+ write32(base + 0x1010, reg32);
+
+ /* Init the codec and write the verb table */
+ codec_mask = hda_codec_detect(base);
+
+ if (codec_mask) {
+ for (i = 3; i >= 0; i--) {
+ if (codec_mask & (1 << i))
+ hda_codec_init(base, i,
+ sizeof(minihd_verb_table),
+ minihd_verb_table);
+ }
+ }
+}
+
+static struct device_operations minihd_ops = {
+ .read_resources = &pci_dev_read_resources,
+ .set_resources = &pci_dev_set_resources,
+ .enable_resources = &pci_dev_enable_resources,
+ .init = &minihd_init,
+ .ops_pci = &broadwell_pci_ops,
+};
+
+static const unsigned short pci_device_ids[] = {
+ 0x0a0c, /* Haswell */
+ 0x160c, /* Broadwell */
+ 0
+};
+
+static const struct pci_driver minihd_driver __pci_driver = {
+ .ops = &minihd_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = pci_device_ids,
+};
diff --git a/src/soc/intel/broadwell/monotonic_timer.c b/src/soc/intel/broadwell/monotonic_timer.c
new file mode 100644
index 0000000..ace9e60
--- /dev/null
+++ b/src/soc/intel/broadwell/monotonic_timer.c
@@ -0,0 +1,63 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdint.h>
+#include <cpu/x86/msr.h>
+#include <timer.h>
+#include <broadwell/msr.h>
+
+static struct monotonic_counter {
+ int initialized;
+ struct mono_time time;
+ uint32_t last_value;
+} mono_counter;
+
+static inline uint32_t read_counter_msr(void)
+{
+ /* Even though the MSR is 64-bit it is assumed that the hardware
+ * is polled frequently enough to only use the lower 32-bits. */
+ msr_t counter_msr;
+
+ counter_msr = rdmsr(MSR_COUNTER_24_MHZ);
+
+ return counter_msr.lo;
+}
+
+void timer_monotonic_get(struct mono_time *mt)
+{
+ uint32_t current_tick;
+ uint32_t usecs_elapsed;
+
+ if (!mono_counter.initialized) {
+ mono_counter.last_value = read_counter_msr();
+ mono_counter.initialized = 1;
+ }
+
+ current_tick = read_counter_msr();
+ usecs_elapsed = (current_tick - mono_counter.last_value) / 24;
+
+ /* Update current time and tick values only if a full tick occurred. */
+ if (usecs_elapsed) {
+ mono_time_add_usecs(&mono_counter.time, usecs_elapsed);
+ mono_counter.last_value = current_tick;
+ }
+
+ /* Save result. */
+ *mt = mono_counter.time;
+}
diff --git a/src/soc/intel/broadwell/pch.c b/src/soc/intel/broadwell/pch.c
new file mode 100644
index 0000000..9ac8331
--- /dev/null
+++ b/src/soc/intel/broadwell/pch.c
@@ -0,0 +1,212 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <delay.h>
+#include <arch/io.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_def.h>
+#include <broadwell/iobp.h>
+#include <broadwell/pch.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/ramstage.h>
+#include <broadwell/rcba.h>
+#include <broadwell/serialio.h>
+#include <broadwell/spi.h>
+
+u8 pch_revision(void)
+{
+ return pci_read_config8(PCH_DEV_LPC, PCI_REVISION_ID);
+}
+
+u16 pch_type(void)
+{
+ return pci_read_config16(PCH_DEV_LPC, PCI_DEVICE_ID);
+}
+
+/* Return 1 if PCH type is WildcatPoint */
+int pch_is_wpt(void)
+{
+ return ((pch_type() & 0xfff0) == 0x9cc0) ? 1 : 0;
+}
+
+/* Return 1 if PCH type is WildcatPoint ULX */
+int pch_is_wpt_ulx(void)
+{
+ u16 lpcid = pch_type();
+
+ switch (lpcid) {
+ case PCH_WPT_BDW_Y_SAMPLE:
+ case PCH_WPT_BDW_Y_PREMIUM:
+ case PCH_WPT_BDW_Y_BASE:
+ return 1;
+ }
+
+ return 0;
+}
+
+u32 pch_read_soft_strap(int id)
+{
+ u32 fdoc;
+
+ fdoc = SPIBAR32(SPIBAR_FDOC);
+ fdoc &= ~0x00007ffc;
+ SPIBAR32(SPIBAR_FDOC) = fdoc;
+
+ fdoc |= 0x00004000;
+ fdoc |= id * 4;
+ SPIBAR32(SPIBAR_FDOC) = fdoc;
+
+ return SPIBAR32(SPIBAR_FDOD);
+}
+
+#ifndef __PRE_RAM__
+
+/* Put device in D3Hot Power State */
+static void pch_enable_d3hot(device_t dev)
+{
+ u32 reg32 = pci_read_config32(dev, PCH_PCS);
+ reg32 |= PCH_PCS_PS_D3HOT;
+ pci_write_config32(dev, PCH_PCS, reg32);
+}
+
+/* Set bit in Function Disble register to hide this device */
+void pch_disable_devfn(device_t dev)
+{
+ switch (dev->path.pci.devfn) {
+ case PCI_DEVFN(19, 0): /* Audio DSP */
+ RCBA32_OR(FD, PCH_DISABLE_ADSPD);
+ break;
+ case PCI_DEVFN(20, 0): /* XHCI */
+ RCBA32_OR(FD, PCH_DISABLE_XHCI);
+ break;
+ case PCI_DEVFN(21, 0): /* DMA */
+ pch_enable_d3hot(dev);
+ pch_iobp_update(SIO_IOBP_FUNCDIS0, ~0UL, SIO_IOBP_FUNCDIS_DIS);
+ break;
+ case PCI_DEVFN(21, 1): /* I2C0 */
+ pch_enable_d3hot(dev);
+ pch_iobp_update(SIO_IOBP_FUNCDIS1, ~0UL, SIO_IOBP_FUNCDIS_DIS);
+ break;
+ case PCI_DEVFN(21, 2): /* I2C1 */
+ pch_enable_d3hot(dev);
+ pch_iobp_update(SIO_IOBP_FUNCDIS2, ~0UL, SIO_IOBP_FUNCDIS_DIS);
+ break;
+ case PCI_DEVFN(21, 3): /* SPI0 */
+ pch_enable_d3hot(dev);
+ pch_iobp_update(SIO_IOBP_FUNCDIS3, ~0UL, SIO_IOBP_FUNCDIS_DIS);
+ break;
+ case PCI_DEVFN(21, 4): /* SPI1 */
+ pch_enable_d3hot(dev);
+ pch_iobp_update(SIO_IOBP_FUNCDIS4, ~0UL, SIO_IOBP_FUNCDIS_DIS);
+ break;
+ case PCI_DEVFN(21, 5): /* UART0 */
+ pch_enable_d3hot(dev);
+ pch_iobp_update(SIO_IOBP_FUNCDIS5, ~0UL, SIO_IOBP_FUNCDIS_DIS);
+ break;
+ case PCI_DEVFN(21, 6): /* UART1 */
+ pch_enable_d3hot(dev);
+ pch_iobp_update(SIO_IOBP_FUNCDIS6, ~0UL, SIO_IOBP_FUNCDIS_DIS);
+ break;
+ case PCI_DEVFN(22, 0): /* MEI #1 */
+ RCBA32_OR(FD2, PCH_DISABLE_MEI1);
+ break;
+ case PCI_DEVFN(22, 1): /* MEI #2 */
+ RCBA32_OR(FD2, PCH_DISABLE_MEI2);
+ break;
+ case PCI_DEVFN(22, 2): /* IDE-R */
+ RCBA32_OR(FD2, PCH_DISABLE_IDER);
+ break;
+ case PCI_DEVFN(22, 3): /* KT */
+ RCBA32_OR(FD2, PCH_DISABLE_KT);
+ break;
+ case PCI_DEVFN(23, 0): /* SDIO */
+ pch_enable_d3hot(dev);
+ pch_iobp_update(SIO_IOBP_FUNCDIS7, ~0UL, SIO_IOBP_FUNCDIS_DIS);
+ break;
+ case PCI_DEVFN(25, 0): /* Gigabit Ethernet */
+ RCBA32_OR(BUC, PCH_DISABLE_GBE);
+ break;
+ case PCI_DEVFN(26, 0): /* EHCI #2 */
+ RCBA32_OR(FD, PCH_DISABLE_EHCI2);
+ break;
+ case PCI_DEVFN(27, 0): /* HD Audio Controller */
+ RCBA32_OR(FD, PCH_DISABLE_HD_AUDIO);
+ break;
+ case PCI_DEVFN(28, 0): /* PCI Express Root Port 1 */
+ case PCI_DEVFN(28, 1): /* PCI Express Root Port 2 */
+ case PCI_DEVFN(28, 2): /* PCI Express Root Port 3 */
+ case PCI_DEVFN(28, 3): /* PCI Express Root Port 4 */
+ case PCI_DEVFN(28, 4): /* PCI Express Root Port 5 */
+ case PCI_DEVFN(28, 5): /* PCI Express Root Port 6 */
+ case PCI_DEVFN(28, 6): /* PCI Express Root Port 7 */
+ case PCI_DEVFN(28, 7): /* PCI Express Root Port 8 */
+ RCBA32_OR(FD, PCH_DISABLE_PCIE(PCI_FUNC(dev->path.pci.devfn)));
+ break;
+ case PCI_DEVFN(29, 0): /* EHCI #1 */
+ RCBA32_OR(FD, PCH_DISABLE_EHCI1);
+ break;
+ case PCI_DEVFN(31, 0): /* LPC */
+ RCBA32_OR(FD, PCH_DISABLE_LPC);
+ break;
+ case PCI_DEVFN(31, 2): /* SATA #1 */
+ RCBA32_OR(FD, PCH_DISABLE_SATA1);
+ break;
+ case PCI_DEVFN(31, 3): /* SMBUS */
+ RCBA32_OR(FD, PCH_DISABLE_SMBUS);
+ break;
+ case PCI_DEVFN(31, 5): /* SATA #2 */
+ RCBA32_OR(FD, PCH_DISABLE_SATA2);
+ break;
+ case PCI_DEVFN(31, 6): /* Thermal Subsystem */
+ RCBA32_OR(FD, PCH_DISABLE_THERMAL);
+ break;
+ }
+}
+
+void broadwell_pch_enable_dev(device_t dev)
+{
+ u32 reg32;
+
+ /* PCH PCIe Root Ports are handled in PCIe driver. */
+ if (PCI_SLOT(dev->path.pci.devfn) == PCH_DEV_SLOT_PCIE)
+ return;
+
+ if (!dev->enabled) {
+ printk(BIOS_DEBUG, "%s: Disabling device\n", dev_path(dev));
+
+ /* Ensure memory, io, and bus master are all disabled */
+ reg32 = pci_read_config32(dev, PCI_COMMAND);
+ reg32 &= ~(PCI_COMMAND_MASTER |
+ PCI_COMMAND_MEMORY | PCI_COMMAND_IO);
+ pci_write_config32(dev, PCI_COMMAND, reg32);
+
+ /* Disable this device if possible */
+ pch_disable_devfn(dev);
+ } else {
+ /* Enable SERR */
+ reg32 = pci_read_config32(dev, PCI_COMMAND);
+ reg32 |= PCI_COMMAND_SERR;
+ pci_write_config32(dev, PCI_COMMAND, reg32);
+ }
+}
+
+#endif
diff --git a/src/soc/intel/broadwell/pcie.c b/src/soc/intel/broadwell/pcie.c
new file mode 100644
index 0000000..a407f3c
--- /dev/null
+++ b/src/soc/intel/broadwell/pcie.c
@@ -0,0 +1,632 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pciexp.h>
+#include <device/pci_def.h>
+#include <device/pci_ids.h>
+#include <broadwell/gpio.h>
+#include <broadwell/lpc.h>
+#include <broadwell/iobp.h>
+#include <broadwell/pch.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/rcba.h>
+#include <chip.h>
+
+static void pcie_update_cfg8(device_t dev, int reg, u8 mask, u8 or);
+static void pcie_update_cfg(device_t dev, int reg, u32 mask, u32 or);
+
+/* Low Power variant has 6 root ports. */
+#define NUM_ROOT_PORTS 6
+
+struct root_port_config {
+ /* RPFN is a write-once register so keep a copy until it is written */
+ u32 orig_rpfn;
+ u32 new_rpfn;
+ u32 pin_ownership;
+ u32 strpfusecfg1;
+ u32 strpfusecfg2;
+ u32 strpfusecfg3;
+ u32 b0d28f0_32c;
+ u32 b0d28f4_32c;
+ u32 b0d28f5_32c;
+ int coalesce;
+ int gbe_port;
+ int num_ports;
+ device_t ports[NUM_ROOT_PORTS];
+};
+
+static struct root_port_config rpc;
+
+static inline int root_port_is_first(device_t dev)
+{
+ return PCI_FUNC(dev->path.pci.devfn) == 0;
+}
+
+static inline int root_port_is_last(device_t dev)
+{
+ return PCI_FUNC(dev->path.pci.devfn) == (rpc.num_ports - 1);
+}
+
+/* Root ports are numbered 1..N in the documentation. */
+static inline int root_port_number(device_t dev)
+{
+ return PCI_FUNC(dev->path.pci.devfn) + 1;
+}
+
+static void root_port_config_update_gbe_port(void)
+{
+ /* Is the Gbe Port enabled? */
+ if (!((rpc.strpfusecfg1 >> 19) & 1))
+ return;
+
+ switch ((rpc.strpfusecfg1 >> 16) & 0x7) {
+ case 0:
+ rpc.gbe_port = 3;
+ break;
+ case 1:
+ rpc.gbe_port = 4;
+ break;
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ /* Lanes 0-4 of Root Port 5. */
+ rpc.gbe_port = 5;
+ break;
+ default:
+ printk(BIOS_DEBUG, "Invalid GbE Port Selection.\n");
+ }
+}
+
+static void root_port_init_config(device_t dev)
+{
+ int rp;
+
+ if (root_port_is_first(dev)) {
+ rpc.orig_rpfn = RCBA32(RPFN);
+ rpc.new_rpfn = rpc.orig_rpfn;
+ rpc.num_ports = NUM_ROOT_PORTS;
+ rpc.gbe_port = -1;
+
+ rpc.pin_ownership = pci_read_config32(dev, 0x410);
+ root_port_config_update_gbe_port();
+
+ if (dev->chip_info != NULL) {
+ config_t *config = dev->chip_info;
+ rpc.coalesce = config->pcie_port_coalesce;
+ }
+ }
+
+ rp = root_port_number(dev);
+ if (rp > rpc.num_ports) {
+ printk(BIOS_ERR, "Found Root Port %d, expecting %d\n",
+ rp, rpc.num_ports);
+ return;
+ }
+
+ /* Read the fuse configuration and pin ownership. */
+ switch (rp) {
+ case 1:
+ rpc.strpfusecfg1 = pci_read_config32(dev, 0xfc);
+ rpc.b0d28f0_32c = pci_read_config32(dev, 0x32c);
+ break;
+ case 5:
+ rpc.strpfusecfg2 = pci_read_config32(dev, 0xfc);
+ rpc.b0d28f4_32c = pci_read_config32(dev, 0x32c);
+ break;
+ case 6:
+ rpc.b0d28f5_32c = pci_read_config32(dev, 0x32c);
+ rpc.strpfusecfg3 = pci_read_config32(dev, 0xfc);
+ break;
+ default:
+ break;
+ }
+
+ /* Cache pci device. */
+ rpc.ports[rp - 1] = dev;
+}
+
+/* Update devicetree with new Root Port function number assignment */
+static void pch_pcie_device_set_func(int index, int pci_func)
+{
+ device_t dev;
+ unsigned new_devfn;
+
+ dev = rpc.ports[index];
+
+ /* Set the new PCI function field for this Root Port. */
+ rpc.new_rpfn &= ~RPFN_FNMASK(index);
+ rpc.new_rpfn |= RPFN_FNSET(index, pci_func);
+
+ /* Determine the new devfn for this port */
+ new_devfn = PCI_DEVFN(PCH_DEV_SLOT_PCIE, pci_func);
+
+ if (dev->path.pci.devfn != new_devfn) {
+ printk(BIOS_DEBUG,
+ "PCH: PCIe map %02x.%1x -> %02x.%1x\n",
+ PCI_SLOT(dev->path.pci.devfn),
+ PCI_FUNC(dev->path.pci.devfn),
+ PCI_SLOT(new_devfn), PCI_FUNC(new_devfn));
+
+ dev->path.pci.devfn = new_devfn;
+ }
+}
+
+static void pcie_enable_clock_gating(void)
+{
+ int i;
+ int enabled_ports = 0;
+
+ for (i = 0; i < rpc.num_ports; i++) {
+ device_t dev;
+ int rp;
+
+ dev = rpc.ports[i];
+ rp = root_port_number(dev);
+
+ if (!dev->enabled) {
+ /* Configure shared resource clock gating. */
+ if (rp == 1 || rp == 5 || rp == 6)
+ pcie_update_cfg8(dev, 0xe1, 0xc3, 0x3c);
+
+ pcie_update_cfg8(dev, 0xe2, ~(3 << 4), (3 << 4));
+ pcie_update_cfg(dev, 0x420, ~(1 << 31), (1 << 31));
+
+ /* Per-Port CLKREQ# handling. */
+ if (gpio_is_native(18 + rp - 1))
+ pcie_update_cfg(dev, 0x420, ~0, (3 << 29));
+
+ /* Enable static clock gating. */
+ if (rp == 1 && !rpc.ports[1]->enabled &&
+ !rpc.ports[2]->enabled && !rpc.ports[3]->enabled) {
+ pcie_update_cfg8(dev, 0xe2, ~1, 1);
+ pcie_update_cfg8(dev, 0xe1, 0x7f, 0x80);
+ } else if (rp == 5 || rp == 6) {
+ pcie_update_cfg8(dev, 0xe2, ~1, 1);
+ pcie_update_cfg8(dev, 0xe1, 0x7f, 0x80);
+ }
+ continue;
+ }
+
+ enabled_ports++;
+
+ /* Enable dynamic clock gating. */
+ pcie_update_cfg8(dev, 0xe1, 0xfc, 0x03);
+ pcie_update_cfg8(dev, 0xe2, ~(1 << 6), (1 << 6));
+ pcie_update_cfg8(dev, 0xe8, ~(3 << 2), (2 << 2));
+
+ /* Update PECR1 register. */
+ pcie_update_cfg8(dev, 0xe8, ~0, 1);
+ pcie_update_cfg8(dev, 0x324, ~(1 << 5), (1 < 5));
+
+ /* Per-Port CLKREQ# handling. */
+ if (gpio_is_native(18 + rp - 1))
+ pcie_update_cfg(dev, 0x420, ~0, (3 << 29));
+
+ /* Configure shared resource clock gating. */
+ if (rp == 1 || rp == 5 || rp == 6)
+ pcie_update_cfg8(dev, 0xe1, 0xc3, 0x3c);
+ }
+
+ if (!enabled_ports)
+ pcie_update_cfg8(rpc.ports[0], 0xe1, ~(1 << 6), (1 << 6));
+}
+
+static void root_port_commit_config(void)
+{
+ int i;
+
+ /* If the first root port is disabled the coalesce ports. */
+ if (!rpc.ports[0]->enabled)
+ rpc.coalesce = 1;
+
+ /* Perform clock gating configuration. */
+ pcie_enable_clock_gating();
+
+ for (i = 0; i < rpc.num_ports; i++) {
+ device_t dev;
+ u32 reg32;
+
+ dev = rpc.ports[i];
+
+ if (dev == NULL) {
+ printk(BIOS_ERR, "Root Port %d device is NULL?\n", i+1);
+ continue;
+ }
+
+ if (dev->enabled)
+ continue;
+
+ printk(BIOS_DEBUG, "%s: Disabling device\n", dev_path(dev));
+
+ /* Ensure memory, io, and bus master are all disabled */
+ reg32 = pci_read_config32(dev, PCI_COMMAND);
+ reg32 &= ~(PCI_COMMAND_MASTER |
+ PCI_COMMAND_MEMORY | PCI_COMMAND_IO);
+ pci_write_config32(dev, PCI_COMMAND, reg32);
+
+ /* Disable this device if possible */
+ pch_disable_devfn(dev);
+ }
+
+ if (rpc.coalesce) {
+ int current_func;
+
+ /* For all Root Ports N enabled ports get assigned the lower
+ * PCI function number. The disabled ones get upper PCI
+ * function numbers. */
+ current_func = 0;
+ for (i = 0; i < rpc.num_ports; i++) {
+ if (!rpc.ports[i]->enabled)
+ continue;
+ pch_pcie_device_set_func(i, current_func);
+ current_func++;
+ }
+
+ /* Allocate the disabled devices' PCI function number. */
+ for (i = 0; i < rpc.num_ports; i++) {
+ if (rpc.ports[i]->enabled)
+ continue;
+ pch_pcie_device_set_func(i, current_func);
+ current_func++;
+ }
+ }
+
+ printk(BIOS_SPEW, "PCH: RPFN 0x%08x -> 0x%08x\n",
+ rpc.orig_rpfn, rpc.new_rpfn);
+ RCBA32(RPFN) = rpc.new_rpfn;
+}
+
+static void root_port_mark_disable(device_t dev)
+{
+ /* Mark device as disabled. */
+ dev->enabled = 0;
+ /* Mark device to be hidden. */
+ rpc.new_rpfn |= RPFN_HIDE(PCI_FUNC(dev->path.pci.devfn));
+}
+
+static void root_port_check_disable(device_t dev)
+{
+ int rp;
+
+ /* Device already disabled. */
+ if (!dev->enabled) {
+ root_port_mark_disable(dev);
+ return;
+ }
+
+ rp = root_port_number(dev);
+
+ /* Is the GbE port mapped to this Root Port? */
+ if (rp == rpc.gbe_port) {
+ root_port_mark_disable(dev);
+ return;
+ }
+
+ /* Check Root Port Configuration. */
+ switch (rp) {
+ case 2:
+ /* Root Port 2 is disabled for all lane configurations
+ * but config 00b (4x1 links). */
+ if ((rpc.strpfusecfg1 >> 14) & 0x3) {
+ root_port_mark_disable(dev);
+ return;
+ }
+ break;
+ case 3:
+ /* Root Port 3 is disabled in config 11b (1x4 links). */
+ if (((rpc.strpfusecfg1 >> 14) & 0x3) == 0x3) {
+ root_port_mark_disable(dev);
+ return;
+ }
+ break;
+ case 4:
+ /* Root Port 4 is disabled in configs 11b (1x4 links)
+ * and 10b (2x2 links). */
+ if ((rpc.strpfusecfg1 >> 14) & 0x2) {
+ root_port_mark_disable(dev);
+ return;
+ }
+ break;
+ }
+
+ /* Check Pin Ownership. */
+ switch (rp) {
+ case 1:
+ /* Bit 0 is Root Port 1 ownership. */
+ if ((rpc.pin_ownership & 0x1) == 0) {
+ root_port_mark_disable(dev);
+ return;
+ }
+ break;
+ case 2:
+ /* Bit 2 is Root Port 2 ownership. */
+ if ((rpc.pin_ownership & 0x4) == 0) {
+ root_port_mark_disable(dev);
+ return;
+ }
+ break;
+ case 6:
+ /* Bits 7:4 are Root Port 6 pin-lane ownership. */
+ if ((rpc.pin_ownership & 0xf0) == 0) {
+ root_port_mark_disable(dev);
+ return;
+ }
+ break;
+ }
+}
+
+static void pcie_update_cfg8(device_t dev, int reg, u8 mask, u8 or)
+{
+ u8 reg8;
+
+ reg8 = pci_read_config8(dev, reg);
+ reg8 &= mask;
+ reg8 |= or;
+ pci_write_config8(dev, reg, reg8);
+}
+
+static void pcie_update_cfg(device_t dev, int reg, u32 mask, u32 or)
+{
+ u32 reg32;
+
+ reg32 = pci_read_config32(dev, reg);
+ reg32 &= mask;
+ reg32 |= or;
+ pci_write_config32(dev, reg, reg32);
+}
+
+static void pcie_add_0x0202000_iobp(u32 reg)
+{
+ u32 reg32;
+
+ reg32 = pch_iobp_read(reg);
+ reg32 += (0x2 << 16) | (0x2 << 8);
+ pch_iobp_write(reg, reg32);
+}
+
+static void pch_pcie_early(struct device *dev)
+{
+ config_t *config = dev->chip_info;
+ int do_aspm = 0;
+ int rp = root_port_number(dev);
+
+ switch (rp) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ /*
+ * Bits 31:28 of b0d28f0 0x32c register correspnd to
+ * Root Ports 4:1.
+ */
+ do_aspm = !!(rpc.b0d28f0_32c & (1 << (28 + rp - 1)));
+ break;
+ case 5:
+ /*
+ * Bit 28 of b0d28f4 0x32c register correspnd to
+ * Root Ports 4:1.
+ */
+ do_aspm = !!(rpc.b0d28f4_32c & (1 << 28));
+ break;
+ case 6:
+ /*
+ * Bit 28 of b0d28f5 0x32c register correspnd to
+ * Root Ports 4:1.
+ */
+ do_aspm = !!(rpc.b0d28f5_32c & (1 << 28));
+ break;
+ }
+
+ /* Allow ASPM to be forced on in devicetree */
+ if (config && (config->pcie_port_force_aspm & (1 << (rp - 1))))
+ do_aspm = 1;
+
+ printk(BIOS_DEBUG, "PCIe Root Port %d ASPM is %sabled\n",
+ rp, do_aspm ? "en" : "dis");
+
+ if (do_aspm) {
+ /* Set ASPM bits in MPC2 register. */
+ pcie_update_cfg(dev, 0xd4, ~(0x3 << 2), (1 << 4) | (0x2 << 2));
+
+ /* Set unique clock exit latency in MPC register. */
+ pcie_update_cfg(dev, 0xd8, ~(0x7 << 18), (0x7 << 18));
+
+ /* Set L1 exit latency in LCAP register. */
+ pcie_update_cfg(dev, 0x4c, ~(0x7 << 15), (0x4 << 15));
+
+ switch (rp) {
+ case 1:
+ pcie_add_0x0202000_iobp(0xe9002440);
+ break;
+ case 2:
+ pcie_add_0x0202000_iobp(0xe9002640);
+ break;
+ case 3:
+ pcie_add_0x0202000_iobp(0xe9000840);
+ break;
+ case 4:
+ pcie_add_0x0202000_iobp(0xe9000a40);
+ break;
+ case 5:
+ pcie_add_0x0202000_iobp(0xe9000c40);
+ pcie_add_0x0202000_iobp(0xe9000e40);
+ pcie_add_0x0202000_iobp(0xe9001040);
+ pcie_add_0x0202000_iobp(0xe9001240);
+ break;
+ case 6:
+ /* Update IOBP based on lane ownership. */
+ if (rpc.pin_ownership & (1 << 4))
+ pcie_add_0x0202000_iobp(0xea002040);
+ if (rpc.pin_ownership & (1 << 5))
+ pcie_add_0x0202000_iobp(0xea002240);
+ if (rpc.pin_ownership & (1 << 6))
+ pcie_add_0x0202000_iobp(0xea002440);
+ if (rpc.pin_ownership & (1 << 7))
+ pcie_add_0x0202000_iobp(0xea002640);
+ break;
+ }
+
+ pcie_update_cfg(dev, 0x338, ~(1 << 26), 0);
+ }
+
+ /* Enable LTR in Root Port. */
+ pcie_update_cfg(dev, 0x64, ~(1 << 11), (1 << 11));
+ pcie_update_cfg(dev, 0x68, ~(1 << 10), (1 << 10));
+
+ pcie_update_cfg(dev, 0x318, ~(0xffff << 16), (0x1414 << 16));
+
+ /* Set L1 exit latency in LCAP register. */
+ if (!do_aspm && (pci_read_config8(dev, 0xf5) & 0x1))
+ pcie_update_cfg(dev, 0x4c, ~(0x7 << 15), (0x4 << 15));
+ else
+ pcie_update_cfg(dev, 0x4c, ~(0x7 << 15), (0x2 << 15));
+
+ pcie_update_cfg(dev, 0x314, 0x0, 0x743a361b);
+
+ /* Set Common Clock Exit Latency in MPC register. */
+ pcie_update_cfg(dev, 0xd8, ~(0x7 << 15), (0x3 << 15));
+
+ pcie_update_cfg(dev, 0x33c, ~0x00ffffff, 0x854c74);
+
+ /* Set Invalid Recieve Range Check Enable in MPC register. */
+ pcie_update_cfg(dev, 0xd8, ~0, (1 << 25));
+
+ pcie_update_cfg8(dev, 0xf5, 0x3f, 0);
+
+ if (rp == 1 || rp == 5 || rp == 6)
+ pcie_update_cfg8(dev, 0xf7, ~0xc, 0);
+
+ /* Set EOI forwarding disable. */
+ pcie_update_cfg(dev, 0xd4, ~0, (1 << 1));
+
+ /* Set something involving advanced error reporting. */
+ pcie_update_cfg(dev, 0x100, ~((1 << 20) - 1), 0x10001);
+ pcie_update_cfg(dev, 0x100, ~0, (1 << 29));
+
+ /* Read and write back write-once capability registers. */
+ pcie_update_cfg(dev, 0x34, ~0, 0);
+ pcie_update_cfg(dev, 0x40, ~0, 0);
+ pcie_update_cfg(dev, 0x80, ~0, 0);
+ pcie_update_cfg(dev, 0x90, ~0, 0);
+}
+
+static void pch_pcie_init(struct device *dev)
+{
+ u16 reg16;
+ u32 reg32;
+
+ printk(BIOS_DEBUG, "Initializing PCH PCIe bridge.\n");
+
+ /* Enable SERR */
+ reg32 = pci_read_config32(dev, PCI_COMMAND);
+ reg32 |= PCI_COMMAND_SERR;
+ pci_write_config32(dev, PCI_COMMAND, reg32);
+
+ /* Enable Bus Master */
+ reg32 = pci_read_config32(dev, PCI_COMMAND);
+ reg32 |= PCI_COMMAND_MASTER;
+ pci_write_config32(dev, PCI_COMMAND, reg32);
+
+ /* Set Cache Line Size to 0x10 */
+ pci_write_config8(dev, 0x0c, 0x10);
+
+ reg16 = pci_read_config16(dev, 0x3e);
+ reg16 &= ~(1 << 0); /* disable parity error response */
+ reg16 |= (1 << 2); /* ISA enable */
+ pci_write_config16(dev, 0x3e, reg16);
+
+#ifdef EVEN_MORE_DEBUG
+ reg32 = pci_read_config32(dev, 0x20);
+ printk(BIOS_SPEW, " MBL = 0x%08x\n", reg32);
+ reg32 = pci_read_config32(dev, 0x24);
+ printk(BIOS_SPEW, " PMBL = 0x%08x\n", reg32);
+ reg32 = pci_read_config32(dev, 0x28);
+ printk(BIOS_SPEW, " PMBU32 = 0x%08x\n", reg32);
+ reg32 = pci_read_config32(dev, 0x2c);
+ printk(BIOS_SPEW, " PMLU32 = 0x%08x\n", reg32);
+#endif
+
+ /* Clear errors in status registers */
+ reg16 = pci_read_config16(dev, 0x06);
+ pci_write_config16(dev, 0x06, reg16);
+ reg16 = pci_read_config16(dev, 0x1e);
+ pci_write_config16(dev, 0x1e, reg16);
+}
+
+static void pch_pcie_enable(device_t dev)
+{
+ /* Add this device to the root port config structure. */
+ root_port_init_config(dev);
+
+ /* Check to see if this Root Port should be disabled. */
+ root_port_check_disable(dev);
+
+ /* Power Management init before enumeration */
+ if (dev->enabled)
+ pch_pcie_early(dev);
+
+ /*
+ * When processing the last PCIe root port we can now
+ * update the Root Port Function Number and Hide register.
+ */
+ if (root_port_is_last(dev))
+ root_port_commit_config();
+}
+
+static void pcie_set_subsystem(device_t dev, unsigned vendor, unsigned device)
+{
+ /* NOTE: This is not the default position! */
+ if (!vendor || !device)
+ pci_write_config32(dev, 0x94, pci_read_config32(dev, 0));
+ else
+ pci_write_config32(dev, 0x94, (device << 16) | vendor);
+}
+
+static struct pci_operations pcie_ops = {
+ .set_subsystem = pcie_set_subsystem,
+};
+
+static struct device_operations device_ops = {
+ .read_resources = pci_bus_read_resources,
+ .set_resources = pci_dev_set_resources,
+ .enable_resources = pci_bus_enable_resources,
+ .init = pch_pcie_init,
+ .enable = pch_pcie_enable,
+ .scan_bus = pciexp_scan_bridge,
+ .ops_pci = &pcie_ops,
+};
+
+static const unsigned short pcie_device_ids[] = {
+ /* Lynxpoint-LP */
+ 0x9c10, 0x9c12, 0x9c14, 0x9c16, 0x9c18, 0x9c1a,
+ /* WildcatPoint */
+ 0x9c90, 0x9c92, 0x9c94, 0x9c96, 0x9c98, 0x9c9a, 0x2448,
+ 0
+};
+
+static const struct pci_driver pch_pcie __pci_driver = {
+ .ops = &device_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = pcie_device_ids,
+};
diff --git a/src/soc/intel/broadwell/pei_data.c b/src/soc/intel/broadwell/pei_data.c
new file mode 100644
index 0000000..aac7c7f
--- /dev/null
+++ b/src/soc/intel/broadwell/pei_data.c
@@ -0,0 +1,48 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <broadwell/iomap.h>
+#include <broadwell/pei_data.h>
+#include <broadwell/pei_wrapper.h>
+#include <broadwell/smm.h>
+
+static void ABI_X86 send_to_console(unsigned char b)
+{
+ console_tx_byte(b);
+}
+
+void broadwell_fill_pei_data(struct pei_data *pei_data)
+{
+ pei_data->pei_version = PEI_VERSION;
+ pei_data->board_type = BOARD_TYPE_ULT;
+ pei_data->usbdebug = CONFIG_USBDEBUG;
+ pei_data->pciexbar = MCFG_BASE_ADDRESS;
+ pei_data->smbusbar = SMBUS_BASE_ADDRESS;
+ pei_data->ehcibar = EARLY_EHCI_BAR;
+ pei_data->xhcibar = EARLY_XHCI_BAR;
+ pei_data->gttbar = EARLY_GTT_BAR;
+ pei_data->pmbase = ACPI_BASE_ADDRESS;
+ pei_data->gpiobase = GPIO_BASE_ADDRESS;
+ pei_data->tseg_size = smm_region_size();
+ pei_data->temp_mmio_base = EARLY_TEMP_MMIO;
+ pei_data->tx_byte = &send_to_console;
+}
diff --git a/src/soc/intel/broadwell/pei_data.h b/src/soc/intel/broadwell/pei_data.h
new file mode 100644
index 0000000..f92c0a6
--- /dev/null
+++ b/src/soc/intel/broadwell/pei_data.h
@@ -0,0 +1,115 @@
+/*
+ * coreboot UEFI PEI wrapper
+ *
+ * Copyright (c) 2011, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Google Inc. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef PEI_DATA_H
+#define PEI_DATA_H
+
+typedef void (*tx_byte_func)(unsigned char byte);
+#define PEI_VERSION 15
+
+#define MAX_USB2_PORTS 16
+#define MAX_USB3_PORTS 16
+#define USB_OC_PIN_SKIP 8
+
+enum usb2_port_location {
+ USB_PORT_BACK_PANEL = 0,
+ USB_PORT_FRONT_PANEL,
+ USB_PORT_DOCK,
+ USB_PORT_MINI_PCIE,
+ USB_PORT_FLEX,
+ USB_PORT_INTERNAL,
+ USB_PORT_SKIP
+};
+
+/* Usb Port Length:
+ * [16:4] = length in inches in octal format
+ * [3:0] = decimal point
+ */
+struct usb2_port_setting {
+ uint16_t length;
+ uint8_t enable;
+ uint8_t over_current_pin;
+ uint8_t location;
+} __attribute__((packed));
+
+struct usb3_port_setting {
+ uint8_t enable;
+ uint8_t over_current_pin;
+} __attribute__((packed));
+
+struct pei_data
+{
+ uint32_t pei_version;
+ uint32_t mchbar;
+ uint32_t dmibar;
+ uint32_t epbar;
+ uint32_t pciexbar;
+ uint16_t smbusbar;
+ uint32_t wdbbar;
+ uint32_t wdbsize;
+ uint32_t hpet_address;
+ uint32_t rcba;
+ uint32_t pmbase;
+ uint32_t gpiobase;
+ uint32_t temp_mmio_base;
+ uint32_t system_type; // 0 Mobile, 1 Desktop/Server
+ uint32_t tseg_size;
+ uint8_t spd_addresses[4];
+ int boot_mode;
+ int ec_present;
+ int gbe_enable;
+ // 0 = leave channel enabled
+ // 1 = disable dimm 0 on channel
+ // 2 = disable dimm 1 on channel
+ // 3 = disable dimm 0+1 on channel
+ int dimm_channel0_disabled;
+ int dimm_channel1_disabled;
+ /* Enable 2x Refresh Mode */
+ int ddr_refresh_2x;
+ int dq_pins_interleaved;
+ /* Data read from flash and passed into MRC */
+ unsigned char *mrc_input;
+ unsigned int mrc_input_len;
+ /* Data from MRC that should be saved to flash */
+ unsigned char *mrc_output;
+ unsigned int mrc_output_len;
+ /*
+ * Max frequency DDR3 could be ran at. Could be one of four values: 800,
+ * 1067, 1333, 1600
+ */
+ uint32_t max_ddr3_freq;
+ /* Route all USB ports to XHCI controller in resume path */
+ int usb_xhci_on_resume;
+ struct usb2_port_setting usb2_ports[MAX_USB2_PORTS];
+ struct usb3_port_setting usb3_ports[MAX_USB3_PORTS];
+ uint8_t spd_data[4][256];
+ tx_byte_func tx_byte;
+} __attribute__((packed));
+
+#endif
diff --git a/src/soc/intel/broadwell/pmutil.c b/src/soc/intel/broadwell/pmutil.c
new file mode 100644
index 0000000..272731c
--- /dev/null
+++ b/src/soc/intel/broadwell/pmutil.c
@@ -0,0 +1,452 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/*
+ * Helper functions for dealing with power management registers
+ * and the differences between PCH variants.
+ */
+
+#include <arch/io.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_def.h>
+#include <console/console.h>
+#include <broadwell/iomap.h>
+#include <broadwell/lpc.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/pm.h>
+#include <broadwell/gpio.h>
+
+/* Print status bits with descriptive names */
+static void print_status_bits(u32 status, const char *bit_names[])
+{
+ int i;
+
+ if (!status)
+ return;
+
+ for (i=31; i>=0; i--) {
+ if (status & (1 << i)) {
+ if (bit_names[i])
+ printk(BIOS_DEBUG, "%s ", bit_names[i]);
+ else
+ printk(BIOS_DEBUG, "BIT%d ", i);
+ }
+ }
+}
+
+/* Print status bits as GPIO numbers */
+static void print_gpio_status(u32 status, int start)
+{
+ int i;
+
+ if (!status)
+ return;
+
+ for (i=31; i>=0; i--) {
+ if (status & (1 << i))
+ printk(BIOS_DEBUG, "GPIO%d ", start + i);
+ }
+}
+
+
+/*
+ * PM1_CNT
+ */
+
+/* Enable events in PM1 control register */
+void enable_pm1_control(u32 mask)
+{
+ u32 pm1_cnt = inl(ACPI_BASE_ADDRESS + PM1_CNT);
+ pm1_cnt |= mask;
+ outl(pm1_cnt, ACPI_BASE_ADDRESS + PM1_CNT);
+}
+
+/* Disable events in PM1 control register */
+void disable_pm1_control(u32 mask)
+{
+ u32 pm1_cnt = inl(ACPI_BASE_ADDRESS + PM1_CNT);
+ pm1_cnt &= ~mask;
+ outl(pm1_cnt, ACPI_BASE_ADDRESS + PM1_CNT);
+}
+
+
+/*
+ * PM1
+ */
+
+/* Clear and return PM1 status register */
+static u16 reset_pm1_status(void)
+{
+ u16 pm1_sts = inw(ACPI_BASE_ADDRESS + PM1_STS);
+ outw(pm1_sts, ACPI_BASE_ADDRESS + PM1_STS);
+ return pm1_sts;
+}
+
+/* Print PM1 status bits */
+static u16 print_pm1_status(u16 pm1_sts)
+{
+ const char *pm1_sts_bits[] = {
+ [0] = "TMROF",
+ [4] = "BM",
+ [5] = "GBL",
+ [8] = "PWRBTN",
+ [10] = "RTC",
+ [11] = "PRBTNOR",
+ [14] = "PCIEXPWAK",
+ [15] = "WAK",
+ };
+
+ if (!pm1_sts)
+ return 0;
+
+ printk(BIOS_SPEW, "PM1_STS: ");
+ print_status_bits(pm1_sts, pm1_sts_bits);
+ printk(BIOS_SPEW, "\n");
+
+ return pm1_sts;
+}
+
+/* Print, clear, and return PM1 status */
+u16 clear_pm1_status(void)
+{
+ return print_pm1_status(reset_pm1_status());
+}
+
+/* Set the PM1 register to events */
+void enable_pm1(u16 events)
+{
+ outw(events, ACPI_BASE_ADDRESS + PM1_EN);
+}
+
+
+/*
+ * SMI
+ */
+
+/* Clear and return SMI status register */
+static u32 reset_smi_status(void)
+{
+ u32 smi_sts = inl(ACPI_BASE_ADDRESS + SMI_STS);
+ outl(smi_sts, ACPI_BASE_ADDRESS + SMI_STS);
+ return smi_sts;
+}
+
+/* Print SMI status bits */
+static u32 print_smi_status(u32 smi_sts)
+{
+ const char *smi_sts_bits[] = {
+ [2] = "BIOS",
+ [3] = "LEGACY_USB",
+ [4] = "SLP_SMI",
+ [5] = "APM",
+ [6] = "SWSMI_TMR",
+ [8] = "PM1",
+ [9] = "GPE0",
+ [10] = "GPI",
+ [11] = "MCSMI",
+ [12] = "DEVMON",
+ [13] = "TCO",
+ [14] = "PERIODIC",
+ [15] = "SERIRQ_SMI",
+ [16] = "SMBUS_SMI",
+ [17] = "LEGACY_USB2",
+ [18] = "INTEL_USB2",
+ [20] = "PCI_EXP_SMI",
+ [21] = "MONITOR",
+ [26] = "SPI",
+ [27] = "GPIO_UNLOCK"
+ };
+
+ if (!smi_sts)
+ return 0;
+
+ printk(BIOS_DEBUG, "SMI_STS: ");
+ print_status_bits(smi_sts, smi_sts_bits);
+ printk(BIOS_DEBUG, "\n");
+
+ return smi_sts;
+}
+
+/* Print, clear, and return SMI status */
+u32 clear_smi_status(void)
+{
+ return print_smi_status(reset_smi_status());
+}
+
+/* Enable SMI event */
+void enable_smi(u32 mask)
+{
+ u32 smi_en = inl(ACPI_BASE_ADDRESS + SMI_EN);
+ smi_en |= mask;
+ outl(smi_en, ACPI_BASE_ADDRESS + SMI_EN);
+}
+
+/* Disable SMI event */
+void disable_smi(u32 mask)
+{
+ u32 smi_en = inl(ACPI_BASE_ADDRESS + SMI_EN);
+ smi_en &= ~mask;
+ outl(smi_en, ACPI_BASE_ADDRESS + SMI_EN);
+}
+
+
+/*
+ * ALT_GP_SMI
+ */
+
+/* Clear GPIO SMI status and return events that are enabled and active */
+static u32 reset_alt_smi_status(void)
+{
+ u32 alt_sts, alt_en;
+
+ /* Low Power variant moves this to GPIO region as dword */
+ alt_sts = inl(GPIO_BASE_ADDRESS + GPIO_ALT_GPI_SMI_STS);
+ outl(alt_sts, GPIO_BASE_ADDRESS + GPIO_ALT_GPI_SMI_STS);
+ alt_en = inl(GPIO_BASE_ADDRESS + GPIO_ALT_GPI_SMI_EN);
+
+ /* Only report enabled events */
+ return alt_sts & alt_en;
+}
+
+/* Print GPIO SMI status bits */
+static u32 print_alt_smi_status(u32 alt_sts)
+{
+ if (!alt_sts)
+ return 0;
+
+ printk(BIOS_DEBUG, "ALT_STS: ");
+
+ /* First 16 events are GPIO 32-47 */
+ print_gpio_status(alt_sts & 0xffff, 32);
+
+ printk(BIOS_DEBUG, "\n");
+
+ return alt_sts;
+}
+
+/* Print, clear, and return GPIO SMI status */
+u32 clear_alt_smi_status(void)
+{
+ return print_alt_smi_status(reset_alt_smi_status());
+}
+
+/* Enable GPIO SMI events */
+void enable_alt_smi(u32 mask)
+{
+ u32 alt_en;
+
+ alt_en = inl(GPIO_BASE_ADDRESS + GPIO_ALT_GPI_SMI_EN);
+ alt_en |= mask;
+ outl(alt_en, GPIO_BASE_ADDRESS + GPIO_ALT_GPI_SMI_EN);
+}
+
+
+/*
+ * TCO
+ */
+
+/* Clear TCO status and return events that are enabled and active */
+static u32 reset_tco_status(void)
+{
+ u32 tcobase = ACPI_BASE_ADDRESS + 0x60;
+ u32 tco_sts = inl(tcobase + 0x04);
+ u32 tco_en = inl(ACPI_BASE_ADDRESS + 0x68);
+
+ /* Don't clear BOOT_STS before SECOND_TO_STS */
+ outl(tco_sts & ~(1 << 18), tcobase + 0x04);
+
+ /* Clear BOOT_STS */
+ if (tco_sts & (1 << 18))
+ outl(tco_sts & (1 << 18), tcobase + 0x04);
+
+ return tco_sts & tco_en;
+}
+
+/* Print TCO status bits */
+static u32 print_tco_status(u32 tco_sts)
+{
+ const char *tco_sts_bits[] = {
+ [0] = "NMI2SMI",
+ [1] = "SW_TCO",
+ [2] = "TCO_INT",
+ [3] = "TIMEOUT",
+ [7] = "NEWCENTURY",
+ [8] = "BIOSWR",
+ [9] = "DMISCI",
+ [10] = "DMISMI",
+ [12] = "DMISERR",
+ [13] = "SLVSEL",
+ [16] = "INTRD_DET",
+ [17] = "SECOND_TO",
+ [18] = "BOOT",
+ [20] = "SMLINK_SLV"
+ };
+
+ if (!tco_sts)
+ return 0;
+
+ printk(BIOS_DEBUG, "TCO_STS: ");
+ print_status_bits(tco_sts, tco_sts_bits);
+ printk(BIOS_DEBUG, "\n");
+
+ return tco_sts;
+}
+
+/* Print, clear, and return TCO status */
+u32 clear_tco_status(void)
+{
+ return print_tco_status(reset_tco_status());
+}
+
+/* Enable TCO SCI */
+void enable_tco_sci(void)
+{
+ /* Clear pending events */
+ outl(ACPI_BASE_ADDRESS + GPE0_STS(3), TCOSCI_STS);
+
+ /* Enable TCO SCI events */
+ enable_gpe(TCOSCI_EN);
+}
+
+
+/*
+ * GPE0
+ */
+
+/* Clear a GPE0 status and return events that are enabled and active */
+static u32 reset_gpe(u16 sts_reg, u16 en_reg)
+{
+ u32 gpe0_sts = inl(ACPI_BASE_ADDRESS + sts_reg);
+ u32 gpe0_en = inl(ACPI_BASE_ADDRESS + en_reg);
+
+ outl(gpe0_sts, ACPI_BASE_ADDRESS + sts_reg);
+
+ /* Only report enabled events */
+ return gpe0_sts & gpe0_en;
+}
+
+/* Print GPE0 status bits */
+static u32 print_gpe_status(u32 gpe0_sts, const char *bit_names[])
+{
+ if (!gpe0_sts)
+ return 0;
+
+ printk(BIOS_DEBUG, "GPE0_STS: ");
+ print_status_bits(gpe0_sts, bit_names);
+ printk(BIOS_DEBUG, "\n");
+
+ return gpe0_sts;
+}
+
+/* Print GPE0 GPIO status bits */
+static u32 print_gpe_gpio(u32 gpe0_sts, int start)
+{
+ if (!gpe0_sts)
+ return 0;
+
+ printk(BIOS_DEBUG, "GPE0_STS: ");
+ print_gpio_status(gpe0_sts, start);
+ printk(BIOS_DEBUG, "\n");
+
+ return gpe0_sts;
+}
+
+/* Clear all GPE status and return "standard" GPE event status */
+u32 clear_gpe_status(void)
+{
+ const char *gpe0_sts_3_bits[] = {
+ [1] = "HOTPLUG",
+ [2] = "SWGPE",
+ [6] = "TCO_SCI",
+ [7] = "SMB_WAK",
+ [9] = "PCI_EXP",
+ [10] = "BATLOW",
+ [11] = "PME",
+ [12] = "ME",
+ [13] = "PME_B0",
+ [16] = "GPIO27",
+ [18] = "WADT"
+ };
+
+ print_gpe_gpio(reset_gpe(GPE0_STS(GPE_31_0), GPE0_EN(GPE_31_0)), 0);
+ print_gpe_gpio(reset_gpe(GPE0_STS(GPE_63_32), GPE0_EN(GPE_63_32)), 32);
+ print_gpe_gpio(reset_gpe(GPE0_STS(GPE_94_64), GPE0_EN(GPE_94_64)), 64);
+ return print_gpe_status(reset_gpe(GPE0_STS(GPE_STD), GPE0_EN(GPE_STD)),
+ gpe0_sts_3_bits);
+}
+
+/* Enable all requested GPE */
+void enable_all_gpe(u32 set1, u32 set2, u32 set3, u32 set4)
+{
+ outl(set1, ACPI_BASE_ADDRESS + GPE0_EN(GPE_31_0));
+ outl(set2, ACPI_BASE_ADDRESS + GPE0_EN(GPE_63_32));
+ outl(set3, ACPI_BASE_ADDRESS + GPE0_EN(GPE_94_64));
+ outl(set4, ACPI_BASE_ADDRESS + GPE0_EN(GPE_STD));
+}
+
+/* Disable all GPE */
+void disable_all_gpe(void)
+{
+ enable_all_gpe(0, 0, 0, 0);
+}
+
+/* Enable a standard GPE */
+void enable_gpe(u32 mask)
+{
+ u32 gpe0_en = inl(ACPI_BASE_ADDRESS + GPE0_EN(GPE_STD));
+ gpe0_en |= mask;
+ outl(gpe0_en, ACPI_BASE_ADDRESS + GPE0_EN(GPE_STD));
+}
+
+/* Disable a standard GPE */
+void disable_gpe(u32 mask)
+{
+ u32 gpe0_en = inl(ACPI_BASE_ADDRESS + GPE0_EN(GPE_STD));
+ gpe0_en &= ~mask;
+ outl(gpe0_en, ACPI_BASE_ADDRESS + GPE0_EN(GPE_STD));
+}
+
+int acpi_sci_irq(void)
+{
+ int scis = pci_read_config32(PCH_DEV_LPC, ACPI_CNTL) & SCI_IRQ_SEL;
+ int sci_irq = 9;
+
+ /* Determine how SCI is routed. */
+ switch (scis) {
+ case SCIS_IRQ9:
+ case SCIS_IRQ10:
+ case SCIS_IRQ11:
+ sci_irq = scis - SCIS_IRQ9 + 9;
+ break;
+ case SCIS_IRQ20:
+ case SCIS_IRQ21:
+ case SCIS_IRQ22:
+ case SCIS_IRQ23:
+ sci_irq = scis - SCIS_IRQ20 + 20;
+ break;
+ default:
+ printk(BIOS_DEBUG, "Invalid SCI route! Defaulting to IRQ9.\n");
+ sci_irq = 9;
+ break;
+ }
+
+ printk(BIOS_DEBUG, "SCI is IRQ%d\n", sci_irq);
+ return sci_irq;
+}
diff --git a/src/soc/intel/broadwell/ramstage.c b/src/soc/intel/broadwell/ramstage.c
new file mode 100644
index 0000000..0563064
--- /dev/null
+++ b/src/soc/intel/broadwell/ramstage.c
@@ -0,0 +1,88 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/acpi.h>
+#include <cbmem.h>
+#include <console/console.h>
+#include <device/device.h>
+#include <romstage_handoff.h>
+#include <stdlib.h>
+#include <broadwell/nvs.h>
+#include <broadwell/pm.h>
+#include <broadwell/ramstage.h>
+#include <chip.h>
+
+/* Save bit index for first enabled event in PM1_STS for \_SB._SWS */
+static void s3_save_acpi_wake_source(global_nvs_t *gnvs)
+{
+ struct chipset_power_state *ps = cbmem_find(CBMEM_ID_POWER_STATE);
+ uint16_t pm1;
+
+ if (!ps)
+ return;
+
+ pm1 = ps->pm1_sts & ps->pm1_en;
+
+ /* Scan for first set bit in PM1 */
+ for (gnvs->pm1i = 0; gnvs->pm1i < 16; gnvs->pm1i++) {
+ if (pm1 & 1)
+ break;
+ pm1 >>= 1;
+ }
+
+ /* If unable to determine then return -1 */
+ if (gnvs->pm1i >= 16)
+ gnvs->pm1i = -1;
+
+ printk(BIOS_DEBUG, "ACPI System Wake Source is PM1 Index %d\n",
+ gnvs->pm1i);
+}
+
+static inline void set_acpi_sleep_type(int val)
+{
+#if CONFIG_HAVE_ACPI_RESUME
+ acpi_slp_type = val;
+#endif
+}
+
+static void s3_resume_prepare(void)
+{
+ global_nvs_t *gnvs;
+ struct romstage_handoff *romstage_handoff;
+
+ gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(global_nvs_t));
+
+ romstage_handoff = cbmem_find(CBMEM_ID_ROMSTAGE_INFO);
+ if (romstage_handoff == NULL || romstage_handoff->s3_resume == 0) {
+ if (gnvs != NULL) {
+ memset(gnvs, 0, sizeof(global_nvs_t));
+ }
+ set_acpi_sleep_type(0);
+ return;
+ }
+
+ set_acpi_sleep_type(3);
+ s3_save_acpi_wake_source(gnvs);
+}
+
+void broadwell_init_pre_device(void *chip_info)
+{
+ s3_resume_prepare();
+ broadwell_run_reference_code();
+}
diff --git a/src/soc/intel/broadwell/refcode.c b/src/soc/intel/broadwell/refcode.c
new file mode 100644
index 0000000..3d2f8b5
--- /dev/null
+++ b/src/soc/intel/broadwell/refcode.c
@@ -0,0 +1,189 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <string.h>
+#include <arch/acpi.h>
+#include <cbmem.h>
+#include <console/console.h>
+#include <cpu/x86/tsc.h>
+#include <rmodule.h>
+#include <ramstage_cache.h>
+#include <string.h>
+#include <vendorcode/google/chromeos/vboot_handoff.h>
+#include <broadwell/pei_data.h>
+#include <broadwell/pei_wrapper.h>
+#include <broadwell/ramstage.h>
+
+static inline int is_s3_resume(void)
+{
+#if CONFIG_HAVE_ACPI_RESUME
+ return acpi_slp_type == 3;
+#else
+ return 0;
+#endif
+}
+
+static inline struct ramstage_cache *next_cache(struct ramstage_cache *c)
+{
+ return (struct ramstage_cache *)&c->program[c->size];
+}
+
+static pei_wrapper_entry_t load_refcode_from_cache(void)
+{
+ struct ramstage_cache *c;
+ long cache_size;
+
+ printk(BIOS_DEBUG, "refcode loading from cache.\n");
+
+ c = ramstage_cache_location(&cache_size);
+
+ if (!ramstage_cache_is_valid(c)) {
+ printk(BIOS_DEBUG, "Invalid ramstage cache descriptor.\n");
+ return NULL;
+ }
+
+ c = next_cache(c);
+ if (!ramstage_cache_is_valid(c)) {
+ printk(BIOS_DEBUG, "Invalid refcode cache descriptor.\n");
+ return NULL;
+ }
+
+ printk(BIOS_DEBUG, "Loading cached reference code from 0x%08x(%x)\n",
+ c->load_address, c->size);
+ memcpy((void *)c->load_address, &c->program[0], c->size);
+
+ return (pei_wrapper_entry_t)c->entry_point;
+}
+
+static void cache_refcode(const struct rmod_stage_load *rsl)
+{
+ struct ramstage_cache *c;
+ long cache_size;
+
+ c = ramstage_cache_location(&cache_size);
+
+ if (!ramstage_cache_is_valid(c)) {
+ printk(BIOS_DEBUG, "No place to cache reference code.\n");
+ return;
+ }
+
+ /* Determine how much remaining cache available. */
+ cache_size -= c->size + sizeof(*c);
+
+ if (cache_size < (sizeof(*c) + cbmem_entry_size(rsl->cbmem_entry))) {
+ printk(BIOS_DEBUG, "Not enough cache space for ref code.\n");
+ return;
+ }
+
+ c = next_cache(c);
+ c->magic = RAMSTAGE_CACHE_MAGIC;
+ c->entry_point = (uint32_t)rsl->entry;
+ c->load_address = (uint32_t)cbmem_entry_start(rsl->cbmem_entry);
+ c->size = cbmem_entry_size(rsl->cbmem_entry);;
+
+ printk(BIOS_DEBUG, "Caching refcode at 0x%p(%x)\n",
+ &c->program[0], c->size);
+ memcpy(&c->program[0], (void *)c->load_address, c->size);
+}
+
+static int load_refcode_from_vboot(struct rmod_stage_load *refcode,
+ struct cbfs_stage *stage)
+{
+ printk(BIOS_DEBUG, "refcode loading from vboot rw area.\n");
+
+ if (rmodule_stage_load(refcode, stage) || refcode->entry == NULL) {
+ printk(BIOS_DEBUG, "Error loading reference code.\n");
+ return -1;
+ }
+ return 0;
+}
+
+static int load_refcode_from_cbfs(struct rmod_stage_load *refcode)
+{
+ printk(BIOS_DEBUG, "refcode loading from cbfs.\n");
+
+ if (rmodule_stage_load_from_cbfs(refcode) || refcode->entry == NULL) {
+ printk(BIOS_DEBUG, "Error loading reference code.\n");
+ return -1;
+ }
+
+ return 0;
+}
+
+static pei_wrapper_entry_t load_reference_code(void)
+{
+ struct vboot_handoff *vboot_handoff;
+ const struct firmware_component *fwc;
+ struct rmod_stage_load refcode = {
+ .cbmem_id = CBMEM_ID_REFCODE,
+ .name = CONFIG_CBFS_PREFIX "/refcode",
+ };
+ int ret;
+
+ if (is_s3_resume()) {
+ return load_refcode_from_cache();
+ }
+
+ vboot_handoff = cbmem_find(CBMEM_ID_VBOOT_HANDOFF);
+ fwc = &vboot_handoff->components[CONFIG_VBOOT_REFCODE_INDEX];
+
+ if (vboot_handoff == NULL ||
+ vboot_handoff->selected_firmware == VB_SELECT_FIRMWARE_READONLY ||
+ CONFIG_VBOOT_REFCODE_INDEX >= MAX_PARSED_FW_COMPONENTS ||
+ fwc->size == 0 || fwc->address == 0) {
+ ret = load_refcode_from_cbfs(&refcode);
+ } else {
+ ret = load_refcode_from_vboot(&refcode, (void *)fwc->address);
+
+ if (ret < 0)
+ ret = load_refcode_from_cbfs(&refcode);
+ }
+
+ if (ret < 0)
+ return NULL;
+
+ /* Cache loaded reference code. */
+ cache_refcode(&refcode);
+
+ return refcode.entry;
+}
+
+void broadwell_run_reference_code(void)
+{
+ int ret;
+ struct pei_data pei_data;
+ pei_wrapper_entry_t entry;
+
+ memset(&pei_data, 0, sizeof(pei_data));
+ mainboard_fill_pei_data(&pei_data);
+ broadwell_fill_pei_data(&pei_data);
+
+ entry = load_reference_code();
+ if (entry == NULL) {
+ printk(BIOS_ERR, "Reference code not found\n");
+ return;
+ }
+
+ /* Call into reference code. */
+ ret = entry(&pei_data);
+ if (ret != 0) {
+ printk(BIOS_ERR, "Reference code returned %d\n", ret);
+ return;
+ }
+}
diff --git a/src/soc/intel/broadwell/reset.c b/src/soc/intel/broadwell/reset.c
new file mode 100644
index 0000000..ffd15e7
--- /dev/null
+++ b/src/soc/intel/broadwell/reset.c
@@ -0,0 +1,51 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/hlt.h>
+#include <arch/io.h>
+#include <reset.h>
+#include <broadwell/reset.h>
+
+/*
+ * Soft reset (INIT# to cpu) - write 0x1 to I/O 0x92
+ * Soft reset (INIT# to cpu)- write 0x4 to I/0 0xcf9
+ * Cold reset (S0->S5->S0) - write 0xe to I/0 0xcf9
+ * Warm reset (PLTRST# assertion) - write 0x6 to I/O 0xcf9
+ * Global reset (S0->S5->S0 with ME reset) - write 0x6 or 0xe to 0xcf9 but
+ * with ETR[20] set.
+ */
+
+void soft_reset(void)
+{
+ outb(0x04, 0xcf9);
+}
+
+void hard_reset(void)
+{
+ outb(0x06, 0xcf9);
+}
+
+void reset_system(void)
+{
+ hard_reset();
+ while (1) {
+ hlt();
+ }
+}
diff --git a/src/soc/intel/broadwell/romstage/Makefile.inc b/src/soc/intel/broadwell/romstage/Makefile.inc
new file mode 100644
index 0000000..98d87a4
--- /dev/null
+++ b/src/soc/intel/broadwell/romstage/Makefile.inc
@@ -0,0 +1,12 @@
+cpu_incs += $(src)/soc/intel/broadwell/romstage/cache_as_ram.inc
+
+romstage-y += cpu.c
+romstage-y += pch.c
+romstage-y += power_state.c
+romstage-y += raminit.c
+romstage-y += report_platform.c
+romstage-y += romstage.c
+romstage-y += smbus.c
+romstage-y += spi.c
+romstage-y += stack.c
+romstage-y += systemagent.c
diff --git a/src/soc/intel/broadwell/romstage/cache_as_ram.inc b/src/soc/intel/broadwell/romstage/cache_as_ram.inc
new file mode 100644
index 0000000..029ab7c
--- /dev/null
+++ b/src/soc/intel/broadwell/romstage/cache_as_ram.inc
@@ -0,0 +1,336 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2000,2007 Ronald G. Minnich <rminnich(a)gmail.com>
+ * Copyright (C) 2007-2008 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <cpu/x86/stack.h>
+#include <cpu/x86/mtrr.h>
+#include <cpu/x86/cache.h>
+#include <cpu/x86/post_code.h>
+#include <cbmem.h>
+
+/* The full cache-as-ram size includes the cache-as-ram portion from coreboot
+ * and the space used by the reference code. These 2 values combined should
+ * be a power of 2 because the MTRR setup assumes that. */
+#define CACHE_AS_RAM_SIZE \
+ (CONFIG_DCACHE_RAM_SIZE + CONFIG_DCACHE_RAM_MRC_VAR_SIZE)
+#define CACHE_AS_RAM_BASE CONFIG_DCACHE_RAM_BASE
+#define CACHE_AS_RAM_LIMIT (CONFIG_DCACHE_RAM_BASE + CONFIG_DCACHE_RAM_SIZE)
+#define USBDEBUG_VAR_SIZE 36 /* sizeof(struct ehci_debug_info) */
+
+/* Cache 4GB - MRC_SIZE_KB for MRC */
+#define CACHE_MRC_BYTES ((CONFIG_CACHE_MRC_SIZE_KB << 10) - 1)
+#define CACHE_MRC_BASE (0xFFFFFFFF - CACHE_MRC_BYTES)
+#define CACHE_MRC_MASK (~CACHE_MRC_BYTES)
+
+#define CPU_MAXPHYSADDR CONFIG_CPU_ADDR_BITS
+#define CPU_PHYSMASK_HI (1 << (CPU_MAXPHYSADDR - 32) - 1)
+
+#define NoEvictMod_MSR 0x2e0
+
+ /* Save the BIST result. */
+ movl %eax, %ebp
+
+cache_as_ram:
+ post_code(0x20)
+
+ /* Send INIT IPI to all excluding ourself. */
+ movl $0x000C4500, %eax
+ movl $0xFEE00300, %esi
+ movl %eax, (%esi)
+
+ /* All CPUs need to be in Wait for SIPI state */
+wait_for_sipi:
+ movl (%esi), %eax
+ bt $12, %eax
+ jc wait_for_sipi
+
+ post_code(0x21)
+ /* Zero out all fixed range and variable range MTRRs. */
+ movl $mtrr_table, %esi
+ movl $((mtrr_table_end - mtrr_table) / 2), %edi
+ xorl %eax, %eax
+ xorl %edx, %edx
+clear_mtrrs:
+ movw (%esi), %bx
+ movzx %bx, %ecx
+ wrmsr
+ add $2, %esi
+ dec %edi
+ jnz clear_mtrrs
+
+ post_code(0x22)
+ /* Configure the default memory type to uncacheable. */
+ movl $MTRRdefType_MSR, %ecx
+ rdmsr
+ andl $(~0x00000cff), %eax
+ wrmsr
+
+ post_code(0x23)
+ /* Set Cache-as-RAM base address. */
+ movl $(MTRRphysBase_MSR(0)), %ecx
+ movl $(CACHE_AS_RAM_BASE | MTRR_TYPE_WRBACK), %eax
+ xorl %edx, %edx
+ wrmsr
+
+ post_code(0x24)
+ /* Set Cache-as-RAM mask. */
+ movl $(MTRRphysMask_MSR(0)), %ecx
+ movl $(~(CACHE_AS_RAM_SIZE - 1) | MTRRphysMaskValid), %eax
+ movl $CPU_PHYSMASK_HI, %edx
+ wrmsr
+
+ post_code(0x25)
+
+ /* Enable MTRR. */
+ movl $MTRRdefType_MSR, %ecx
+ rdmsr
+ orl $MTRRdefTypeEn, %eax
+ wrmsr
+
+ /* Enable cache (CR0.CD = 0, CR0.NW = 0). */
+ movl %cr0, %eax
+ andl $(~(CR0_CacheDisable | CR0_NoWriteThrough)), %eax
+ invd
+ movl %eax, %cr0
+
+ /* enable the 'no eviction' mode */
+ movl $NoEvictMod_MSR, %ecx
+ rdmsr
+ orl $1, %eax
+ andl $~2, %eax
+ wrmsr
+
+ /* Clear the cache memory region. This will also fill up the cache */
+ movl $CACHE_AS_RAM_BASE, %esi
+ movl %esi, %edi
+ movl $(CACHE_AS_RAM_SIZE / 4), %ecx
+ xorl %eax, %eax
+ rep stosl
+
+ /* enable the 'no eviction run' state */
+ movl $NoEvictMod_MSR, %ecx
+ rdmsr
+ orl $3, %eax
+ wrmsr
+
+ post_code(0x26)
+ /* Enable Cache-as-RAM mode by disabling cache. */
+ movl %cr0, %eax
+ orl $CR0_CacheDisable, %eax
+ movl %eax, %cr0
+
+ /* Enable cache for our code in Flash because we do XIP here */
+ movl $MTRRphysBase_MSR(1), %ecx
+ xorl %edx, %edx
+ /*
+ * IMPORTANT: The following calculation _must_ be done at runtime. See
+ * http://www.coreboot.org/pipermail/coreboot/2010-October/060855.html
+ */
+ movl $copy_and_run, %eax
+ andl $(~(CONFIG_XIP_ROM_SIZE - 1)), %eax
+ orl $MTRR_TYPE_WRPROT, %eax
+ wrmsr
+
+ movl $MTRRphysMask_MSR(1), %ecx
+ movl $CPU_PHYSMASK_HI, %edx
+ movl $(~(CONFIG_XIP_ROM_SIZE - 1) | MTRRphysMaskValid), %eax
+ wrmsr
+
+ post_code(0x27)
+#if CONFIG_CACHE_MRC_BIN
+ /* Enable caching for ram init code to run faster */
+ movl $MTRRphysBase_MSR(2), %ecx
+ movl $(CACHE_MRC_BASE | MTRR_TYPE_WRPROT), %eax
+ xorl %edx, %edx
+ wrmsr
+ movl $MTRRphysMask_MSR(2), %ecx
+ movl $(CACHE_MRC_MASK | MTRRphysMaskValid), %eax
+ movl $CPU_PHYSMASK_HI, %edx
+ wrmsr
+#endif
+
+ post_code(0x28)
+ /* Enable cache. */
+ movl %cr0, %eax
+ andl $(~(CR0_CacheDisable | CR0_NoWriteThrough)), %eax
+ movl %eax, %cr0
+
+ /* Setup the stack. */
+ movl $(CACHE_AS_RAM_LIMIT), %eax
+#if CONFIG_USBDEBUG
+ sub $(USBDEBUG_VAR_SIZE), %eax
+#endif
+ movl %eax, %esp
+
+ /* Restore the BIST result. */
+ movl %ebp, %eax
+ movl %esp, %ebp
+ pushl %eax
+
+before_romstage:
+ post_code(0x29)
+ /* Call romstage.c main function. */
+ call romstage_main
+ /* Save return value from romstage_main. It contains the stack to use
+ * after cache-as-ram is torn down. It also contains the information
+ * for setting up MTRRs. */
+ movl %eax, %ebx
+
+ post_code(0x2f)
+
+ /* Copy global variable space (for USBDEBUG) to memory */
+#if CONFIG_USBDEBUG
+ cld
+ movl $(CACHE_AS_RAM_LIMIT - USBDEBUG_VAR_SIZE), %esi
+ movl $(CONFIG_RAMTOP - USBDEBUG_VAR_SIZE), %edi
+ movl $USBDEBUG_VAR_SIZE, %ecx
+ rep movsb
+#endif
+
+ post_code(0x30)
+
+ /* Disable cache. */
+ movl %cr0, %eax
+ orl $CR0_CacheDisable, %eax
+ movl %eax, %cr0
+
+ post_code(0x31)
+
+ /* Disable MTRR. */
+ movl $MTRRdefType_MSR, %ecx
+ rdmsr
+ andl $(~MTRRdefTypeEn), %eax
+ wrmsr
+
+ post_code(0x31)
+
+ /* Disable the no eviction run state */
+ movl $NoEvictMod_MSR, %ecx
+ rdmsr
+ andl $~2, %eax
+ wrmsr
+
+ invd
+
+ /* Disable the no eviction mode */
+ rdmsr
+ andl $~1, %eax
+ wrmsr
+
+#if CONFIG_CACHE_MRC_BIN
+ /* Clear MTRR that was used to cache MRC */
+ xorl %eax, %eax
+ xorl %edx, %edx
+ movl $MTRRphysBase_MSR(2), %ecx
+ wrmsr
+ movl $MTRRphysMask_MSR(2), %ecx
+ wrmsr
+#endif
+
+ post_code(0x33)
+
+ /* Enable cache. */
+ movl %cr0, %eax
+ andl $~(CR0_CacheDisable | CR0_NoWriteThrough), %eax
+ movl %eax, %cr0
+
+ post_code(0x36)
+
+ /* Disable cache. */
+ movl %cr0, %eax
+ orl $CR0_CacheDisable, %eax
+ movl %eax, %cr0
+
+ post_code(0x38)
+
+ /* Setup stack as indicated by return value from ramstage_main(). */
+ movl %ebx, %esp
+
+ /* Get number of MTRRs. */
+ popl %ebx
+ movl $MTRRphysBase_MSR(0), %ecx
+1:
+ testl %ebx, %ebx
+ jz 1f
+
+ /* Low 32 bits of MTRR base. */
+ popl %eax
+ /* Upper 32 bits of MTRR base. */
+ popl %edx
+ /* Write MTRR base. */
+ wrmsr
+ inc %ecx
+ /* Low 32 bits of MTRR mask. */
+ popl %eax
+ /* Upper 32 bits of MTRR mask. */
+ popl %edx
+ /* Write MTRR mask. */
+ wrmsr
+ inc %ecx
+
+ dec %ebx
+ jmp 1b
+1:
+ post_code(0x39)
+
+ /* And enable cache again after setting MTRRs. */
+ movl %cr0, %eax
+ andl $~(CR0_CacheDisable | CR0_NoWriteThrough), %eax
+ movl %eax, %cr0
+
+ post_code(0x3a)
+
+ /* Enable MTRR. */
+ movl $MTRRdefType_MSR, %ecx
+ rdmsr
+ orl $MTRRdefTypeEn, %eax
+ wrmsr
+
+ post_code(0x3b)
+
+ /* Invalidate the cache again. */
+ invd
+
+ post_code(0x3c)
+
+__main:
+ post_code(POST_PREPARE_RAMSTAGE)
+ cld /* Clear direction flag. */
+ call romstage_after_car
+
+.Lhlt:
+ post_code(POST_DEAD_CODE)
+ hlt
+ jmp .Lhlt
+
+mtrr_table:
+ /* Fixed MTRRs */
+ .word 0x250, 0x258, 0x259
+ .word 0x268, 0x269, 0x26A
+ .word 0x26B, 0x26C, 0x26D
+ .word 0x26E, 0x26F
+ /* Variable MTRRs */
+ .word 0x200, 0x201, 0x202, 0x203
+ .word 0x204, 0x205, 0x206, 0x207
+ .word 0x208, 0x209, 0x20A, 0x20B
+ .word 0x20C, 0x20D, 0x20E, 0x20F
+ .word 0x210, 0x211, 0x212, 0x213
+mtrr_table_end:
+
diff --git a/src/soc/intel/broadwell/romstage/cpu.c b/src/soc/intel/broadwell/romstage/cpu.c
new file mode 100644
index 0000000..e7139b8
--- /dev/null
+++ b/src/soc/intel/broadwell/romstage/cpu.c
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdlib.h>
+#include <console/console.h>
+#include <cpu/x86/msr.h>
+#include <broadwell/cpu.h>
+#include <broadwell/msr.h>
+#include <broadwell/romstage.h>
+
+void set_max_freq(void)
+{
+ msr_t msr, perf_ctl, platform_info;
+
+ /* Check for configurable TDP option */
+ platform_info = rdmsr(MSR_PLATFORM_INFO);
+
+ if ((platform_info.hi >> 1) & 3) {
+ /* Set to nominal TDP ratio */
+ msr = rdmsr(MSR_CONFIG_TDP_NOMINAL);
+ perf_ctl.lo = (msr.lo & 0xff) << 8;
+ } else {
+ /* Platform Info bits 15:8 give max ratio */
+ msr = rdmsr(MSR_PLATFORM_INFO);
+ perf_ctl.lo = msr.lo & 0xff00;
+ }
+
+ perf_ctl.hi = 0;
+ wrmsr(IA32_PERF_CTL, perf_ctl);
+
+ printk(BIOS_DEBUG, "CPU: frequency set to %d MHz\n",
+ ((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK);
+}
diff --git a/src/soc/intel/broadwell/romstage/pch.c b/src/soc/intel/broadwell/romstage/pch.c
new file mode 100644
index 0000000..d064fc0
--- /dev/null
+++ b/src/soc/intel/broadwell/romstage/pch.c
@@ -0,0 +1,146 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <console/console.h>
+#include <device/device.h>
+#include <device/pci_def.h>
+#include <reg_script.h>
+#include <broadwell/iomap.h>
+#include <broadwell/lpc.h>
+#include <broadwell/pch.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/pm.h>
+#include <broadwell/rcba.h>
+#include <broadwell/romstage.h>
+#include <broadwell/smbus.h>
+#include <chip.h>
+
+const struct reg_script pch_early_init_script[] = {
+ /* Setup southbridge BARs */
+ REG_PCI_WRITE32(RCBA, RCBA_BASE_ADDRESS | 1),
+ REG_PCI_WRITE32(PMBASE, ACPI_BASE_ADDRESS | 1),
+ REG_PCI_WRITE8(ACPI_CNTL, ACPI_EN),
+ REG_PCI_WRITE32(GPIO_BASE, GPIO_BASE_ADDRESS | 1),
+ REG_PCI_WRITE8(GPIO_CNTL, GPIO_EN),
+
+ /* Set COM1/COM2 decode range */
+ REG_PCI_WRITE16(LPC_IO_DEC, 0x0010),
+ /* Enable legacy decode ranges */
+ REG_PCI_WRITE16(LPC_EN, CNF1_LPC_EN | CNF2_LPC_EN | GAMEL_LPC_EN |
+ COMA_LPC_EN | KBC_LPC_EN | MC_LPC_EN),
+
+ /* Enable IOAPIC */
+ REG_MMIO_WRITE16(RCBA_BASE_ADDRESS + OIC, 0x0100),
+ /* Read back for posted write */
+ REG_MMIO_READ16(RCBA_BASE_ADDRESS + OIC),
+
+ /* Set HPET address and enable it */
+ REG_MMIO_RMW32(RCBA_BASE_ADDRESS + HPTC, ~3, (1 << 7)),
+ /* Read back for posted write */
+ REG_MMIO_READ32(RCBA_BASE_ADDRESS + HPTC),
+ /* Enable HPET to start counter */
+ REG_MMIO_OR32(HPET_BASE_ADDRESS + 0x10, (1 << 0)),
+
+ /* Disable reset */
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + GCS, (1 << 5)),
+ /* TCO timer halt */
+ REG_IO_OR16(ACPI_BASE_ADDRESS + TCO1_CNT, TCO_TMR_HLT),
+
+ /* Enable upper 128 bytes of CMOS */
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + RC, (1 << 2)),
+
+ /* Disable unused device (always) */
+ REG_MMIO_OR32(RCBA_BASE_ADDRESS + FD, PCH_DISABLE_ALWAYS),
+
+ REG_SCRIPT_END
+};
+
+const struct reg_script pch_interrupt_init_script[] = {
+ /*
+ * GFX INTA -> PIRQA (MSI)
+ * D28IP_P1IP PCIE INTA -> PIRQA
+ * D29IP_E1P EHCI INTA -> PIRQD
+ * D20IP_XHCI XHCI INTA -> PIRQC (MSI)
+ * D31IP_SIP SATA INTA -> PIRQF (MSI)
+ * D31IP_SMIP SMBUS INTB -> PIRQG
+ * D31IP_TTIP THRT INTC -> PIRQA
+ * D27IP_ZIP HDA INTA -> PIRQG (MSI)
+ */
+
+ /* Device interrupt pin register (board specific) */
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D31IP,
+ (INTC << D31IP_TTIP) | (NOINT << D31IP_SIP2) |
+ (INTB << D31IP_SMIP) | (INTA << D31IP_SIP)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D29IP, (INTA << D29IP_E1P)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D28IP,
+ (INTA << D28IP_P1IP) | (INTC << D28IP_P3IP) |
+ (INTB << D28IP_P4IP)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D27IP, (INTA << D27IP_ZIP)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D26IP, (INTA << D26IP_E2P)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D22IP, (NOINT << D22IP_MEI1IP)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D20IP, (INTA << D20IP_XHCI)),
+
+ /* Device interrupt route registers */
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D31IR, /* LPC */
+ DIR_ROUTE(PIRQG, PIRQC, PIRQB, PIRQA)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D29IR, /* EHCI */
+ DIR_ROUTE(PIRQD, PIRQD, PIRQD, PIRQD)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D28IR, /* PCIE */
+ DIR_ROUTE(PIRQA, PIRQB, PIRQC, PIRQD)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D27IR, /* HDA */
+ DIR_ROUTE(PIRQG, PIRQG, PIRQG, PIRQG)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D22IR, /* ME */
+ DIR_ROUTE(PIRQA, PIRQA, PIRQA, PIRQA)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D21IR, /* SIO */
+ DIR_ROUTE(PIRQE, PIRQF, PIRQF, PIRQF)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D20IR, /* XHCI */
+ DIR_ROUTE(PIRQC, PIRQC, PIRQC, PIRQC)),
+ REG_MMIO_WRITE32(RCBA_BASE_ADDRESS + D23IR, /* SDIO */
+ DIR_ROUTE(PIRQH, PIRQH, PIRQH, PIRQH)),
+
+ REG_SCRIPT_END
+};
+
+static void pch_enable_lpc(void)
+{
+ /* Lookup device tree in romstage */
+ const struct device *dev;
+ const config_t *config;
+
+ dev = dev_find_slot(0, PCI_DEVFN(PCH_DEV_SLOT_LPC, 0));
+ if (!dev || !dev->chip_info)
+ return;
+ config = dev->chip_info;
+
+ pci_write_config32(PCH_DEV_LPC, LPC_GEN1_DEC, config->gen1_dec);
+ pci_write_config32(PCH_DEV_LPC, LPC_GEN2_DEC, config->gen2_dec);
+ pci_write_config32(PCH_DEV_LPC, LPC_GEN3_DEC, config->gen3_dec);
+ pci_write_config32(PCH_DEV_LPC, LPC_GEN4_DEC, config->gen4_dec);
+}
+
+void pch_early_init(void)
+{
+ reg_script_run_on_dev(PCH_DEV_LPC, pch_early_init_script);
+ reg_script_run_on_dev(PCH_DEV_LPC, pch_interrupt_init_script);
+
+ pch_enable_lpc();
+
+ enable_smbus();
+}
diff --git a/src/soc/intel/broadwell/romstage/power_state.c b/src/soc/intel/broadwell/romstage/power_state.c
new file mode 100644
index 0000000..6e333c1
--- /dev/null
+++ b/src/soc/intel/broadwell/romstage/power_state.c
@@ -0,0 +1,131 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/early_variables.h>
+#include <arch/io.h>
+#include <cbmem.h>
+#include <console/console.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_def.h>
+#include <reg_script.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <broadwell/iomap.h>
+#include <broadwell/lpc.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/pm.h>
+#include <broadwell/romstage.h>
+
+static struct chipset_power_state power_state CAR_GLOBAL;
+
+static void migrate_power_state(void)
+{
+ struct chipset_power_state *ps_cbmem;
+ struct chipset_power_state *ps_car;
+
+ ps_car = car_get_var_ptr(&power_state);
+ ps_cbmem = cbmem_add(CBMEM_ID_POWER_STATE, sizeof(*ps_cbmem));
+
+ if (ps_cbmem == NULL) {
+ printk(BIOS_DEBUG, "Not adding power state to cbmem!\n");
+ return;
+ }
+ memcpy(ps_cbmem, ps_car, sizeof(*ps_cbmem));
+}
+CAR_MIGRATE(migrate_power_state);
+
+/* Return 0, 3, or 5 to indicate the previous sleep state. */
+static int prev_sleep_state(struct chipset_power_state *ps)
+{
+ /* Default to S0. */
+ int prev_sleep_state = SLEEP_STATE_S0;
+
+ if (ps->pm1_sts & WAK_STS) {
+ switch ((ps->pm1_cnt & SLP_TYP) >> SLP_TYP_SHIFT) {
+#if CONFIG_HAVE_ACPI_RESUME
+ case SLP_TYP_S3:
+ prev_sleep_state = SLEEP_STATE_S3;
+ break;
+#endif
+ case SLP_TYP_S5:
+ prev_sleep_state = SLEEP_STATE_S5;
+ break;
+ }
+ /* Clear SLP_TYP. */
+ outl(ps->pm1_cnt & ~(SLP_TYP), ACPI_BASE_ADDRESS + PM1_CNT);
+ }
+
+ if (ps->gen_pmcon3 & (PWR_FLR | SUS_PWR_FLR))
+ prev_sleep_state = SLEEP_STATE_S5;
+
+ return prev_sleep_state;
+}
+
+static void dump_power_state(struct chipset_power_state *ps)
+{
+ printk(BIOS_DEBUG, "PM1_STS: %04x\n", ps->pm1_sts);
+ printk(BIOS_DEBUG, "PM1_EN: %04x\n", ps->pm1_en);
+ printk(BIOS_DEBUG, "PM1_CNT: %08x\n", ps->pm1_cnt);
+ printk(BIOS_DEBUG, "TCO_STS: %08x %08x\n", ps->tco1_sts, ps->tco2_sts);
+
+ printk(BIOS_DEBUG, "GPE0_STS: %08x %08x %08x %08x\n",
+ ps->gpe0_sts[0], ps->gpe0_sts[1],
+ ps->gpe0_sts[2], ps->gpe0_sts[3]);
+ printk(BIOS_DEBUG, "GPE0_EN: %08x %08x %08x %08x\n",
+ ps->gpe0_en[0], ps->gpe0_en[1],
+ ps->gpe0_en[2], ps->gpe0_en[3]);
+
+ printk(BIOS_DEBUG, "GEN_PMCON: %04x %04x %04x\n",
+ ps->gen_pmcon1, ps->gen_pmcon2, ps->gen_pmcon3);
+
+ printk(BIOS_DEBUG, "Previous Sleep State: S%d\n",
+ ps->prev_sleep_state);
+}
+
+/* Fill power state structure from ACPI PM registers */
+struct chipset_power_state *fill_power_state(void)
+{
+ struct chipset_power_state *ps = car_get_var_ptr(&power_state);
+
+ ps->pm1_sts = inw(ACPI_BASE_ADDRESS + PM1_STS);
+ ps->pm1_en = inw(ACPI_BASE_ADDRESS + PM1_EN);
+ ps->pm1_cnt = inl(ACPI_BASE_ADDRESS + PM1_CNT);
+ ps->tco1_sts = inl(ACPI_BASE_ADDRESS + TCO1_STS);
+ ps->tco2_sts = inl(ACPI_BASE_ADDRESS + TCO2_STS);
+ ps->gpe0_sts[0] = inl(ACPI_BASE_ADDRESS + GPE0_STS(0));
+ ps->gpe0_sts[1] = inl(ACPI_BASE_ADDRESS + GPE0_STS(1));
+ ps->gpe0_sts[2] = inl(ACPI_BASE_ADDRESS + GPE0_STS(2));
+ ps->gpe0_sts[3] = inl(ACPI_BASE_ADDRESS + GPE0_STS(3));
+ ps->gpe0_en[0] = inl(ACPI_BASE_ADDRESS + GPE0_EN(0));
+ ps->gpe0_en[1] = inl(ACPI_BASE_ADDRESS + GPE0_EN(1));
+ ps->gpe0_en[2] = inl(ACPI_BASE_ADDRESS + GPE0_EN(2));
+ ps->gpe0_en[3] = inl(ACPI_BASE_ADDRESS + GPE0_EN(3));
+
+ ps->gen_pmcon1 = pci_read_config16(PCH_DEV_LPC, GEN_PMCON_1);
+ ps->gen_pmcon2 = pci_read_config16(PCH_DEV_LPC, GEN_PMCON_2);
+ ps->gen_pmcon3 = pci_read_config16(PCH_DEV_LPC, GEN_PMCON_3);
+
+ ps->prev_sleep_state = prev_sleep_state(ps);
+
+ dump_power_state(ps);
+
+ return ps;
+}
diff --git a/src/soc/intel/broadwell/romstage/raminit.c b/src/soc/intel/broadwell/romstage/raminit.c
new file mode 100644
index 0000000..870952f
--- /dev/null
+++ b/src/soc/intel/broadwell/romstage/raminit.c
@@ -0,0 +1,114 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/cbfs.h>
+#include <arch/hlt.h>
+#include <arch/io.h>
+#include <cbfs.h>
+#include <cbmem.h>
+#include <console/console.h>
+#include <device/pci_def.h>
+#include <string.h>
+#if CONFIG_EC_GOOGLE_CHROMEEC
+#include <ec/google/chromeec/ec.h>
+#include <ec/google/chromeec/ec_commands.h>
+#endif
+#include <vendorcode/google/chromeos/chromeos.h>
+#include <soc/intel/common/mrc_cache.h>
+#include <broadwell/iomap.h>
+#include <broadwell/pei_data.h>
+#include <broadwell/pei_wrapper.h>
+#include <broadwell/pm.h>
+#include <broadwell/reset.h>
+#include <broadwell/romstage.h>
+#include <broadwell/smm.h>
+#include <broadwell/systemagent.h>
+
+/*
+ * Find PEI executable in coreboot filesystem and execute it.
+ */
+void raminit(struct pei_data *pei_data)
+{
+ const struct mrc_saved_data *cache;
+ pei_wrapper_entry_t entry;
+ int ret;
+
+ broadwell_fill_pei_data(pei_data);
+
+ if (recovery_mode_enabled()) {
+ /* Recovery mode does not use MRC cache */
+ printk(BIOS_DEBUG, "Recovery mode: not using MRC cache.\n");
+ } else if (!mrc_cache_get_current(&cache)) {
+ /* MRC cache found */
+ pei_data->saved_data_size = cache->size;
+ pei_data->saved_data = &cache->data[0];
+ } else if (pei_data->boot_mode == SLEEP_STATE_S3) {
+ /* Waking from S3 and no cache. */
+ printk(BIOS_DEBUG, "No MRC cache found in S3 resume path.\n");
+ post_code(POST_RESUME_FAILURE);
+ reset_system();
+ } else {
+ printk(BIOS_DEBUG, "No MRC cache found.\n");
+#if CONFIG_EC_GOOGLE_CHROMEEC
+ if (pei_data->boot_mode == SLEEP_STATE_S0) {
+ /* Ensure EC is running RO firmware. */
+ google_chromeec_check_ec_image(EC_IMAGE_RO);
+ }
+#endif
+ }
+
+ /* Determine if mrc.bin is in the cbfs. */
+ entry = (pei_wrapper_entry_t)cbfs_get_file_content(
+ CBFS_DEFAULT_MEDIA, "mrc.bin", 0xab);
+ if (entry == NULL) {
+ printk(BIOS_DEBUG, "Couldn't find mrc.bin\n");
+ return;
+ }
+
+ printk(BIOS_DEBUG, "Starting Memory Reference Code\n");
+
+ ret = entry(pei_data);
+ if (ret < 0)
+ die("pei_data version mismatch\n");
+
+ /* Print the MRC version after executing the UEFI PEI stage. */
+ u32 version = MCHBAR32(MCHBAR_PEI_VERSION);
+ printk(BIOS_DEBUG, "MRC Version %d.%d.%d Build %d\n",
+ version >> 24 , (version >> 16) & 0xff,
+ (version >> 8) & 0xff, version & 0xff);
+
+ report_memory_config();
+
+ if (pei_data->boot_mode != SLEEP_STATE_S3) {
+ cbmem_initialize_empty();
+ } else if (cbmem_initialize()) {
+#if CONFIG_HAVE_ACPI_RESUME
+ printk(BIOS_DEBUG, "Failed to recover CBMEM in S3 resume.\n");
+ /* Failed S3 resume, reset to come up cleanly */
+ reset_system();
+#endif
+ }
+
+ printk(BIOS_DEBUG, "MRC data at %p %d bytes\n", pei_data->data_to_save,
+ pei_data->data_to_save_size);
+
+ if (pei_data->data_to_save != NULL && pei_data->data_to_save_size > 0)
+ mrc_cache_stash_data(pei_data->data_to_save,
+ pei_data->data_to_save_size);
+}
diff --git a/src/soc/intel/broadwell/romstage/report_platform.c b/src/soc/intel/broadwell/romstage/report_platform.c
new file mode 100644
index 0000000..3c4016f
--- /dev/null
+++ b/src/soc/intel/broadwell/romstage/report_platform.c
@@ -0,0 +1,211 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/cpu.h>
+#include <arch/io.h>
+#include <console/console.h>
+#include <device/pci.h>
+#include <string.h>
+#include <cpu/x86/msr.h>
+#include <broadwell/cpu.h>
+#include <broadwell/pch.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/romstage.h>
+#include <broadwell/systemagent.h>
+
+static struct {
+ u32 cpuid;
+ const char *name;
+} cpu_table [] = {
+ { CPUID_HASWELL_A0, "Haswell A0" },
+ { CPUID_HASWELL_B0, "Haswell B0" },
+ { CPUID_HASWELL_C0, "Haswell C0" },
+ { CPUID_HASWELL_ULT_B0, "Haswell ULT B0" },
+ { CPUID_HASWELL_ULT, "Haswell ULT C0 or D0" },
+ { CPUID_HASWELL_HALO, "Haswell Perf Halo" },
+ { CPUID_BROADWELL_C0, "Broadwell C0" },
+ { CPUID_BROADWELL_D0, "Broadwell D0" },
+};
+
+static struct {
+ u16 lpcid;
+ const char *name;
+} pch_table [] = {
+ { PCH_LPT_LP_SAMPLE, "LynxPoint LP Sample" },
+ { PCH_LPT_LP_PREMIUM, "LynxPoint LP Premium" },
+ { PCH_LPT_LP_MAINSTREAM, "LynxPoint LP Mainstream" },
+ { PCH_LPT_LP_VALUE, "LynxPoint LP Value" },
+ { PCH_WPT_HSW_U_SAMPLE, "Haswell U Sample" },
+ { PCH_WPT_BDW_U_SAMPLE, "Broadwell U Sample" },
+ { PCH_WPT_BDW_U_PREMIUM, "Broadwell U Premium" },
+ { PCH_WPT_BDW_U_BASE, "Broadwell U Base" },
+ { PCH_WPT_BDW_Y_SAMPLE, "Broadwell Y Sample" },
+ { PCH_WPT_BDW_Y_PREMIUM, "Broadwell Y Premium" },
+ { PCH_WPT_BDW_Y_BASE, "Broadwell Y Base" },
+ { PCH_WPT_BDW_H, "Broadwell H" },
+};
+
+static struct {
+ u16 igdid;
+ const char *name;
+} igd_table [] = {
+ { IGD_HASWELL_ULT_GT1, "Haswell ULT GT1" },
+ { IGD_HASWELL_ULT_GT2, "Haswell ULT GT2" },
+ { IGD_HASWELL_ULT_GT3, "Haswell ULT GT3" },
+ { IGD_BROADWELL_U_GT1, "Broadwell U GT1" },
+ { IGD_BROADWELL_U_GT2, "Broadwell U GT2" },
+ { IGD_BROADWELL_U_GT3_15W, "Broadwell U GT3 (15W)" },
+ { IGD_BROADWELL_U_GT3_28W, "Broadwell U GT3 (28W)" },
+ { IGD_BROADWELL_Y_GT2, "Broadwell Y GT2" },
+ { IGD_BROADWELL_H_GT2, "Broadwell U GT2" },
+ { IGD_BROADWELL_H_GT3, "Broadwell U GT3" },
+};
+
+static void report_cpu_info(void)
+{
+ struct cpuid_result cpuidr;
+ u32 i, index;
+ char cpu_string[50], *cpu_name = cpu_string; /* 48 bytes are reported */
+ int vt, txt, aes;
+ msr_t microcode_ver;
+ const char *mode[] = {"NOT ", ""};
+ const char *cpu_type = "Unknown";
+
+ index = 0x80000000;
+ cpuidr = cpuid(index);
+ if (cpuidr.eax < 0x80000004) {
+ strcpy(cpu_string, "Platform info not available");
+ } else {
+ u32 *p = (u32*) cpu_string;
+ for (i = 2; i <= 4 ; i++) {
+ cpuidr = cpuid(index + i);
+ *p++ = cpuidr.eax;
+ *p++ = cpuidr.ebx;
+ *p++ = cpuidr.ecx;
+ *p++ = cpuidr.edx;
+ }
+ }
+ /* Skip leading spaces in CPU name string */
+ while (cpu_name[0] == ' ')
+ cpu_name++;
+
+ microcode_ver.lo = 0;
+ microcode_ver.hi = 0;
+ wrmsr(0x8B, microcode_ver);
+ cpuidr = cpuid(1);
+ microcode_ver = rdmsr(0x8b);
+
+ /* Look for string to match the name */
+ for (i = 0; i < ARRAY_SIZE(cpu_table); i++) {
+ if (cpu_table[i].cpuid == cpuidr.eax) {
+ cpu_type = cpu_table[i].name;
+ break;
+ }
+ }
+
+ printk(BIOS_DEBUG, "CPU: %s\n", cpu_name);
+ printk(BIOS_DEBUG, "CPU: ID %x, %s, ucode: %08x\n",
+ cpuidr.eax, cpu_type, microcode_ver.hi);
+
+ aes = (cpuidr.ecx & (1 << 25)) ? 1 : 0;
+ txt = (cpuidr.ecx & (1 << 6)) ? 1 : 0;
+ vt = (cpuidr.ecx & (1 << 5)) ? 1 : 0;
+ printk(BIOS_DEBUG, "CPU: AES %ssupported, TXT %ssupported, "
+ "VT %ssupported\n", mode[aes], mode[txt], mode[vt]);
+}
+
+static void report_pch_info(void)
+{
+ int i;
+ u16 lpcid = pch_type();
+ const char *pch_type = "Unknown";
+
+ for (i = 0; i < ARRAY_SIZE(pch_table); i++) {
+ if (pch_table[i].lpcid == lpcid) {
+ pch_type = pch_table[i].name;
+ break;
+ }
+ }
+ printk(BIOS_DEBUG, "PCH: device id %04x (rev %02x) is %s\n",
+ lpcid, pch_revision(), pch_type);
+}
+
+static void report_igd_info(void)
+{
+ int i;
+ u16 igdid = pci_read_config16(SA_DEV_IGD, PCI_DEVICE_ID);
+ const char *igd_type = "Unknown";
+
+ for (i = 0; i < ARRAY_SIZE(igd_table); i++) {
+ if (igd_table[i].igdid == igdid) {
+ igd_type = igd_table[i].name;
+ break;
+ }
+ }
+ printk(BIOS_DEBUG, "IGD: device id %04x (rev %02x) is %s\n",
+ igdid, pci_read_config8(SA_DEV_IGD, PCI_REVISION_ID), igd_type);
+}
+
+void report_platform_info(void)
+{
+ report_cpu_info();
+ report_pch_info();
+ report_igd_info();
+}
+
+/*
+ * Dump in the log memory controller configuration as read from the memory
+ * controller registers.
+ */
+void report_memory_config(void)
+{
+ u32 addr_decoder_common, addr_decode_ch[2];
+ int i;
+
+ addr_decoder_common = MCHBAR32(0x5000);
+ addr_decode_ch[0] = MCHBAR32(0x5004);
+ addr_decode_ch[1] = MCHBAR32(0x5008);
+
+ printk(BIOS_DEBUG, "memcfg DDR3 clock %d MHz\n",
+ (MCHBAR32(0x5e04) * 13333 * 2 + 50)/100);
+ printk(BIOS_DEBUG, "memcfg channel assignment: A: %d, B % d, C % d\n",
+ addr_decoder_common & 3,
+ (addr_decoder_common >> 2) & 3,
+ (addr_decoder_common >> 4) & 3);
+
+ for (i = 0; i < ARRAY_SIZE(addr_decode_ch); i++) {
+ u32 ch_conf = addr_decode_ch[i];
+ printk(BIOS_DEBUG, "memcfg channel[%d] config (%8.8x):\n",
+ i, ch_conf);
+ printk(BIOS_DEBUG, " enhanced interleave mode %s\n",
+ ((ch_conf >> 22) & 1) ? "on" : "off");
+ printk(BIOS_DEBUG, " rank interleave %s\n",
+ ((ch_conf >> 21) & 1) ? "on" : "off");
+ printk(BIOS_DEBUG, " DIMMA %d MB width %s %s rank%s\n",
+ ((ch_conf >> 0) & 0xff) * 256,
+ ((ch_conf >> 19) & 1) ? "x16" : "x8 or x32",
+ ((ch_conf >> 17) & 1) ? "dual" : "single",
+ ((ch_conf >> 16) & 1) ? "" : ", selected");
+ printk(BIOS_DEBUG, " DIMMB %d MB width %s %s rank%s\n",
+ ((ch_conf >> 8) & 0xff) * 256,
+ ((ch_conf >> 19) & 1) ? "x16" : "x8 or x32",
+ ((ch_conf >> 18) & 1) ? "dual" : "single",
+ ((ch_conf >> 16) & 1) ? ", selected" : "");
+ }
+}
diff --git a/src/soc/intel/broadwell/romstage/romstage.c b/src/soc/intel/broadwell/romstage/romstage.c
new file mode 100644
index 0000000..84d1f11
--- /dev/null
+++ b/src/soc/intel/broadwell/romstage/romstage.c
@@ -0,0 +1,164 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stddef.h>
+#include <stdint.h>
+#include <arch/cpu.h>
+#include <arch/io.h>
+#include <arch/cbfs.h>
+#include <arch/stages.h>
+#include <arch/early_variables.h>
+#include <console/console.h>
+#include <cbmem.h>
+#include <cpu/x86/mtrr.h>
+#include <elog.h>
+#include <ramstage_cache.h>
+#include <romstage_handoff.h>
+#include <timestamp.h>
+#include <vendorcode/google/chromeos/chromeos.h>
+#include <broadwell/me.h>
+#include <broadwell/pei_data.h>
+#include <broadwell/pm.h>
+#include <broadwell/reset.h>
+#include <broadwell/romstage.h>
+#include <broadwell/spi.h>
+
+static inline void mark_ts(struct romstage_params *rp, uint64_t ts)
+{
+ struct romstage_timestamps *rt = &rp->ts;
+
+ rt->times[rt->count] = ts;
+ rt->count++;
+}
+
+/* Entry from cache-as-ram.inc. */
+void * asmlinkage romstage_main(unsigned long bist,
+ uint32_t tsc_low, uint32_t tsc_hi)
+{
+ struct romstage_params rp = {
+ .bist = bist,
+ .pei_data = NULL,
+ };
+
+ post_code(0x30);
+
+ /* Save initial timestamp from bootblock. */
+ mark_ts(&rp, (((uint64_t)tsc_hi) << 32) | (uint64_t)tsc_low);
+
+ /* Save romstage begin */
+ mark_ts(&rp, timestamp_get());
+
+ /* System Agent Early Initialization */
+ systemagent_early_init();
+
+ /* PCH Early Initialization */
+ pch_early_init();
+
+ /* Start console drivers */
+ console_init();
+
+ /* Print useful platform information */
+ report_platform_info();
+
+ /* Set CPU frequency to maximum */
+ set_max_freq();
+
+ /* Call into mainboard. */
+ mainboard_romstage_entry(&rp);
+
+ return setup_stack_and_mttrs();
+}
+
+static inline void chromeos_init(int prev_sleep_state)
+{
+#if CONFIG_CHROMEOS
+ /* Normalize the sleep state to what init_chromeos() wants for S3: 2 */
+ init_chromeos(prev_sleep_state == SLEEP_STATE_S3 ? 2 : 0);
+#endif
+}
+
+/* Entry from the mainboard. */
+void romstage_common(struct romstage_params *params)
+{
+ struct chipset_power_state *ps;
+ struct romstage_handoff *handoff;
+
+ post_code(0x32);
+
+ mark_ts(params, timestamp_get());
+
+ /* Get power state */
+ ps = fill_power_state();
+ params->pei_data->boot_mode = ps->prev_sleep_state;
+
+#if CONFIG_ELOG_BOOT_COUNT
+ if (ps->prev_sleep_state != SLEEP_STATE_S3)
+ boot_count_increment();
+#endif
+
+ /* Print ME state before MRC */
+ intel_me_status();
+
+ /* Initialize RAM */
+ raminit(params->pei_data);
+ mark_ts(params, timestamp_get());
+
+ handoff = romstage_handoff_find_or_add();
+ if (handoff != NULL)
+ handoff->s3_resume = (ps->prev_sleep_state == SLEEP_STATE_S3);
+ else
+ printk(BIOS_DEBUG, "Romstage handoff structure not added!\n");
+
+ chromeos_init(ps->prev_sleep_state);
+
+ /* Save timestamp information. */
+ timestamp_init(params->ts.times[0]);
+ timestamp_add(TS_START_ROMSTAGE, params->ts.times[1]);
+ timestamp_add(TS_BEFORE_INITRAM, params->ts.times[2]);
+ timestamp_add(TS_AFTER_INITRAM, params->ts.times[3]);
+}
+
+void asmlinkage romstage_after_car(void)
+{
+ timestamp_add_now(TS_END_ROMSTAGE);
+
+ /* Run vboot verification if configured. */
+ vboot_verify_firmware(romstage_handoff_find_or_add());
+
+ /* Load the ramstage. */
+ copy_and_run();
+ while (1);
+}
+
+void ramstage_cache_invalid(struct ramstage_cache *cache)
+{
+#if CONFIG_RESET_ON_INVALID_RAMSTAGE_CACHE
+ /* Perform cold reset on invalid ramstage cache. */
+ reset_system();
+#endif
+}
+
+#if CONFIG_CHROMEOS
+int vboot_get_sw_write_protect(void)
+{
+ u8 status;
+ /* Return unprotected status if status read fails. */
+ return (early_spi_read_wpsr(&status) ? 0 : !!(status & 0x80));
+}
+#endif
diff --git a/src/soc/intel/broadwell/romstage/smbus.c b/src/soc/intel/broadwell/romstage/smbus.c
new file mode 100644
index 0000000..2bc1492
--- /dev/null
+++ b/src/soc/intel/broadwell/romstage/smbus.c
@@ -0,0 +1,52 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <console/console.h>
+#include <device/pci_ids.h>
+#include <device/pci_def.h>
+#include <reg_script.h>
+#include <broadwell/iomap.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/smbus.h>
+#include <broadwell/romstage.h>
+
+static const struct reg_script smbus_init_script[] = {
+ /* Set SMBUS I/O base address */
+ REG_PCI_WRITE32(SMB_BASE, SMBUS_BASE_ADDRESS | 1),
+ /* Set SMBUS enable */
+ REG_PCI_WRITE8(HOSTC, HST_EN),
+ /* Enable I/O access */
+ REG_PCI_WRITE16(PCI_COMMAND, PCI_COMMAND_IO),
+ /* Disable interrupts */
+ REG_IO_WRITE8(SMBUS_BASE_ADDRESS + SMBHSTCTL, 0),
+ /* Clear errors */
+ REG_IO_WRITE8(SMBUS_BASE_ADDRESS + SMBHSTSTAT, 0xff),
+};
+
+void enable_smbus(void)
+{
+ reg_script_run_on_dev(PCH_DEV_SMBUS, smbus_init_script);
+}
+
+int smbus_read_byte(unsigned device, unsigned address)
+{
+ return do_smbus_read_byte(SMBUS_BASE_ADDRESS, device, address);
+}
diff --git a/src/soc/intel/broadwell/romstage/spi.c b/src/soc/intel/broadwell/romstage/spi.c
new file mode 100644
index 0000000..dd060b6
--- /dev/null
+++ b/src/soc/intel/broadwell/romstage/spi.c
@@ -0,0 +1,149 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <console/console.h>
+#include <device/pci_ids.h>
+#include <device/pci_def.h>
+#include <delay.h>
+#include <broadwell/spi.h>
+#include <broadwell/rcba.h>
+#include <broadwell/romstage.h>
+
+#define SPI_DELAY 10 /* 10us */
+#define SPI_RETRY 200000 /* 2s */
+
+static int early_spi_read_block(u32 offset, u8 size, u8 *buffer)
+{
+ u32 *ptr32 = (u32*)buffer;
+ u32 i;
+
+ /* Clear status bits */
+ SPIBAR16(SPIBAR_HSFS) |= SPIBAR_HSFS_AEL | SPIBAR_HSFS_FCERR |
+ SPIBAR_HSFS_FDONE;
+
+ if (SPIBAR16(SPIBAR_HSFS) & SPIBAR_HSFS_SCIP) {
+ printk(BIOS_ERR, "SPI ERROR: transaction in progress\n");
+ return -1;
+ }
+
+ /* Set flash address */
+ SPIBAR32(SPIBAR_FADDR) = offset;
+
+ /* Setup read transaction */
+ SPIBAR16(SPIBAR_HSFC) = SPIBAR_HSFC_BYTE_COUNT(size) |
+ SPIBAR_HSFC_CYCLE_READ;
+
+ /* Start transactinon */
+ SPIBAR16(SPIBAR_HSFC) |= SPIBAR_HSFC_GO;
+
+ /* Wait for completion */
+ for (i = 0; i < SPI_RETRY; i++) {
+ if (SPIBAR16(SPIBAR_HSFS) & SPIBAR_HSFS_SCIP) {
+ /* Cycle in progress, wait 1ms */
+ udelay(SPI_DELAY);
+ continue;
+ }
+
+ if (SPIBAR16(SPIBAR_HSFS) & SPIBAR_HSFS_AEL) {
+ printk(BIOS_ERR, "SPI ERROR: Access Error\n");
+ return -1;
+
+ }
+
+ if (SPIBAR16(SPIBAR_HSFS) & SPIBAR_HSFS_FCERR) {
+ printk(BIOS_ERR, "SPI ERROR: Flash Cycle Error\n");
+ return -1;
+ }
+ break;
+ }
+
+ if (i >= SPI_RETRY) {
+ printk(BIOS_ERR, "SPI ERROR: Timeout\n");
+ return -1;
+ }
+
+ /* Read the data */
+ for (i = 0; i < size; i+=sizeof(u32)) {
+ if (size-i >= 4) {
+ /* reading >= dword */
+ *ptr32++ = SPIBAR32(SPIBAR_FDATA(i/sizeof(u32)));
+ } else {
+ /* reading < dword */
+ u8 j, *ptr8 = (u8*)ptr32;
+ u32 temp = SPIBAR32(SPIBAR_FDATA(i/sizeof(u32)));
+ for (j = 0; j < (size-i); j++) {
+ *ptr8++ = temp & 0xff;
+ temp >>= 8;
+ }
+ }
+ }
+
+ return size;
+}
+
+int early_spi_read(u32 offset, u32 size, u8 *buffer)
+{
+ u32 current = 0;
+
+ while (size > 0) {
+ u8 count = (size < 64) ? size : 64;
+ if (early_spi_read_block(offset + current, count,
+ buffer + current) < 0)
+ return -1;
+ size -= count;
+ current += count;
+ }
+
+ return 0;
+}
+
+/*
+ * Minimal set of commands to read WPSR from SPI.
+ * Don't use this code outside romstage -- it trashes the opmenu table.
+ * Returns 0 on success, < 0 on failure.
+ */
+int early_spi_read_wpsr(u8 *sr)
+{
+ int retry;
+
+ /* No address associated with rdsr */
+ SPIBAR8(SPIBAR_OPTYPE) = 0x0;
+ /* Setup opcode[0] = read wpsr */
+ SPIBAR8(SPIBAR_OPMENU_LOWER) = 0x5;
+
+ /* Start transaction */
+ SPIBAR16(SPIBAR_SSFC) = SPIBAR_SSFC_DATA | SPIBAR_SSFC_GO;
+
+ /* Wait for error / complete status */
+ for (retry = SPI_RETRY; retry; retry--) {
+ u16 status = SPIBAR16(SPIBAR_SSFS);
+ if (status & SPIBAR_SSFS_ERROR) {
+ printk(BIOS_ERR, "SPI rdsr failed\n");
+ return -1;
+ } else if (status & SPIBAR_SSFS_DONE) {
+ break;
+ }
+
+ udelay(SPI_DELAY);
+ }
+
+ *sr = SPIBAR32(SPIBAR_FDATA(0)) & 0xff;
+ return 0;
+}
diff --git a/src/soc/intel/broadwell/romstage/stack.c b/src/soc/intel/broadwell/romstage/stack.c
new file mode 100644
index 0000000..7f56629
--- /dev/null
+++ b/src/soc/intel/broadwell/romstage/stack.c
@@ -0,0 +1,124 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stddef.h>
+#include <stdint.h>
+#include <arch/cpu.h>
+#include <arch/early_variables.h>
+#include <console/console.h>
+#include <cbmem.h>
+#include <cpu/x86/mtrr.h>
+#include <broadwell/romstage.h>
+
+static inline uint32_t *stack_push(u32 *stack, u32 value)
+{
+ stack = &stack[-1];
+ *stack = value;
+ return stack;
+}
+
+/* Romstage needs quite a bit of stack for decompressing images since the lzma
+ * lib keeps its state on the stack during romstage. */
+static unsigned long choose_top_of_stack(void)
+{
+ unsigned long stack_top;
+ const unsigned long romstage_ram_stack_size = 0x5000;
+
+ /* cbmem_add() does a find() before add(). */
+ stack_top = (unsigned long)cbmem_add(CBMEM_ID_ROMSTAGE_RAM_STACK,
+ romstage_ram_stack_size);
+ stack_top += romstage_ram_stack_size;
+ return stack_top;
+}
+
+/* setup_stack_and_mttrs() determines the stack to use after
+ * cache-as-ram is torn down as well as the MTRR settings to use. */
+void *setup_stack_and_mttrs(void)
+{
+ unsigned long top_of_stack;
+ int num_mtrrs;
+ uint32_t *slot;
+ uint32_t mtrr_mask_upper;
+ uint32_t top_of_ram;
+
+ /* Top of stack needs to be aligned to a 4-byte boundary. */
+ top_of_stack = choose_top_of_stack() & ~3;
+ slot = (void *)top_of_stack;
+ num_mtrrs = 0;
+
+ /* The upper bits of the MTRR mask need to set according to the number
+ * of physical address bits. */
+ mtrr_mask_upper = (1 << ((cpuid_eax(0x80000008) & 0xff) - 32)) - 1;
+
+ /* The order for each MTTR is value then base with upper 32-bits of
+ * each value coming before the lower 32-bits. The reasoning for
+ * this ordering is to create a stack layout like the following:
+ * +0: Number of MTRRs
+ * +4: MTTR base 0 31:0
+ * +8: MTTR base 0 63:32
+ * +12: MTTR mask 0 31:0
+ * +16: MTTR mask 0 63:32
+ * +20: MTTR base 1 31:0
+ * +24: MTTR base 1 63:32
+ * +28: MTTR mask 1 31:0
+ * +32: MTTR mask 1 63:32
+ */
+
+ /* Cache the ROM as WP just below 4GiB. */
+ slot = stack_push(slot, mtrr_mask_upper); /* upper mask */
+ slot = stack_push(slot, ~(CONFIG_ROM_SIZE - 1) | MTRRphysMaskValid);
+ slot = stack_push(slot, 0); /* upper base */
+ slot = stack_push(slot, ~(CONFIG_ROM_SIZE - 1) | MTRR_TYPE_WRPROT);
+ num_mtrrs++;
+
+ /* Cache RAM as WB from 0 -> CONFIG_RAMTOP. */
+ slot = stack_push(slot, mtrr_mask_upper); /* upper mask */
+ slot = stack_push(slot, ~(CONFIG_RAMTOP - 1) | MTRRphysMaskValid);
+ slot = stack_push(slot, 0); /* upper base */
+ slot = stack_push(slot, 0 | MTRR_TYPE_WRBACK);
+ num_mtrrs++;
+
+ top_of_ram = (uint32_t)cbmem_top();
+ /* Cache 8MiB below the top of ram. The top of ram under 4GiB is the
+ * start of the TSEG region. It is required to be 8MiB aligned. Set
+ * this area as cacheable so it can be used later for ramstage before
+ * setting up the entire RAM as cacheable. */
+ slot = stack_push(slot, mtrr_mask_upper); /* upper mask */
+ slot = stack_push(slot, ~((8 << 20) - 1) | MTRRphysMaskValid);
+ slot = stack_push(slot, 0); /* upper base */
+ slot = stack_push(slot, (top_of_ram - (8 << 20)) | MTRR_TYPE_WRBACK);
+ num_mtrrs++;
+
+ /* Cache 8MiB at the top of ram. Top of ram is where the TSEG
+ * region resides. However, it is not restricted to SMM mode until
+ * SMM has been relocated. By setting the region to cacheable it
+ * provides faster access when relocating the SMM handler as well
+ * as using the TSEG region for other purposes. */
+ slot = stack_push(slot, mtrr_mask_upper); /* upper mask */
+ slot = stack_push(slot, ~((8 << 20) - 1) | MTRRphysMaskValid);
+ slot = stack_push(slot, 0); /* upper base */
+ slot = stack_push(slot, top_of_ram | MTRR_TYPE_WRBACK);
+ num_mtrrs++;
+
+ /* Save the number of MTTRs to setup. Return the stack location
+ * pointing to the number of MTRRs. */
+ slot = stack_push(slot, num_mtrrs);
+
+ return slot;
+}
diff --git a/src/soc/intel/broadwell/romstage/systemagent.c b/src/soc/intel/broadwell/romstage/systemagent.c
new file mode 100644
index 0000000..8e4d82c
--- /dev/null
+++ b/src/soc/intel/broadwell/romstage/systemagent.c
@@ -0,0 +1,55 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2010 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdlib.h>
+#include <arch/io.h>
+#include <device/pci_def.h>
+#include <reg_script.h>
+#include <broadwell/iomap.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/romstage.h>
+#include <broadwell/systemagent.h>
+
+static const struct reg_script systemagent_early_init_script[] = {
+ REG_PCI_WRITE32(MCHBAR, MCH_BASE_ADDRESS | 1),
+ REG_PCI_WRITE32(DMIBAR, DMI_BASE_ADDRESS | 1),
+ REG_PCI_WRITE32(EPBAR, EP_BASE_ADDRESS | 1),
+ REG_MMIO_WRITE32(MCH_BASE_ADDRESS + EDRAMBAR, EDRAM_BASE_ADDRESS | 1),
+ REG_MMIO_WRITE32(MCH_BASE_ADDRESS + GDXCBAR, GDXC_BASE_ADDRESS | 1),
+
+ /* Set C0000-FFFFF to access RAM on both reads and writes */
+ REG_PCI_WRITE8(PAM0, 0x30),
+ REG_PCI_WRITE8(PAM1, 0x33),
+ REG_PCI_WRITE8(PAM2, 0x33),
+ REG_PCI_WRITE8(PAM3, 0x33),
+ REG_PCI_WRITE8(PAM4, 0x33),
+ REG_PCI_WRITE8(PAM5, 0x33),
+ REG_PCI_WRITE8(PAM6, 0x33),
+
+ /* Device enable: IGD and Mini-HD */
+ REG_PCI_WRITE32(DEVEN, DEVEN_D0EN | DEVEN_D2EN | DEVEN_D3EN),
+
+ REG_SCRIPT_END
+};
+
+void systemagent_early_init(void)
+{
+ reg_script_run_on_dev(SA_DEV_ROOT, systemagent_early_init_script);
+}
diff --git a/src/soc/intel/broadwell/sata.c b/src/soc/intel/broadwell/sata.c
new file mode 100644
index 0000000..e8d1fbe
--- /dev/null
+++ b/src/soc/intel/broadwell/sata.c
@@ -0,0 +1,254 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <console/console.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <delay.h>
+#include <broadwell/iobp.h>
+#include <broadwell/ramstage.h>
+#include <broadwell/rcba.h>
+#include <broadwell/sata.h>
+#include <chip.h>
+
+static inline u32 sir_read(struct device *dev, int idx)
+{
+ pci_write_config32(dev, SATA_SIRI, idx);
+ return pci_read_config32(dev, SATA_SIRD);
+}
+
+static inline void sir_write(struct device *dev, int idx, u32 value)
+{
+ pci_write_config32(dev, SATA_SIRI, idx);
+ pci_write_config32(dev, SATA_SIRD, value);
+}
+
+static void sata_init(struct device *dev)
+{
+ config_t *config = dev->chip_info;
+ u32 reg32, abar;
+ u16 reg16;
+
+ printk(BIOS_DEBUG, "SATA: Initializing controller in AHCI mode.\n");
+
+ /* Enable BARs */
+ pci_write_config16(dev, PCI_COMMAND, 0x0007);
+
+ /* Set Interrupt Line */
+ /* Interrupt Pin is set by D31IP.PIP */
+ pci_write_config8(dev, PCI_INTERRUPT_LINE, 0x0a);
+
+ /* Set timings */
+ pci_write_config16(dev, IDE_TIM_PRI, IDE_DECODE_ENABLE |
+ IDE_ISP_3_CLOCKS | IDE_RCT_1_CLOCKS |
+ IDE_PPE0 | IDE_IE0 | IDE_TIME0);
+ pci_write_config16(dev, IDE_TIM_SEC, IDE_DECODE_ENABLE |
+ IDE_ISP_5_CLOCKS | IDE_RCT_4_CLOCKS);
+
+ /* Sync DMA */
+ pci_write_config16(dev, IDE_SDMA_CNT, IDE_PSDE0);
+ pci_write_config16(dev, IDE_SDMA_TIM, 0x0001);
+
+ /* Set IDE I/O Configuration */
+ reg32 = SIG_MODE_PRI_NORMAL | FAST_PCB1 | FAST_PCB0 | PCB1 | PCB0;
+ pci_write_config32(dev, IDE_CONFIG, reg32);
+
+ /* for AHCI, Port Enable is managed in memory mapped space */
+ reg16 = pci_read_config16(dev, 0x92);
+ reg16 &= ~0x3f;
+ reg16 |= 0x8000 | config->sata_port_map;
+ pci_write_config16(dev, 0x92, reg16);
+ udelay(2);
+
+ /* Setup register 98h */
+ reg32 = pci_read_config16(dev, 0x98);
+ reg32 |= 1 << 19; /* BWG step 6 */
+ reg32 |= 1 << 22; /* BWG step 5 */
+ reg32 &= ~(0x3f << 7);
+ reg32 |= 0x04 << 7; /* BWG step 7 */
+ reg32 |= 1 << 20; /* BWG step 8 */
+ reg32 &= ~(0x03 << 5);
+ reg32 |= 1 << 5; /* BWG step 9 */
+ reg32 |= 1 << 18; /* BWG step 10 */
+ reg32 |= 1 << 29; /* BWG step 11 */
+ reg32 &= ~((1 << 31) | (1 << 30));
+ reg32 |= 1 << 23;
+ reg32 |= 1 << 24; /* Disable listen mode (hotplug) */
+ pci_write_config32(dev, 0x98, reg32);
+
+ /* Setup register 9Ch */
+ reg16 = 0; /* Disable alternate ID */
+ reg16 = 1 << 5; /* BWG step 12 */
+ pci_write_config16(dev, 0x9c, reg16);
+
+ /* SATA Initialization register */
+ reg32 = 0x183;
+ reg32 |= (config->sata_port_map ^ 0x3f) << 24;
+ reg32 |= (config->sata_devslp_mux & 1) << 15;
+ pci_write_config32(dev, 0x94, reg32);
+
+ /* Initialize AHCI memory-mapped space */
+ abar = pci_read_config32(dev, PCI_BASE_ADDRESS_5);
+ printk(BIOS_DEBUG, "ABAR: %08X\n", abar);
+
+ /* CAP (HBA Capabilities) : enable power management */
+ reg32 = read32(abar + 0x00);
+ reg32 |= 0x0c006000; // set PSC+SSC+SALP+SSS
+ reg32 &= ~0x00020060; // clear SXS+EMS+PMS
+ reg32 |= (1 << 18); // SAM: SATA AHCI MODE ONLY
+ write32(abar + 0x00, reg32);
+
+ /* PI (Ports implemented) */
+ write32(abar + 0x0c, config->sata_port_map);
+ (void) read32(abar + 0x0c); /* Read back 1 */
+ (void) read32(abar + 0x0c); /* Read back 2 */
+
+ /* CAP2 (HBA Capabilities Extended)*/
+ reg32 = read32(abar + 0x24);
+
+ /*
+ * Static Power Gating for unused ports
+ */
+ reg32 = RCBA32(0x3a84);
+ /* Port 3 and 2 disabled */
+ if ((config->sata_port_map & ((1 << 3)|(1 << 2))) == 0)
+ reg32 |= (1 << 24) | (1 << 26);
+ /* Port 1 and 0 disabled */
+ if ((config->sata_port_map & ((1 << 1)|(1 << 0))) == 0)
+ reg32 |= (1 << 20) | (1 << 18);
+ RCBA32(0x3a84) = reg32;
+
+ /* Enable DEVSLP */
+ if (config->sata_devslp_disable)
+ reg32 &= ~(1 << 3);
+ else
+ reg32 |= (1 << 5)|(1 << 4)|(1 << 3)|(1 << 2);
+ write32(abar + 0x24, reg32);
+
+ /* Set Gen3 Transmitter settings if needed */
+ if (config->sata_port0_gen3_tx)
+ pch_iobp_update(SATA_IOBP_SP0G3IR, 0,
+ config->sata_port0_gen3_tx);
+
+ if (config->sata_port1_gen3_tx)
+ pch_iobp_update(SATA_IOBP_SP1G3IR, 0,
+ config->sata_port1_gen3_tx);
+
+ /* Set Gen3 DTLE DATA / EDGE registers if needed */
+ if (config->sata_port0_gen3_dtle) {
+ pch_iobp_update(SATA_IOBP_SP0DTLE_DATA,
+ ~(SATA_DTLE_MASK << SATA_DTLE_DATA_SHIFT),
+ (config->sata_port0_gen3_dtle & SATA_DTLE_MASK)
+ << SATA_DTLE_DATA_SHIFT);
+
+ pch_iobp_update(SATA_IOBP_SP0DTLE_EDGE,
+ ~(SATA_DTLE_MASK << SATA_DTLE_EDGE_SHIFT),
+ (config->sata_port0_gen3_dtle & SATA_DTLE_MASK)
+ << SATA_DTLE_EDGE_SHIFT);
+ }
+
+ if (config->sata_port1_gen3_dtle) {
+ pch_iobp_update(SATA_IOBP_SP1DTLE_DATA,
+ ~(SATA_DTLE_MASK << SATA_DTLE_DATA_SHIFT),
+ (config->sata_port1_gen3_dtle & SATA_DTLE_MASK)
+ << SATA_DTLE_DATA_SHIFT);
+
+ pch_iobp_update(SATA_IOBP_SP1DTLE_EDGE,
+ ~(SATA_DTLE_MASK << SATA_DTLE_EDGE_SHIFT),
+ (config->sata_port1_gen3_dtle & SATA_DTLE_MASK)
+ << SATA_DTLE_EDGE_SHIFT);
+ }
+
+ /*
+ * Additional Programming Requirements for Power Optimizer
+ */
+
+ /* Step 1 */
+ sir_write(dev, 0x64, 0x883c9003);
+
+ /* Step 2: SIR 68h[15:0] = 880Ah */
+ reg32 = sir_read(dev, 0x68);
+ reg32 &= 0xffff0000;
+ reg32 |= 0x880a;
+ sir_write(dev, 0x68, reg32);
+
+ /* Step 3: SIR 60h[3] = 1 */
+ reg32 = sir_read(dev, 0x60);
+ reg32 |= (1 << 3);
+ sir_write(dev, 0x60, reg32);
+
+ /* Step 4: SIR 60h[0] = 1 */
+ reg32 = sir_read(dev, 0x60);
+ reg32 |= (1 << 0);
+ sir_write(dev, 0x60, reg32);
+
+ /* Step 5: SIR 60h[1] = 1 */
+ reg32 = sir_read(dev, 0x60);
+ reg32 |= (1 << 1);
+ sir_write(dev, 0x60, reg32);
+
+ /* Clock Gating */
+ sir_write(dev, 0x70, 0x3f00bf1f);
+ sir_write(dev, 0x54, 0xcf000f0f);
+ sir_write(dev, 0x58, 0x00190000);
+
+ reg32 = pci_read_config32(dev, 0x300);
+ reg32 |= (1 << 17) | (1 << 16);
+ reg32 |= (1 << 31) | (1 << 30) | (1 << 29);
+ pci_write_config32(dev, 0x300, reg32);
+}
+
+/*
+ * Set SATA controller mode early so the resource allocator can
+ * properly assign IO/Memory resources for the controller.
+ */
+static void sata_enable(device_t dev)
+{
+ /* Get the chip configuration */
+ config_t *config = dev->chip_info;
+ u16 map = 0x0060;
+
+ map |= (config->sata_port_map ^ 0x3f) << 8;
+
+ pci_write_config16(dev, 0x90, map);
+}
+
+static struct device_operations sata_ops = {
+ .read_resources = &pci_dev_read_resources,
+ .set_resources = &pci_dev_set_resources,
+ .enable_resources = &pci_dev_enable_resources,
+ .init = &sata_init,
+ .enable = &sata_enable,
+ .ops_pci = &broadwell_pci_ops,
+};
+
+static const unsigned short pci_device_ids[] = {
+ 0x9c03, 0x9c05, 0x9c07, 0x9c0f, /* LynxPoint-LP */
+ 0x9c83, 0x9c85, 0x282a, 0x9c87, 0x282a, 0x9c8f, /* WildcatPoint */
+ 0
+};
+
+static const struct pci_driver pch_sata __pci_driver = {
+ .ops = &sata_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = pci_device_ids,
+};
diff --git a/src/soc/intel/broadwell/serialio.c b/src/soc/intel/broadwell/serialio.c
new file mode 100644
index 0000000..bbb018f
--- /dev/null
+++ b/src/soc/intel/broadwell/serialio.c
@@ -0,0 +1,296 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <cbmem.h>
+#include <console/console.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pciexp.h>
+#include <device/pci_ids.h>
+#include <stdlib.h>
+#include <broadwell/iobp.h>
+#include <broadwell/nvs.h>
+#include <broadwell/pch.h>
+#include <broadwell/ramstage.h>
+#include <broadwell/rcba.h>
+#include <broadwell/serialio.h>
+#include <chip.h>
+
+/* Set D3Hot Power State in ACPI mode */
+static void serialio_enable_d3hot(struct device *dev)
+{
+ u32 reg32 = pci_read_config32(dev, PCH_PCS);
+ reg32 |= PCH_PCS_PS_D3HOT;
+ pci_write_config32(dev, PCH_PCS, reg32);
+}
+
+/* Enable clock in PCI mode */
+static void serialio_enable_clock(struct resource *bar0)
+{
+ u32 reg32 = read32(bar0->base + SIO_REG_PPR_CLOCK);
+ reg32 |= SIO_REG_PPR_CLOCK_EN;
+ write32(bar0->base + SIO_REG_PPR_CLOCK, reg32);
+}
+
+/* Put Serial IO D21:F0-F6 device into desired mode. */
+static void serialio_d21_mode(int sio_index, int int_pin, int acpi_mode)
+{
+ u32 portctrl = SIO_IOBP_PORTCTRL_PM_CAP_PRSNT;
+
+ /* Snoop select 1. */
+ portctrl |= SIO_IOBP_PORTCTRL_SNOOP_SELECT(1);
+
+ /* Set interrupt pin. */
+ portctrl |= SIO_IOBP_PORTCTRL_INT_PIN(int_pin);
+
+ if (acpi_mode) {
+ /* Enable ACPI interrupt mode. */
+ portctrl |= SIO_IOBP_PORTCTRL_ACPI_IRQ_EN;
+
+ /* Disable PCI config space. */
+ portctrl |= SIO_IOBP_PORTCTRL_PCI_CONF_DIS;
+ }
+
+ pch_iobp_update(SIO_IOBP_PORTCTRLX(sio_index), 0, portctrl);
+}
+
+/* Put Serial IO D23:F0 device into desired mode. */
+static void serialio_d23_mode(int acpi_mode)
+{
+ u32 portctrl = 0;
+
+ /* Snoop select 1. */
+ pch_iobp_update(SIO_IOBP_PORTCTRL1, 0,
+ SIO_IOBP_PORTCTRL1_SNOOP_SELECT(1));
+
+ if (acpi_mode) {
+ /* Enable ACPI interrupt mode. */
+ portctrl |= SIO_IOBP_PORTCTRL0_ACPI_IRQ_EN;
+
+ /* Disable PCI config space. */
+ portctrl |= SIO_IOBP_PORTCTRL0_PCI_CONF_DIS;
+ }
+
+ pch_iobp_update(SIO_IOBP_PORTCTRL0, 0, portctrl);
+}
+
+/* Enable LTR Auto Mode for D21:F1-F6. */
+static void serialio_d21_ltr(struct resource *bar0)
+{
+ u32 reg;
+
+ /* 1. Program BAR0 + 808h[2] = 0b */
+ reg = read32(bar0->base + SIO_REG_PPR_GEN);
+ reg &= ~SIO_REG_PPR_GEN_LTR_MODE_MASK;
+ write32(bar0->base + SIO_REG_PPR_GEN, reg);
+
+ /* 2. Program BAR0 + 804h[1:0] = 00b */
+ reg = read32(bar0->base + SIO_REG_PPR_RST);
+ reg &= ~SIO_REG_PPR_RST_ASSERT;
+ write32(bar0->base + SIO_REG_PPR_RST, reg);
+
+ /* 3. Program BAR0 + 804h[1:0] = 11b */
+ reg = read32(bar0->base + SIO_REG_PPR_RST);
+ reg |= SIO_REG_PPR_RST_ASSERT;
+ write32(bar0->base + SIO_REG_PPR_RST, reg);
+
+ /* 4. Program BAR0 + 814h[31:0] = 00000000h */
+ write32(bar0->base + SIO_REG_AUTO_LTR, 0);
+}
+
+/* Enable LTR Auto Mode for D23:F0. */
+static void serialio_d23_ltr(struct resource *bar0)
+{
+ u32 reg;
+
+ /* Program BAR0 + 1008h[2] = 1b */
+ reg = read32(bar0->base + SIO_REG_SDIO_PPR_GEN);
+ reg |= SIO_REG_PPR_GEN_LTR_MODE_MASK;
+ write32(bar0->base + SIO_REG_SDIO_PPR_GEN, reg);
+
+ /* Program BAR0 + 1010h = 0x00000000 */
+ write32(bar0->base + SIO_REG_SDIO_PPR_SW_LTR, 0);
+
+ /* Program BAR0 + 3Ch[30] = 1b */
+ reg = read32(bar0->base + SIO_REG_SDIO_PPR_CMD12);
+ reg |= SIO_REG_SDIO_PPR_CMD12_B30;
+ write32(bar0->base + SIO_REG_SDIO_PPR_CMD12, reg);
+}
+
+/* Select I2C voltage of 1.8V or 3.3V. */
+static void serialio_i2c_voltage_sel(struct resource *bar0, u8 voltage)
+{
+ u32 reg32 = read32(bar0->base + SIO_REG_PPR_GEN);
+ reg32 &= ~SIO_REG_PPR_GEN_VOLTAGE_MASK;
+ reg32 |= SIO_REG_PPR_GEN_VOLTAGE(voltage);
+ write32(bar0->base + SIO_REG_PPR_GEN, reg32);
+}
+
+/* Init sequence to be run once, done as part of D21:F0 (SDMA) init. */
+static void serialio_init_once(int acpi_mode)
+{
+ if (acpi_mode) {
+ /* Enable ACPI IRQ for IRQ13, IRQ7, IRQ6, IRQ5 in RCBA. */
+ RCBA32_OR(ACPIIRQEN, (1 << 13)|(1 << 7)|(1 << 6)|(1 << 5));
+ }
+
+ /* Program IOBP CB000154h[12,9:8,4:0] = 1001100011111b. */
+ pch_iobp_update(SIO_IOBP_GPIODF, ~0x0000131f, 0x0000131f);
+
+ /* Program IOBP CB000180h[5:0] = 111111b (undefined register) */
+ pch_iobp_update(0xcb000180, ~0x0000003f, 0x0000003f);
+}
+
+static void serialio_init(struct device *dev)
+{
+ config_t *config = dev->chip_info;
+ struct resource *bar0, *bar1;
+ int sio_index = -1;
+ u32 reg32;
+
+ printk(BIOS_DEBUG, "Initializing Serial IO device\n");
+
+ /* Ensure memory and bus master are enabled */
+ reg32 = pci_read_config32(dev, PCI_COMMAND);
+ reg32 |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
+ pci_write_config32(dev, PCI_COMMAND, reg32);
+
+ /* Find BAR0 and BAR1 */
+ bar0 = find_resource(dev, PCI_BASE_ADDRESS_0);
+ if (!bar0)
+ return;
+ bar1 = find_resource(dev, PCI_BASE_ADDRESS_1);
+ if (!bar1)
+ return;
+
+ if (!config->sio_acpi_mode)
+ serialio_enable_clock(bar0);
+ else if (dev->path.pci.devfn != PCI_DEVFN(21, 0))
+ serialio_enable_d3hot(dev); /* all but SDMA */
+
+ switch (dev->path.pci.devfn) {
+ case PCI_DEVFN(21, 0): /* SDMA */
+ sio_index = SIO_ID_SDMA;
+ serialio_init_once(config->sio_acpi_mode);
+ serialio_d21_mode(sio_index, SIO_PIN_INTB,
+ config->sio_acpi_mode);
+ break;
+ case PCI_DEVFN(21, 1): /* I2C0 */
+ sio_index = SIO_ID_I2C0;
+ serialio_d21_ltr(bar0);
+ serialio_i2c_voltage_sel(bar0, config->sio_i2c0_voltage);
+ serialio_d21_mode(sio_index, SIO_PIN_INTC,
+ config->sio_acpi_mode);
+ break;
+ case PCI_DEVFN(21, 2): /* I2C1 */
+ sio_index = SIO_ID_I2C1;
+ serialio_d21_ltr(bar0);
+ serialio_i2c_voltage_sel(bar0, config->sio_i2c1_voltage);
+ serialio_d21_mode(sio_index, SIO_PIN_INTC,
+ config->sio_acpi_mode);
+ break;
+ case PCI_DEVFN(21, 3): /* SPI0 */
+ sio_index = SIO_ID_SPI0;
+ serialio_d21_ltr(bar0);
+ serialio_d21_mode(sio_index, SIO_PIN_INTC,
+ config->sio_acpi_mode);
+ break;
+ case PCI_DEVFN(21, 4): /* SPI1 */
+ sio_index = SIO_ID_SPI1;
+ serialio_d21_ltr(bar0);
+ serialio_d21_mode(sio_index, SIO_PIN_INTC,
+ config->sio_acpi_mode);
+ break;
+ case PCI_DEVFN(21, 5): /* UART0 */
+ sio_index = SIO_ID_UART0;
+ serialio_d21_ltr(bar0);
+ serialio_d21_mode(sio_index, SIO_PIN_INTD,
+ config->sio_acpi_mode);
+ break;
+ case PCI_DEVFN(21, 6): /* UART1 */
+ sio_index = SIO_ID_UART1;
+ serialio_d21_ltr(bar0);
+ serialio_d21_mode(sio_index, SIO_PIN_INTD,
+ config->sio_acpi_mode);
+ break;
+ case PCI_DEVFN(23, 0): /* SDIO */
+ sio_index = SIO_ID_SDIO;
+ serialio_d23_ltr(bar0);
+ serialio_d23_mode(config->sio_acpi_mode);
+ break;
+ default:
+ return;
+ }
+
+ if (config->sio_acpi_mode) {
+ global_nvs_t *gnvs;
+
+ /* Find ACPI NVS to update BARs */
+ gnvs = (global_nvs_t *)cbmem_find(CBMEM_ID_ACPI_GNVS);
+ if (!gnvs) {
+ printk(BIOS_ERR, "Unable to locate Global NVS\n");
+ return;
+ }
+
+ /* Save BAR0 and BAR1 to ACPI NVS */
+ gnvs->dev.bar0[sio_index] = (u32)bar0->base;
+ gnvs->dev.bar1[sio_index] = (u32)bar1->base;
+ }
+}
+
+static void serialio_set_resources(struct device *dev)
+{
+ pci_dev_set_resources(dev);
+
+#if CONFIG_INTEL_PCH_UART_CONSOLE
+ /* Update UART base address if used for debug */
+ if (serialio_uart_is_debug(dev)) {
+ struct resource *res = find_resource(dev, PCI_BASE_ADDRESS_0);
+ if (res)
+ uartmem_setbaseaddr(res->base);
+ }
+#endif
+}
+
+static struct device_operations device_ops = {
+ .read_resources = &pci_dev_read_resources,
+ .set_resources = &serialio_set_resources,
+ .enable_resources = &pci_dev_enable_resources,
+ .init = &serialio_init,
+ .ops_pci = &broadwell_pci_ops,
+};
+
+static const unsigned short pci_device_ids[] = {
+ 0x9c60, 0x9ce0, /* 0:15.0 - SDMA */
+ 0x9c61, 0x9ce1, /* 0:15.1 - I2C0 */
+ 0x9c62, 0x9ce2, /* 0:15.2 - I2C1 */
+ 0x9c65, 0x9ce5, /* 0:15.3 - SPI0 */
+ 0x9c66, 0x9ce6, /* 0:15.4 - SPI1 */
+ 0x9c63, 0x9ce3, /* 0:15.5 - UART0 */
+ 0x9c64, 0x9ce4, /* 0:15.6 - UART1 */
+ 0x9c35, 0x9cb5, /* 0:17.0 - SDIO */
+ 0
+};
+
+static const struct pci_driver pch_pcie __pci_driver = {
+ .ops = &device_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = pci_device_ids,
+};
diff --git a/src/soc/intel/broadwell/smbus.c b/src/soc/intel/broadwell/smbus.c
new file mode 100644
index 0000000..a1dbdfe
--- /dev/null
+++ b/src/soc/intel/broadwell/smbus.c
@@ -0,0 +1,113 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <console/console.h>
+#include <device/device.h>
+#include <device/path.h>
+#include <device/smbus.h>
+#include <device/smbus_def.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <device/pci_ops.h>
+#include <broadwell/iomap.h>
+#include <broadwell/ramstage.h>
+#include <broadwell/smbus.h>
+
+static void pch_smbus_init(device_t dev)
+{
+ struct resource *res;
+ u16 reg16;
+
+ /* Enable clock gating */
+ reg16 = pci_read_config32(dev, 0x80);
+ reg16 &= ~((1 << 8)|(1 << 10)|(1 << 12)|(1 << 14));
+ pci_write_config32(dev, 0x80, reg16);
+
+ /* Set Receive Slave Address */
+ res = find_resource(dev, PCI_BASE_ADDRESS_4);
+ if (res)
+ outb(SMBUS_SLAVE_ADDR, res->base + SMB_RCV_SLVA);
+}
+
+static int lsmbus_read_byte(device_t dev, u8 address)
+{
+ u16 device;
+ struct resource *res;
+ struct bus *pbus;
+
+ device = dev->path.i2c.device;
+ pbus = get_pbus_smbus(dev);
+ res = find_resource(pbus->dev, PCI_BASE_ADDRESS_4);
+
+ return do_smbus_read_byte(res->base, device, address);
+}
+
+static int lsmbus_write_byte(device_t dev, u8 address, u8 data)
+{
+ u16 device;
+ struct resource *res;
+ struct bus *pbus;
+
+ device = dev->path.i2c.device;
+ pbus = get_pbus_smbus(dev);
+ res = find_resource(pbus->dev, PCI_BASE_ADDRESS_4);
+ return do_smbus_write_byte(res->base, device, address, data);
+}
+
+static struct smbus_bus_operations lops_smbus_bus = {
+ .read_byte = lsmbus_read_byte,
+ .write_byte = lsmbus_write_byte,
+};
+
+static void smbus_read_resources(device_t dev)
+{
+ struct resource *res = new_resource(dev, PCI_BASE_ADDRESS_4);
+ res->base = SMBUS_BASE_ADDRESS;
+ res->size = 32;
+ res->limit = res->base + res->size - 1;
+ res->flags = IORESOURCE_IO | IORESOURCE_FIXED | IORESOURCE_RESERVE |
+ IORESOURCE_STORED | IORESOURCE_ASSIGNED;
+
+ /* Also add MMIO resource */
+ res = pci_get_resource(dev, PCI_BASE_ADDRESS_0);
+}
+
+static struct device_operations smbus_ops = {
+ .read_resources = &smbus_read_resources,
+ .set_resources = &pci_dev_set_resources,
+ .enable_resources = &pci_dev_enable_resources,
+ .scan_bus = &scan_static_bus,
+ .init = &pch_smbus_init,
+ .ops_smbus_bus = &lops_smbus_bus,
+ .ops_pci = &broadwell_pci_ops,
+};
+
+static const unsigned short pci_device_ids[] = {
+ 0x9c22, /* LynxPoint */
+ 0x9ca2, /* WildcatPoint */
+ 0
+};
+
+static const struct pci_driver pch_smbus __pci_driver = {
+ .ops = &smbus_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = pci_device_ids,
+};
diff --git a/src/soc/intel/broadwell/smbus_common.c b/src/soc/intel/broadwell/smbus_common.c
new file mode 100644
index 0000000..ff43dcd
--- /dev/null
+++ b/src/soc/intel/broadwell/smbus_common.c
@@ -0,0 +1,155 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2005 Yinghai Lu <yinghailu(a)gmail.com>
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <arch/io.h>
+#include <console/console.h>
+#include <device/device.h>
+#include <device/path.h>
+#include <device/smbus_def.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <broadwell/ramstage.h>
+#include <broadwell/smbus.h>
+
+static void smbus_delay(void)
+{
+ inb(0x80);
+}
+
+static int smbus_wait_until_ready(u16 smbus_base)
+{
+ unsigned loops = SMBUS_TIMEOUT;
+ unsigned char byte;
+ do {
+ smbus_delay();
+ if (--loops == 0)
+ break;
+ byte = inb(smbus_base + SMBHSTSTAT);
+ } while (byte & 1);
+ return loops ? 0 : -1;
+}
+
+static int smbus_wait_until_done(u16 smbus_base)
+{
+ unsigned loops = SMBUS_TIMEOUT;
+ unsigned char byte;
+ do {
+ smbus_delay();
+ if (--loops == 0)
+ break;
+ byte = inb(smbus_base + SMBHSTSTAT);
+ } while ((byte & 1) || (byte & ~((1 << 6) | (1 << 0))) == 0);
+ return loops ? 0 : -1;
+}
+
+int do_smbus_read_byte(unsigned smbus_base, unsigned device, unsigned address)
+{
+ unsigned char global_status_register;
+ unsigned char byte;
+
+ if (smbus_wait_until_ready(smbus_base) < 0) {
+ return SMBUS_WAIT_UNTIL_READY_TIMEOUT;
+ }
+ /* Setup transaction */
+ /* Disable interrupts */
+ outb(inb(smbus_base + SMBHSTCTL) & (~1), smbus_base + SMBHSTCTL);
+ /* Set the device I'm talking too */
+ outb(((device & 0x7f) << 1) | 1, smbus_base + SMBXMITADD);
+ /* Set the command/address... */
+ outb(address & 0xff, smbus_base + SMBHSTCMD);
+ /* Set up for a byte data read */
+ outb((inb(smbus_base + SMBHSTCTL) & 0xe3) | (0x2 << 2),
+ (smbus_base + SMBHSTCTL));
+ /* Clear any lingering errors, so the transaction will run */
+ outb(inb(smbus_base + SMBHSTSTAT), smbus_base + SMBHSTSTAT);
+
+ /* Clear the data byte... */
+ outb(0, smbus_base + SMBHSTDAT0);
+
+ /* Start the command */
+ outb((inb(smbus_base + SMBHSTCTL) | 0x40),
+ smbus_base + SMBHSTCTL);
+
+ /* Poll for transaction completion */
+ if (smbus_wait_until_done(smbus_base) < 0) {
+ return SMBUS_WAIT_UNTIL_DONE_TIMEOUT;
+ }
+
+ global_status_register = inb(smbus_base + SMBHSTSTAT);
+
+ /* Ignore the "In Use" status... */
+ global_status_register &= ~(3 << 5);
+
+ /* Read results of transaction */
+ byte = inb(smbus_base + SMBHSTDAT0);
+ if (global_status_register != (1 << 1)) {
+ return SMBUS_ERROR;
+ }
+ return byte;
+}
+
+int do_smbus_write_byte(unsigned smbus_base, unsigned device,
+ unsigned address, unsigned data)
+{
+ unsigned char global_status_register;
+
+ if (smbus_wait_until_ready(smbus_base) < 0)
+ return SMBUS_WAIT_UNTIL_READY_TIMEOUT;
+
+ /* Setup transaction */
+ /* Disable interrupts */
+ outb(inb(smbus_base + SMBHSTCTL) & (~1), smbus_base + SMBHSTCTL);
+ /* Set the device I'm talking too */
+ outb(((device & 0x7f) << 1) & ~0x01, smbus_base + SMBXMITADD);
+ /* Set the command/address... */
+ outb(address & 0xff, smbus_base + SMBHSTCMD);
+ /* Set up for a byte data read */
+ outb((inb(smbus_base + SMBHSTCTL) & 0xe3) | (0x2 << 2),
+ (smbus_base + SMBHSTCTL));
+ /* Clear any lingering errors, so the transaction will run */
+ outb(inb(smbus_base + SMBHSTSTAT), smbus_base + SMBHSTSTAT);
+
+ /* Clear the data byte... */
+ outb(data, smbus_base + SMBHSTDAT0);
+
+ /* Start the command */
+ outb((inb(smbus_base + SMBHSTCTL) | 0x40),
+ smbus_base + SMBHSTCTL);
+
+ /* Poll for transaction completion */
+ if (smbus_wait_until_done(smbus_base) < 0) {
+ printk(BIOS_ERR, "SMBUS transaction timeout\n");
+ return SMBUS_WAIT_UNTIL_DONE_TIMEOUT;
+ }
+
+ global_status_register = inb(smbus_base + SMBHSTSTAT);
+
+ /* Ignore the "In Use" status... */
+ global_status_register &= ~(3 << 5);
+
+ /* Read results of transaction */
+ if (global_status_register != (1 << 1)) {
+ printk(BIOS_ERR, "SMBUS transaction error\n");
+ return SMBUS_ERROR;
+ }
+
+ return 0;
+}
diff --git a/src/soc/intel/broadwell/smi.c b/src/soc/intel/broadwell/smi.c
new file mode 100644
index 0000000..529346a
--- /dev/null
+++ b/src/soc/intel/broadwell/smi.c
@@ -0,0 +1,123 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <device/device.h>
+#include <device/pci.h>
+#include <console/console.h>
+#include <arch/io.h>
+#include <cpu/cpu.h>
+#include <cpu/x86/cache.h>
+#include <cpu/x86/smm.h>
+#include <string.h>
+#include <broadwell/iomap.h>
+#include <broadwell/pch.h>
+#include <broadwell/pm.h>
+#include <broadwell/smm.h>
+
+void southbridge_smm_clear_state(void)
+{
+ u32 smi_en;
+
+ printk(BIOS_DEBUG, "Initializing Southbridge SMI...");
+ printk(BIOS_SPEW, " ... pmbase = 0x%04x\n", ACPI_BASE_ADDRESS);
+
+ smi_en = inl(ACPI_BASE_ADDRESS + SMI_EN);
+ if (smi_en & APMC_EN) {
+ printk(BIOS_INFO, "SMI# handler already enabled?\n");
+ return;
+ }
+
+ printk(BIOS_DEBUG, "\n");
+
+ /* Dump and clear status registers */
+ clear_smi_status();
+ clear_pm1_status();
+ clear_tco_status();
+ clear_gpe_status();
+}
+
+void southbridge_smm_enable_smi(void)
+{
+ printk(BIOS_DEBUG, "Enabling SMIs.\n");
+ /* Configure events */
+ enable_pm1(PWRBTN_EN | GBL_EN);
+ disable_gpe(PME_B0_EN);
+
+ /* Enable SMI generation:
+ * - on APMC writes (io 0xb2)
+ * - on writes to SLP_EN (sleep states)
+ * - on writes to GBL_RLS (bios commands)
+ * No SMIs:
+ * - on microcontroller writes (io 0x62/0x66)
+ * - on TCO events
+ */
+ enable_smi(APMC_EN | SLP_SMI_EN | GBL_SMI_EN | EOS);
+}
+
+void southbridge_trigger_smi(void)
+{
+ /**
+ * There are several methods of raising a controlled SMI# via
+ * software, among them:
+ * - Writes to io 0xb2 (APMC)
+ * - Writes to the Local Apic ICR with Delivery mode SMI.
+ *
+ * Using the local apic is a bit more tricky. According to
+ * AMD Family 11 Processor BKDG no destination shorthand must be
+ * used.
+ * The whole SMM initialization is quite a bit hardware specific, so
+ * I'm not too worried about the better of the methods at the moment
+ */
+
+ /* raise an SMI interrupt */
+ printk(BIOS_SPEW, " ... raise SMI#\n");
+ outb(0x00, 0xb2);
+}
+
+void southbridge_clear_smi_status(void)
+{
+ /* Clear SMI status */
+ clear_smi_status();
+
+ /* Clear PM1 status */
+ clear_pm1_status();
+
+ /* Set EOS bit so other SMIs can occur. */
+ enable_smi(EOS);
+}
+
+void smm_setup_structures(void *gnvs, void *tcg, void *smi1)
+{
+ /*
+ * Issue SMI to set the gnvs pointer in SMM.
+ * tcg and smi1 are unused.
+ *
+ * EAX = APM_CNT_GNVS_UPDATE
+ * EBX = gnvs pointer
+ * EDX = APM_CNT
+ */
+ asm volatile (
+ "outb %%al, %%dx\n\t"
+ : /* ignore result */
+ : "a" (APM_CNT_GNVS_UPDATE),
+ "b" ((u32)gnvs),
+ "d" (APM_CNT)
+ );
+}
diff --git a/src/soc/intel/broadwell/smihandler.c b/src/soc/intel/broadwell/smihandler.c
new file mode 100644
index 0000000..6acd07c
--- /dev/null
+++ b/src/soc/intel/broadwell/smihandler.c
@@ -0,0 +1,545 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <delay.h>
+#include <types.h>
+#include <arch/hlt.h>
+#include <arch/io.h>
+#include <console/console.h>
+#include <cpu/x86/cache.h>
+#include <device/pci_def.h>
+#include <cpu/x86/smm.h>
+#include <spi-generic.h>
+#include <elog.h>
+#include <pc80/mc146818rtc.h>
+#include <broadwell/lpc.h>
+#include <broadwell/nvs.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/pm.h>
+#include <broadwell/rcba.h>
+#include <broadwell/smm.h>
+#include <broadwell/xhci.h>
+
+static u8 smm_initialized = 0;
+
+/*
+ * GNVS needs to be updated by an 0xEA PM Trap (B2) after it has been located
+ * by coreboot.
+ */
+static global_nvs_t *gnvs;
+global_nvs_t *smm_get_gnvs(void)
+{
+ return gnvs;
+}
+
+int southbridge_io_trap_handler(int smif)
+{
+ switch (smif) {
+ case 0x32:
+ printk(BIOS_DEBUG, "OS Init\n");
+ /* gnvs->smif:
+ * On success, the IO Trap Handler returns 0
+ * On failure, the IO Trap Handler returns a value != 0
+ */
+ gnvs->smif = 0;
+ return 1; /* IO trap handled */
+ }
+
+ /* Not handled */
+ return 0;
+}
+
+/**
+ * @brief Set the EOS bit
+ */
+void southbridge_smi_set_eos(void)
+{
+ enable_smi(EOS);
+}
+
+static void busmaster_disable_on_bus(int bus)
+{
+ int slot, func;
+ unsigned int val;
+ unsigned char hdr;
+
+ for (slot = 0; slot < 0x20; slot++) {
+ for (func = 0; func < 8; func++) {
+ u32 reg32;
+ device_t dev = PCI_DEV(bus, slot, func);
+
+ val = pci_read_config32(dev, PCI_VENDOR_ID);
+
+ if (val == 0xffffffff || val == 0x00000000 ||
+ val == 0x0000ffff || val == 0xffff0000)
+ continue;
+
+ /* Disable Bus Mastering for this one device */
+ reg32 = pci_read_config32(dev, PCI_COMMAND);
+ reg32 &= ~PCI_COMMAND_MASTER;
+ pci_write_config32(dev, PCI_COMMAND, reg32);
+
+ /* If this is a bridge, then follow it. */
+ hdr = pci_read_config8(dev, PCI_HEADER_TYPE);
+ hdr &= 0x7f;
+ if (hdr == PCI_HEADER_TYPE_BRIDGE ||
+ hdr == PCI_HEADER_TYPE_CARDBUS) {
+ unsigned int buses;
+ buses = pci_read_config32(dev, PCI_PRIMARY_BUS);
+ busmaster_disable_on_bus((buses >> 8) & 0xff);
+ }
+ }
+ }
+}
+
+
+static void southbridge_smi_sleep(void)
+{
+ u8 reg8;
+ u32 reg32;
+ u8 slp_typ;
+ u8 s5pwr = CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL;
+
+ /* save and recover RTC port values */
+ u8 tmp70, tmp72;
+ tmp70 = inb(0x70);
+ tmp72 = inb(0x72);
+ get_option(&s5pwr, "power_on_after_fail");
+ outb(tmp70, 0x70);
+ outb(tmp72, 0x72);
+
+ /* First, disable further SMIs */
+ disable_smi(SLP_SMI_EN);
+
+ /* Figure out SLP_TYP */
+ reg32 = inl(ACPI_BASE_ADDRESS + PM1_CNT);
+ printk(BIOS_SPEW, "SMI#: SLP = 0x%08x\n", reg32);
+ slp_typ = (reg32 >> 10) & 7;
+
+ /* Do any mainboard sleep handling */
+ mainboard_smi_sleep(slp_typ-2);
+
+ /* USB sleep preparations */
+ usb_xhci_sleep_prepare(PCH_DEV_XHCI, slp_typ);
+
+#if CONFIG_ELOG_GSMI
+ /* Log S3, S4, and S5 entry */
+ if (slp_typ >= 5)
+ elog_add_event_byte(ELOG_TYPE_ACPI_ENTER, slp_typ-2);
+#endif
+
+ /* Next, do the deed.
+ */
+
+ switch (slp_typ) {
+ case SLP_TYP_S0:
+ printk(BIOS_DEBUG, "SMI#: Entering S0 (On)\n");
+ break;
+ case SLP_TYP_S1:
+ printk(BIOS_DEBUG, "SMI#: Entering S1 (Assert STPCLK#)\n");
+ break;
+ case SLP_TYP_S3:
+ printk(BIOS_DEBUG, "SMI#: Entering S3 (Suspend-To-RAM)\n");
+
+ /* Invalidate the cache before going to S3 */
+ wbinvd();
+ break;
+ case SLP_TYP_S4:
+ printk(BIOS_DEBUG, "SMI#: Entering S4 (Suspend-To-Disk)\n");
+ break;
+ case SLP_TYP_S5:
+ printk(BIOS_DEBUG, "SMI#: Entering S5 (Soft Power off)\n");
+
+ /* Disable all GPE */
+ disable_all_gpe();
+
+ /* Always set the flag in case CMOS was changed on runtime. For
+ * "KEEP", switch to "OFF" - KEEP is software emulated
+ */
+ reg8 = pci_read_config8(PCH_DEV_LPC, GEN_PMCON_3);
+ if (s5pwr == MAINBOARD_POWER_ON)
+ reg8 &= ~1;
+ else
+ reg8 |= 1;
+ pci_write_config8(PCH_DEV_LPC, GEN_PMCON_3, reg8);
+
+ /* also iterates over all bridges on bus 0 */
+ busmaster_disable_on_bus(0);
+ break;
+ default:
+ printk(BIOS_DEBUG, "SMI#: ERROR: SLP_TYP reserved\n");
+ break;
+ }
+
+ /*
+ * Write back to the SLP register to cause the originally intended
+ * event again. We need to set BIT13 (SLP_EN) though to make the
+ * sleep happen.
+ */
+ enable_pm1_control(SLP_EN);
+
+ /* Make sure to stop executing code here for S3/S4/S5 */
+ if (slp_typ > 1)
+ hlt();
+
+ /*
+ * In most sleep states, the code flow of this function ends at
+ * the line above. However, if we entered sleep state S1 and wake
+ * up again, we will continue to execute code in this function.
+ */
+ reg32 = inl(ACPI_BASE_ADDRESS + PM1_CNT);
+ if (reg32 & SCI_EN) {
+ /* The OS is not an ACPI OS, so we set the state to S0 */
+ disable_pm1_control(SLP_EN | SLP_TYP);
+ }
+}
+
+/*
+ * Look for Synchronous IO SMI and use save state from that
+ * core in case we are not running on the same core that
+ * initiated the IO transaction.
+ */
+static em64t101_smm_state_save_area_t *smi_apmc_find_state_save(u8 cmd)
+{
+ em64t101_smm_state_save_area_t *state;
+ int node;
+
+ /* Check all nodes looking for the one that issued the IO */
+ for (node = 0; node < CONFIG_MAX_CPUS; node++) {
+ state = smm_get_save_state(node);
+
+ /* Check for Synchronous IO (bit0==1) */
+ if (!(state->io_misc_info & (1 << 0)))
+ continue;
+
+ /* Make sure it was a write (bit4==0) */
+ if (state->io_misc_info & (1 << 4))
+ continue;
+
+ /* Check for APMC IO port */
+ if (((state->io_misc_info >> 16) & 0xff) != APM_CNT)
+ continue;
+
+ /* Check AX against the requested command */
+ if ((state->rax & 0xff) != cmd)
+ continue;
+
+ return state;
+ }
+
+ return NULL;
+}
+
+#if CONFIG_ELOG_GSMI
+static void southbridge_smi_gsmi(void)
+{
+ u32 *ret, *param;
+ u8 sub_command;
+ em64t101_smm_state_save_area_t *io_smi =
+ smi_apmc_find_state_save(ELOG_GSMI_APM_CNT);
+
+ if (!io_smi)
+ return;
+
+ /* Command and return value in EAX */
+ ret = (u32*)&io_smi->rax;
+ sub_command = (u8)(*ret >> 8);
+
+ /* Parameter buffer in EBX */
+ param = (u32*)&io_smi->rbx;
+
+ /* drivers/elog/gsmi.c */
+ *ret = gsmi_exec(sub_command, param);
+}
+#endif
+
+static void finalize(void)
+{
+ static int finalize_done;
+
+ if (finalize_done) {
+ printk(BIOS_DEBUG, "SMM already finalized.\n");
+ return;
+ }
+ finalize_done = 1;
+
+#if CONFIG_SPI_FLASH_SMM
+ /* Re-init SPI driver to handle locked BAR */
+ spi_init();
+#endif
+}
+
+static void southbridge_smi_apmc(void)
+{
+ u8 reg8;
+ em64t101_smm_state_save_area_t *state;
+
+ /* Emulate B2 register as the FADT / Linux expects it */
+
+ reg8 = inb(APM_CNT);
+ switch (reg8) {
+ case APM_CNT_CST_CONTROL:
+ printk(BIOS_DEBUG, "C-state control\n");
+ break;
+ case APM_CNT_PST_CONTROL:
+ printk(BIOS_DEBUG, "P-state control\n");
+ break;
+ case APM_CNT_ACPI_DISABLE:
+ disable_pm1_control(SCI_EN);
+ printk(BIOS_DEBUG, "SMI#: ACPI disabled.\n");
+ break;
+ case APM_CNT_ACPI_ENABLE:
+ enable_pm1_control(SCI_EN);
+ printk(BIOS_DEBUG, "SMI#: ACPI enabled.\n");
+ break;
+ case APM_CNT_FINALIZE:
+ finalize();
+ break;
+ case APM_CNT_GNVS_UPDATE:
+ if (smm_initialized) {
+ printk(BIOS_DEBUG,
+ "SMI#: SMM structures already initialized!\n");
+ return;
+ }
+ state = smi_apmc_find_state_save(reg8);
+ if (state) {
+ /* EBX in the state save contains the GNVS pointer */
+ gnvs = (global_nvs_t *)((u32)state->rbx);
+ smm_initialized = 1;
+ printk(BIOS_DEBUG, "SMI#: Setting GNVS to %p\n", gnvs);
+ }
+ break;
+#if CONFIG_ELOG_GSMI
+ case ELOG_GSMI_APM_CNT:
+ southbridge_smi_gsmi();
+ break;
+#endif
+ }
+
+ mainboard_smi_apmc(reg8);
+}
+
+static void southbridge_smi_pm1(void)
+{
+ u16 pm1_sts = clear_pm1_status();
+
+ /* While OSPM is not active, poweroff immediately
+ * on a power button event.
+ */
+ if (pm1_sts & PWRBTN_STS) {
+ /* power button pressed */
+#if CONFIG_ELOG_GSMI
+ elog_add_event(ELOG_TYPE_POWER_BUTTON);
+#endif
+ disable_pm1_control(-1UL);
+ enable_pm1_control(SLP_EN | (SLP_TYP_S5 << 10));
+ }
+}
+
+static void southbridge_smi_gpe0(void)
+{
+ clear_gpe_status();
+}
+
+static void southbridge_smi_gpi(void)
+{
+ mainboard_smi_gpi(clear_alt_smi_status());
+
+ /* Clear again after mainboard handler */
+ clear_alt_smi_status();
+}
+
+static void southbridge_smi_mc(void)
+{
+ u32 reg32 = inl(ACPI_BASE_ADDRESS + SMI_EN);
+
+ /* Are microcontroller SMIs enabled? */
+ if ((reg32 & MCSMI_EN) == 0)
+ return;
+
+ printk(BIOS_DEBUG, "Microcontroller SMI.\n");
+}
+
+static void southbridge_smi_tco(void)
+{
+ u32 tco_sts = clear_tco_status();
+
+ /* Any TCO event? */
+ if (!tco_sts)
+ return;
+
+ if (tco_sts & (1 << 8)) { // BIOSWR
+ u8 bios_cntl = pci_read_config16(PCH_DEV_LPC, BIOS_CNTL);
+
+ if (bios_cntl & 1) {
+ /*
+ * BWE is RW, so the SMI was caused by a
+ * write to BWE, not by a write to the BIOS
+ *
+ * This is the place where we notice someone
+ * is trying to tinker with the BIOS. We are
+ * trying to be nice and just ignore it. A more
+ * resolute answer would be to power down the
+ * box.
+ */
+ printk(BIOS_DEBUG, "Switching back to RO\n");
+ pci_write_config32(PCH_DEV_LPC, BIOS_CNTL,
+ (bios_cntl & ~1));
+ } /* No else for now? */
+ } else if (tco_sts & (1 << 3)) { /* TIMEOUT */
+ /* Handle TCO timeout */
+ printk(BIOS_DEBUG, "TCO Timeout.\n");
+ }
+}
+
+static void southbridge_smi_periodic(void)
+{
+ u32 reg32 = inl(ACPI_BASE_ADDRESS + SMI_EN);
+
+ /* Are periodic SMIs enabled? */
+ if ((reg32 & PERIODIC_EN) == 0)
+ return;
+
+ printk(BIOS_DEBUG, "Periodic SMI.\n");
+}
+
+static void southbridge_smi_monitor(void)
+{
+#define IOTRAP(x) (trap_sts & (1 << x))
+ u32 trap_sts, trap_cycle;
+ u32 data, mask = 0;
+ int i;
+
+ trap_sts = RCBA32(0x1e00); // TRSR - Trap Status Register
+ RCBA32(0x1e00) = trap_sts; // Clear trap(s) in TRSR
+
+ trap_cycle = RCBA32(0x1e10);
+ for (i=16; i<20; i++) {
+ if (trap_cycle & (1 << i))
+ mask |= (0xff << ((i - 16) << 2));
+ }
+
+
+ /* IOTRAP(3) SMI function call */
+ if (IOTRAP(3)) {
+ if (gnvs && gnvs->smif)
+ io_trap_handler(gnvs->smif); // call function smif
+ return;
+ }
+
+ /* IOTRAP(2) currently unused
+ * IOTRAP(1) currently unused */
+
+ /* IOTRAP(0) SMIC */
+ if (IOTRAP(0)) {
+ if (!(trap_cycle & (1 << 24))) { // It's a write
+ printk(BIOS_DEBUG, "SMI1 command\n");
+ data = RCBA32(0x1e18);
+ data &= mask;
+ // if (smi1)
+ // southbridge_smi_command(data);
+ // return;
+ }
+ // Fall through to debug
+ }
+
+ printk(BIOS_DEBUG, " trapped io address = 0x%x\n",
+ trap_cycle & 0xfffc);
+ for (i=0; i < 4; i++)
+ if(IOTRAP(i)) printk(BIOS_DEBUG, " TRAP = %d\n", i);
+ printk(BIOS_DEBUG, " AHBE = %x\n", (trap_cycle >> 16) & 0xf);
+ printk(BIOS_DEBUG, " MASK = 0x%08x\n", mask);
+ printk(BIOS_DEBUG, " read/write: %s\n",
+ (trap_cycle & (1 << 24)) ? "read" : "write");
+
+ if (!(trap_cycle & (1 << 24))) {
+ /* Write Cycle */
+ data = RCBA32(0x1e18);
+ printk(BIOS_DEBUG, " iotrap written data = 0x%08x\n", data);
+ }
+#undef IOTRAP
+}
+
+typedef void (*smi_handler_t)(void);
+
+static smi_handler_t southbridge_smi[32] = {
+ NULL, // [0] reserved
+ NULL, // [1] reserved
+ NULL, // [2] BIOS_STS
+ NULL, // [3] LEGACY_USB_STS
+ southbridge_smi_sleep, // [4] SLP_SMI_STS
+ southbridge_smi_apmc, // [5] APM_STS
+ NULL, // [6] SWSMI_TMR_STS
+ NULL, // [7] reserved
+ southbridge_smi_pm1, // [8] PM1_STS
+ southbridge_smi_gpe0, // [9] GPE0_STS
+ southbridge_smi_gpi, // [10] GPI_STS
+ southbridge_smi_mc, // [11] MCSMI_STS
+ NULL, // [12] DEVMON_STS
+ southbridge_smi_tco, // [13] TCO_STS
+ southbridge_smi_periodic, // [14] PERIODIC_STS
+ NULL, // [15] SERIRQ_SMI_STS
+ NULL, // [16] SMBUS_SMI_STS
+ NULL, // [17] LEGACY_USB2_STS
+ NULL, // [18] INTEL_USB2_STS
+ NULL, // [19] reserved
+ NULL, // [20] PCI_EXP_SMI_STS
+ southbridge_smi_monitor, // [21] MONITOR_STS
+ NULL, // [22] reserved
+ NULL, // [23] reserved
+ NULL, // [24] reserved
+ NULL, // [25] EL_SMI_STS
+ NULL, // [26] SPI_STS
+ NULL, // [27] reserved
+ NULL, // [28] reserved
+ NULL, // [29] reserved
+ NULL, // [30] reserved
+ NULL // [31] reserved
+};
+
+/**
+ * @brief Interrupt handler for SMI#
+ *
+ * @param smm_revision revision of the smm state save map
+ */
+
+void southbridge_smi_handler(void)
+{
+ int i;
+ u32 smi_sts;
+
+ /* We need to clear the SMI status registers, or we won't see what's
+ * happening in the following calls.
+ */
+ smi_sts = clear_smi_status();
+
+ /* Call SMI sub handler for each of the status bits */
+ for (i = 0; i < 31; i++) {
+ if (smi_sts & (1 << i)) {
+ if (southbridge_smi[i]) {
+ southbridge_smi[i]();
+ } else {
+ printk(BIOS_DEBUG,
+ "SMI_STS[%d] occured, but no "
+ "handler available.\n", i);
+ }
+ }
+ }
+}
diff --git a/src/soc/intel/broadwell/smmrelocate.c b/src/soc/intel/broadwell/smmrelocate.c
new file mode 100644
index 0000000..bd1fc26
--- /dev/null
+++ b/src/soc/intel/broadwell/smmrelocate.c
@@ -0,0 +1,439 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <types.h>
+#include <string.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <cpu/cpu.h>
+#include <cpu/x86/cache.h>
+#include <cpu/x86/lapic.h>
+#include <cpu/x86/mp.h>
+#include <cpu/x86/msr.h>
+#include <cpu/x86/mtrr.h>
+#include <cpu/x86/smm.h>
+#include <console/console.h>
+#include <broadwell/cpu.h>
+#include <broadwell/msr.h>
+#include <broadwell/pci_devs.h>
+#include <broadwell/smm.h>
+#include <broadwell/systemagent.h>
+
+/* This gets filled in and used during relocation. */
+static struct smm_relocation_params smm_reloc_params;
+
+static inline void write_smrr(struct smm_relocation_params *relo_params)
+{
+ printk(BIOS_DEBUG, "Writing SMRR. base = 0x%08x, mask=0x%08x\n",
+ relo_params->smrr_base.lo, relo_params->smrr_mask.lo);
+ wrmsr(SMRRphysBase_MSR, relo_params->smrr_base);
+ wrmsr(SMRRphysMask_MSR, relo_params->smrr_mask);
+}
+
+static inline void write_emrr(struct smm_relocation_params *relo_params)
+{
+ printk(BIOS_DEBUG, "Writing EMRR. base = 0x%08x, mask=0x%08x\n",
+ relo_params->emrr_base.lo, relo_params->emrr_mask.lo);
+ wrmsr(EMRRphysBase_MSR, relo_params->emrr_base);
+ wrmsr(EMRRphysMask_MSR, relo_params->emrr_mask);
+}
+
+static inline void write_uncore_emrr(struct smm_relocation_params *relo_params)
+{
+ printk(BIOS_DEBUG,
+ "Writing UNCORE_EMRR. base = 0x%08x, mask=0x%08x\n",
+ relo_params->uncore_emrr_base.lo,
+ relo_params->uncore_emrr_mask.lo);
+ wrmsr(UNCORE_EMRRphysBase_MSR, relo_params->uncore_emrr_base);
+ wrmsr(UNCORE_EMRRphysMask_MSR, relo_params->uncore_emrr_mask);
+}
+
+static void update_save_state(int cpu,
+ struct smm_relocation_params *relo_params,
+ const struct smm_runtime *runtime)
+{
+ u32 smbase;
+ u32 iedbase;
+
+ /* The relocated handler runs with all CPUs concurrently. Therefore
+ * stagger the entry points adjusting SMBASE downwards by save state
+ * size * CPU num. */
+ smbase = relo_params->smram_base - cpu * runtime->save_state_size;
+ iedbase = relo_params->ied_base;
+
+ printk(BIOS_DEBUG, "New SMBASE=0x%08x IEDBASE=0x%08x\n",
+ smbase, iedbase);
+
+ /* All threads need to set IEDBASE and SMBASE to the relocated
+ * handler region. However, the save state location depends on the
+ * smm_save_state_in_msrs field in the relocation parameters. If
+ * smm_save_state_in_msrs is non-zero then the CPUs are relocating
+ * the SMM handler in parallel, and each CPUs save state area is
+ * located in their respective MSR space. If smm_save_state_in_msrs
+ * is zero then the SMM relocation is happening serially so the
+ * save state is at the same default location for all CPUs. */
+ if (relo_params->smm_save_state_in_msrs) {
+ msr_t smbase_msr;
+ msr_t iedbase_msr;
+
+ smbase_msr.lo = smbase;
+ smbase_msr.hi = 0;
+
+ /* According the BWG the IEDBASE MSR is in bits 63:32. It's
+ * not clear why it differs from the SMBASE MSR. */
+ iedbase_msr.lo = 0;
+ iedbase_msr.hi = iedbase;
+
+ wrmsr(SMBASE_MSR, smbase_msr);
+ wrmsr(IEDBASE_MSR, iedbase_msr);
+ } else {
+ em64t101_smm_state_save_area_t *save_state;
+
+ save_state = (void *)(runtime->smbase + SMM_DEFAULT_SIZE -
+ runtime->save_state_size);
+
+ save_state->smbase = smbase;
+ save_state->iedbase = iedbase;
+ }
+}
+
+/* Returns 1 if SMM MSR save state was set. */
+static int bsp_setup_msr_save_state(struct smm_relocation_params *relo_params)
+{
+ msr_t smm_mca_cap;
+
+ smm_mca_cap = rdmsr(SMM_MCA_CAP_MSR);
+ if (smm_mca_cap.hi & SMM_CPU_SVRSTR_MASK) {
+ msr_t smm_feature_control;
+
+ smm_feature_control = rdmsr(SMM_FEATURE_CONTROL_MSR);
+ smm_feature_control.hi = 0;
+ smm_feature_control.lo |= SMM_CPU_SAVE_EN;
+ wrmsr(SMM_FEATURE_CONTROL_MSR, smm_feature_control);
+ relo_params->smm_save_state_in_msrs = 1;
+ }
+ return relo_params->smm_save_state_in_msrs;
+}
+
+/* The relocation work is actually performed in SMM context, but the code
+ * resides in the ramstage module. This occurs by trampolining from the default
+ * SMRAM entry point to here. */
+static void asmlinkage cpu_smm_do_relocation(void *arg)
+{
+ msr_t mtrr_cap;
+ struct smm_relocation_params *relo_params;
+ const struct smm_module_params *p;
+ const struct smm_runtime *runtime;
+ int cpu;
+
+ p = arg;
+ runtime = p->runtime;
+ relo_params = p->arg;
+ cpu = p->cpu;
+
+ if (cpu >= CONFIG_MAX_CPUS) {
+ printk(BIOS_CRIT,
+ "Invalid CPU number assigned in SMM stub: %d\n", cpu);
+ return;
+ }
+
+ printk(BIOS_DEBUG, "In relocation handler: cpu %d\n", cpu);
+
+ /* Determine if the processor supports saving state in MSRs. If so,
+ * enable it before the non-BSPs run so that SMM relocation can occur
+ * in parallel in the non-BSP CPUs. */
+ if (cpu == 0) {
+ /* If smm_save_state_in_msrs is 1 then that means this is the
+ * 2nd time through the relocation handler for the BSP.
+ * Parallel SMM handler relocation is taking place. However,
+ * it is desired to access other CPUs save state in the real
+ * SMM handler. Therefore, disable the SMM save state in MSRs
+ * feature. */
+ if (relo_params->smm_save_state_in_msrs) {
+ msr_t smm_feature_control;
+
+ smm_feature_control = rdmsr(SMM_FEATURE_CONTROL_MSR);
+ smm_feature_control.lo &= ~SMM_CPU_SAVE_EN;
+ wrmsr(SMM_FEATURE_CONTROL_MSR, smm_feature_control);
+ } else if (bsp_setup_msr_save_state(relo_params))
+ /* Just return from relocation handler if MSR save
+ * state is enabled. In that case the BSP will come
+ * back into the relocation handler to setup the new
+ * SMBASE as well disabling SMM save state in MSRs. */
+ return;
+ }
+
+ /* Make appropriate changes to the save state map. */
+ update_save_state(cpu, relo_params, runtime);
+
+ /* Write EMRR and SMRR MSRs based on indicated support. */
+ mtrr_cap = rdmsr(MTRRcap_MSR);
+ if (mtrr_cap.lo & SMRR_SUPPORTED)
+ write_smrr(relo_params);
+
+ if (mtrr_cap.lo & EMRR_SUPPORTED) {
+ write_emrr(relo_params);
+ /* UNCORE_EMRR msrs are package level. Therefore, only
+ * configure these MSRs on the BSP. */
+ if (cpu == 0)
+ write_uncore_emrr(relo_params);
+ }
+}
+
+static u32 northbridge_get_base_reg(device_t dev, int reg)
+{
+ u32 value;
+
+ value = pci_read_config32(dev, reg);
+ /* Base registers are at 1MiB granularity. */
+ value &= ~((1 << 20) - 1);
+ return value;
+}
+
+static void fill_in_relocation_params(device_t dev,
+ struct smm_relocation_params *params)
+{
+ u32 tseg_size;
+ u32 tsegmb;
+ u32 bgsm;
+ u32 emrr_base;
+ u32 emrr_size;
+ int phys_bits;
+ /* All range registers are aligned to 4KiB */
+ const u32 rmask = ~((1 << 12) - 1);
+
+ /* Some of the range registers are dependent on the number of physical
+ * address bits supported. */
+ phys_bits = cpuid_eax(0x80000008) & 0xff;
+
+ /* The range bounded by the TSEGMB and BGSM registers encompasses the
+ * SMRAM range as well as the IED range. However, the SMRAM available
+ * to the handler is 4MiB since the IEDRAM lives TSEGMB + 4MiB.
+ */
+ tsegmb = northbridge_get_base_reg(dev, TSEG);
+ bgsm = northbridge_get_base_reg(dev, BGSM);
+ tseg_size = bgsm - tsegmb;
+
+ params->smram_base = tsegmb;
+ params->smram_size = 4 << 20;
+ params->ied_base = tsegmb + params->smram_size;
+ params->ied_size = tseg_size - params->smram_size;
+
+ /* Adjust available SMM handler memory size. */
+ params->smram_size -= CONFIG_SMM_RESERVED_SIZE;
+
+ /* SMRR has 32-bits of valid address aligned to 4KiB. */
+ params->smrr_base.lo = (params->smram_base & rmask) | MTRR_TYPE_WRBACK;
+ params->smrr_base.hi = 0;
+ params->smrr_mask.lo = (~(tseg_size - 1) & rmask) | MTRRphysMaskValid;
+ params->smrr_mask.hi = 0;
+
+ /* The EMRR and UNCORE_EMRR are at IEDBASE + 2MiB */
+ emrr_base = (params->ied_base + (2 << 20)) & rmask;
+ emrr_size = params->ied_size - (2 << 20);
+
+ /* EMRR has 46 bits of valid address aligned to 4KiB. It's dependent
+ * on the number of physical address bits supported. */
+ params->emrr_base.lo = emrr_base | MTRR_TYPE_WRBACK;
+ params->emrr_base.hi = 0;
+ params->emrr_mask.lo = (~(emrr_size - 1) & rmask) | MTRRphysMaskValid;
+ params->emrr_mask.hi = (1 << (phys_bits - 32)) - 1;
+
+ /* UNCORE_EMRR has 39 bits of valid address aligned to 4KiB. */
+ params->uncore_emrr_base.lo = emrr_base;
+ params->uncore_emrr_base.hi = 0;
+ params->uncore_emrr_mask.lo = (~(emrr_size - 1) & rmask) |
+ MTRRphysMaskValid;
+ params->uncore_emrr_mask.hi = (1 << (39 - 32)) - 1;
+}
+
+static void adjust_apic_id_map(struct smm_loader_params *smm_params)
+{
+ struct smm_runtime *runtime;
+ int i;
+
+ /* Adjust the APIC id map if HT is disabled. */
+ if (!ht_disabled)
+ return;
+
+ runtime = smm_params->runtime;
+
+ /* The APIC ids increment by 2 when HT is disabled. */
+ for (i = 0; i < CONFIG_MAX_CPUS; i++)
+ runtime->apic_id_to_cpu[i] = runtime->apic_id_to_cpu[i] * 2;
+}
+
+static int install_relocation_handler(int num_cpus,
+ struct smm_relocation_params *relo_params)
+{
+ /* The default SMM entry can happen in parallel or serially. If the
+ * default SMM entry is done in parallel the BSP has already setup
+ * the saving state to each CPU's MSRs. At least one save state size
+ * is required for the initial SMM entry for the BSP to determine if
+ * parallel SMM relocation is even feasible. Set the stack size to
+ * the save state size, and call into the do_relocation handler. */
+ int save_state_size = sizeof(em64t101_smm_state_save_area_t);
+ struct smm_loader_params smm_params = {
+ .per_cpu_stack_size = save_state_size,
+ .num_concurrent_stacks = num_cpus,
+ .per_cpu_save_state_size = save_state_size,
+ .num_concurrent_save_states = 1,
+ .handler = (smm_handler_t)&cpu_smm_do_relocation,
+ .handler_arg = (void *)relo_params,
+ };
+
+ if (smm_setup_relocation_handler(&smm_params))
+ return -1;
+
+ adjust_apic_id_map(&smm_params);
+
+ return 0;
+}
+
+static void setup_ied_area(struct smm_relocation_params *params)
+{
+ char *ied_base;
+
+ struct ied_header ied = {
+ .signature = "INTEL RSVD",
+ .size = params->ied_size,
+ .reserved = {0},
+ };
+
+ ied_base = (void *)params->ied_base;
+
+ /* Place IED header at IEDBASE. */
+ memcpy(ied_base, &ied, sizeof(ied));
+
+ /* Zero out 32KiB at IEDBASE + 1MiB */
+ memset(ied_base + (1 << 20), 0, (32 << 10));
+}
+
+static int install_permanent_handler(int num_cpus,
+ struct smm_relocation_params *relo_params)
+{
+ /* There are num_cpus concurrent stacks and num_cpus concurrent save
+ * state areas. Lastly, set the stack size to the save state size. */
+ int save_state_size = sizeof(em64t101_smm_state_save_area_t);
+ struct smm_loader_params smm_params = {
+ .per_cpu_stack_size = save_state_size,
+ .num_concurrent_stacks = num_cpus,
+ .per_cpu_save_state_size = save_state_size,
+ .num_concurrent_save_states = num_cpus,
+ };
+
+ printk(BIOS_DEBUG, "Installing SMM handler to 0x%08x\n",
+ relo_params->smram_base);
+ if (smm_load_module((void *)relo_params->smram_base,
+ relo_params->smram_size, &smm_params))
+ return -1;
+
+ adjust_apic_id_map(&smm_params);
+
+ return 0;
+}
+
+static int cpu_smm_setup(void)
+{
+ device_t dev = SA_DEV_ROOT;
+ int num_cpus;
+ msr_t msr;
+
+ printk(BIOS_DEBUG, "Setting up SMI for CPU\n");
+
+ fill_in_relocation_params(dev, &smm_reloc_params);
+
+ setup_ied_area(&smm_reloc_params);
+
+ msr = rdmsr(CORE_THREAD_COUNT_MSR);
+ num_cpus = msr.lo & 0xffff;
+ if (num_cpus > CONFIG_MAX_CPUS) {
+ printk(BIOS_CRIT,
+ "Error: Hardware CPUs (%d) > MAX_CPUS (%d)\n",
+ num_cpus, CONFIG_MAX_CPUS);
+ }
+
+ if (install_relocation_handler(num_cpus, &smm_reloc_params)) {
+ printk(BIOS_CRIT, "SMM Relocation handler install failed.\n");
+ return -1;
+ }
+
+ if (install_permanent_handler(num_cpus, &smm_reloc_params)) {
+ printk(BIOS_CRIT, "SMM Permanent handler install failed.\n");
+ return -1;
+ }
+
+ /* Ensure the SMM handlers hit DRAM before performing first SMI. */
+ /* TODO(adurbin): Is this really needed? */
+ wbinvd();
+
+ return 0;
+}
+
+int smm_initialize(void)
+{
+ /* Return early if CPU SMM setup failed. */
+ if (cpu_smm_setup())
+ return -1;
+
+ /* Clear the SMM state in the southbridge. */
+ southbridge_smm_clear_state();
+
+ /* Run the relocation handler. */
+ smm_initiate_relocation();
+
+ if (smm_reloc_params.smm_save_state_in_msrs) {
+ printk(BIOS_DEBUG, "Doing parallel SMM relocation.\n");
+ }
+
+ return 0;
+}
+
+void smm_relocate(void)
+{
+ /*
+ * If smm_save_state_in_msrs is non-zero then parallel SMM relocation
+ * shall take place. Run the relocation handler a second time on the
+ * BSP to do * the final move. For APs, a relocation handler always
+ * needs to be run.
+ */
+ if (smm_reloc_params.smm_save_state_in_msrs)
+ smm_initiate_relocation_parallel();
+ else if (!boot_cpu())
+ smm_initiate_relocation();
+}
+
+void smm_init(void)
+{
+ /* smm_init() is normally called from initialize_cpus() in
+ * lapic_cpu_init.c. However, that path is no longer used. Don't reuse
+ * the function name because that would cause confusion.
+ * The smm_initialize() function above is used to setup SMM at the
+ * appropriate time. */
+}
+
+void smm_lock(void)
+{
+ /* LOCK the SMM memory window and enable normal SMM.
+ * After running this function, only a full reset can
+ * make the SMM registers writable again.
+ */
+ printk(BIOS_DEBUG, "Locking SMM.\n");
+ pci_write_config8(SA_DEV_ROOT, SMRAM, D_LCK | G_SMRAME | C_BASE_SEG);
+}
diff --git a/src/soc/intel/broadwell/spi.c b/src/soc/intel/broadwell/spi.c
new file mode 100644
index 0000000..353323a
--- /dev/null
+++ b/src/soc/intel/broadwell/spi.c
@@ -0,0 +1,637 @@
+/*
+ * Copyright (C) 2014 Google Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* This file is derived from the flashrom project. */
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <bootstate.h>
+#include <delay.h>
+#include <arch/io.h>
+#include <console/console.h>
+#include <device/pci_ids.h>
+#include <spi-generic.h>
+#include <broadwell/pci_devs.h>
+
+#define min(a, b) ((a)<(b)?(a):(b))
+
+#ifdef __SMM__
+#define pci_read_config_byte(dev, reg, targ)\
+ *(targ) = pci_read_config8(dev, reg)
+#define pci_read_config_word(dev, reg, targ)\
+ *(targ) = pci_read_config16(dev, reg)
+#define pci_read_config_dword(dev, reg, targ)\
+ *(targ) = pci_read_config32(dev, reg)
+#define pci_write_config_byte(dev, reg, val)\
+ pci_write_config8(dev, reg, val)
+#define pci_write_config_word(dev, reg, val)\
+ pci_write_config16(dev, reg, val)
+#define pci_write_config_dword(dev, reg, val)\
+ pci_write_config32(dev, reg, val)
+#else /* !__SMM__ */
+#include <device/device.h>
+#include <device/pci.h>
+#define pci_read_config_byte(dev, reg, targ)\
+ *(targ) = pci_read_config8(dev, reg)
+#define pci_read_config_word(dev, reg, targ)\
+ *(targ) = pci_read_config16(dev, reg)
+#define pci_read_config_dword(dev, reg, targ)\
+ *(targ) = pci_read_config32(dev, reg)
+#define pci_write_config_byte(dev, reg, val)\
+ pci_write_config8(dev, reg, val)
+#define pci_write_config_word(dev, reg, val)\
+ pci_write_config16(dev, reg, val)
+#define pci_write_config_dword(dev, reg, val)\
+ pci_write_config32(dev, reg, val)
+#endif /* !__SMM__ */
+
+typedef struct spi_slave ich_spi_slave;
+
+static int ichspi_lock = 0;
+
+typedef struct ich9_spi_regs {
+ uint32_t bfpr;
+ uint16_t hsfs;
+ uint16_t hsfc;
+ uint32_t faddr;
+ uint32_t _reserved0;
+ uint32_t fdata[16];
+ uint32_t frap;
+ uint32_t freg[5];
+ uint32_t _reserved1[3];
+ uint32_t pr[5];
+ uint32_t _reserved2[2];
+ uint8_t ssfs;
+ uint8_t ssfc[3];
+ uint16_t preop;
+ uint16_t optype;
+ uint8_t opmenu[8];
+ uint32_t bbar;
+ uint8_t _reserved3[12];
+ uint32_t fdoc;
+ uint32_t fdod;
+ uint8_t _reserved4[8];
+ uint32_t afc;
+ uint32_t lvscc;
+ uint32_t uvscc;
+ uint8_t _reserved5[4];
+ uint32_t fpb;
+ uint8_t _reserved6[28];
+ uint32_t srdl;
+ uint32_t srdc;
+ uint32_t srd;
+} __attribute__((packed)) ich9_spi_regs;
+
+typedef struct ich_spi_controller {
+ int locked;
+
+ uint8_t *opmenu;
+ int menubytes;
+ uint16_t *preop;
+ uint16_t *optype;
+ uint32_t *addr;
+ uint8_t *data;
+ unsigned databytes;
+ uint8_t *status;
+ uint16_t *control;
+ uint32_t *bbar;
+} ich_spi_controller;
+
+static ich_spi_controller cntlr;
+
+enum {
+ SPIS_SCIP = 0x0001,
+ SPIS_GRANT = 0x0002,
+ SPIS_CDS = 0x0004,
+ SPIS_FCERR = 0x0008,
+ SSFS_AEL = 0x0010,
+ SPIS_LOCK = 0x8000,
+ SPIS_RESERVED_MASK = 0x7ff0,
+ SSFS_RESERVED_MASK = 0x7fe2
+};
+
+enum {
+ SPIC_SCGO = 0x000002,
+ SPIC_ACS = 0x000004,
+ SPIC_SPOP = 0x000008,
+ SPIC_DBC = 0x003f00,
+ SPIC_DS = 0x004000,
+ SPIC_SME = 0x008000,
+ SSFC_SCF_MASK = 0x070000,
+ SSFC_RESERVED = 0xf80000
+};
+
+enum {
+ HSFS_FDONE = 0x0001,
+ HSFS_FCERR = 0x0002,
+ HSFS_AEL = 0x0004,
+ HSFS_BERASE_MASK = 0x0018,
+ HSFS_BERASE_SHIFT = 3,
+ HSFS_SCIP = 0x0020,
+ HSFS_FDOPSS = 0x2000,
+ HSFS_FDV = 0x4000,
+ HSFS_FLOCKDN = 0x8000
+};
+
+enum {
+ HSFC_FGO = 0x0001,
+ HSFC_FCYCLE_MASK = 0x0006,
+ HSFC_FCYCLE_SHIFT = 1,
+ HSFC_FDBC_MASK = 0x3f00,
+ HSFC_FDBC_SHIFT = 8,
+ HSFC_FSMIE = 0x8000
+};
+
+enum {
+ SPI_OPCODE_TYPE_READ_NO_ADDRESS = 0,
+ SPI_OPCODE_TYPE_WRITE_NO_ADDRESS = 1,
+ SPI_OPCODE_TYPE_READ_WITH_ADDRESS = 2,
+ SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS = 3
+};
+
+#if CONFIG_DEBUG_SPI_FLASH
+
+static u8 readb_(const void *addr)
+{
+ u8 v = read8((unsigned long)addr);
+ printk(BIOS_DEBUG, "read %2.2x from %4.4x\n",
+ v, ((unsigned) addr & 0xffff) - 0xf020);
+ return v;
+}
+
+static u16 readw_(const void *addr)
+{
+ u16 v = read16((unsigned long)addr);
+ printk(BIOS_DEBUG, "read %4.4x from %4.4x\n",
+ v, ((unsigned) addr & 0xffff) - 0xf020);
+ return v;
+}
+
+static u32 readl_(const void *addr)
+{
+ u32 v = read32((unsigned long)addr);
+ printk(BIOS_DEBUG, "read %8.8x from %4.4x\n",
+ v, ((unsigned) addr & 0xffff) - 0xf020);
+ return v;
+}
+
+static void writeb_(u8 b, const void *addr)
+{
+ write8((unsigned long)addr, b);
+ printk(BIOS_DEBUG, "wrote %2.2x to %4.4x\n",
+ b, ((unsigned) addr & 0xffff) - 0xf020);
+}
+
+static void writew_(u16 b, const void *addr)
+{
+ write16((unsigned long)addr, b);
+ printk(BIOS_DEBUG, "wrote %4.4x to %4.4x\n",
+ b, ((unsigned) addr & 0xffff) - 0xf020);
+}
+
+static void writel_(u32 b, const void *addr)
+{
+ write32((unsigned long)addr, b);
+ printk(BIOS_DEBUG, "wrote %8.8x to %4.4x\n",
+ b, ((unsigned) addr & 0xffff) - 0xf020);
+}
+
+#else /* CONFIG_DEBUG_SPI_FLASH ^^^ enabled vvv NOT enabled */
+
+#define readb_(a) read8((uint32_t)a)
+#define readw_(a) read16((uint32_t)a)
+#define readl_(a) read32((uint32_t)a)
+#define writeb_(val, addr) write8((uint32_t)addr, val)
+#define writew_(val, addr) write16((uint32_t)addr, val)
+#define writel_(val, addr) write32((uint32_t)addr, val)
+
+#endif /* CONFIG_DEBUG_SPI_FLASH ^^^ NOT enabled */
+
+static void write_reg(const void *value, void *dest, uint32_t size)
+{
+ const uint8_t *bvalue = value;
+ uint8_t *bdest = dest;
+
+ while (size >= 4) {
+ writel_(*(const uint32_t *)bvalue, bdest);
+ bdest += 4; bvalue += 4; size -= 4;
+ }
+ while (size) {
+ writeb_(*bvalue, bdest);
+ bdest++; bvalue++; size--;
+ }
+}
+
+static void read_reg(const void *src, void *value, uint32_t size)
+{
+ const uint8_t *bsrc = src;
+ uint8_t *bvalue = value;
+
+ while (size >= 4) {
+ *(uint32_t *)bvalue = readl_(bsrc);
+ bsrc += 4; bvalue += 4; size -= 4;
+ }
+ while (size) {
+ *bvalue = readb_(bsrc);
+ bsrc++; bvalue++; size--;
+ }
+}
+
+static void ich_set_bbar(uint32_t minaddr)
+{
+ const uint32_t bbar_mask = 0x00ffff00;
+ uint32_t ichspi_bbar;
+
+ minaddr &= bbar_mask;
+ ichspi_bbar = readl_(cntlr.bbar) & ~bbar_mask;
+ ichspi_bbar |= minaddr;
+ writel_(ichspi_bbar, cntlr.bbar);
+}
+
+struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs)
+{
+ ich_spi_slave *slave = malloc(sizeof(*slave));
+
+ if (!slave) {
+ printk(BIOS_DEBUG, "ICH SPI: Bad allocation\n");
+ return NULL;
+ }
+
+ memset(slave, 0, sizeof(*slave));
+
+ slave->bus = bus;
+ slave->cs = cs;
+ return slave;
+}
+
+void spi_init(void)
+{
+ uint8_t *rcrb; /* Root Complex Register Block */
+ uint32_t rcba; /* Root Complex Base Address */
+ uint8_t bios_cntl;
+ device_t dev = PCH_DEV_LPC;
+ ich9_spi_regs *ich9_spi;
+
+ pci_read_config_dword(dev, 0xf0, &rcba);
+ /* Bits 31-14 are the base address, 13-1 are reserved, 0 is enable. */
+ rcrb = (uint8_t *)(rcba & 0xffffc000);
+ ich9_spi = (ich9_spi_regs *)(rcrb + 0x3800);
+ ichspi_lock = readw_(&ich9_spi->hsfs) & HSFS_FLOCKDN;
+ cntlr.opmenu = ich9_spi->opmenu;
+ cntlr.menubytes = sizeof(ich9_spi->opmenu);
+ cntlr.optype = &ich9_spi->optype;
+ cntlr.addr = &ich9_spi->faddr;
+ cntlr.data = (uint8_t *)ich9_spi->fdata;
+ cntlr.databytes = sizeof(ich9_spi->fdata);
+ cntlr.status = &ich9_spi->ssfs;
+ cntlr.control = (uint16_t *)ich9_spi->ssfc;
+ cntlr.bbar = &ich9_spi->bbar;
+ cntlr.preop = &ich9_spi->preop;
+ ich_set_bbar(0);
+
+ /* Disable the BIOS write protect so write commands are allowed. */
+ pci_read_config_byte(dev, 0xdc, &bios_cntl);
+ bios_cntl &= ~(1 << 5);
+ pci_write_config_byte(dev, 0xdc, bios_cntl | 0x1);
+}
+
+static void spi_init_cb(void *unused)
+{
+ spi_init();
+}
+
+BOOT_STATE_INIT_ENTRIES(spi_init_bscb) = {
+ BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_ENTRY, spi_init_cb, NULL),
+};
+
+int spi_claim_bus(struct spi_slave *slave)
+{
+ /* Handled by ICH automatically. */
+ return 0;
+}
+
+void spi_release_bus(struct spi_slave *slave)
+{
+ /* Handled by ICH automatically. */
+}
+
+typedef struct spi_transaction {
+ const uint8_t *out;
+ uint32_t bytesout;
+ uint8_t *in;
+ uint32_t bytesin;
+ uint8_t type;
+ uint8_t opcode;
+ uint32_t offset;
+} spi_transaction;
+
+static inline void spi_use_out(spi_transaction *trans, unsigned bytes)
+{
+ trans->out += bytes;
+ trans->bytesout -= bytes;
+}
+
+static inline void spi_use_in(spi_transaction *trans, unsigned bytes)
+{
+ trans->in += bytes;
+ trans->bytesin -= bytes;
+}
+
+static void spi_setup_type(spi_transaction *trans)
+{
+ trans->type = 0xFF;
+
+ /* Try to guess spi type from read/write sizes. */
+ if (trans->bytesin == 0) {
+ if (trans->bytesout > 4)
+ /*
+ * If bytesin = 0 and bytesout > 4, we presume this is
+ * a write data operation, which is accompanied by an
+ * address.
+ */
+ trans->type = SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS;
+ else
+ trans->type = SPI_OPCODE_TYPE_WRITE_NO_ADDRESS;
+ return;
+ }
+
+ if (trans->bytesout == 1) { /* and bytesin is > 0 */
+ trans->type = SPI_OPCODE_TYPE_READ_NO_ADDRESS;
+ return;
+ }
+
+ if (trans->bytesout == 4) { /* and bytesin is > 0 */
+ trans->type = SPI_OPCODE_TYPE_READ_WITH_ADDRESS;
+ }
+
+ /* Fast read command is called with 5 bytes instead of 4 */
+ if (trans->out[0] == SPI_OPCODE_FAST_READ && trans->bytesout == 5) {
+ trans->type = SPI_OPCODE_TYPE_READ_WITH_ADDRESS;
+ --trans->bytesout;
+ }
+}
+
+static int spi_setup_opcode(spi_transaction *trans)
+{
+ uint16_t optypes;
+ uint8_t opmenu[cntlr.menubytes];
+
+ trans->opcode = trans->out[0];
+ spi_use_out(trans, 1);
+ if (!ichspi_lock) {
+ /* The lock is off, so just use index 0. */
+ writeb_(trans->opcode, cntlr.opmenu);
+ optypes = readw_(cntlr.optype);
+ optypes = (optypes & 0xfffc) | (trans->type & 0x3);
+ writew_(optypes, cntlr.optype);
+ return 0;
+ } else {
+ /* The lock is on. See if what we need is on the menu. */
+ uint8_t optype;
+ uint16_t opcode_index;
+
+ /* Write Enable is handled as atomic prefix */
+ if (trans->opcode == SPI_OPCODE_WREN)
+ return 0;
+
+ read_reg(cntlr.opmenu, opmenu, sizeof(opmenu));
+ for (opcode_index = 0; opcode_index < cntlr.menubytes;
+ opcode_index++) {
+ if (opmenu[opcode_index] == trans->opcode)
+ break;
+ }
+
+ if (opcode_index == cntlr.menubytes) {
+ printk(BIOS_DEBUG, "ICH SPI: Opcode %x not found\n",
+ trans->opcode);
+ return -1;
+ }
+
+ optypes = readw_(cntlr.optype);
+ optype = (optypes >> (opcode_index * 2)) & 0x3;
+ if (trans->type == SPI_OPCODE_TYPE_WRITE_NO_ADDRESS &&
+ optype == SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS &&
+ trans->bytesout >= 3) {
+ /* We guessed wrong earlier. Fix it up. */
+ trans->type = optype;
+ }
+ if (optype != trans->type) {
+ printk(BIOS_DEBUG, "ICH SPI: Transaction doesn't fit type %d\n",
+ optype);
+ return -1;
+ }
+ return opcode_index;
+ }
+}
+
+static int spi_setup_offset(spi_transaction *trans)
+{
+ /* Separate the SPI address and data. */
+ switch (trans->type) {
+ case SPI_OPCODE_TYPE_READ_NO_ADDRESS:
+ case SPI_OPCODE_TYPE_WRITE_NO_ADDRESS:
+ return 0;
+ case SPI_OPCODE_TYPE_READ_WITH_ADDRESS:
+ case SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS:
+ trans->offset = ((uint32_t)trans->out[0] << 16) |
+ ((uint32_t)trans->out[1] << 8) |
+ ((uint32_t)trans->out[2] << 0);
+ spi_use_out(trans, 3);
+ return 1;
+ default:
+ printk(BIOS_DEBUG, "Unrecognized SPI transaction type %#x\n", trans->type);
+ return -1;
+ }
+}
+
+/*
+ * Wait for up to 60ms til status register bit(s) turn 1 (in case wait_til_set
+ * below is True) or 0. In case the wait was for the bit(s) to set - write
+ * those bits back, which would cause resetting them.
+ *
+ * Return the last read status value on success or -1 on failure.
+ */
+static int ich_status_poll(u16 bitmask, int wait_til_set)
+{
+ int timeout = 6000; /* This will result in 60 ms */
+ u16 status = 0;
+
+ while (timeout--) {
+ status = readw_(cntlr.status);
+ if (wait_til_set ^ ((status & bitmask) == 0)) {
+ if (wait_til_set)
+ writew_((status & bitmask), cntlr.status);
+ return status;
+ }
+ udelay(10);
+ }
+
+ printk(BIOS_DEBUG, "ICH SPI: SCIP timeout, read %x, expected %x\n",
+ status, bitmask);
+ return -1;
+}
+
+int spi_xfer(struct spi_slave *slave, const void *dout,
+ unsigned int bytesout, void *din, unsigned int bytesin)
+{
+ uint16_t control;
+ int16_t opcode_index;
+ int with_address;
+ int status;
+
+ spi_transaction trans = {
+ dout, bytesout,
+ din, bytesin,
+ 0xff, 0xff, 0
+ };
+
+ /* There has to always at least be an opcode. */
+ if (!bytesout || !dout) {
+ printk(BIOS_DEBUG, "ICH SPI: No opcode for transfer\n");
+ return -1;
+ }
+ /* Make sure if we read something we have a place to put it. */
+ if (bytesin != 0 && !din) {
+ printk(BIOS_DEBUG, "ICH SPI: Read but no target buffer\n");
+ return -1;
+ }
+
+ if (ich_status_poll(SPIS_SCIP, 0) == -1)
+ return -1;
+
+ writew_(SPIS_CDS | SPIS_FCERR, cntlr.status);
+
+ spi_setup_type(&trans);
+ if ((opcode_index = spi_setup_opcode(&trans)) < 0)
+ return -1;
+ if ((with_address = spi_setup_offset(&trans)) < 0)
+ return -1;
+
+ if (trans.opcode == SPI_OPCODE_WREN) {
+ /*
+ * Treat Write Enable as Atomic Pre-Op if possible
+ * in order to prevent the Management Engine from
+ * issuing a transaction between WREN and DATA.
+ */
+ if (!ichspi_lock)
+ writew_(trans.opcode, cntlr.preop);
+ return 0;
+ }
+
+ /* Preset control fields */
+ control = SPIC_SCGO | ((opcode_index & 0x07) << 4);
+
+ /* Issue atomic preop cycle if needed */
+ if (readw_(cntlr.preop))
+ control |= SPIC_ACS;
+
+ if (!trans.bytesout && !trans.bytesin) {
+ /* SPI addresses are 24 bit only */
+ if (with_address)
+ writel_(trans.offset & 0x00FFFFFF, cntlr.addr);
+
+ /*
+ * This is a 'no data' command (like Write Enable), its
+ * bitesout size was 1, decremented to zero while executing
+ * spi_setup_opcode() above. Tell the chip to send the
+ * command.
+ */
+ writew_(control, cntlr.control);
+
+ /* wait for the result */
+ status = ich_status_poll(SPIS_CDS | SPIS_FCERR, 1);
+ if (status == -1)
+ return -1;
+
+ if (status & SPIS_FCERR) {
+ printk(BIOS_DEBUG, "ICH SPI: Command transaction error\n");
+ return -1;
+ }
+
+ return 0;
+ }
+
+ /*
+ * Check if this is a write command atempting to transfer more bytes
+ * than the controller can handle. Iterations for writes are not
+ * supported here because each SPI write command needs to be preceded
+ * and followed by other SPI commands, and this sequence is controlled
+ * by the SPI chip driver.
+ */
+ if (trans.bytesout > cntlr.databytes) {
+ printk(BIOS_DEBUG, "ICH SPI: Too much to write. Does your SPI chip driver use"
+ " CONTROLLER_PAGE_LIMIT?\n");
+ return -1;
+ }
+
+ /*
+ * Read or write up to databytes bytes at a time until everything has
+ * been sent.
+ */
+ while (trans.bytesout || trans.bytesin) {
+ uint32_t data_length;
+
+ /* SPI addresses are 24 bit only */
+ writel_(trans.offset & 0x00FFFFFF, cntlr.addr);
+
+ if (trans.bytesout)
+ data_length = min(trans.bytesout, cntlr.databytes);
+ else
+ data_length = min(trans.bytesin, cntlr.databytes);
+
+ /* Program data into FDATA0 to N */
+ if (trans.bytesout) {
+ write_reg(trans.out, cntlr.data, data_length);
+ spi_use_out(&trans, data_length);
+ if (with_address)
+ trans.offset += data_length;
+ }
+
+ /* Add proper control fields' values */
+ control &= ~((cntlr.databytes - 1) << 8);
+ control |= SPIC_DS;
+ control |= (data_length - 1) << 8;
+
+ /* write it */
+ writew_(control, cntlr.control);
+
+ /* Wait for Cycle Done Status or Flash Cycle Error. */
+ status = ich_status_poll(SPIS_CDS | SPIS_FCERR, 1);
+ if (status == -1)
+ return -1;
+
+ if (status & SPIS_FCERR) {
+ printk(BIOS_DEBUG, "ICH SPI: Data transaction error\n");
+ return -1;
+ }
+
+ if (trans.bytesin) {
+ read_reg(cntlr.data, trans.in, data_length);
+ spi_use_in(&trans, data_length);
+ if (with_address)
+ trans.offset += data_length;
+ }
+ }
+
+ /* Clear atomic preop now that xfer is done */
+ writew_(0, cntlr.preop);
+
+ return 0;
+}
diff --git a/src/soc/intel/broadwell/spi_loading.c b/src/soc/intel/broadwell/spi_loading.c
new file mode 100644
index 0000000..d7247c6
--- /dev/null
+++ b/src/soc/intel/broadwell/spi_loading.c
@@ -0,0 +1,93 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <arch/byteorder.h>
+#include <cbmem.h>
+#include <cbfs.h>
+#include <console/console.h>
+#include <cpu/x86/smm.h>
+#include <vendorcode/google/chromeos/chromeos.h>
+
+#define CACHELINE_SIZE 64
+#define INTRA_CACHELINE_MASK (CACHELINE_SIZE - 1)
+#define CACHELINE_MASK (~INTRA_CACHELINE_MASK)
+
+/* Mirror the payload file to the default SMM location if it is small enough.
+ * The default SMM region can be used since no one is using the memory at this
+ * location at this stage in the boot. */
+static inline void *spi_mirror(void *file_start, int file_len)
+{
+ int alignment_diff;
+ char *src;
+ char *dest = (void *)SMM_DEFAULT_BASE;
+
+ alignment_diff = (INTRA_CACHELINE_MASK & (long)file_start);
+
+ /* Adjust file length so that the start and end points are aligned to a
+ * cacheline. Coupled with the ROM caching in the CPU the SPI hardware
+ * will read and cache full length cachelines. It will also prefetch
+ * data as well. Once things are mirrored in memory all accesses should
+ * hit the CPUs cache. */
+ file_len += alignment_diff;
+ file_len = ALIGN(file_len, CACHELINE_SIZE);
+
+ printk(BIOS_DEBUG, "Payload aligned size: 0x%x\n", file_len);
+
+ /* Just pass back the pointer to ROM space if the file is larger
+ * than the RAM mirror region. */
+ if (file_len > SMM_DEFAULT_SIZE)
+ return file_start;
+
+ src = (void *)(CACHELINE_MASK & (long)file_start);
+ /* Note that if mempcy is not using 32-bit moves the performance will
+ * degrade because the SPI hardware prefetchers look for
+ * cacheline-aligned 32-bit accesses to kick in. */
+ memcpy(dest, src, file_len);
+
+ /* Provide pointer into mirrored space. */
+ return &dest[alignment_diff];
+}
+
+void *cbfs_load_payload(struct cbfs_media *media, const char *name)
+{
+ int file_len;
+ void *file_start;
+ struct cbfs_file *file;
+
+ file_start = vboot_get_payload(&file_len);
+
+ if (file_start != NULL)
+ return spi_mirror(file_start, file_len);
+
+ file = cbfs_get_file(media, name);
+
+ if (file == NULL)
+ return NULL;
+
+ if (ntohl(file->type) != CBFS_TYPE_PAYLOAD)
+ return NULL;
+
+ file_len = ntohl(file->len);
+
+ file_start = CBFS_SUBHEADER(file);
+
+ return spi_mirror(file_start, file_len);
+}
diff --git a/src/soc/intel/broadwell/stage_cache.c b/src/soc/intel/broadwell/stage_cache.c
new file mode 100644
index 0000000..6c6b6fb
--- /dev/null
+++ b/src/soc/intel/broadwell/stage_cache.c
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <cbmem.h>
+#include <ramstage_cache.h>
+#include <broadwell/smm.h>
+#include <stdint.h>
+
+struct ramstage_cache *ramstage_cache_location(long *size)
+{
+ /* The ramstage cache lives in the TSEG region.
+ * The top of ram is defined to be the TSEG base address. */
+ u32 offset = smm_region_size();
+ offset -= CONFIG_IED_REGION_SIZE;
+ offset -= CONFIG_SMM_RESERVED_SIZE;
+
+ *size = CONFIG_SMM_RESERVED_SIZE;
+ return (void *)(cbmem_top() + offset);
+}
diff --git a/src/soc/intel/broadwell/systemagent.c b/src/soc/intel/broadwell/systemagent.c
new file mode 100644
index 0000000..56a44d9
--- /dev/null
+++ b/src/soc/intel/broadwell/systemagent.c
@@ -0,0 +1,440 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <arch/acpi.h>
+#include <arch/io.h>
+#include <stdint.h>
+#include <delay.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <stdlib.h>
+#include <string.h>
+#include <cbmem.h>
+#include <romstage_handoff.h>
+#include <vendorcode/google/chromeos/chromeos.h>
+#include <broadwell/cpu.h>
+#include <broadwell/iomap.h>
+#include <broadwell/ramstage.h>
+#include <broadwell/systemagent.h>
+
+static int get_pcie_bar(device_t dev, unsigned int index, u32 *base, u32 *len)
+{
+ u32 pciexbar_reg;
+
+ *base = 0;
+ *len = 0;
+
+ pciexbar_reg = pci_read_config32(dev, index);
+
+ if (!(pciexbar_reg & (1 << 0)))
+ return 0;
+
+ switch ((pciexbar_reg >> 1) & 3) {
+ case 0: // 256MB
+ *base = pciexbar_reg & ((1 << 31)|(1 << 30)|(1 << 29)|
+ (1 << 28));
+ *len = 256 * 1024 * 1024;
+ return 1;
+ case 1: // 128M
+ *base = pciexbar_reg & ((1 << 31)|(1 << 30)|(1 << 29)|
+ (1 << 28)|(1 << 27));
+ *len = 128 * 1024 * 1024;
+ return 1;
+ case 2: // 64M
+ *base = pciexbar_reg & ((1 << 31)|(1 << 30)|(1 << 29)|
+ (1 << 28)|(1 << 27)|(1 << 26));
+ *len = 64 * 1024 * 1024;
+ return 1;
+ }
+
+ return 0;
+}
+
+static int get_bar(device_t dev, unsigned int index, u32 *base, u32 *len)
+{
+ u32 bar;
+
+ bar = pci_read_config32(dev, index);
+
+ /* If not enabled don't report it. */
+ if (!(bar & 0x1))
+ return 0;
+
+ /* Knock down the enable bit. */
+ *base = bar & ~1;
+
+ return 1;
+}
+
+/* There are special BARs that actually are programmed in the MCHBAR. These
+ * Intel special features, but they do consume resources that need to be
+ * accounted for. */
+static int get_bar_in_mchbar(device_t dev, unsigned int index, u32 *base,
+ u32 *len)
+{
+ u32 bar;
+
+ bar = MCHBAR32(index);
+
+ /* If not enabled don't report it. */
+ if (!(bar & 0x1))
+ return 0;
+
+ /* Knock down the enable bit. */
+ *base = bar & ~1;
+
+ return 1;
+}
+
+struct fixed_mmio_descriptor {
+ unsigned int index;
+ u32 size;
+ int (*get_resource)(device_t dev, unsigned int index,
+ u32 *base, u32 *size);
+ const char *description;
+};
+
+struct fixed_mmio_descriptor mc_fixed_resources[] = {
+ { PCIEXBAR, 0, get_pcie_bar, "PCIEXBAR" },
+ { MCHBAR, MCH_BASE_SIZE, get_bar, "MCHBAR" },
+ { DMIBAR, DMI_BASE_SIZE, get_bar, "DMIBAR" },
+ { EPBAR, EP_BASE_SIZE, get_bar, "EPBAR" },
+ { GDXCBAR, GDXC_BASE_SIZE, get_bar_in_mchbar, "GDXCBAR" },
+ { EDRAMBAR, EDRAM_BASE_SIZE, get_bar_in_mchbar, "EDRAMBAR" },
+};
+
+/*
+ * Add all known fixed MMIO ranges that hang off the host bridge/memory
+ * controller device.
+ */
+static void mc_add_fixed_mmio_resources(device_t dev)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(mc_fixed_resources); i++) {
+ u32 base;
+ u32 size;
+ struct resource *resource;
+ unsigned int index;
+
+ size = mc_fixed_resources[i].size;
+ index = mc_fixed_resources[i].index;
+ if (!mc_fixed_resources[i].get_resource(dev, index,
+ &base, &size))
+ continue;
+
+ resource = new_resource(dev, mc_fixed_resources[i].index);
+ resource->flags = IORESOURCE_MEM | IORESOURCE_FIXED |
+ IORESOURCE_STORED | IORESOURCE_RESERVE |
+ IORESOURCE_ASSIGNED;
+ resource->base = base;
+ resource->size = size;
+ printk(BIOS_DEBUG, "%s: Adding %s @ %x 0x%08lx-0x%08lx.\n",
+ __func__, mc_fixed_resources[i].description, index,
+ (unsigned long)base, (unsigned long)(base + size - 1));
+ }
+}
+
+/* Host Memory Map:
+ *
+ * +--------------------------+ TOUUD
+ * | |
+ * +--------------------------+ 4GiB
+ * | PCI Address Space |
+ * +--------------------------+ TOLUD (also maps into MC address space)
+ * | iGD |
+ * +--------------------------+ BDSM
+ * | GTT |
+ * +--------------------------+ BGSM
+ * | TSEG |
+ * +--------------------------+ TSEGMB
+ * | Usage DRAM |
+ * +--------------------------+ 0
+ *
+ * Some of the base registers above can be equal making the size of those
+ * regions 0. The reason is because the memory controller internally subtracts
+ * the base registers from each other to determine sizes of the regions. In
+ * other words, the memory map is in a fixed order no matter what.
+ */
+
+struct map_entry {
+ int reg;
+ int is_64_bit;
+ int is_limit;
+ const char *description;
+};
+
+static void read_map_entry(device_t dev, struct map_entry *entry,
+ uint64_t *result)
+{
+ uint64_t value;
+ uint64_t mask;
+
+ /* All registers are on a 1MiB granularity. */
+ mask = ((1ULL<<20)-1);
+ mask = ~mask;
+
+ value = 0;
+
+ if (entry->is_64_bit) {
+ value = pci_read_config32(dev, entry->reg + 4);
+ value <<= 32;
+ }
+
+ value |= pci_read_config32(dev, entry->reg);
+ value &= mask;
+
+ if (entry->is_limit)
+ value |= ~mask;
+
+ *result = value;
+}
+
+#define MAP_ENTRY(reg_, is_64_, is_limit_, desc_) \
+ { \
+ .reg = reg_, \
+ .is_64_bit = is_64_, \
+ .is_limit = is_limit_, \
+ .description = desc_, \
+ }
+
+#define MAP_ENTRY_BASE_64(reg_, desc_) \
+ MAP_ENTRY(reg_, 1, 0, desc_)
+#define MAP_ENTRY_LIMIT_64(reg_, desc_) \
+ MAP_ENTRY(reg_, 1, 1, desc_)
+#define MAP_ENTRY_BASE_32(reg_, desc_) \
+ MAP_ENTRY(reg_, 0, 0, desc_)
+
+enum {
+ TOM_REG,
+ TOUUD_REG,
+ MESEG_BASE_REG,
+ MESEG_LIMIT_REG,
+ REMAP_BASE_REG,
+ REMAP_LIMIT_REG,
+ TOLUD_REG,
+ BGSM_REG,
+ BDSM_REG,
+ TSEG_REG,
+ // Must be last.
+ NUM_MAP_ENTRIES
+};
+
+static struct map_entry memory_map[NUM_MAP_ENTRIES] = {
+ [TOM_REG] = MAP_ENTRY_BASE_64(TOM, "TOM"),
+ [TOUUD_REG] = MAP_ENTRY_BASE_64(TOUUD, "TOUUD"),
+ [MESEG_BASE_REG] = MAP_ENTRY_BASE_64(MESEG_BASE, "MESEG_BASE"),
+ [MESEG_LIMIT_REG] = MAP_ENTRY_LIMIT_64(MESEG_LIMIT, "MESEG_LIMIT"),
+ [REMAP_BASE_REG] = MAP_ENTRY_BASE_64(REMAPBASE, "REMAP_BASE"),
+ [REMAP_LIMIT_REG] = MAP_ENTRY_LIMIT_64(REMAPLIMIT, "REMAP_LIMIT"),
+ [TOLUD_REG] = MAP_ENTRY_BASE_32(TOLUD, "TOLUD"),
+ [BDSM_REG] = MAP_ENTRY_BASE_32(BDSM, "BDSM"),
+ [BGSM_REG] = MAP_ENTRY_BASE_32(BGSM, "BGSM"),
+ [TSEG_REG] = MAP_ENTRY_BASE_32(TSEG, "TESGMB"),
+};
+
+static void mc_read_map_entries(device_t dev, uint64_t *values)
+{
+ int i;
+ for (i = 0; i < NUM_MAP_ENTRIES; i++) {
+ read_map_entry(dev, &memory_map[i], &values[i]);
+ }
+}
+
+static void mc_report_map_entries(device_t dev, uint64_t *values)
+{
+ int i;
+ for (i = 0; i < NUM_MAP_ENTRIES; i++) {
+ printk(BIOS_DEBUG, "MC MAP: %s: 0x%llx\n",
+ memory_map[i].description, values[i]);
+ }
+ /* One can validate the BDSM and BGSM against the GGC. */
+ printk(BIOS_DEBUG, "MC MAP: GGC: 0x%x\n", pci_read_config16(dev, GGC));
+}
+
+static void mc_add_dram_resources(device_t dev)
+{
+ unsigned long base_k, size_k;
+ unsigned long touud_k;
+ unsigned long index;
+ struct resource *resource;
+ uint64_t mc_values[NUM_MAP_ENTRIES];
+
+ /* Read in the MAP registers and report their values. */
+ mc_read_map_entries(dev, &mc_values[0]);
+ mc_report_map_entries(dev, &mc_values[0]);
+
+ /*
+ * These are the host memory ranges that should be added:
+ * - 0 -> 0xa0000: cacheable
+ * - 0xc0000 -> TSEG : cacheable
+ * - TESG -> BGSM: cacheable with standard MTRRs and reserved
+ * - BGSM -> TOLUD: not cacheable with standard MTRRs and reserved
+ * - 4GiB -> TOUUD: cacheable
+ *
+ * The default SMRAM space is reserved so that the range doesn't
+ * have to be saved during S3 Resume. Once marked reserved the OS
+ * cannot use the memory. This is a bit of an odd place to reserve
+ * the region, but the CPU devices don't have dev_ops->read_resources()
+ * called on them.
+ *
+ * The range 0xa0000 -> 0xc0000 does not have any resources
+ * associated with it to handle legacy VGA memory. If this range
+ * is not omitted the mtrr code will setup the area as cacheable
+ * causing VGA access to not work.
+ *
+ * The TSEG region is mapped as cacheable so that one can perform
+ * SMRAM relocation faster. Once the SMRR is enabled the SMRR takes
+ * precedence over the existing MTRRs covering this region.
+ *
+ * It should be noted that cacheable entry types need to be added in
+ * order. The reason is that the current MTRR code assumes this and
+ * falls over itself if it isn't.
+ *
+ * The resource index starts low and should not meet or exceed
+ * PCI_BASE_ADDRESS_0.
+ */
+ index = 0;
+
+ /* 0 - > 0xa0000 */
+ base_k = 0;
+ size_k = (0xa0000 >> 10) - base_k;
+ ram_resource(dev, index++, base_k, size_k);
+
+ /* 0xc0000 -> TSEG */
+ base_k = 0xc0000 >> 10;
+ size_k = (unsigned long)(mc_values[TSEG_REG] >> 10) - base_k;
+ ram_resource(dev, index++, base_k, size_k);
+
+ /* TSEG -> BGSM */
+ resource = new_resource(dev, index++);
+ resource->base = mc_values[TSEG_REG];
+ resource->size = mc_values[BGSM_REG] - resource->base;
+ resource->flags = IORESOURCE_MEM | IORESOURCE_FIXED |
+ IORESOURCE_STORED | IORESOURCE_RESERVE |
+ IORESOURCE_ASSIGNED | IORESOURCE_CACHEABLE;
+
+ /* BGSM -> TOLUD */
+ resource = new_resource(dev, index++);
+ resource->base = mc_values[BGSM_REG];
+ resource->size = mc_values[TOLUD_REG] - resource->base;
+ resource->flags = IORESOURCE_MEM | IORESOURCE_FIXED |
+ IORESOURCE_STORED | IORESOURCE_RESERVE |
+ IORESOURCE_ASSIGNED;
+
+ /* 4GiB -> TOUUD */
+ base_k = 4096 * 1024; /* 4GiB */
+ touud_k = mc_values[TOUUD_REG] >> 10;
+ size_k = touud_k - base_k;
+ if (touud_k > base_k)
+ ram_resource(dev, index++, base_k, size_k);
+
+ /* Reserve everything between A segment and 1MB:
+ *
+ * 0xa0000 - 0xbffff: legacy VGA
+ * 0xc0000 - 0xfffff: RAM
+ */
+ mmio_resource(dev, index++, (0xa0000 >> 10), (0xc0000 - 0xa0000) >> 10);
+ reserved_ram_resource(dev, index++, (0xc0000 >> 10),
+ (0x100000 - 0xc0000) >> 10);
+
+ chromeos_reserve_ram_oops(dev, index++);
+}
+
+static void systemagent_read_resources(device_t dev)
+{
+ /* Read standard PCI resources. */
+ pci_dev_read_resources(dev);
+
+ /* Add all fixed MMIO resources. */
+ mc_add_fixed_mmio_resources(dev);
+
+ /* Calculate and add DRAM resources. */
+ mc_add_dram_resources(dev);
+}
+
+static void systemagent_init(struct device *dev)
+{
+ u8 bios_reset_cpl, pair;
+
+ /* Enable Power Aware Interrupt Routing */
+ pair = MCHBAR8(MCH_PAIR);
+ pair &= ~0x7; /* Clear 2:0 */
+ pair |= 0x4; /* Fixed Priority */
+ MCHBAR8(MCH_PAIR) = pair;
+
+ /*
+ * Set bits 0+1 of BIOS_RESET_CPL to indicate to the CPU
+ * that BIOS has initialized memory and power management
+ */
+ bios_reset_cpl = MCHBAR8(BIOS_RESET_CPL);
+ bios_reset_cpl |= 3;
+ MCHBAR8(BIOS_RESET_CPL) = bios_reset_cpl;
+ printk(BIOS_DEBUG, "Set BIOS_RESET_CPL\n");
+
+ /* Configure turbo power limits 1ms after reset complete bit */
+ mdelay(1);
+ set_power_limits(28);
+}
+
+static void systemagent_enable(device_t dev)
+{
+#if CONFIG_HAVE_ACPI_RESUME
+ struct romstage_handoff *handoff;
+
+ handoff = cbmem_find(CBMEM_ID_ROMSTAGE_INFO);
+
+ if (handoff == NULL) {
+ printk(BIOS_DEBUG, "Unknown boot method, assuming normal.\n");
+ acpi_slp_type = 0;
+ } else if (handoff->s3_resume) {
+ printk(BIOS_DEBUG, "S3 Resume.\n");
+ acpi_slp_type = 3;
+ } else {
+ printk(BIOS_DEBUG, "Normal boot.\n");
+ acpi_slp_type = 0;
+ }
+#endif
+}
+
+static struct device_operations systemagent_ops = {
+ .read_resources = &systemagent_read_resources,
+ .set_resources = &pci_dev_set_resources,
+ .enable_resources = &pci_dev_enable_resources,
+ .init = &systemagent_init,
+ .enable = &systemagent_enable,
+ .ops_pci = &broadwell_pci_ops,
+};
+
+static const unsigned short systemagent_ids[] = {
+ 0x0a04, /* Haswell ULT */
+ 0x1604, /* Broadwell-U/Y */
+ 0x1610, /* Broadwell-H Desktop */
+ 0x1614, /* Broadwell-H Mobile */
+ 0
+};
+
+static const struct pci_driver systemagent_driver __pci_driver = {
+ .ops = &systemagent_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = systemagent_ids
+};
diff --git a/src/soc/intel/broadwell/tsc_freq.c b/src/soc/intel/broadwell/tsc_freq.c
new file mode 100644
index 0000000..80dd989
--- /dev/null
+++ b/src/soc/intel/broadwell/tsc_freq.c
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdint.h>
+#include <cpu/x86/msr.h>
+#include <cpu/x86/tsc.h>
+#include <broadwell/cpu.h>
+#include <broadwell/msr.h>
+
+unsigned long tsc_freq_mhz(void)
+{
+ msr_t platform_info;
+
+ platform_info = rdmsr(MSR_PLATFORM_INFO);
+ return CPU_BCLK * ((platform_info.lo >> 8) & 0xff);
+}
diff --git a/src/soc/intel/broadwell/xhci.c b/src/soc/intel/broadwell/xhci.c
new file mode 100644
index 0000000..89e1139
--- /dev/null
+++ b/src/soc/intel/broadwell/xhci.c
@@ -0,0 +1,203 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <delay.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <arch/io.h>
+#include <broadwell/ramstage.h>
+#include <broadwell/xhci.h>
+
+#ifdef __SMM__
+static u32 usb_xhci_mem_base(device_t dev)
+{
+ u32 mem_base = pci_read_config32(dev, PCI_BASE_ADDRESS_0);
+
+ /* Check if the controller is disabled or not present */
+ if (mem_base == 0 || mem_base == 0xffffffff)
+ return 0;
+
+ return mem_base & ~0xf;
+}
+
+static int usb_xhci_port_count_usb3(device_t dev)
+{
+ /* PCH-LP has 4 SS ports */
+ return 4;
+}
+
+static void usb_xhci_reset_status_usb3(u32 mem_base, int port)
+{
+ u32 portsc = mem_base + XHCI_USB3_PORTSC(port);
+ u32 status = read32(portsc);
+ /* Do not set Port Enabled/Disabled field */
+ status &= ~XHCI_USB3_PORTSC_PED;
+ /* Clear all change status bits */
+ status |= XHCI_USB3_PORTSC_CHST;
+ write32(portsc, status);
+}
+
+static void usb_xhci_reset_port_usb3(u32 mem_base, int port)
+{
+ u32 portsc = mem_base + XHCI_USB3_PORTSC(port);
+ write32(portsc, read32(portsc) | XHCI_USB3_PORTSC_WPR);
+}
+
+#define XHCI_RESET_DELAY_US 1000 /* 1ms */
+#define XHCI_RESET_TIMEOUT 100 /* 100ms */
+
+/*
+ * 1) Wait until port is done polling
+ * 2) If port is disconnected
+ * a) Issue warm port reset
+ * b) Poll for warm reset complete
+ * c) Write 1 to port change status bits
+ */
+static void usb_xhci_reset_usb3(device_t dev, int all)
+{
+ u32 status, port_disabled;
+ int timeout, port;
+ int port_count = usb_xhci_port_count_usb3(dev);
+ u32 mem_base = usb_xhci_mem_base(dev);
+
+ if (!mem_base || !port_count)
+ return;
+
+ /* Get mask of disabled ports */
+ port_disabled = pci_read_config32(dev, XHCI_USB3PDO);
+
+ /* Wait until all enabled ports are done polling */
+ for (timeout = XHCI_RESET_TIMEOUT; timeout; timeout--) {
+ int complete = 1;
+ for (port = 0; port < port_count; port++) {
+ /* Skip disabled ports */
+ if (port_disabled & (1 << port))
+ continue;
+ /* Read port link status field */
+ status = read32(mem_base + XHCI_USB3_PORTSC(port));
+ status &= XHCI_USB3_PORTSC_PLS;
+ if (status == XHCI_PLSR_POLLING)
+ complete = 0;
+ }
+ /* Exit if all ports not polling */
+ if (complete)
+ break;
+ udelay(XHCI_RESET_DELAY_US);
+ }
+
+ /* Reset all requested ports */
+ for (port = 0; port < port_count; port++) {
+ u32 portsc = mem_base + XHCI_USB3_PORTSC(port);
+ /* Skip disabled ports */
+ if (port_disabled & (1 << port))
+ continue;
+ status = read32(portsc) & XHCI_USB3_PORTSC_PLS;
+ /* Reset all or only disconnected ports */
+ if (all || (status == XHCI_PLSR_RXDETECT ||
+ status == XHCI_PLSR_POLLING))
+ usb_xhci_reset_port_usb3(mem_base, port);
+ else
+ port_disabled |= 1 << port;
+ }
+
+ /* Wait for warm reset complete on all reset ports */
+ for (timeout = XHCI_RESET_TIMEOUT; timeout; timeout--) {
+ int complete = 1;
+ for (port = 0; port < port_count; port++) {
+ /* Only check ports that were reset */
+ if (port_disabled & (1 << port))
+ continue;
+ /* Check if warm reset is complete */
+ status = read32(mem_base + XHCI_USB3_PORTSC(port));
+ if (!(status & XHCI_USB3_PORTSC_WRC))
+ complete = 0;
+ }
+ /* Check for warm reset complete in any port */
+ if (complete)
+ break;
+ udelay(XHCI_RESET_DELAY_US);
+ }
+
+ /* Clear port change status bits */
+ for (port = 0; port < port_count; port++)
+ usb_xhci_reset_status_usb3(mem_base, port);
+}
+
+/* Handler for XHCI controller on entry to S3/S4/S5 */
+void usb_xhci_sleep_prepare(device_t dev, u8 slp_typ)
+{
+ u16 reg16;
+ u32 reg32;
+ u32 mem_base = usb_xhci_mem_base(dev);
+
+ if (!mem_base || slp_typ < 3)
+ return;
+
+ /* Set D0 state */
+ reg16 = pci_read_config16(dev, XHCI_PWR_CTL_STS);
+ reg16 &= ~XHCI_PWR_CTL_SET_MASK;
+ reg16 |= XHCI_PWR_CTL_SET_D0;
+ pci_write_config16(dev, XHCI_PWR_CTL_STS, reg16);
+
+ /* Clear PCI 0xB0[14:13] */
+ reg32 = pci_read_config32(dev, 0xb0);
+ reg32 &= ~((1 << 14) | (1 << 13));
+ pci_write_config32(dev, 0xb0, reg32);
+
+ /* Clear MMIO 0x816c[14,2] */
+ reg32 = read32(mem_base + 0x816c);
+ reg32 &= ~((1 << 14) | (1 << 2));
+ write32(mem_base + 0x816c, reg32);
+
+ /* Reset disconnected USB3 ports */
+ usb_xhci_reset_usb3(dev, 0);
+
+ /* Set MMIO 0x80e0[15] */
+ reg32 = read32(mem_base + 0x80e0);
+ reg32 |= (1 << 15);
+ write32(mem_base + 0x80e0, reg32);
+
+ /* Set D3Hot state and enable PME */
+ pci_or_config16(dev, XHCI_PWR_CTL_STS, XHCI_PWR_CTL_SET_D3);
+ pci_or_config16(dev, XHCI_PWR_CTL_STS, XHCI_PWR_CTL_STATUS_PME);
+ pci_or_config16(dev, XHCI_PWR_CTL_STS, XHCI_PWR_CTL_ENABLE_PME);
+}
+#else /* !__SMM__ */
+
+static struct device_operations usb_xhci_ops = {
+ .read_resources = &pci_dev_read_resources,
+ .set_resources = &pci_dev_set_resources,
+ .enable_resources = &pci_dev_enable_resources,
+ .ops_pci = &broadwell_pci_ops,
+};
+
+static const unsigned short pci_device_ids[] = {
+ 0x9c31, /* LynxPoint-LP */
+ 0x9cb1, /* WildcatPoint */
+ 0
+};
+
+static const struct pci_driver pch_usb_xhci __pci_driver = {
+ .ops = &usb_xhci_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .devices = pci_device_ids,
+};
+#endif /* !__SMM__ */
Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6963
-gerrit
commit 166aab60c37bacf4827df467ed212f2297ace795
Author: Furquan Shaikh <furquan(a)google.com>
Date: Wed Mar 19 14:29:48 2014 -0700
ipq806x: Add generic support skeleton for ipq806x
Skeleton for soc ipq806x
Old-Change-Id: I92a8d592d762f59665e15d1a7fc6cc73dc74c296
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
Reviewed-on: https://chromium-review.googlesource.com/190723
Reviewed-by: Vadim Bendebury <vbendeb(a)chromium.org>
Commit-Queue: Furquan Shaikh <furquan(a)chromium.org>
Tested-by: Furquan Shaikh <furquan(a)chromium.org>
(cherry picked from commit e71d45733d86e77717fd2f592ef06113246db911)
soc/ipq806x: Disable LPAE mode.
LPAE (large physical address extension) is not available on this SOC
core, do not enable it.
Old-Change-Id: I9e9ad1aeaf613f04987c0c306a574085042d0e7b
Signed-off-by: Deepa Dinamani <deepad(a)codeaurora.com>
Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/198023
Reviewed-by: deepa dinamani <deepad(a)quicinc.com>
(cherry picked from commit e6e12c39efd54e4fcbd444134bf30e211948a71b)
Squashed 2 commits for the Qualcomm ipq806x SOC.
Change-Id: I14521d3b2844ddd68112882de81453ce8d19fc16
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
src/soc/Kconfig | 3 ++-
src/soc/Makefile.inc | 1 +
src/soc/qualcomm/Kconfig | 1 +
src/soc/qualcomm/Makefile.inc | 1 +
src/soc/qualcomm/ipq806x/Kconfig | 22 ++++++++++++++++++++++
src/soc/qualcomm/ipq806x/Makefile.inc | 8 ++++++++
src/soc/qualcomm/ipq806x/cbfs.c | 26 ++++++++++++++++++++++++++
src/soc/qualcomm/ipq806x/timer.c | 28 ++++++++++++++++++++++++++++
8 files changed, 89 insertions(+), 1 deletion(-)
diff --git a/src/soc/Kconfig b/src/soc/Kconfig
index 5903a57..53d7b90 100644
--- a/src/soc/Kconfig
+++ b/src/soc/Kconfig
@@ -1,3 +1,4 @@
source src/soc/intel/Kconfig
source src/soc/nvidia/Kconfig
-source src/soc/samsung/Kconfig
\ No newline at end of file
+source src/soc/qualcomm/Kconfig
+source src/soc/samsung/Kconfig
diff --git a/src/soc/Makefile.inc b/src/soc/Makefile.inc
index b36d5be..6939346 100644
--- a/src/soc/Makefile.inc
+++ b/src/soc/Makefile.inc
@@ -3,4 +3,5 @@
################################################################################
subdirs-y += intel
subdirs-y += nvidia
+subdirs-y += qualcomm
subdirs-y += samsung
diff --git a/src/soc/qualcomm/Kconfig b/src/soc/qualcomm/Kconfig
new file mode 100644
index 0000000..b7a12d4
--- /dev/null
+++ b/src/soc/qualcomm/Kconfig
@@ -0,0 +1 @@
+source src/soc/qualcomm/ipq806x/Kconfig
diff --git a/src/soc/qualcomm/Makefile.inc b/src/soc/qualcomm/Makefile.inc
new file mode 100644
index 0000000..06b2f2f
--- /dev/null
+++ b/src/soc/qualcomm/Makefile.inc
@@ -0,0 +1 @@
+subdirs-$(CONFIG_SOC_QC_IPQ806X) += ipq806x
diff --git a/src/soc/qualcomm/ipq806x/Kconfig b/src/soc/qualcomm/ipq806x/Kconfig
new file mode 100644
index 0000000..fcf8ccd
--- /dev/null
+++ b/src/soc/qualcomm/ipq806x/Kconfig
@@ -0,0 +1,22 @@
+config SOC_QC_IPQ806X
+ select ARCH_BOOTBLOCK_ARMV4
+ select ARCH_ROMSTAGE_ARMV7
+ select ARCH_RAMSTAGE_ARMV7
+ bool
+ default n
+
+if SOC_QC_IPQ806X
+
+config BOOTBLOCK_ROM_OFFSET
+ hex
+ default 0x0
+
+config CBFS_HEADER_ROM_OFFSET
+ hex "offset of master CBFS header in ROM"
+ default 0x18000
+
+config CBFS_ROM_OFFSET
+ hex "offset of CBFS data in ROM"
+ default 0x18080
+
+endif
diff --git a/src/soc/qualcomm/ipq806x/Makefile.inc b/src/soc/qualcomm/ipq806x/Makefile.inc
new file mode 100644
index 0000000..be37581
--- /dev/null
+++ b/src/soc/qualcomm/ipq806x/Makefile.inc
@@ -0,0 +1,8 @@
+bootblock-y += cbfs.c
+bootblock-y += timer.c
+
+romstage-y += cbfs.c
+romstage-y += timer.c
+
+ramstage-y += cbfs.c
+ramstage-y += timer.c
diff --git a/src/soc/qualcomm/ipq806x/cbfs.c b/src/soc/qualcomm/ipq806x/cbfs.c
new file mode 100644
index 0000000..97ae548
--- /dev/null
+++ b/src/soc/qualcomm/ipq806x/cbfs.c
@@ -0,0 +1,26 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+#include <cbfs.h> /* This driver serves as a CBFS media source. */
+
+int init_default_cbfs_media(struct cbfs_media *media)
+{
+ return 0;
+}
diff --git a/src/soc/qualcomm/ipq806x/timer.c b/src/soc/qualcomm/ipq806x/timer.c
new file mode 100644
index 0000000..c4e250e
--- /dev/null
+++ b/src/soc/qualcomm/ipq806x/timer.c
@@ -0,0 +1,28 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2013 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <console/console.h>
+#include <timer.h>
+#include <delay.h>
+#include <thread.h>
+
+void init_timer(void)
+{
+}
+
Vladimir Serbinenko (phcoder(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6948
-gerrit
commit 8fa479c9bae31029e6cb073848325d8066154bc9
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Sun Sep 21 14:31:19 2014 +0200
NOTFORMERGE: amdk8: Move to per-device ACPI
Change-Id: I485791015aa7eaabba53813945c216f5725554b1
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
---
src/mainboard/amd/dbm690t/acpi_tables.c | 108 +------------
src/mainboard/amd/mahogany/acpi_tables.c | 159 +------------------
src/mainboard/amd/mahogany_fam10/acpi_tables.c | 6 -
src/mainboard/amd/pistachio/acpi_tables.c | 107 +------------
src/mainboard/amd/serengeti_cheetah/acpi_tables.c | 102 +-----------
src/mainboard/amd/serengeti_cheetah/mainboard.c | 15 ++
src/mainboard/amd/serengeti_cheetah/mainboard.h | 1 +
src/mainboard/amd/tilapia_fam10/acpi_tables.c | 6 -
src/mainboard/asrock/939a785gmh/acpi_tables.c | 159 +------------------
src/mainboard/asus/a8n_e/acpi_tables.c | 137 ----------------
src/mainboard/asus/a8v-e_deluxe/acpi_tables.c | 93 +----------
src/mainboard/asus/a8v-e_deluxe/dsdt.asl | 7 -
src/mainboard/asus/a8v-e_se/acpi_tables.c | 109 +------------
src/mainboard/asus/k8v-x/acpi_tables.c | 109 +------------
src/mainboard/asus/m2v-mx_se/acpi_tables.c | 129 +--------------
src/mainboard/asus/m2v/acpi_tables.c | 130 +---------------
src/mainboard/asus/m4a78-em/acpi_tables.c | 6 -
src/mainboard/asus/m4a785-m/acpi_tables.c | 8 -
src/mainboard/gigabyte/m57sli/acpi_tables.c | 117 --------------
src/mainboard/gigabyte/ma785gm/acpi_tables.c | 6 -
src/mainboard/gigabyte/ma785gmt/acpi_tables.c | 6 -
src/mainboard/gigabyte/ma78gm/acpi_tables.c | 6 -
src/mainboard/hp/dl145_g1/acpi_tables.c | 173 +--------------------
src/mainboard/iei/kino-780am2-fam10/acpi_tables.c | 6 -
src/mainboard/iwill/dk8_htx/acpi_tables.c | 109 +------------
src/mainboard/iwill/dk8_htx/mainboard.c | 17 ++
src/mainboard/iwill/dk8_htx/mainboard.h | 1 +
src/mainboard/jetway/pa78vm5/acpi_tables.c | 6 -
src/mainboard/kontron/kt690/acpi_tables.c | 107 +------------
src/mainboard/msi/ms7135/acpi_tables.c | 138 ----------------
src/mainboard/msi/ms9652_fam10/acpi_tables.c | 6 -
src/mainboard/siemens/sitemp_g1p1/acpi_tables.c | 166 ++------------------
src/mainboard/siemens/sitemp_g1p1/dsdt.asl | 4 +-
src/mainboard/siemens/sitemp_g1p1/mainboard.c | 2 +
src/mainboard/siemens/sitemp_g1p1/mainboard.h | 1 +
src/mainboard/supermicro/h8scm_fam10/acpi_tables.c | 6 -
src/mainboard/technexion/tim5690/acpi_tables.c | 107 +------------
src/mainboard/technexion/tim8690/acpi_tables.c | 107 +------------
src/mainboard/tyan/s2891/acpi_tables.c | 114 +-------------
src/mainboard/tyan/s2891/mainboard.c | 23 +++
src/mainboard/tyan/s2892/acpi_tables.c | 114 +-------------
src/mainboard/tyan/s2892/mainboard.c | 23 +++
src/mainboard/tyan/s2895/acpi_tables.c | 114 +-------------
src/mainboard/tyan/s2895/mainboard.c | 23 +++
src/mainboard/winent/mb6047/acpi_tables.c | 114 +-------------
src/mainboard/winent/mb6047/mainboard.c | 23 +++
src/northbridge/amd/amdk8/Kconfig | 1 +
src/northbridge/amd/amdk8/acpi.c | 8 +-
src/northbridge/amd/amdk8/acpi.h | 2 +-
src/northbridge/amd/amdk8/northbridge.c | 36 +++++
src/southbridge/amd/amd8111/lpc.c | 31 ++++
src/southbridge/amd/rs690/ht.c | 18 +++
src/southbridge/amd/sb600/lpc.c | 19 +++
src/southbridge/amd/sb700/lpc.c | 25 ++-
src/southbridge/nvidia/ck804/ht.c | 27 ++++
src/southbridge/nvidia/ck804/lpc.c | 4 +
src/southbridge/nvidia/mcp55/ht.c | 9 ++
src/southbridge/nvidia/mcp55/lpc.c | 20 +++
src/southbridge/via/k8t890/traf_ctrl.c | 41 +++++
59 files changed, 426 insertions(+), 2845 deletions(-)
diff --git a/src/mainboard/amd/dbm690t/acpi_tables.c b/src/mainboard/amd/dbm690t/acpi_tables.c
index 87ff5ea..da75062 100644
--- a/src/mainboard/amd/dbm690t/acpi_tables.c
+++ b/src/mainboard/amd/dbm690t/acpi_tables.c
@@ -28,28 +28,11 @@
#include <cpu/amd/amdk8_sysconf.h>
#include "northbridge/amd/amdk8/acpi.h"
#include <arch/cpu.h>
-#include <cpu/amd/model_fxx_powernow.h>
-
-extern u16 pm_base;
-
-/*
-* Assume the max pstate number is 8
-* 0x21(33 bytes) is one package length of _PSS package
-*/
-
-#define Maxpstate 8
-#define Defpkglength 0x21
-
-extern const unsigned char AmlCode[];
-
-unsigned long acpi_fill_mcfg(unsigned long current)
-{
- /* Just a dummy */
- return current;
-}
unsigned long acpi_fill_madt(unsigned long current)
{
+ get_bus_conf();
+
/* create all subtables for processors */
current = acpi_create_madt_lapics(current);
@@ -72,90 +55,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current;
}
-
-unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
- k8acpi_write_vars();
- amd_model_fxx_generate_powernow(pm_base + 8, 6, 1);
- return (unsigned long) (acpigen_get_current());
-}
-
-unsigned long write_acpi_tables(unsigned long start)
-{
- unsigned long current;
- acpi_rsdp_t *rsdp;
- acpi_rsdt_t *rsdt;
- acpi_hpet_t *hpet;
- acpi_madt_t *madt;
- acpi_fadt_t *fadt;
- acpi_facs_t *facs;
- acpi_header_t *dsdt;
- acpi_header_t *ssdt;
-
- get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
-
- /* Align ACPI tables to 16byte */
- start = ALIGN(start, 16);
- current = start;
-
- printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
-
- /* We need at least an RSDP and an RSDT Table */
- rsdp = (acpi_rsdp_t *) current;
- current += sizeof(acpi_rsdp_t);
- rsdt = (acpi_rsdt_t *) current;
- current += sizeof(acpi_rsdt_t);
-
- /* clear all table memory */
- memset((void *)start, 0, current - start);
-
- acpi_write_rsdp(rsdp, rsdt, NULL);
- acpi_write_rsdt(rsdt);
-
- /* FACS */
- printk(BIOS_DEBUG, "ACPI: * FACS\n");
- facs = (acpi_facs_t *) current;
- current += sizeof(acpi_facs_t);
- acpi_create_facs(facs);
-
- /* DSDT */
- printk(BIOS_DEBUG, "ACPI: * DSDT\n");
- dsdt = (acpi_header_t *)current;
- memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
- current += dsdt->length;
- memcpy(dsdt, &AmlCode, dsdt->length);
- printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
- /* FADT */
- printk(BIOS_DEBUG, "ACPI: * FADT\n");
- fadt = (acpi_fadt_t *) current;
- current += sizeof(acpi_fadt_t);
-
- acpi_create_fadt(fadt, facs, dsdt);
- acpi_add_table(rsdp, fadt);
-
- /*
- * We explicitly add these tables later on:
- */
- /* If we want to use HPET Timers Linux wants an MADT */
- printk(BIOS_DEBUG, "ACPI: * HPET\n");
- hpet = (acpi_hpet_t *) current;
- current += sizeof(acpi_hpet_t);
- acpi_create_hpet(hpet);
- acpi_add_table(rsdp, hpet);
-
- printk(BIOS_DEBUG, "ACPI: * MADT\n");
- madt = (acpi_madt_t *) current;
- acpi_create_madt(madt);
- current += madt->header.length;
- acpi_add_table(rsdp, madt);
-
- /* SSDT */
- printk(BIOS_DEBUG, "ACPI: * SSDT\n");
- ssdt = (acpi_header_t *)current;
-
- acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR);
- current += ssdt->length;
- acpi_add_table(rsdp, ssdt);
-
- printk(BIOS_INFO, "ACPI: done.\n");
- return current;
-}
diff --git a/src/mainboard/amd/mahogany/acpi_tables.c b/src/mainboard/amd/mahogany/acpi_tables.c
index ef2690a..f7154ad 100644
--- a/src/mainboard/amd/mahogany/acpi_tables.c
+++ b/src/mainboard/amd/mahogany/acpi_tables.c
@@ -28,34 +28,12 @@
#include <cpu/amd/amdk8_sysconf.h>
#include "northbridge/amd/amdk8/acpi.h"
#include <arch/cpu.h>
-#include <cpu/amd/model_fxx_powernow.h>
#include <southbridge/amd/sb700/sb700.h>
-/*
-* Assume the max pstate number is 8
-* 0x21(33 bytes) is one package length of _PSS package
-*/
-
-#define Maxpstate 8
-#define Defpkglength 0x21
-
-extern const unsigned char AmlCode[];
-
-#if CONFIG_ACPI_SSDTX_NUM >= 1
-extern const unsigned char AmlCode_ssdt2[];
-extern const unsigned char AmlCode_ssdt3[];
-extern const unsigned char AmlCode_ssdt4[];
-extern const unsigned char AmlCode_ssdt5[];
-#endif
-
-unsigned long acpi_fill_mcfg(unsigned long current)
-{
- /* Just a dummy */
- return current;
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
+ get_bus_conf();
+
/* create all subtables for processors */
current = acpi_create_madt_lapics(current);
@@ -78,136 +56,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current;
}
-
-unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
- k8acpi_write_vars();
- amd_model_fxx_generate_powernow(ACPI_CPU_CONTROL, 6, 1);
- return (unsigned long) (acpigen_get_current());
-}
-
-unsigned long write_acpi_tables(unsigned long start)
-{
- unsigned long current;
- acpi_rsdp_t *rsdp;
- acpi_rsdt_t *rsdt;
- acpi_hpet_t *hpet;
- acpi_madt_t *madt;
- acpi_fadt_t *fadt;
- acpi_facs_t *facs;
- acpi_header_t *dsdt;
- acpi_header_t *ssdt;
-#if CONFIG_ACPI_SSDTX_NUM >= 1
- acpi_header_t *ssdtx;
- void *p;
- int i;
-#endif
-
- get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
-
- /* Align ACPI tables to 16 bytes */
- start = ALIGN(start, 16);
- current = start;
-
- printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
-
- /* We need at least an RSDP and an RSDT Table */
- rsdp = (acpi_rsdp_t *) current;
- current += sizeof(acpi_rsdp_t);
- rsdt = (acpi_rsdt_t *) current;
- current += sizeof(acpi_rsdt_t);
-
- /* clear all table memory */
- memset((void *)start, 0, current - start);
-
- acpi_write_rsdp(rsdp, rsdt, NULL);
- acpi_write_rsdt(rsdt);
-
- /* FACS */
- printk(BIOS_DEBUG, "ACPI: * FACS\n");
- facs = (acpi_facs_t *) current;
- current += sizeof(acpi_facs_t);
- acpi_create_facs(facs);
-
- /* DSDT */
- printk(BIOS_DEBUG, "ACPI: * DSDT\n");
- dsdt = (acpi_header_t *)current;
- memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
- current += dsdt->length;
- memcpy(dsdt, &AmlCode, dsdt->length);
- printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
- /* FADT */
- printk(BIOS_DEBUG, "ACPI: * FADT\n");
- fadt = (acpi_fadt_t *) current;
- current += sizeof(acpi_fadt_t);
-
- acpi_create_fadt(fadt, facs, dsdt);
- acpi_add_table(rsdp, fadt);
-
- /*
- * We explicitly add these tables later on:
- */
- /* If we want to use HPET Timers Linux wants an MADT */
- printk(BIOS_DEBUG, "ACPI: * HPET\n");
- hpet = (acpi_hpet_t *) current;
- current += sizeof(acpi_hpet_t);
- acpi_create_hpet(hpet);
- acpi_add_table(rsdp, hpet);
-
- printk(BIOS_DEBUG, "ACPI: * MADT\n");
- madt = (acpi_madt_t *) current;
- acpi_create_madt(madt);
- current += madt->header.length;
- acpi_add_table(rsdp, madt);
-
- /* SSDT */
- printk(BIOS_DEBUG, "ACPI: * SSDT\n");
- ssdt = (acpi_header_t *)current;
-
- acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR);
- current += ssdt->length;
- acpi_add_table(rsdp, ssdt);
-
-#if CONFIG_ACPI_SSDTX_NUM >= 1
-
- /* same htio, but different position? We may have to copy, change HCIN, and recalculate the checknum and add_table */
-
- for (i = 1; i < sysconf.hc_possible_num; i++) { /* 0: is hc sblink */
- if ((sysconf.pci1234[i] & 1) != 1)
- continue;
- u8 c;
- if (i < 7) {
- c = (u8) ('4' + i - 1);
- } else {
- c = (u8) ('A' + i - 1 - 6);
- }
- printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c Aka hcid = %d\n", c, sysconf.hcid[i]); /* pci0 and pci1 are in dsdt */
- current = ALIGN(current, 8);
- ssdtx = (acpi_header_t *) current;
- switch (sysconf.hcid[i]) {
- case 1: /* 8132 */
- p = &AmlCode_ssdt2;
- break;
- case 2: /* 8151 */
- p = &AmlCode_ssdt3;
- break;
- case 3: /* 8131 */
- p = &AmlCode_ssdt4;
- break;
- default:
- /* HTX no io apic */
- p = &AmlCode_ssdt5;
- break;
- }
- memcpy(ssdtx, p, sizeof(acpi_header_t));
- current += ssdtx->length;
- memcpy(ssdtx, p, ssdtx->length);
- update_ssdtx((void *)ssdtx, i);
- ssdtx->checksum = 0;
- ssdtx->checksum = acpi_checksum((u8 *)ssdtx, ssdtx->length);
- acpi_add_table(rsdp, ssdtx);
- }
-#endif
-
- printk(BIOS_INFO, "ACPI: done.\n");
- return current;
-}
diff --git a/src/mainboard/amd/mahogany_fam10/acpi_tables.c b/src/mainboard/amd/mahogany_fam10/acpi_tables.c
index 01172ad..5efb0ee 100644
--- a/src/mainboard/amd/mahogany_fam10/acpi_tables.c
+++ b/src/mainboard/amd/mahogany_fam10/acpi_tables.c
@@ -60,12 +60,6 @@ unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_ta
return (unsigned long) (acpigen_get_current());
}
-unsigned long acpi_fill_mcfg(unsigned long current)
-{
- /* Just a dummy */
- return current;
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* create all subtables for processors */
diff --git a/src/mainboard/amd/pistachio/acpi_tables.c b/src/mainboard/amd/pistachio/acpi_tables.c
index 5ef0da5..2a587cd 100644
--- a/src/mainboard/amd/pistachio/acpi_tables.c
+++ b/src/mainboard/amd/pistachio/acpi_tables.c
@@ -30,26 +30,10 @@
#include <arch/cpu.h>
#include <cpu/amd/model_fxx_powernow.h>
-extern u16 pm_base;
-
-/*
-* Assume the max pstate number is 8
-* 0x21(33 bytes) is one package length of _PSS package
-*/
-
-#define Maxpstate 8
-#define Defpkglength 0x21
-
-extern const unsigned char AmlCode[];
-
-unsigned long acpi_fill_mcfg(unsigned long current)
-{
- /* Just a dummy */
- return current;
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
+ get_bus_conf();
+
/* create all subtables for processors */
current = acpi_create_madt_lapics(current);
@@ -73,90 +57,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current;
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
- k8acpi_write_vars();
- amd_model_fxx_generate_powernow(pm_base + 8, 6, 1);
- return (unsigned long) (acpigen_get_current());
-}
-
-unsigned long write_acpi_tables(unsigned long start)
-{
- unsigned long current;
- acpi_rsdp_t *rsdp;
- acpi_rsdt_t *rsdt;
- acpi_hpet_t *hpet;
- acpi_madt_t *madt;
- acpi_fadt_t *fadt;
- acpi_facs_t *facs;
- acpi_header_t *dsdt;
- acpi_header_t *ssdt;
-
- get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
-
- /* Align ACPI tables to 16byte */
- start = ALIGN(start, 16);
- current = start;
-
- printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
-
- /* We need at least an RSDP and an RSDT Table */
- rsdp = (acpi_rsdp_t *) current;
- current += sizeof(acpi_rsdp_t);
- rsdt = (acpi_rsdt_t *) current;
- current += sizeof(acpi_rsdt_t);
-
- /* clear all table memory */
- memset((void *)start, 0, current - start);
-
- acpi_write_rsdp(rsdp, rsdt, NULL);
- acpi_write_rsdt(rsdt);
-
- /* FACS */
- printk(BIOS_DEBUG, "ACPI: * FACS\n");
- facs = (acpi_facs_t *) current;
- current += sizeof(acpi_facs_t);
- acpi_create_facs(facs);
-
- /* DSDT */
- printk(BIOS_DEBUG, "ACPI: * DSDT\n");
- dsdt = (acpi_header_t *) current;
- memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
- current += dsdt->length;
- memcpy(dsdt, &AmlCode, dsdt->length);
-
- printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
- /* FADT */
- printk(BIOS_DEBUG, "ACPI: * FADT\n");
- fadt = (acpi_fadt_t *) current;
- current += sizeof(acpi_fadt_t);
-
- acpi_create_fadt(fadt, facs, dsdt);
- acpi_add_table(rsdp, fadt);
-
- /*
- * We explicitly add these tables later on:
- */
- /* If we want to use HPET Timers Linux wants an MADT */
- printk(BIOS_DEBUG, "ACPI: * HPET\n");
- hpet = (acpi_hpet_t *) current;
- current += sizeof(acpi_hpet_t);
- acpi_create_hpet(hpet);
- acpi_add_table(rsdp, hpet);
-
- printk(BIOS_DEBUG, "ACPI: * MADT\n");
- madt = (acpi_madt_t *) current;
- acpi_create_madt(madt);
- current += madt->header.length;
- acpi_add_table(rsdp, madt);
-
- /* SSDT */
- printk(BIOS_DEBUG, "ACPI: * SSDT\n");
- ssdt = (acpi_header_t *)current;
-
- acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR);
- current += ssdt->length;
- acpi_add_table(rsdp, ssdt);
-
- printk(BIOS_INFO, "ACPI: done.\n");
- return current;
-}
diff --git a/src/mainboard/amd/serengeti_cheetah/acpi_tables.c b/src/mainboard/amd/serengeti_cheetah/acpi_tables.c
index a429c1f..65b8fc5 100644
--- a/src/mainboard/amd/serengeti_cheetah/acpi_tables.c
+++ b/src/mainboard/amd/serengeti_cheetah/acpi_tables.c
@@ -19,19 +19,11 @@
#include <cpu/amd/amdk8_sysconf.h>
#include "northbridge/amd/amdk8/acpi.h"
#include "mb_sysconf.h"
+#include "mainboard.h"
-extern const unsigned char AmlCode[];
-#if CONFIG_ACPI_SSDTX_NUM >= 1
extern const unsigned char AmlCode_ssdt2[];
extern const unsigned char AmlCode_ssdt3[];
extern const unsigned char AmlCode_ssdt4[];
-#endif
-
-unsigned long acpi_fill_mcfg(unsigned long current)
-{
- /* Just a dummy */
- return current;
-}
unsigned long acpi_fill_madt(unsigned long current)
{
@@ -130,24 +122,9 @@ unsigned long acpi_fill_madt(unsigned long current)
return current;
}
-unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
- k8acpi_write_vars();
- return (unsigned long) (acpigen_get_current());
-}
-
-unsigned long write_acpi_tables(unsigned long start)
+unsigned long mainboard_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp)
{
unsigned long current;
- acpi_rsdp_t *rsdp;
- acpi_rsdt_t *rsdt;
- acpi_hpet_t *hpet;
- acpi_madt_t *madt;
- acpi_srat_t *srat;
- acpi_slit_t *slit;
- acpi_fadt_t *fadt;
- acpi_facs_t *facs;
- acpi_header_t *dsdt;
- acpi_header_t *ssdt;
acpi_header_t *ssdtx;
void *p;
@@ -159,80 +136,6 @@ unsigned long write_acpi_tables(unsigned long start)
start = ALIGN(start, 16);
current = start;
- printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
-
- /* We need at least an RSDP and an RSDT Table */
- rsdp = (acpi_rsdp_t *) current;
- current += sizeof(acpi_rsdp_t);
- rsdt = (acpi_rsdt_t *) current;
- current += sizeof(acpi_rsdt_t);
-
- /* clear all table memory */
- memset((void *)start, 0, current - start);
-
- acpi_write_rsdp(rsdp, rsdt, NULL);
- acpi_write_rsdt(rsdt);
-
- /* FACS */
- printk(BIOS_DEBUG, "ACPI: * FACS\n");
- facs = (acpi_facs_t *) current;
- current += sizeof(acpi_facs_t);
- acpi_create_facs(facs);
-
- /* DSDT */
- printk(BIOS_DEBUG, "ACPI: * DSDT at %lx\n", current);
- dsdt = (acpi_header_t *)current;
- memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
- current += dsdt->length;
- memcpy(dsdt, &AmlCode, dsdt->length);
- printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
-
- /* FADT */
- printk(BIOS_DEBUG, "ACPI: * FADT at %lx\n", current);
- fadt = (acpi_fadt_t *) current;
- current += sizeof(acpi_fadt_t);
-
- acpi_create_fadt(fadt, facs, dsdt);
- acpi_add_table(rsdp, fadt);
-
- /*
- * We explicitly add these tables later on:
- */
- printk(BIOS_DEBUG, "ACPI: * HPET at %lx\n", current);
- hpet = (acpi_hpet_t *) current;
- current += sizeof(acpi_hpet_t);
- acpi_create_hpet(hpet);
- acpi_add_table(rsdp, hpet);
-
- /* If we want to use HPET Timers Linux wants an MADT */
- printk(BIOS_DEBUG, "ACPI: * MADT at %lx\n", current);
- madt = (acpi_madt_t *) current;
- acpi_create_madt(madt);
- current+=madt->header.length;
- acpi_add_table(rsdp, madt);
-
- /* SRAT */
- printk(BIOS_DEBUG, "ACPI: * SRAT at %lx\n", current);
- srat = (acpi_srat_t *) current;
- acpi_create_srat(srat);
- current+=srat->header.length;
- acpi_add_table(rsdp, srat);
-
- /* SLIT */
- printk(BIOS_DEBUG, "ACPI: * SLIT at %lx\n", current);
- slit = (acpi_slit_t *) current;
- acpi_create_slit(slit);
- current+=slit->header.length;
- acpi_add_table(rsdp, slit);
-
- /* SSDT */
- printk(BIOS_DEBUG, "ACPI: * SSDT at %lx\n", current);
- ssdt = (acpi_header_t *)current;
-
- acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR);
- current += ssdt->length;
- acpi_add_table(rsdp, ssdt);
-
#if CONFIG_ACPI_SSDTX_NUM >= 1
//same htio, but different position? We may have to copy, change HCIN, and recalculate the checknum and add_table
@@ -272,6 +175,5 @@ unsigned long write_acpi_tables(unsigned long start)
}
#endif
- printk(BIOS_INFO, "ACPI: done.\n");
return current;
}
diff --git a/src/mainboard/amd/serengeti_cheetah/mainboard.c b/src/mainboard/amd/serengeti_cheetah/mainboard.c
new file mode 100644
index 0000000..b9c88f6
--- /dev/null
+++ b/src/mainboard/amd/serengeti_cheetah/mainboard.c
@@ -0,0 +1,15 @@
+#include <console/console.h>
+#include <device/device.h>
+#include <arch/acpi.h>
+#include <arch/acpi.h>
+#include <arch/acpigen.h>
+#include "mainboard.h"
+
+static void mainboard_enable(device_t dev)
+{
+ dev->ops->write_acpi_tables = mainboard_write_acpi_tables;
+}
+
+struct chip_operations mainboard_ops = {
+ .enable_dev = mainboard_enable,
+};
diff --git a/src/mainboard/amd/serengeti_cheetah/mainboard.h b/src/mainboard/amd/serengeti_cheetah/mainboard.h
new file mode 100644
index 0000000..80d8f2a
--- /dev/null
+++ b/src/mainboard/amd/serengeti_cheetah/mainboard.h
@@ -0,0 +1 @@
+unsigned long mainboard_write_acpi_tables(unsigned long start, acpi_rsdp_t *rsdp);
diff --git a/src/mainboard/amd/tilapia_fam10/acpi_tables.c b/src/mainboard/amd/tilapia_fam10/acpi_tables.c
index 898a955..8d7f723 100644
--- a/src/mainboard/amd/tilapia_fam10/acpi_tables.c
+++ b/src/mainboard/amd/tilapia_fam10/acpi_tables.c
@@ -39,12 +39,6 @@ extern const unsigned char AmlCode_ssdt4[];
extern const unsigned char AmlCode_ssdt5[];
#endif
-unsigned long acpi_fill_mcfg(unsigned long current)
-{
- /* Just a dummy */
- return current;
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
/* create all subtables for processors */
diff --git a/src/mainboard/asrock/939a785gmh/acpi_tables.c b/src/mainboard/asrock/939a785gmh/acpi_tables.c
index 52b45f7..2b05888 100644
--- a/src/mainboard/asrock/939a785gmh/acpi_tables.c
+++ b/src/mainboard/asrock/939a785gmh/acpi_tables.c
@@ -31,31 +31,10 @@
#include <cpu/amd/model_fxx_powernow.h>
#include <southbridge/amd/sb700/sb700.h>
-/*
-* Assume the max pstate number is 8
-* 0x21(33 bytes) is one package length of _PSS package
-*/
-
-#define Maxpstate 8
-#define Defpkglength 0x21
-
-extern const unsigned char AmlCode[];
-
-#if CONFIG_ACPI_SSDTX_NUM >= 1
-extern const unsigned char AmlCode_ssdt2[];
-extern const unsigned char AmlCode_ssdt3[];
-extern const unsigned char AmlCode_ssdt4[];
-extern const unsigned char AmlCode_ssdt5[];
-#endif
-
-unsigned long acpi_fill_mcfg(unsigned long current)
-{
- /* Just a dummy */
- return current;
-}
-
unsigned long acpi_fill_madt(unsigned long current)
{
+ get_bus_conf();
+
/* create all subtables for processors */
current = acpi_create_madt_lapics(current);
@@ -78,137 +57,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current;
}
-
-unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
- k8acpi_write_vars();
- amd_model_fxx_generate_powernow(ACPI_CPU_CONTROL, 6, 1);
- return (unsigned long) (acpigen_get_current());
-}
-
-unsigned long write_acpi_tables(unsigned long start)
-{
- unsigned long current;
- acpi_rsdp_t *rsdp;
- acpi_rsdt_t *rsdt;
- acpi_hpet_t *hpet;
- acpi_madt_t *madt;
- acpi_fadt_t *fadt;
- acpi_facs_t *facs;
- acpi_header_t *dsdt;
- acpi_header_t *ssdt;
-#if CONFIG_ACPI_SSDTX_NUM >= 1
- acpi_header_t *ssdtx;
- void *p;
- int i;
-#endif
-
- get_bus_conf(); /* it will get sblk, pci1234, hcdn, and sbdn */
-
- /* Align ACPI tables to 16 bytes */
- start = ALIGN(start, 16);
- current = start;
-
- printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
-
- /* We need at least an RSDP and an RSDT Table */
- rsdp = (acpi_rsdp_t *) current;
- current += sizeof(acpi_rsdp_t);
- rsdt = (acpi_rsdt_t *) current;
- current += sizeof(acpi_rsdt_t);
-
- /* clear all table memory */
- memset((void *)start, 0, current - start);
-
- acpi_write_rsdp(rsdp, rsdt, NULL);
- acpi_write_rsdt(rsdt);
-
- /*
- * We explicitly add these tables later on:
- */
- /* If we want to use HPET Timers Linux wants an MADT */
- printk(BIOS_DEBUG, "ACPI: * HPET\n");
- hpet = (acpi_hpet_t *) current;
- current += sizeof(acpi_hpet_t);
- acpi_create_hpet(hpet);
- acpi_add_table(rsdp, hpet);
-
- printk(BIOS_DEBUG, "ACPI: * MADT\n");
- madt = (acpi_madt_t *) current;
- acpi_create_madt(madt);
- current += madt->header.length;
- acpi_add_table(rsdp, madt);
-
- /* SSDT */
- printk(BIOS_DEBUG, "ACPI: * SSDT\n");
- ssdt = (acpi_header_t *)current;
-
- acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR);
- current += ssdt->length;
- acpi_add_table(rsdp, ssdt);
-
-#if CONFIG_ACPI_SSDTX_NUM >= 1
-
- /* same htio, but different position? We may have to copy, change HCIN, and recalculate the checknum and add_table */
-
- for (i = 1; i < sysconf.hc_possible_num; i++) { /* 0: is hc sblink */
- if ((sysconf.pci1234[i] & 1) != 1)
- continue;
- u8 c;
- if (i < 7) {
- c = (u8) ('4' + i - 1);
- } else {
- c = (u8) ('A' + i - 1 - 6);
- }
- printk(BIOS_DEBUG, "ACPI: * SSDT for PCI%c Aka hcid = %d\n", c, sysconf.hcid[i]); /* pci0 and pci1 are in dsdt */
- current = ALIGN(current, 8);
- ssdtx = (acpi_header_t *) current;
- switch (sysconf.hcid[i]) {
- case 1: /* 8132 */
- p = &AmlCode_ssdt2;
- break;
- case 2: /* 8151 */
- p = &AmlCode_ssdt3;
- break;
- case 3: /* 8131 */
- p = &AmlCode_ssdt4;
- break;
- default:
- /* HTX no io apic */
- p = &AmlCode_ssdt5;
- break;
- }
- memcpy(ssdtx, p, sizeof(acpi_header_t));
- current += ssdtx->length;
- memcpy(ssdtx, p, ssdtx->length);
- update_ssdtx((void *)ssdtx, i);
- ssdtx->checksum = 0;
- ssdtx->checksum = acpi_checksum((u8 *)ssdtx, ssdtx->length);
- acpi_add_table(rsdp, ssdtx);
- }
-#endif
-
- /* FACS */
- printk(BIOS_DEBUG, "ACPI: * FACS\n");
- facs = (acpi_facs_t *) current;
- current += sizeof(acpi_facs_t);
- acpi_create_facs(facs);
-
- /* DSDT */
- printk(BIOS_DEBUG, "ACPI: * DSDT\n");
- dsdt = (acpi_header_t *)current;
- memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
- current += dsdt->length;
- memcpy(dsdt, &AmlCode, dsdt->length);
- printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
- /* FADT */
- printk(BIOS_DEBUG, "ACPI: * FADT\n");
- fadt = (acpi_fadt_t *) current;
- current += sizeof(acpi_fadt_t);
-
- acpi_create_fadt(fadt, facs, dsdt);
- acpi_add_table(rsdp, fadt);
-
-
- printk(BIOS_INFO, "ACPI: done.\n");
- return current;
-}
diff --git a/src/mainboard/asus/a8n_e/acpi_tables.c b/src/mainboard/asus/a8n_e/acpi_tables.c
index ee8e81f..2e06915 100644
--- a/src/mainboard/asus/a8n_e/acpi_tables.c
+++ b/src/mainboard/asus/a8n_e/acpi_tables.c
@@ -21,30 +21,6 @@
#include "../../../northbridge/amd/amdk8/acpi.h"
//#include <cpu/amd/model_fxx_powernow.h>
-extern const unsigned char AmlCode[];
-
-unsigned long acpi_fill_mcfg(unsigned long current)
-{
- device_t dev;
- unsigned long mcfg_base;
-
- dev = dev_find_slot(0x0, PCI_DEVFN(0x0,0));
- if (!dev)
- return current;
-
- mcfg_base = pci_read_config16(dev, 0x90);
- if ((mcfg_base & 0x1000) == 0)
- return current;
-
- mcfg_base = (mcfg_base & 0xf) << 28;
-
- printk(BIOS_INFO, "mcfg_base %lx.\n", mcfg_base);
-
- current += acpi_create_mcfg_mmconfig((acpi_mcfg_mmconfig_t *)
- current, mcfg_base, 0x0, 0x0, 0xff);
- return current;
-}
-
/* APIC */
unsigned long acpi_fill_madt(unsigned long current)
{
@@ -86,116 +62,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current;
}
-
-unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
- k8acpi_write_vars();
- //amd_model_fxx_generate_powernow(0, 0, 0);
- return (unsigned long) (acpigen_get_current());
-}
-
-unsigned long write_acpi_tables(unsigned long start)
-{
- unsigned long current;
- acpi_rsdp_t *rsdp;
- acpi_srat_t *srat;
- acpi_rsdt_t *rsdt;
- acpi_hpet_t *hpet;
- acpi_madt_t *madt;
- acpi_mcfg_t *mcfg;
- acpi_fadt_t *fadt;
- acpi_facs_t *facs;
- acpi_slit_t *slit;
- acpi_header_t *ssdt;
- acpi_header_t *dsdt;
-
- /* Align ACPI tables to 16 byte. */
- start = ALIGN(start, 16);
- current = start;
-
- printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx.\n", start);
-
- /* We need at least an RSDP and an RSDT Table */
- rsdp = (acpi_rsdp_t *) current;
- current += sizeof(acpi_rsdp_t);
-
- current = ALIGN(current, 16);
- rsdt = (acpi_rsdt_t *) current;
- current += sizeof(acpi_rsdt_t);
-
- /* Clear all table memory. */
- memset((void *) start, 0, current - start);
-
- acpi_write_rsdp(rsdp, rsdt, NULL);
- acpi_write_rsdt(rsdt);
-
- current = ALIGN(current, 64);
- facs = (acpi_facs_t *) current;
- printk(BIOS_DEBUG, "ACPI: * FACS %p\n", facs);
- current += sizeof(acpi_facs_t);
- acpi_create_facs(facs);
-
- /* DSDT */
- current = ALIGN(current, 16);
- dsdt = (acpi_header_t *) current;
- printk(BIOS_DEBUG, "ACPI: * DSDT %p\n", dsdt);
- memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
- current += dsdt->length;
- memcpy(dsdt, &AmlCode, dsdt->length);
- printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
-
- current = ALIGN(current, 16);
- fadt = (acpi_fadt_t *) current;
- printk(BIOS_DEBUG, "ACPI: * FACP (FADT) @ %p\n", fadt);
- current += sizeof(acpi_fadt_t);
-
- /* Add FADT now that we have facs and dsdt. */
- acpi_create_fadt(fadt, facs, dsdt);
- acpi_add_table(rsdp, fadt);
-
- current = ALIGN(current, 16);
- mcfg = (acpi_mcfg_t *) current;
- printk(BIOS_DEBUG, "ACPI: * MCFG @ %p\n", mcfg);
- acpi_create_mcfg(mcfg);
- current += mcfg->header.length;
- acpi_add_table(rsdp, mcfg);
-
- current = ALIGN(current, 16);
- hpet = (acpi_hpet_t *) current;
- printk(BIOS_DEBUG, "ACPI: * HPET @ %p\n", hpet);
- acpi_create_hpet(hpet);
- acpi_add_table(rsdp, hpet);
- current += hpet->header.length;
-
- current = ALIGN(current, 16);
- madt = (acpi_madt_t *) current;
- printk(BIOS_DEBUG, "ACPI: * APIC/MADT @ %p\n", madt);
- acpi_create_madt(madt);
- current += madt->header.length;
- acpi_add_table(rsdp, madt);
-
- current = ALIGN(current, 16);
- srat = (acpi_srat_t *) current;
- printk(BIOS_DEBUG, "ACPI: * SRAT @ %p\n", srat);
- acpi_create_srat(srat);
- current += srat->header.length;
- acpi_add_table(rsdp, srat);
-
- /* SLIT */
- current = ALIGN(current, 16);
- slit = (acpi_slit_t *) current;
- printk(BIOS_DEBUG, "ACPI: * SLIT @ %p\n", slit);
- acpi_create_slit(slit);
- current+=slit->header.length;
- acpi_add_table(rsdp,slit);
-
- /* SSDT */
- current = ALIGN(current, 16);
- ssdt = (acpi_header_t *)current;
- printk(BIOS_DEBUG, "ACPI: * SSDT @ %p\n", ssdt);
- acpi_create_ssdt_generator(ssdt, ACPI_TABLE_CREATOR);
- current += ssdt->length;
- acpi_add_table(rsdp, ssdt);
-
- printk(BIOS_INFO, "ACPI: done %p.\n", (void *)current);
- return current;
-}
diff --git a/src/mainboard/asus/a8v-e_deluxe/acpi_tables.c b/src/mainboard/asus/a8v-e_deluxe/acpi_tables.c
index 30914e4..b86e4d2 100644
--- a/src/mainboard/asus/a8v-e_deluxe/acpi_tables.c
+++ b/src/mainboard/asus/a8v-e_deluxe/acpi_tables.c
@@ -31,24 +31,11 @@
#include <device/pci_ids.h>
#include "southbridge/via/vt8237r/vt8237r.h"
#include "southbridge/via/k8t890/k8t890.h"
+#include <cpu/amd/amdk8_sysconf.h>
-extern const unsigned char AmlCode[];
-
-unsigned long acpi_fill_mcfg(unsigned long current)
+void get_bus_conf(void)
{
- device_t dev;
- struct resource *res;
-
- dev = dev_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_K8T890CE_5, 0);
- if (!dev)
- return current;
-
- res = find_resource(dev, K8T890_MMCONFIG_MBAR);
- if (res) {
- current += acpi_create_mcfg_mmconfig((acpi_mcfg_mmconfig_t *)
- current, res->base, 0x0, 0x0, 0xff);
- }
- return current;
+ /* FIXME: implement this. */
}
unsigned long acpi_fill_madt(unsigned long current)
@@ -80,77 +67,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current;
}
-
-unsigned long write_acpi_tables(unsigned long start)
-{
- unsigned long current;
- acpi_rsdp_t *rsdp;
- acpi_srat_t *srat;
- acpi_rsdt_t *rsdt;
- acpi_madt_t *madt;
- acpi_mcfg_t *mcfg;
- acpi_fadt_t *fadt;
- acpi_facs_t *facs;
- acpi_header_t *dsdt;
-
- /* Align ACPI tables to 16 byte. */
- start = ALIGN(start, 16);
- current = start;
-
- printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
-
- /* We need at least an RSDP and an RSDT table. */
- rsdp = (acpi_rsdp_t *) current;
- current += sizeof(acpi_rsdp_t);
- rsdt = (acpi_rsdt_t *) current;
- current += sizeof(acpi_rsdt_t);
-
- /* Clear all table memory. */
- memset((void *) start, 0, current - start);
-
- acpi_write_rsdp(rsdp, rsdt, NULL);
- acpi_write_rsdt(rsdt);
-
- /* We explicitly add these tables later on: */
- printk(BIOS_DEBUG, "ACPI: * FACS\n");
- facs = (acpi_facs_t *) current;
- current += sizeof(acpi_facs_t);
- acpi_create_facs(facs);
-
- dsdt = (acpi_header_t *)current;
- memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
- current += dsdt->length;
- memcpy(dsdt, &AmlCode, dsdt->length);
- dsdt->checksum = 0; /* Don't trust iasl to get this right. */
- dsdt->checksum = acpi_checksum((u8*)dsdt, dsdt->length);
- printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt,
- dsdt->length);
- printk(BIOS_DEBUG, "ACPI: * FADT\n");
-
- fadt = (acpi_fadt_t *) current;
- current += sizeof(acpi_fadt_t);
-
- acpi_create_fadt(fadt, facs, dsdt);
- acpi_add_table(rsdp, fadt);
-
- /* If we want to use HPET timers Linux wants it in MADT. */
- printk(BIOS_DEBUG, "ACPI: * MADT\n");
- madt = (acpi_madt_t *) current;
- acpi_create_madt(madt);
- current += madt->header.length;
- acpi_add_table(rsdp, madt);
- printk(BIOS_DEBUG, "ACPI: * MCFG\n");
- mcfg = (acpi_mcfg_t *) current;
- acpi_create_mcfg(mcfg);
- current += mcfg->header.length;
- acpi_add_table(rsdp, mcfg);
-
- printk(BIOS_DEBUG, "ACPI: * SRAT\n");
- srat = (acpi_srat_t *) current;
- acpi_create_srat(srat);
- current += srat->header.length;
- acpi_add_table(rsdp, srat);
-
- printk(BIOS_INFO, "ACPI: done.\n");
- return current;
-}
diff --git a/src/mainboard/asus/a8v-e_deluxe/dsdt.asl b/src/mainboard/asus/a8v-e_deluxe/dsdt.asl
index 3afcdc3..8f1e197 100644
--- a/src/mainboard/asus/a8v-e_deluxe/dsdt.asl
+++ b/src/mainboard/asus/a8v-e_deluxe/dsdt.asl
@@ -24,13 +24,6 @@
DefinitionBlock ("DSDT.aml", "DSDT", 1, "CORE ", "COREBOOT", 1)
{
- /* Define the main processor.*/
- Scope (\_PR)
- {
- Processor (\_PR.CPU0, 0x00, 0x000000, 0x00) {}
- Processor (\_PR.CPU1, 0x01, 0x000000, 0x00) {}
- }
-
/* For now only define 2 power states:
* - S0 which is fully on
* - S5 which is soft off
diff --git a/src/mainboard/asus/a8v-e_se/acpi_tables.c b/src/mainboard/asus/a8v-e_se/acpi_tables.c
index f5f081a..fe659da 100644
--- a/src/mainboard/asus/a8v-e_se/acpi_tables.c
+++ b/src/mainboard/asus/a8v-e_se/acpi_tables.c
@@ -34,23 +34,9 @@
#include "northbridge/amd/amdk8/acpi.h"
#include <cpu/amd/model_fxx_powernow.h>
-extern const unsigned char AmlCode[];
-
-unsigned long acpi_fill_mcfg(unsigned long current)
+void get_bus_conf(void)
{
- device_t dev;
- struct resource *res;
-
- dev = dev_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_K8T890CE_5, 0);
- if (!dev)
- return current;
-
- res = find_resource(dev, K8T890_MMCONFIG_MBAR);
- if (res) {
- current += acpi_create_mcfg_mmconfig((acpi_mcfg_mmconfig_t *)
- current, res->base, 0x0, 0x0, 0xff);
- }
- return current;
+ /* FIXME: implement this. */
}
unsigned long acpi_fill_madt(unsigned long current)
@@ -82,94 +68,3 @@ unsigned long acpi_fill_madt(unsigned long current)
return current;
}
-
-unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id)
-{
- k8acpi_write_vars();
- amd_model_fxx_generate_powernow(0, 0, 0);
- acpigen_write_mainboard_resources("\\_SB.PCI0.MBRS", "_CRS");
- return (unsigned long) (acpigen_get_current());
-}
-
-unsigned long write_acpi_tables(unsigned long start)
-{
- unsigned long current;
- acpi_rsdp_t *rsdp;
- acpi_srat_t *srat;
- acpi_rsdt_t *rsdt;
- acpi_madt_t *madt;
- acpi_mcfg_t *mcfg;
- acpi_fadt_t *fadt;
- acpi_facs_t *facs;
- acpi_header_t *ssdt;
- acpi_header_t *dsdt;
-
- /* Align ACPI tables to 16 byte. */
- start = ALIGN(start, 16);
- current = start;
-
- printk(BIOS_INFO, "ACPI: Writing ACPI tables at %lx...\n", start);
-
- /* We need at least an RSDP and an RSDT table. */
- rsdp = (acpi_rsdp_t *) current;
- current += sizeof(acpi_rsdp_t);
- rsdt = (acpi_rsdt_t *) current;
- current += sizeof(acpi_rsdt_t);
-
- /* Clear all table memory. */
- memset((void *) start, 0, current - start);
-
- acpi_write_rsdp(rsdp, rsdt, NULL);
- acpi_write_rsdt(rsdt);
-
- /* We explicitly add these tables later on: */
- printk(BIOS_DEBUG, "ACPI: * FACS\n");
- facs = (acpi_facs_t *) current;
- current += sizeof(acpi_facs_t);
- acpi_create_facs(facs);
-
- dsdt = (acpi_header_t *)current;
- memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
- current += dsdt->length;
- memcpy(dsdt, &AmlCode, dsdt->length);
- dsdt->checksum = 0; /* Don't trust iasl to get this right. */
- dsdt->checksum = acpi_checksum((u8*)dsdt, dsdt->length);
- printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt,
- dsdt->length);
- printk(BIOS_DEBUG, "ACPI: * FADT\n");
-
- fadt = (acpi_fadt_t *) current;
- current += sizeof(acpi_fadt_t);
-
- acpi_create_fadt(fadt, facs, dsdt);
- acpi_add_table(rsdp, fadt);
-
- /* If we want to use HPET timers Linux wants it in MADT. */
- printk(BIOS_DEBUG, "ACPI: * MADT\n");
- madt = (acpi_madt_t *) current;
- acpi_create_madt(madt);
- current += madt->header.length;
- acpi_add_table(rsdp, madt);
- printk(BIOS_DEBUG, "ACPI: * MCFG\n");
- mcfg = (acpi_mcfg_t *) current;
- acpi_create_mcfg(mcfg);
-