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.8935.1601445197457851856 for ; Tue, 29 Sep 2020 22:53:18 -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 ; Wed, 30 Sep 2020 13:53:08 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , Cc: "'Bob Feng'" References: <20200930054859.7492-1-chinni.b.duggapu@intel.com> <20200930054859.7492-2-chinni.b.duggapu@intel.com> In-Reply-To: <20200930054859.7492-2-chinni.b.duggapu@intel.com> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW1BhdGNoIFY0IDEvMV0gVG9vbHNcRml0R2VuOiBBZGQgZXh0cmEgcGFyYW1ldGVyIHRvIGlucHV0IHRoZSBIaWdoZXIgRmxhc2ggQWRkcmVzcw==?= Date: Wed, 30 Sep 2020 13:53:10 +0800 Message-ID: <008301d696ed$fa670780$ef351680$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQDonDoCDtjpFzfBdTnqiF5GQJArHgIVZCmqq0v39+A= Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Chinni: Can you change subject and commit message with the top flash address instead of higher flash address?=20 Thanks Liming > -----=D3=CA=BC=FE=D4=AD=BC=FE----- > =B7=A2=BC=FE=C8=CB: bounce+27952+65758+4905953+8761045@groups.io > =B4=FA=B1=ED cbduggap > =B7=A2=CB=CD=CA=B1=BC=E4: 2020=C4=EA9=D4=C230=C8=D5 13:49 > =CA=D5=BC=FE=C8=CB: devel@edk2.groups.io > =B3=AD=CB=CD: cbduggap ; Bob Feng > ; Liming Gao > =D6=F7=CC=E2: [edk2-devel] [Patch V4 1/1] Tools\FitGen: Add extra = parameter to input > the Higher Flash Address >=20 > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3D2981 >=20 > Add extra parameter to the Fit Gen Tool to input the Higher Address. > Default Address should be 4GB and if some one inputs new address, > tool must consume that address instead of Default address (4GB). >=20 > Signed-off-by: cbduggap > Cc: Bob Feng > Cc: Liming Gao >=20 > Signed-off-by: cbduggap > --- > Silicon/Intel/Tools/FitGen/FitGen.c | 23 +++++++++++++++++++++-- > 1 file changed, 21 insertions(+), 2 deletions(-) >=20 > 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 >=20 > #define DEFAULT_FIT_ENTRY_VERSION 0x0100 >=20 >=20 >=20 > +#define TOP_FLASH_ADDRESS > (gFitTableContext.TopFlashAddressRemapValue) >=20 > + >=20 > #define MEMORY_TO_FLASH(FileBuffer, FvBuffer, FvSize) \ >=20 > - (UINTN)(0x100000000 - ((UINTN)(FvBuffer) + > (UINTN)(FvSize) - (UINTN)(FileBuffer))) >=20 > + (UINTN)(TOP_FLASH_ADDRESS - ((UINTN)(FvBuffer) + > (UINTN)(FvSize) - (UINTN)(FileBuffer))) >=20 > #define FLASH_TO_MEMORY(Address, FvBuffer, FvSize) \ >=20 > - (VOID *)(UINTN)((UINTN)(FvBuffer) + (UINTN)(FvSize) = - > (0x100000000 - (UINTN)(Address))) >=20 > + (VOID *)(UINTN)((UINTN)(FvBuffer) + (UINTN)(FvSize) = - > (TOP_FLASH_ADDRESS - (UINTN)(Address))) >=20 >=20 >=20 > #define FIT_TABLE_TYPE_HEADER 0 >=20 > #define FIT_TABLE_TYPE_MICROCODE 1 >=20 > @@ -268,6 +270,7 @@ typedef struct { > UINT32 MicrocodeVersion; >=20 > FIT_TABLE_CONTEXT_ENTRY > OptionalModule[MAX_OPTIONAL_ENTRY]; >=20 > FIT_TABLE_CONTEXT_ENTRY PortModule[MAX_PORT_ENTRY]; >=20 > + UINT64 TopFlashAddressRemapValue; >=20 > } FIT_TABLE_CONTEXT; >=20 >=20 >=20 > FIT_TABLE_CONTEXT gFitTableContext =3D {0}; >=20 > @@ -330,6 +333,7 @@ Returns: > "\t[-F ] [-F = ] [-V > ]\n" >=20 > "\t[-NA]\n" >=20 > "\t[-A ]\n" >=20 > + "\t[-REMAP \n" >=20 > "\t[-CLEAR]\n" >=20 > "\t[-L ]\n" >=20 > "\t[-I ]\n" >=20 > @@ -986,6 +990,21 @@ Returns: > Index +=3D 2; >=20 > } >=20 >=20 >=20 > + if ((Index >=3D argc) || >=20 > + ((strcmp (argv[Index], "-REMAP") =3D=3D 0) || >=20 > + (strcmp (argv[Index], "-remap") =3D=3D 0)) ) { >=20 > + // >=20 > + // by pass >=20 > + // >=20 > + gFitTableContext.TopFlashAddressRemapValue =3D xtoi (argv[Index + = 1]); >=20 > + Index +=3D 2; >=20 > + } else { >=20 > + // >=20 > + // no remapping >=20 > + // >=20 > + gFitTableContext.TopFlashAddressRemapValue =3D 0x100000000; >=20 > + } >=20 > + printf ("Top Flash Address Value : 0x%llx\n", > gFitTableContext.TopFlashAddressRemapValue); >=20 > // >=20 > // 0.4 Clear FIT table related memory >=20 > // >=20 > -- > 2.26.2.windows.1 >=20 >=20 >=20 > -=3D-=3D-=3D-=3D-=3D-=3D > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#65758): = https://edk2.groups.io/g/devel/message/65758 > Mute This Topic: https://groups.io/mt/77212511/4905953 > Group Owner: devel+owner@edk2.groups.io > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [gaoliming@byosoft.com.cn] > -=3D-=3D-=3D-=3D-=3D-=3D >=20