Re: [edk2-devel] [PATCH] IntelFsp2Pkg: Add FSP 2.3 header support

2022-05-29 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 
Thanks TungLun!

> -Original Message-
> From: Loo, Tung Lun 
> Sent: Thursday, May 12, 2022 7:26 AM
> To: devel@edk2.groups.io
> Cc: Loo, Tung Lun ; Desimone, Nathaniel L
> ; Zeng, Star ; Chiu,
> Chasel 
> Subject: [PATCH] IntelFsp2Pkg: Add FSP 2.3 header support
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3921
> 
> This patch adds a couple of fields supported in FSP 2.3 header from both
> header generation and tool support perspective.
> 
> Signed-off-by: Loo Tung Lun 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Cc: Chasel Chiu 
> ---
>  IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py | 63
> ++-
> 
>  IntelFsp2Pkg/Tools/ConfigEditor/GenYamlCfg.py   | 14 +++---
>  2 files changed, 69 insertions(+), 8 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py
> b/IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py
> index 680b90e09d..5271504282 100644
> --- a/IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py
> +++ b/IntelFsp2Pkg/Tools/ConfigEditor/ConfigEditor.py
> @@ -13,6 +13,7 @@ import tkinter.ttk as ttk
>  import tkinter.messagebox as messagebox import tkinter.filedialog as
> filedialog +from pickle import FALSE, TRUE from pathlib import Path from
> GenYamlCfg import CGenYamlCfg, bytes_to_value, \
> bytes_to_bracket_str, value_to_bytes, array_str_to_value@@ -458,7
> +459,10 @@ class FSP_INFORMATION_HEADER(Structure):
>  ('NotifyPhaseEntryOffset', c_uint32),
> ('FspMemoryInitEntryOffset',   c_uint32), ('TempRamExitEntryOffset',
> c_uint32),-('FspSiliconInitEntryOffset',  c_uint32)+
> ('FspSiliconInitEntryOffset',  c_uint32),+
> ('FspMultiPhaseSiInitEntryOffset', c_uint32),+
> ('ExtendedImageRevision',
> c_uint16),+('Reserved4',  c_uint16) ]  @@ -700,6 +704,34 @@
> class FirmwareDevice:
>  raise Exception("ERROR: Incorrect FV size in image !")
> self.CheckFsp() +def IsIntegerType(self, val):+if 
> sys.version_info[0] <
> 3:+if type(val) in (int, long):+return True+  
>   else:+if
> type(val) is int:+return True+return False++def
> ConvertRevisionString(self, obj):+for field in obj._fields_:+ 
>key =
> field[0]+val = getattr(obj, key)+rep = ''++   
>  if
> self.IsIntegerType(val):+if (key == 'ImageRevision'):+
> FspImageRevisionMajor = ((val >> 24) & 0xFF)+
> FspImageRevisionMinor = ((val >> 16) & 0xFF)+
> FspImageRevisionRevision = ((val >> 8) & 0xFF)+
> FspImageRevisionBuildNumber = (val & 0xFF)+rep = '0x%08X' 
> %
> val+elif (key == 'ExtendedImageRevision'):+
> FspImageRevisionRevision |= (val & 0xFF00)+
> FspImageRevisionBuildNumber |= ((val << 8) & 0xFF00)+rep =
> "0x%04X ('%02X.%02X.%04X.%04X')" % (val, FspImageRevisionMajor,
> FspImageRevisionMinor, FspImageRevisionRevision,
> FspImageRevisionBuildNumber)+return rep+ def
> OutputFsp(self): def copy_text_to_clipboard():
> window.clipboard_clear()@@ -721,7 +753,8 @@ class FirmwareDevice:
>  self.OutputText = self.OutputText + "Fsp Header Details \n\n"
> while i < len(self.FihList): try:-self.OutputText 
> +=
> str(self.BuildList[i].decode()) + "\n"+# self.OutputText +=
> str(self.BuildList[i].decode()) + "\n"+self.OutputText +=
> str(self.BuildList[i]) + "\n" except Exception: 
> self.OutputText
> += "No description found\n" self.OutputText += "FSP Header :\n
> "@@ -729,6 +762,8 @@ class FirmwareDevice:
>  str(self.FihList[i].Signature.decode('utf-8')) + "\n "
> self.OutputText += "Header Length : " + \
> str(hex(self.FihList[i].HeaderLength)) + "\n "+self.OutputText +=
> "Reserved1 : " + \+str(hex(self.FihList[i].Reserved1)) + "\n "
> self.OutputText += "Header Revision : " + \
> str(hex(self.FihList[i].HeaderRevision)) + "\n " self.OutputText 
> +=
> "Spec Version : " + \@@ -743,15 +778,17 @@ class FirmwareDevice:
>  str(hex(self.FihList[i].ImageBase)) + "\n " 
> self.OutputText +=
> "Image Attribute : " + \ 
> str(hex(self.FihList[i].ImageAttribute)) + "\n
> "+self.OutputText += "Component Attribute : " + \+
> str(hex(self.FihList[i].ComponentAttribute)) + "\n " 
> self.OutputText
> += "Cfg Region Offset : " + \ 
> str(hex(self.FihList[i].CfgRegionOffset))
> + "\n " self.OutputText += "Cfg Region Size : " + \
> str(hex(self.FihList[i].CfgRegionSize)) + "\n "-self.OutputText 
> += "API
> Entry Num : " + \+self.OutputText += "Reserved2 : " + \
> str(hex(self.FihList[i].Reserved2)) + "\n " self.OutputText += 
> "Temp
> Ram Init 

[edk2-devel] [edk2-platforms]Vlv2TbltDevicePkg built failed.

2022-05-29 Thread gordontcp
Hi all,

I compiled Vlv2TbltDevicePkg and operated according to the following URL:
https://github.com/tianocore/edk2-platforms/tree/master/Platform/Intel/Vlv2TbltDevicePkg
The compiled command is as follows:
build -a IA32 -a X64 -n 5 -t VS2019 -b DEBUG -p 
Vlv2TbltDevicePkg\PlatformPkgX64.dsc
The result is the following error message:
edk2p\Build\Vlv2TbltDevicePkgX64\DEBUG_VS2010x86\X64\MdePkg\Library\BaseLib\BaseLib\OUTPUT\X64\DisablePaging64.iii:35:
 error: symbol `InternalX86DisablePaging64.0' undefined
NMAKE : fatal error U1077: 'c:\nasm\nasm.EXE' : return code '0x1'

My version of Nasm is nasm-2.13.03, how can I solve the error about nasm?
Any suggestion is greatly appreciated!
Thanks!


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#90090): https://edk2.groups.io/g/devel/message/90090
Mute This Topic: https://groups.io/mt/91423996/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-