[coreboot-gerrit] New patch to review for coreboot: amdfwtool: Reserve one more dword in PSP2 header

Zheng Bao (zheng.bao@amd.com) gerrit at coreboot.org
Fri Feb 26 16:08:34 CET 2016


Zheng Bao (zheng.bao at amd.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13810

-gerrit

commit c3227aced5df78e53f2c8e20cecd777c6e18b33f
Author: zbao <fishbaozi at gmail.com>
Date:   Fri Feb 26 22:25:32 2016 +0800

    amdfwtool: Reserve one more dword in PSP2 header
    
    Spec says that. It is validated.
    
    Change-Id: Ied699309f98841f10966b7a5b9697800a25ab27a
    Signed-off-by: Zheng Bao <fishbaozi at gmail.com>
---
 util/amdfwtool/amdfwtool.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c
index 7e70012..2272052 100644
--- a/util/amdfwtool/amdfwtool.c
+++ b/util/amdfwtool/amdfwtool.c
@@ -46,6 +46,8 @@
  *  +------------+---------------+----------------+------------+
  *  | 'PSP2'     | Fletcher      |    Count       |Look up mode|
  *  +------------+---------------+----------------+------------+
+ *  |            R e s e r v e d                               |
+ *  +------------+---------------+----------------+------------+
  *  | ID-Sel     | PSP ID        |   PSPDIR ADDR  |            | 2nd PSP directory
  *  +------------+---------------+----------------+------------+
  *  | ID-Sel     | PSP ID        |   PSPDIR ADDR  |            | 3rd PSP directory
@@ -555,11 +557,11 @@ int main(int argc, char **argv)
 		psp2count = 1;		/* Start from 1. */
 		/* for (; psp2count <= PSP2COUNT; psp2count++, current=ALIGN(current, 0x100)) { */
 		/* Now the psp2dir is psp combo dir. */
-		psp2dir[psp2count*4 + 0] = 0; /* 0 -Compare PSP ID, 1 -Compare chip family ID */
-		psp2dir[psp2count*4 + 1] = 0x10220B00; /* TODO: PSP ID. Documentation is needed. */
-		psp2dir[psp2count*4 + 2] = current + ROM_BASE_ADDRESS;
+		psp2dir[psp2count*4 + 0 + 4] = 0; /* 0 -Compare PSP ID, 1 -Compare chip family ID */
+		psp2dir[psp2count*4 + 1 + 4] = 0x10220B00; /* TODO: PSP ID. Documentation is needed. */
+		psp2dir[psp2count*4 + 2 + 4] = current + ROM_BASE_ADDRESS;
 		pspdir = rom + current;
-		psp2dir[psp2count*4 + 3] = 0;
+		psp2dir[psp2count*4 + 3 + 4] = 0;
 
 		current += 0x200;	/* Add conservative size of pspdir. Start of PSP entries. */
 		current = integrate_psp_firmwares(rom, current, pspdir, amd_psp2_fw_table);
@@ -568,8 +570,12 @@ int main(int argc, char **argv)
 		/* fill the PSP combo head */
 		psp2dir[0] = 0x50535032;  /* 'PSP2' */
 		psp2dir[2] = psp2count;		  /* Count */
-		psp2dir[3] = 0;		/* 0-Dynamic look up through all entries, 1-PSP/chip ID match */
-		psp2dir[1] = fletcher32((uint16_t *)&psp2dir[1], (psp2count*16 + 16)/2 - 2);
+		psp2dir[3] = 1;		/* 0-Dynamic look up through all entries, 1-PSP/chip ID match */
+		psp2dir[4] = 0;		/* reserved 4 dwords. */
+		psp2dir[5] = 0;
+		psp2dir[6] = 0;
+		psp2dir[7] = 0;
+		psp2dir[1] = fletcher32((uint16_t *)&psp2dir[1], (psp2count*16 + 32)/2 - 2);
 #else
 		current = integrate_psp_firmwares(rom, current, psp2dir, amd_psp2_fw_table);
 #endif



More information about the coreboot-gerrit mailing list