From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web10.3269.1602290903430186728 for ; Fri, 09 Oct 2020 17:48:24 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Sat, 10 Oct 2020 08:48:17 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'cbduggap'" Cc: "'Bob Feng'" References: <20201005141309.12427-1-chinni.b.duggapu@intel.com> <20201005141309.12427-3-chinni.b.duggapu@intel.com> <163C4ABEA87228CD.15658@groups.io> In-Reply-To: <163C4ABEA87228CD.15658@groups.io> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0g5Zue5aSNOiBbUGF0Y2ggVjUgMS8xXSBUb29sc1xGaXRHZW46IEFkZCBleHRyYSBwYXJhbWV0ZXIgdG8gaW5wdXQgdGhlIFRvcCBGbGFzaCBBZGRyZXNz?= Date: Sat, 10 Oct 2020 08:48:21 +0800 Message-ID: <002f01d69e9f$0d9781f0$28c685d0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGZB7Pbmqx2olZ2nzmt+TRNFu3sEQG9aGLRAzZ5SRyp44+TkA== Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Merge @ 4a53dbd24e11332767a1c20577f260bfb6feb702 on edk2-platforms. > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: bounce+27952+66060+4905953+8761045@groups.io > =B4=FA=B1=ED gaoliming > =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA10=D4=C29=C8=D5 18:02 > =CA=D5=BC=FE=C8=CB: 'cbduggap' ; devel@edk2.= groups.io > =B3=AD=CB=CD: 'Bob Feng' > =D6=F7=CC=E2: [edk2-devel] =BB=D8=B8=B4: [Patch V5 1/1] Tools\FitGen: Ad= d extra parameter > to input the Top Flash Address >=20 > Reviewed-by: Liming Gao >=20 > > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > > =B7=A2=BC=FE=C8=CB: cbduggap > > =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA10=D4=C25=C8=D5 22:13 > > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > > =B3=AD=CB=CD: cbduggap ; Bob Feng > > ; Liming Gao > > =D6=F7=CC=E2: [Patch V5 1/1] Tools\FitGen: Add extra parameter to inpu= t the Top > Flash > > Address > > > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2981 > > > > Add extra parameter to the Fit Gen Tool to input the Top Flash Address= . > > Default Address should be 4GB and if some one inputs new address, > > tool must consume that address instead of Default address (4GB). > > > > Signed-off-by: cbduggap > > Cc: Bob Feng > > Cc: Liming Gao > > > > Signed-off-by: cbduggap > > --- > > Silicon/Intel/Tools/FitGen/FitGen.c | 23 +++++++++++++++++++++-- > > 1 file changed, 21 insertions(+), 2 deletions(-) > > > > diff --git a/Silicon/Intel/Tools/FitGen/FitGen.c > > b/Silicon/Intel/Tools/FitGen/FitGen.c > > index c4006e69c8..cb60a3c324 100644 > > --- a/Silicon/Intel/Tools/FitGen/FitGen.c > > +++ b/Silicon/Intel/Tools/FitGen/FitGen.c > > @@ -209,10 +209,12 @@ typedef struct { > > #define DEFAULT_FIT_TABLE_POINTER_OFFSET 0x40 > > > > #define DEFAULT_FIT_ENTRY_VERSION 0x0100 > > > > > > > > +#define TOP_FLASH_ADDRESS > > (gFitTableContext.TopFlashAddressRemapValue) > > > > + > > > > #define MEMORY_TO_FLASH(FileBuffer, FvBuffer, FvSize) \ > > > > - (UINTN)(0x100000000 - ((UINTN)(FvBuffer) + > > (UINTN)(FvSize) - (UINTN)(FileBuffer))) > > > > + (UINTN)(TOP_FLASH_ADDRESS - ((UINTN)(FvBuffer) + > > (UINTN)(FvSize) - (UINTN)(FileBuffer))) > > > > #define FLASH_TO_MEMORY(Address, FvBuffer, FvSize) \ > > > > - (VOID *)(UINTN)((UINTN)(FvBuffer) + (UINTN)(FvSize) > - > > (0x100000000 - (UINTN)(Address))) > > > > + (VOID *)(UINTN)((UINTN)(FvBuffer) + (UINTN)(FvSize) > - > > (TOP_FLASH_ADDRESS - (UINTN)(Address))) > > > > > > > > #define FIT_TABLE_TYPE_HEADER 0 > > > > #define FIT_TABLE_TYPE_MICROCODE 1 > > > > @@ -268,6 +270,7 @@ typedef struct { > > UINT32 MicrocodeVersion; > > > > FIT_TABLE_CONTEXT_ENTRY > > OptionalModule[MAX_OPTIONAL_ENTRY]; > > > > FIT_TABLE_CONTEXT_ENTRY PortModule[MAX_PORT_ENTRY]; > > > > + UINT64 TopFlashAddressRemapValue; > > > > } FIT_TABLE_CONTEXT; > > > > > > > > FIT_TABLE_CONTEXT gFitTableContext =3D {0}; > > > > @@ -330,6 +333,7 @@ Returns: > > "\t[-F ] [-F = ] > [-V > > ]\n" > > > > "\t[-NA]\n" > > > > "\t[-A ]\n" > > > > + "\t[-REMAP \n" > > > > "\t[-CLEAR]\n" > > > > "\t[-L ]\n" > > > > "\t[-I ]\n" > > > > @@ -986,6 +990,21 @@ Returns: > > Index +=3D 2; > > > > } > > > > > > > > + if ((Index >=3D argc) || > > > > + ((strcmp (argv[Index], "-REMAP") =3D=3D 0) || > > > > + (strcmp (argv[Index], "-remap") =3D=3D 0)) ) { > > > > + // > > > > + // by pass > > > > + // > > > > + gFitTableContext.TopFlashAddressRemapValue =3D xtoi (argv[Index + > 1]); > > > > + Index +=3D 2; > > > > + } else { > > > > + // > > > > + // no remapping > > > > + // > > > > + gFitTableContext.TopFlashAddressRemapValue =3D 0x100000000; > > > > + } > > > > + printf ("Top Flash Address Value : 0x%llx\n", > > gFitTableContext.TopFlashAddressRemapValue); > > > > // > > > > // 0.4 Clear FIT table related memory > > > > // > > > > -- > > 2.26.2.windows.1 >=20 >=20 >=20 >=20 >=20 >=20 >=20