Fix ME hash functions on Panther Point/Cougar Point

- On Cougar Point there may have been stack corruption during the
  ME hash verification
- On Panther Point the ME firmware hash was not passed on to the
  OS

Change-Id: I73fc10db63ecff939833fb856a6da1e394155043
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/1279
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Stefan Reinauer 2012-06-11 14:13:09 -07:00 committed by Ronald G. Minnich
parent 999e94cb7a
commit 49058c0adf
2 changed files with 10 additions and 8 deletions

View File

@ -621,7 +621,7 @@ static int intel_mei_setup(device_t dev)
static int intel_me_extend_valid(device_t dev)
{
struct me_heres status;
u32 extend[] = {0};
u32 extend[8] = {0};
int i, count = 0;
pci_read_dword_ptr(dev, &status, PCI_ME_HERES);

View File

@ -49,6 +49,7 @@
#if CONFIG_CHROMEOS
#include <vendorcode/google/chromeos/chromeos.h>
#include <vendorcode/google/chromeos/gnvs.h>
#endif
#ifndef __SMM__
@ -622,7 +623,7 @@ static int intel_mei_setup(device_t dev)
static int intel_me_extend_valid(device_t dev)
{
struct me_heres status;
u32 extend;
u32 extend[8] = {0};
int i, count = 0;
pci_read_dword_ptr(dev, &status, PCI_ME_HERES);
@ -651,16 +652,17 @@ static int intel_me_extend_valid(device_t dev)
return -1;
}
/*
* TODO(dlaurie) Verify the hash against a saved good value.
*/
for (i = 0; i < count; ++i) {
extend = pci_read_config32(dev, PCI_ME_HER(i));
printk(BIOS_DEBUG, "%08x", extend);
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;
}