[edk2] [PATCH v4] BaseTools/Scripts/PatchCheck.py: Extended patch style check for c code

2016-12-12 Thread Daniil Egranov
Corrected maximum code line size to 120 characters

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daniil Egranov 
---
Changelog:

v3
Corrected space detection before parentheses. 

v2:
Fixed several indentation cases

v1:
Fixed reporting signature error for a cover letter.
Fixed reporting line size error for a file change information
included in the commit message.
Fixed line number reported in PatchCheck error messages. It
points to the correct line in the diff file.
The patch extends style checking for c code:
 Added check for code indentation.
 Added report line size greater than 80 characters.
 Added checking for space before '('.
 Added checking for space before '{'.
 Added checking for '}' to be on a new line and have spaces
 for "} else {" or "} while ()" cases.

 BaseTools/Scripts/PatchCheck.py | 260 
 1 file changed, 236 insertions(+), 24 deletions(-)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 7c30082..7a6fd4e 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -32,7 +32,7 @@ class Verbose:
 class CommitMessageCheck:
 """Checks the contents of a git commit message."""
 
-def __init__(self, subject, message):
+def __init__(self, subject, message, message_offset, cover):
 self.ok = True
 
 if subject is None and  message is None:
@@ -41,9 +41,15 @@ class CommitMessageCheck:
 
 self.subject = subject
 self.msg = message
+self.msg_offset = message_offset
+self.cover = cover
+
+if not cover:
+self.check_contributed_under()
+self.check_signed_off_by()
+else:
+print('The commit message is cover letter.')
 
-self.check_contributed_under()
-self.check_signed_off_by()
 self.check_misc_signatures()
 self.check_overall_format()
 self.report_message_result()
@@ -180,6 +186,9 @@ class CommitMessageCheck:
 for sig in self.sig_types:
 self.find_signatures(sig)
 
+diff_change_info_re = \
+re.compile(r'.*\|\s+(\d|Bin)*\s.*[\+\-]')
+
 def check_overall_format(self):
 lines = self.msg.splitlines()
 
@@ -197,9 +206,10 @@ class CommitMessageCheck:
 self.error('Empty commit message!')
 return
 
-if count >= 1 and len(lines[0]) >= 72:
+if count >= 1 and len(lines[0]) > 72:
 self.error('First line of commit message (subject line) ' +
-   'is too long.')
+   'is too long (%d) (max 72 characters):' 
%(len(lines[0])))
+print(lines[0], '\n')
 
 if count >= 1 and len(lines[0].strip()) == 0:
 self.error('First line of commit message (subject line) ' +
@@ -210,10 +220,13 @@ class CommitMessageCheck:
'empty.')
 
 for i in range(2, count):
-if (len(lines[i]) >= 76 and
+if (len(lines[i]) > 76 and
 len(lines[i].split()) > 1 and
-not lines[i].startswith('git-svn-id:')):
-self.error('Line %d of commit message is too long.' % (i + 1))
+not lines[i].startswith('git-svn-id:') and
+self.diff_change_info_re.search(lines[i]) is None):
+self.error('Line %d of commit message is too long (%d) (max 76 
characters):' \
+   % (i + self.msg_offset - 1, len(lines[i])))
+print(lines[i], '\n')
 
 last_sig_line = None
 for i in range(count - 1, 0, -1):
@@ -236,13 +249,19 @@ class CommitMessageCheck:
 class GitDiffCheck:
 """Checks the contents of a git diff."""
 
-def __init__(self, diff):
+def __init__(self, diff, offset):
 self.ok = True
 self.format_ok = True
 self.lines = diff.splitlines(True)
 self.count = len(self.lines)
 self.line_num = 0
 self.state = START
+self.comments_open = False
+self.dquote_open = False
+self.multiline_string = False
+self.current_indent_size = 0
+self.parentheses_count = 0
+self.offset = offset
 while self.line_num < self.count and self.format_ok:
 line_num = self.line_num
 self.run()
@@ -255,6 +274,10 @@ class GitDiffCheck:
 if self.ok:
 print('The code passed all checks.')
 
+def clean_counts(self):
+self.current_indent_size = -1
+self.parentheses_count = 0
+
 def run(self):
 line = self.lines[self.line_num]
 
@@ -283,6 +306,20 @@ class GitDiffCheck:
 elif self.state == PRE_PATCH:
 if line.startswith('+++ b/'):
 self.set_filename(line[6:].rstrip())
+print("Checking patch for %s ...\n" %(self.hunk_filename))
+if self.hunk_filename.endswith(".c") or \
+   self.hunk_filename.endswith(".h"):
+

[edk2] [PATCH v2] ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe: Set Marvell Yukon MAC address

2016-12-12 Thread Daniil Egranov
Corrected style issues and code structure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daniil Egranov 
---
Changelog:

v1
The patch reads a valid MAC address form the Juno IOFPGA registers 
and pushes it into onboard Marvell Yukon NIC.

.../ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 147 +
 .../Drivers/ArmJunoDxe/ArmJunoDxeInternal.h|  13 ++
 2 files changed, 160 insertions(+)

diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c 
b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
index b97f044..a36c6ff 100644
--- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
+++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
@@ -15,7 +15,9 @@
 #include "ArmJunoDxeInternal.h"
 #include 
 
+#include 
 #include 
+#include 
 #include 
 
 #include 
@@ -69,6 +71,148 @@ STATIC CONST EFI_PCI_ROOT_BRIDGE_DEVICE_PATH 
mPciRootComplexDevicePath = {
 EFI_EVENT mAcpiRegistration = NULL;
 
 /**
+  The function reads MAC address from Juno IOFPGA registers and writes it
+  into Marvell Yukon NIC.
+**/
+STATIC
+EFI_STATUS
+ArmJunoSetNetworkMAC ()
+{
+
+  EFI_STATUS  Status;
+  UINTN   HandleCount;
+  EFI_HANDLE  *HandleBuffer;
+  UINTN   HIndex;
+  EFI_PCI_IO_PROTOCOL*PciIo;
+  UINT64  PciID;
+  UINT32  MacHigh;
+  UINT32  MacLow;
+  UINT32  PciRegBase;
+  UINT64  OldPciAttributes;
+  UINT64  AttrSupports;
+  UINT8   *PciBarAttributes;
+  EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR   *AddrSpaceDescriptor;
+
+  Status = gBS->LocateHandleBuffer (ByProtocol,
+&gEfiPciIoProtocolGuid,
+NULL, &HandleCount, &HandleBuffer);
+
+  if (EFI_ERROR (Status)) {
+return (Status);
+  }
+
+  for (HIndex = 0; HIndex < HandleCount; ++HIndex) {
+Status = gBS->OpenProtocol (
+HandleBuffer[HIndex],
+&gEfiPciIoProtocolGuid,
+(VOID **) &PciIo,
+NULL,
+NULL,
+EFI_OPEN_PROTOCOL_GET_PROTOCOL);
+
+if (EFI_ERROR (Status)) {
+  continue;
+}
+
+Status = PciIo->Pci.Read (
+  PciIo,
+  EfiPciIoWidthUint32,
+  PCI_VENDOR_ID_OFFSET,
+  1,
+  &PciID
+  );
+
+if (EFI_ERROR (Status)) {
+  continue;
+}
+
+if ((PciID & 0x) != JUNO_MARVELL_YUKON_ID) {
+  continue;
+}
+
+// Read MAC address from IOFPGA
+MacHigh= MmioRead32 (ARM_JUNO_SYS_PCIGBE_H);
+MacLow = MmioRead32 (ARM_JUNO_SYS_PCIGBE_L);
+
+Status = PciIo->Attributes (
+  PciIo,
+  EfiPciIoAttributeOperationGet,
+  0,
+  &OldPciAttributes
+  );
+
+if (EFI_ERROR (Status)) {
+  return Status;
+}
+
+Status = PciIo->Attributes (
+  PciIo,
+  EfiPciIoAttributeOperationSupported,
+  0,
+  &AttrSupports
+  );
+
+if (EFI_ERROR (Status)) {
+  return Status;
+}
+
+AttrSupports &= EFI_PCI_DEVICE_ENABLE;
+Status = PciIo->Attributes (
+  PciIo,
+  EfiPciIoAttributeOperationEnable,
+  AttrSupports,
+  NULL
+  );
+
+Status = PciIo->GetBarAttributes (PciIo, 0, &AttrSupports, 
(VOID**)&PciBarAttributes);
+if (EFI_ERROR (Status)) {
+  return Status;
+}
+
+AddrSpaceDescriptor = (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR 
*)PciBarAttributes;
+
+if (AddrSpaceDescriptor->Desc == ACPI_ADDRESS_SPACE_DESCRIPTOR &&
+AddrSpaceDescriptor->ResType == ACPI_ADDRESS_SPACE_TYPE_MEM &&
+!(AddrSpaceDescriptor->SpecificFlag & ACPI_SPECFLAG_PREFETCHABLE)) {
+
+  PciRegBase = AddrSpaceDescriptor->AddrRangeMin;
+
+  // Set software reset control register to protect from deactivation
+  // the config write state
+  MmioWrite16 (PciRegBase + R_CONTROL_STATUS, CS_RESET_CLR);
+
+  // Convert to Marvell MAC Address register format
+  MacHigh = SwapBytes32 ((MacHigh & 0x) << 16 |
+ (MacLow & 0x) >> 16);
+  MacLow = SwapBytes32 (MacLow) >> 16;
+
+  // Set MAC Address
+  MmioWrite8 (PciRegBase + R_TST_CTRL_1, TST_CFG_WRITE_ENABLE);
+  MmioWrite32 (PciRegBase + R_MAC, MacHigh);
+  MmioWrite32 (PciRegBase + R_MAC_MAINT, MacHigh);
+  MmioWrite32 (PciRegBase + R_MAC + R_MAC_LOW, MacLow);
+  MmioWrite32 (PciRegBa

Re: [edk2] [PATCH] UefiCpuPkg/PiSmmCpu: Add SMM Comm Buffer Paging Protection.

2016-12-12 Thread Fan, Jeff
Reviewed-by: Jeff Fan 

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jiewen 
Yao
Sent: Wednesday, December 07, 2016 8:54 PM
To: edk2-devel@lists.01.org
Cc: Kinney, Michael D; Laszlo Ersek; Fan, Jeff
Subject: [edk2] [PATCH] UefiCpuPkg/PiSmmCpu: Add SMM Comm Buffer Paging 
Protection.

This patch sets the normal OS buffer EfiLoaderCode/Data, 
EfiBootServicesCode/Data, EfiConventionalMemory, EfiACPIReclaimMemory to be not 
present after SmmReadyToLock.

To access these region in OS runtime phase is not a good solution.

Previously, we did similar check in SmmMemLib to help SMI handler do the check. 
But if SMI handler forgets the check, it can still access these OS region and 
bring risk.

So here we enforce the policy to prevent it happening.

Cc: Jeff Fan 
Cc: Michael D Kinney 
Cc: Laszlo Ersek 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao 
---
 UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c   |   7 +
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c |  23 +-
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h |  29 +++
 UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 248 
 UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c|   7 +
 5 files changed, 302 insertions(+), 12 deletions(-)

diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c 
b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
index ba79477..c1f4b7e 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
@@ -149,6 +149,13 @@ SmiPFHandler (
   );
   CpuDeadLoop ();
 }
+if (IsSmmCommBufferForbiddenAddress (PFAddress)) {
+  DEBUG ((DEBUG_ERROR, "Access SMM communication forbidden address 
(0x%x)!\n", PFAddress));
+  DEBUG_CODE (
+DumpModuleInfoByIp ((UINTN)SystemContext.SystemContextIa32->Eip);
+  );
+  CpuDeadLoop ();
+}
   }
 
   if (FeaturePcdGet (PcdCpuSmmProfileEnable)) { diff --git 
a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c 
b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
index 4bef60a..fc7714a 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c
@@ -504,6 +504,11 @@ SmmReadyToLockEventNotify (
   GetAcpiCpuData ();
 
   //
+  // Cache a copy of UEFI memory map before we start profiling feature.
+  //
+  GetUefiMemoryMap ();
+
+  //
   // Set SMM ready to lock flag and return
   //
   mSmmReadyToLock = TRUE;
@@ -1154,17 +1159,6 @@ ConfigSmmCodeAccessCheck (  }
 
 /**
-  Set code region to be read only and data region to be execute disable.
-**/
-VOID
-SetRegionAttributes (
-  VOID
-  )
-{
-  SetMemMapAttributes ();
-}
-
-/**
   This API provides a way to allocate memory for page table.
 
   This API can be called more once to allocate memory for page tables.
@@ -1320,7 +1314,12 @@ PerformRemainingTasks (
 //
 // Mark critical region to be read-only in page table
 //
-SetRegionAttributes ();
+SetMemMapAttributes ();
+
+//
+// For outside SMRAM, we only map SMM communication buffer or MMIO.
+//
+SetUefiMemMapAttributes ();
 
 //
 // Set page table itself to be read-only diff --git 
a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h 
b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
index 9160fa8..69c54fb 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
@@ -839,6 +839,35 @@ SetMemMapAttributes (
   );
 
 /**
+  This function sets UEFI memory attribute according to UEFI memory map.
+**/
+VOID
+SetUefiMemMapAttributes (
+  VOID
+  );
+
+/**
+  Return if the Address is forbidden as SMM communication buffer.
+
+  @param[in] Address the address to be checked
+
+  @return TRUE  The address is forbidden as SMM communication buffer.
+  @return FALSE The address is allowed as SMM communication buffer.
+**/
+BOOLEAN
+IsSmmCommBufferForbiddenAddress (
+  IN UINT64  Address
+  );
+
+/**
+  This function caches the UEFI memory map information.
+**/
+VOID
+GetUefiMemoryMap (
+  VOID
+  );
+
+/**
   This function sets memory attribute for page table.
 **/
 VOID
diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c 
b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
index 588aa27..9942c43 100644
--- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
+++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
@@ -16,6 +16,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 #define NEXT_MEMORY_DESCRIPTOR(MemoryDescriptor, Size) \
   ((EFI_MEMORY_DESCRIPTOR *)((UINT8 *)(MemoryDescriptor) + (Size)))
 
+EFI_MEMORY_DESCRIPTOR *mUefiMemoryMap;
+UINTN mUefiMemoryMapSize;
+UINTN mUefiDescriptorSize;
+
 PAGE_ATTRIBUTE_TABLE mPageAttributeTable[] = {
   {Page4K,  SIZE_4KB, PAGING_4K_ADDRESS_MASK_64},
   {Page2M,  SIZE_2MB, PAGING_2M_ADDRESS_MASK_64}, @@ -823,3 +827,247 @@ 
SetMemMapAttributes (
 
   return ;
 }
+
+/**
+  Sort memory map entries based upon Physic

Re: [edk2] [PATCH 0/1] Use the Windows Kits directory in 32-bit ProgramFiles, since none exists in 64-bit one

2016-12-12 Thread Gao, Liming
Rebecca:  
  Please use VS2015x86 tool chain tag when windows is 64bit. VS2015 tool chain 
tag is used for 32bit windows. 

Thanks
Liming
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Rebecca Cran
> Sent: Tuesday, December 13, 2016 10:33 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [PATCH 0/1] Use the Windows Kits directory in 32-bit
> ProgramFiles, since none exists in 64-bit one
> 
> On a fresh install of Windows 10 and Visual Studio 2015 etc., "C:\Program
> Files\Windows Kits"
> doesn't exist - only "C:\Program Files (x86)\Windows Kits" does. I don't know
> about 32-bit Windows, but since at this point 64-bit should be most common,
> update the path to the Windows SDK 8.1.
>   
> Rebecca Cran (1):
>   Use the Windows Kits directory under the 32-bit Program Files
> 
>  BaseTools/Conf/tools_def.template | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --
> 2.11.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 0/1] Use the Windows Kits directory in 32-bit ProgramFiles, since none exists in 64-bit one

2016-12-12 Thread Rebecca Cran
On a fresh install of Windows 10 and Visual Studio 2015 etc., "C:\Program 
Files\Windows Kits"
doesn't exist - only "C:\Program Files (x86)\Windows Kits" does. I don't know
about 32-bit Windows, but since at this point 64-bit should be most common,
update the path to the Windows SDK 8.1.

Rebecca Cran (1):
  Use the Windows Kits directory under the 32-bit Program Files

 BaseTools/Conf/tools_def.template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.11.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 1/1] Use the Windows Kits directory under the 32-bit Program Files

2016-12-12 Thread Rebecca Cran
On a fresh install of Windows 10 with Visual Studio 2015, a "Windows Kits"
directory only exists under the 32-bit Program Files directory, not the
64-bit one.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Rebecca Cran 
---
 BaseTools/Conf/tools_def.template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index aaae4fcd2916..5ec56ef93045 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -90,7 +90,7 @@ DEFINE WINSDK8_BIN   = ENV(WINSDK8_PREFIX)x86\
 DEFINE WINSDK8x86_BIN= ENV(WINSDK8x86_PREFIX)x64
 
 # Microsoft Visual Studio 2015 Professional Edition
-DEFINE WINSDK81_BIN   = ENV(WINSDK81_PREFIX)x86\
+DEFINE WINSDK81_BIN   = ENV(WINSDK81x86_PREFIX)x86
 DEFINE WINSDK81x86_BIN= ENV(WINSDK81x86_PREFIX)x64
 
 # These defines are needed for certain Microsoft Visual Studio tools that
-- 
2.11.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] SecurityPkg:/Tcg2Dxe: remove 4G limitation

2016-12-12 Thread Zhang, Chao B
Reviewed-by: Chao Zhang 





Thanks & Best regards
Chao Zhang

-Original Message-
From: Yao, Jiewen 
Sent: Monday, December 12, 2016 3:03 PM
To: edk2-devel@lists.01.org
Cc: Zhang, Chao B; Zeng, Star
Subject: [PATCH] SecurityPkg:/Tcg2Dxe: remove 4G limitation

Tcg2Dxe allocates event log below 4G. It is unnecessary.

Cc: Chao Zhang 
Cc: Star Zeng 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao 
Reviewed-by: Star Zeng 
---
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c 
b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
index 9e8dfae..cf2fe4e 100644
--- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
+++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c
@@ -1394,9 +1394,8 @@ SetupEventLog (
   for (Index = 0; Index < sizeof(mTcg2EventInfo)/sizeof(mTcg2EventInfo[0]); 
Index++) {
 if ((mTcgDxeData.BsCap.SupportedEventLogs & 
mTcg2EventInfo[Index].LogFormat) != 0) {
   mTcgDxeData.EventLogAreaStruct[Index].EventLogFormat = 
mTcg2EventInfo[Index].LogFormat;
-  Lasa = (EFI_PHYSICAL_ADDRESS) (SIZE_4GB - 1);
   Status = gBS->AllocatePages (
-  AllocateMaxAddress,
+  AllocateAnyPages,
   EfiBootServicesData,
   EFI_SIZE_TO_PAGES (PcdGet32 (PcdTcgLogAreaMinLen)),
   &Lasa
@@ -1496,9 +1495,8 @@ SetupEventLog (
   for (Index = 0; Index < sizeof(mTcg2EventInfo)/sizeof(mTcg2EventInfo[0]); 
Index++) {
 if ((mTcgDxeData.BsCap.SupportedEventLogs & 
mTcg2EventInfo[Index].LogFormat) != 0) {
   if (mTcg2EventInfo[Index].LogFormat == EFI_TCG2_EVENT_LOG_FORMAT_TCG_2) {
-Lasa = (EFI_PHYSICAL_ADDRESS) (SIZE_4GB - 1);
 Status = gBS->AllocatePages (
-AllocateMaxAddress,
+AllocateAnyPages,
 EfiACPIMemoryNVS,
 EFI_SIZE_TO_PAGES (PcdGet32 (PcdTcg2FinalLogAreaLen)),
 &Lasa
-- 
2.7.4.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] build failure trying to build gcc cross-compiler

2016-12-12 Thread Shragai, Yaron
You're right, cut-n-paste error, the page I referenced has no instructions on 
it, I meant to reference the page you did.  I got as far as the directions to 
build a cross compiler, then got stuck as indicated in the OP.

Thanks,
Yaron


-Original Message-
From: Richardson, Brian [mailto:brian.richard...@intel.com]
Sent: Monday, December 12, 2016 6:30 PM
To: Shragai, Yaron ; edk2-devel@lists.01.org
Subject: RE: build failure trying to build gcc cross-compiler

Actually, you should have ended up here ...
https://github.com/tianocore/tianocore.github.io/wiki/Common-instructions

The Ubuntu instructions link to 'Common instructions for Linux' (not UNIX). I 
will make some wiki edits to clarify this.

Thanks ... br
---
Brian Richardson, Senior Technical Marketing Engineer, Intel Software 
brian.richard...@intel.com -- @intel_Brian (Twitter & WeChat) 
https://software.intel.com/en-us/meet-the-developers/evangelists/team/brian-richardson


-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Shragai, 
Yaron
Sent: Monday, December 12, 2016 6:10 PM
To: edk2-devel@lists.01.org
Subject: Re: [edk2] build failure trying to build gcc cross-compiler

Thanks.  Note that the instructions at that link - differentiated by flavor of 
Linux - all end with a link to the instructions that I referenced ("The 
remaining instructions are common for most UNIX-like systems").  I did follow 
the special Ubuntu notes on the page you referenced before going on to the page 
I referenced.

Thanks,
Yaron

-Original Message-
From: Richardson, Brian [mailto:brian.richard...@intel.com]
Sent: Monday, December 12, 2016 6:05 PM
To: Shragai, Yaron ; edk2-devel@lists.01.org
Subject: RE: build failure trying to build gcc cross-compiler

The instructions you referenced are intended for non-Linux UNIX systems. Please 
try these instructions for Ubuntu LTS ...
https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC

I have recently updated these instructions for GCC5 on Ubuntu 16.04 LTS.

Thanks ... br
---
Brian Richardson, Senior Technical Marketing Engineer, Intel Software 
brian.richard...@intel.com -- @intel_Brian (Twitter & WeChat) 
https://software.intel.com/en-us/meet-the-developers/evangelists/team/brian-richardson

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Shragai, 
Yaron
Sent: Monday, December 12, 2016 3:55 PM
To: edk2-devel@lists.01.org
Subject: [edk2] build failure trying to build gcc cross-compiler

Hello,
I am trying to build the Tianocore source from 
https://github.com/tianocore/edk2, as per the instructions here: 
https://github.com/tianocore/tianocore.github.io/wiki/Common-instructions-for-Unix

I am runnin on a Virtualbox VM running Ubuntu Desktop LTS.

I get as far as the "Build gcc x64 UEFI cross compiler" section.
The script mingw-gcc-build.py contains hardcoded references to download 
binutils and gcc.
In the case of binutils, it references a version that no longer exists in the 
archive (version 2.20.51.0.5).
In the case of gcc, it references version 4.3.0, on ftpmirror.gnu.org/gcc/, 
which redirects to other mirror sites, many of which are blocked by my firewall.
I tried getting around this by downloaded the files myself, and commented out 
the part of the script that downloads the sources (the call to sources.GetAll() 
- lines 553-558).
I downloaded binutils version 2.24.51.0.2, and gcc vesion 2.24.51.0.2.
It appears that binutils built, but gcc is not building.
Any advice?
Is there an updated version of mingw-gcc-build.py?

Extracting ./src/gcc-4.3.0.tar.bz2:
Extracting ./src/binutils-2.24.51.0.2.tar.bz2:
binutils [config] ... [done]
binutils [build] ... [done]
binutils [install] ... [done]
binutils module is now built and installed gcc [config] ... [done] gcc [build] 
... [failed!] Traceback (most recent call last):
  File "./mingw-gcc-build.py", line 564, in 
App()
  File "./mingw-gcc-build.py", line 562, in __init__
Builder(sources, config).Build()
  File "./mingw-gcc-build.py", line 426, in Build
self.BuildModule('gcc')
  File "./mingw-gcc-build.py", line 473, in BuildModule
self.RunCommand(cmd, module, 'build')
  File "./mingw-gcc-build.py", line 511, in RunCommand
'See output log at %s' % self.config.Relative(logFile)
Exception: Failed to build gcc
See output log at ./build/log.txt

Thanks,
Yaron Shragai
yshra...@draper.com

  
Notice: This email and any attachments may contain proprietary (Draper 
non-public) and/or export-controlled information of Draper. If you are not the 
intended recipient of this email, please immediately notify the sender by 
replying to this email and immediately destroy all copies of this email.
  
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
___

Re: [edk2] build failure trying to build gcc cross-compiler

2016-12-12 Thread Richardson, Brian
Actually, you should have ended up here ...
https://github.com/tianocore/tianocore.github.io/wiki/Common-instructions 

The Ubuntu instructions link to 'Common instructions for Linux' (not UNIX). I 
will make some wiki edits to clarify this.

Thanks ... br
---
Brian Richardson, Senior Technical Marketing Engineer, Intel Software
brian.richard...@intel.com -- @intel_Brian (Twitter & WeChat)
https://software.intel.com/en-us/meet-the-developers/evangelists/team/brian-richardson
 


-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Shragai, 
Yaron
Sent: Monday, December 12, 2016 6:10 PM
To: edk2-devel@lists.01.org
Subject: Re: [edk2] build failure trying to build gcc cross-compiler

Thanks.  Note that the instructions at that link - differentiated by flavor of 
Linux - all end with a link to the instructions that I referenced ("The 
remaining instructions are common for most UNIX-like systems").  I did follow 
the special Ubuntu notes on the page you referenced before going on to the page 
I referenced.

Thanks,
Yaron

-Original Message-
From: Richardson, Brian [mailto:brian.richard...@intel.com]
Sent: Monday, December 12, 2016 6:05 PM
To: Shragai, Yaron ; edk2-devel@lists.01.org
Subject: RE: build failure trying to build gcc cross-compiler

The instructions you referenced are intended for non-Linux UNIX systems. Please 
try these instructions for Ubuntu LTS ...
https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC

I have recently updated these instructions for GCC5 on Ubuntu 16.04 LTS.

Thanks ... br
---
Brian Richardson, Senior Technical Marketing Engineer, Intel Software 
brian.richard...@intel.com -- @intel_Brian (Twitter & WeChat) 
https://software.intel.com/en-us/meet-the-developers/evangelists/team/brian-richardson

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Shragai, 
Yaron
Sent: Monday, December 12, 2016 3:55 PM
To: edk2-devel@lists.01.org
Subject: [edk2] build failure trying to build gcc cross-compiler

Hello,
I am trying to build the Tianocore source from 
https://github.com/tianocore/edk2, as per the instructions here: 
https://github.com/tianocore/tianocore.github.io/wiki/Common-instructions-for-Unix

I am runnin on a Virtualbox VM running Ubuntu Desktop LTS.

I get as far as the "Build gcc x64 UEFI cross compiler" section.
The script mingw-gcc-build.py contains hardcoded references to download 
binutils and gcc.
In the case of binutils, it references a version that no longer exists in the 
archive (version 2.20.51.0.5).
In the case of gcc, it references version 4.3.0, on ftpmirror.gnu.org/gcc/, 
which redirects to other mirror sites, many of which are blocked by my firewall.
I tried getting around this by downloaded the files myself, and commented out 
the part of the script that downloads the sources (the call to sources.GetAll() 
- lines 553-558).
I downloaded binutils version 2.24.51.0.2, and gcc vesion 2.24.51.0.2.
It appears that binutils built, but gcc is not building.
Any advice?
Is there an updated version of mingw-gcc-build.py?

Extracting ./src/gcc-4.3.0.tar.bz2:
Extracting ./src/binutils-2.24.51.0.2.tar.bz2:
binutils [config] ... [done]
binutils [build] ... [done]
binutils [install] ... [done]
binutils module is now built and installed gcc [config] ... [done] gcc [build] 
... [failed!] Traceback (most recent call last):
  File "./mingw-gcc-build.py", line 564, in 
App()
  File "./mingw-gcc-build.py", line 562, in __init__
Builder(sources, config).Build()
  File "./mingw-gcc-build.py", line 426, in Build
self.BuildModule('gcc')
  File "./mingw-gcc-build.py", line 473, in BuildModule
self.RunCommand(cmd, module, 'build')
  File "./mingw-gcc-build.py", line 511, in RunCommand
'See output log at %s' % self.config.Relative(logFile)
Exception: Failed to build gcc
See output log at ./build/log.txt

Thanks,
Yaron Shragai
yshra...@draper.com

  
Notice: This email and any attachments may contain proprietary (Draper 
non-public) and/or export-controlled information of Draper. If you are not the 
intended recipient of this email, please immediately notify the sender by 
replying to this email and immediately destroy all copies of this email.
  
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

 Notice: This email and any attachments may contain proprietary (Draper 
non-public) and/or export-controlled information of Draper. If you are not the 
intended recipient of this email, please immediately notify the sender by 
replying to this email and immediately destroy all copies of this email.

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinf

Re: [edk2] $ escape sequence at build_rule.txt

2016-12-12 Thread Andrew Fish

> On Dec 12, 2016, at 1:49 PM, Peter Kirmeier  wrote:
> 
> Hi Andrew,
> 
> the line I wrote first..
>"$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}" infile.in >
> outfile.out
> .. failed with this error message..
>makefile(527) : fatal error U1001: Syntaxfehler: ung³ltiges Zeichen "/"
> in Makro 
>   (means syntax error due to invalid character "/" in macro)
> ..and brought this result at the makefile:
>"$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$/,\"\"); print}" infile.in >
> outfile.out
> 

Peter,

You can also looks at the makefile (GNUmakefile) produced by the build as they 
will live in the Build/ output directories. 

> Also with this line..
>"$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\/,\"\"); print}" infile.in >
> outfile.out
> .. I get exactly the same error and output (multiple dollars are stripped
> down to a single one)
> 
> Tried to get some more details of how the macros work by looking at python
> scripts.
> All I see is that only fixed macros are supported like ${s_base} or
> $(OUTPUT_DIR).
> I couldn't find a way to actually espace the $(xx) sequence at all.
> 
> Here are some more tries to figure out how the $ is processed:
> 
> $() fails because no macro name is set but prints $() into the makefile,
> $($) fails because second $ is unknown and prints $($) into the makefile,
> ${} fails because { is no valid character but prints ${} into the makefile,
> $ or $$ or $$$ or  .. fails because next character "/" invalid and
> prints a single $ into the makefile.
> 
> It seems there is one exception that multiple $ signs will not be printed
> 1:1 into the makefile. 
> All other tries were printed correctly into the makefile.
> So if $$ would be printed 1:1, too, it should work as I expected.
> Unfortunately I don't get $$ with anyone of them.
> 
> Guess there is no support for any escape sequence yet, right?

Sorry I was just taking a guess. It looks like an issue in how the file is 
parsed hopefully the maintainer can chime in with more details. 

Short term can you make it work if you pass the pattern in via a file (awk -f)? 
You should be able to use the existing macros to point to a file checked into 
your source tree. 

Thanks,

Andrew Fish

> Any idea to get this working and/or in case $$ should work in
> build_rules.txt, would you plan to fix this?
> 
> Best Regards,
>  Peter Kirmeier
> 
> PS: Maybe a quick and simple solution could be to add a predefined $(DOLLAR)
> marco or anything like that into the python scripts?
> 
> 
> -Ursprüngliche Nachricht-
> Von: edk2-devel [mailto:edk2-devel-boun...@ml01.01.org] Im Auftrag von
> Andrew Fish
> Gesendet: Montag, 12. Dezember 2016 18:27
> An: peter.kirme...@ts.fujitsu.com
> Cc: edk2-devel@lists.01.org
> Betreff: Re: [edk2] $ escape sequence at build_rule.txt
> 
> 
>> On Dec 12, 2016, at 2:31 AM, peter.kirme...@ts.fujitsu.com wrote:
>> 
>> Hi all,
>> 
>> I tried to add a AWK replacement into the build_rules to become part of
> the generated makefiles:
>> 
>>   
>>   "$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}" infile.in
>> outfile.out
>> 
>> Unfortunately I don't get it, how the dollar sign can be escaped to the
> doubled $$ which is used by make for placing a single $ at the command.
>> 
>> Can someone help?
>> 
> 
> Peter,
> 
> Do you think the build_rules.txt parse is removing one of the $? I'm not
> sure if this will work but what happens if you use 4 $? 
> 
> What do you see in the generated makefile?
> 
> Thanks,
> 
> Andrew Fish
> 
>> Thanks,
>> Peter
>> 
>> ---
>> Peter Kirmeier
>> Senior Firmware Developer
>> Client Computing Devices Engineering
>> 
>> FUJITSU
>> Buergermeister-Ulrich-Strasse 100, 86199 Augsburg, Germany
>> Tel.: +49 (821) 804 3227
>> Fax: +49 (821) 804 83227
>> E-mail: peter.kirme...@ts.fujitsu.com
>> Web: ts.fujitsu.com
>> Company: Fujitsu Technology Solutions GmbH / ts.fujitsu.com/imprint
>> This communication contains information that is confidential, proprietary
> in nature and/or privileged.  It is for the exclusive use of the intended
> recipient(s). If you are not the intended recipient(s) or the person
> responsible for delivering it to the intended recipient(s), please note that
> any form of dissemination, distribution or copying of this communication is
> strictly prohibited and may be unlawful. If you have received this
> communication in error, please immediately notify the sender and delete the
> original communication. Thank you for your cooperation.
>> Please be advised that neither Fujitsu, its affiliates, its employees or
> agents accept liability for any errors, omissions or damages caused by
> delays of receipt or by any virus infection in this message or its
> attachments, or which may otherwise arise as a result of this e-mail
> transmission.
>> 
>> ___
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
> 
> _

Re: [edk2] build failure trying to build gcc cross-compiler

2016-12-12 Thread Shragai, Yaron
Thanks.  Note that the instructions at that link - differentiated by flavor of 
Linux - all end with a link to the instructions that I referenced ("The 
remaining instructions are common for most UNIX-like systems").  I did follow 
the special Ubuntu notes on the page you referenced before going on to the page 
I referenced.

Thanks,
Yaron

-Original Message-
From: Richardson, Brian [mailto:brian.richard...@intel.com]
Sent: Monday, December 12, 2016 6:05 PM
To: Shragai, Yaron ; edk2-devel@lists.01.org
Subject: RE: build failure trying to build gcc cross-compiler

The instructions you referenced are intended for non-Linux UNIX systems. Please 
try these instructions for Ubuntu LTS ...
https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC

I have recently updated these instructions for GCC5 on Ubuntu 16.04 LTS.

Thanks ... br
---
Brian Richardson, Senior Technical Marketing Engineer, Intel Software 
brian.richard...@intel.com -- @intel_Brian (Twitter & WeChat) 
https://software.intel.com/en-us/meet-the-developers/evangelists/team/brian-richardson

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Shragai, 
Yaron
Sent: Monday, December 12, 2016 3:55 PM
To: edk2-devel@lists.01.org
Subject: [edk2] build failure trying to build gcc cross-compiler

Hello,
I am trying to build the Tianocore source from 
https://github.com/tianocore/edk2, as per the instructions here: 
https://github.com/tianocore/tianocore.github.io/wiki/Common-instructions-for-Unix

I am runnin on a Virtualbox VM running Ubuntu Desktop LTS.

I get as far as the "Build gcc x64 UEFI cross compiler" section.
The script mingw-gcc-build.py contains hardcoded references to download 
binutils and gcc.
In the case of binutils, it references a version that no longer exists in the 
archive (version 2.20.51.0.5).
In the case of gcc, it references version 4.3.0, on ftpmirror.gnu.org/gcc/, 
which redirects to other mirror sites, many of which are blocked by my firewall.
I tried getting around this by downloaded the files myself, and commented out 
the part of the script that downloads the sources (the call to sources.GetAll() 
- lines 553-558).
I downloaded binutils version 2.24.51.0.2, and gcc vesion 2.24.51.0.2.
It appears that binutils built, but gcc is not building.
Any advice?
Is there an updated version of mingw-gcc-build.py?

Extracting ./src/gcc-4.3.0.tar.bz2:
Extracting ./src/binutils-2.24.51.0.2.tar.bz2:
binutils [config] ... [done]
binutils [build] ... [done]
binutils [install] ... [done]
binutils module is now built and installed gcc [config] ... [done] gcc [build] 
... [failed!] Traceback (most recent call last):
  File "./mingw-gcc-build.py", line 564, in 
App()
  File "./mingw-gcc-build.py", line 562, in __init__
Builder(sources, config).Build()
  File "./mingw-gcc-build.py", line 426, in Build
self.BuildModule('gcc')
  File "./mingw-gcc-build.py", line 473, in BuildModule
self.RunCommand(cmd, module, 'build')
  File "./mingw-gcc-build.py", line 511, in RunCommand
'See output log at %s' % self.config.Relative(logFile)
Exception: Failed to build gcc
See output log at ./build/log.txt

Thanks,
Yaron Shragai
yshra...@draper.com

  
Notice: This email and any attachments may contain proprietary (Draper 
non-public) and/or export-controlled information of Draper. If you are not the 
intended recipient of this email, please immediately notify the sender by 
replying to this email and immediately destroy all copies of this email.
  
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

 Notice: This email and any attachments may contain proprietary (Draper 
non-public) and/or export-controlled information of Draper. If you are not the 
intended recipient of this email, please immediately notify the sender by 
replying to this email and immediately destroy all copies of this email.

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] build failure trying to build gcc cross-compiler

2016-12-12 Thread Richardson, Brian
The instructions you referenced are intended for non-Linux UNIX systems. Please 
try these instructions for Ubuntu LTS ...
https://github.com/tianocore/tianocore.github.io/wiki/Using-EDK-II-with-Native-GCC
 

I have recently updated these instructions for GCC5 on Ubuntu 16.04 LTS.

Thanks ... br
---
Brian Richardson, Senior Technical Marketing Engineer, Intel Software
brian.richard...@intel.com -- @intel_Brian (Twitter & WeChat)
https://software.intel.com/en-us/meet-the-developers/evangelists/team/brian-richardson
 

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Shragai, 
Yaron
Sent: Monday, December 12, 2016 3:55 PM
To: edk2-devel@lists.01.org
Subject: [edk2] build failure trying to build gcc cross-compiler

Hello,
I am trying to build the Tianocore source from 
https://github.com/tianocore/edk2, as per the instructions here: 
https://github.com/tianocore/tianocore.github.io/wiki/Common-instructions-for-Unix

I am runnin on a Virtualbox VM running Ubuntu Desktop LTS.

I get as far as the "Build gcc x64 UEFI cross compiler" section.
The script mingw-gcc-build.py contains hardcoded references to download 
binutils and gcc.
In the case of binutils, it references a version that no longer exists in the 
archive (version 2.20.51.0.5).
In the case of gcc, it references version 4.3.0, on ftpmirror.gnu.org/gcc/, 
which redirects to other mirror sites, many of which are blocked by my firewall.
I tried getting around this by downloaded the files myself, and commented out 
the part of the script that downloads the sources (the call to sources.GetAll() 
- lines 553-558).
I downloaded binutils version 2.24.51.0.2, and gcc vesion 2.24.51.0.2.
It appears that binutils built, but gcc is not building.
Any advice?
Is there an updated version of mingw-gcc-build.py?

Extracting ./src/gcc-4.3.0.tar.bz2:
Extracting ./src/binutils-2.24.51.0.2.tar.bz2:
binutils [config] ... [done]
binutils [build] ... [done]
binutils [install] ... [done]
binutils module is now built and installed gcc [config] ... [done] gcc [build] 
... [failed!] Traceback (most recent call last):
  File "./mingw-gcc-build.py", line 564, in 
App()
  File "./mingw-gcc-build.py", line 562, in __init__
Builder(sources, config).Build()
  File "./mingw-gcc-build.py", line 426, in Build
self.BuildModule('gcc')
  File "./mingw-gcc-build.py", line 473, in BuildModule
self.RunCommand(cmd, module, 'build')
  File "./mingw-gcc-build.py", line 511, in RunCommand
'See output log at %s' % self.config.Relative(logFile)
Exception: Failed to build gcc
See output log at ./build/log.txt

Thanks,
Yaron Shragai
yshra...@draper.com

  
Notice: This email and any attachments may contain proprietary (Draper 
non-public) and/or export-controlled information of Draper. If you are not the 
intended recipient of this email, please immediately notify the sender by 
replying to this email and immediately destroy all copies of this email.
  
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] $ escape sequence at build_rule.txt

2016-12-12 Thread Peter Kirmeier
Hi Andrew,

the line I wrote first..
"$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}" infile.in >
outfile.out
.. failed with this error message..
makefile(527) : fatal error U1001: Syntaxfehler: ung³ltiges Zeichen "/"
in Makro 
   (means syntax error due to invalid character "/" in macro)
..and brought this result at the makefile:
"$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$/,\"\"); print}" infile.in >
outfile.out

Also with this line..
"$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\/,\"\"); print}" infile.in >
outfile.out
.. I get exactly the same error and output (multiple dollars are stripped
down to a single one)

Tried to get some more details of how the macros work by looking at python
scripts.
All I see is that only fixed macros are supported like ${s_base} or
$(OUTPUT_DIR).
I couldn't find a way to actually espace the $(xx) sequence at all.

Here are some more tries to figure out how the $ is processed:

$() fails because no macro name is set but prints $() into the makefile,
$($) fails because second $ is unknown and prints $($) into the makefile,
${} fails because { is no valid character but prints ${} into the makefile,
$ or $$ or $$$ or  .. fails because next character "/" invalid and
prints a single $ into the makefile.

It seems there is one exception that multiple $ signs will not be printed
1:1 into the makefile. 
All other tries were printed correctly into the makefile.
So if $$ would be printed 1:1, too, it should work as I expected.
Unfortunately I don't get $$ with anyone of them.

Guess there is no support for any escape sequence yet, right?
Any idea to get this working and/or in case $$ should work in
build_rules.txt, would you plan to fix this?

Best Regards,
  Peter Kirmeier

PS: Maybe a quick and simple solution could be to add a predefined $(DOLLAR)
marco or anything like that into the python scripts?


-Ursprüngliche Nachricht-
Von: edk2-devel [mailto:edk2-devel-boun...@ml01.01.org] Im Auftrag von
Andrew Fish
Gesendet: Montag, 12. Dezember 2016 18:27
An: peter.kirme...@ts.fujitsu.com
Cc: edk2-devel@lists.01.org
Betreff: Re: [edk2] $ escape sequence at build_rule.txt


> On Dec 12, 2016, at 2:31 AM, peter.kirme...@ts.fujitsu.com wrote:
> 
> Hi all,
> 
> I tried to add a AWK replacement into the build_rules to become part of
the generated makefiles:
> 
>
>"$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}" infile.in
> outfile.out
> 
> Unfortunately I don't get it, how the dollar sign can be escaped to the
doubled $$ which is used by make for placing a single $ at the command.
> 
> Can someone help?
> 

Peter,

Do you think the build_rules.txt parse is removing one of the $? I'm not
sure if this will work but what happens if you use 4 $? 

What do you see in the generated makefile?

Thanks,

Andrew Fish

> Thanks,
>  Peter
> 
> ---
> Peter Kirmeier
> Senior Firmware Developer
> Client Computing Devices Engineering
> 
> FUJITSU
> Buergermeister-Ulrich-Strasse 100, 86199 Augsburg, Germany
> Tel.: +49 (821) 804 3227
> Fax: +49 (821) 804 83227
> E-mail: peter.kirme...@ts.fujitsu.com
> Web: ts.fujitsu.com
> Company: Fujitsu Technology Solutions GmbH / ts.fujitsu.com/imprint
> This communication contains information that is confidential, proprietary
in nature and/or privileged.  It is for the exclusive use of the intended
recipient(s). If you are not the intended recipient(s) or the person
responsible for delivering it to the intended recipient(s), please note that
any form of dissemination, distribution or copying of this communication is
strictly prohibited and may be unlawful. If you have received this
communication in error, please immediately notify the sender and delete the
original communication. Thank you for your cooperation.
> Please be advised that neither Fujitsu, its affiliates, its employees or
agents accept liability for any errors, omissions or damages caused by
delays of receipt or by any virus infection in this message or its
attachments, or which may otherwise arise as a result of this e-mail
transmission.
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] build failure trying to build gcc cross-compiler

2016-12-12 Thread Bill Paul
Of all the gin joints in all the towns in all the world, Shragai, Yaron had to 
walk into mine at 12:54:53 on Monday 12 December 2016 and say:

> Hello,
> I am trying to build the Tianocore source from
> https://github.com/tianocore/edk2, as per the instructions here:
> https://github.com/tianocore/tianocore.github.io/wiki/Common-instructions-
> for-Unix
> 
> I am runnin on a Virtualbox VM running Ubuntu Desktop LTS.
> 
> I get as far as the "Build gcc x64 UEFI cross compiler" section.
> The script mingw-gcc-build.py contains hardcoded references to download
> binutils and gcc. In the case of binutils, it references a version that no
> longer exists in the archive (version 2.20.51.0.5). In the case of gcc, it
> references version 4.3.0, on ftpmirror.gnu.org/gcc/, which redirects to
> other mirror sites, many of which are blocked by my firewall. I tried
> getting around this by downloaded the files myself, and commented out the
> part of the script that downloads the sources (the call to
> sources.GetAll() - lines 553-558). I downloaded binutils version
> 2.24.51.0.2, and gcc vesion 2.24.51.0.2. It appears that binutils built,
> but gcc is not building.
> Any advice?
> Is there an updated version of mingw-gcc-build.py?

I submitted a patch some time ago to fix the bitrot in cross-compiler 
toolchain case which updates the script to use GCC 4.9.3, but for reasons that 
completely baffle me, there is continued resistance to applying it. The 
preference seems to be to use a native compiler instead. This works if you 
intend to do an IA32 or X64 build and you have an IA32/X64 host system and 
saves you the time/trouble of setting up a cross-build toolchain. However I 
continue to maintain that using a cross-compiler is technically the better 
solution, especially for OSes other than Windows where the native executable 
format is not PE/COFF.

The patches I created at least make using the cross-compiler build an option 
again. I uploaded my patches along with the original and modified files here:

http://people.freebsd.org/~wpaul/edk2/patch

The tools_def.template file needed some updates because the newer version of 
GCC behaves a little differently than GCC 4.3.0 did with respect to underscore 
decoration of function names. (GCC 4.3.0 didn't actually implement the 
convention correctly.) Also, the OVMF build uses a flag to enforce alignment 
which the newer version of GNU ld doesn't support. (The flags for PE/COFF 
binaries are different from those for ELF binaries.)

Note that while this fixes the script to build a newer version of GCC, that 
alone may not correct your problem: it's hard to say because you didn't show 
us the log file containing the actual build error. Building GCC requires 
libmpfr and libgmp to be present, along with their associated header files. 
With many Linux distributions, simply installing the library packages is not 
enough: that just gives you the shared library, but omits the header files 
that go with it. For those you usually need to install a "devel" package.

I have used these patches to successfully build a cross-compile toolchain and 
OVMF images on my FreeBSD host system. I also have some (now-stale) 
instructions for how I did the build at:

http://people.freebsd.org/~wpaul/edk2/README.txt

It's possible the tools_def.template and OVMF build files have changed since I 
created this patch, so you may have to apply some of the changes manually. 
They are pretty straightforward though. Standard disclaimers apply. If it 
breaks, you get to keep both pieces.

-Bill

> Extracting ./src/gcc-4.3.0.tar.bz2:
> Extracting ./src/binutils-2.24.51.0.2.tar.bz2:
> binutils [config] ... [done]
> binutils [build] ... [done]
> binutils [install] ... [done]
> binutils module is now built and installed
> gcc [config] ... [done]
> gcc [build] ... [failed!]
> Traceback (most recent call last):
>   File "./mingw-gcc-build.py", line 564, in 
> App()
>   File "./mingw-gcc-build.py", line 562, in __init__
> Builder(sources, config).Build()
>   File "./mingw-gcc-build.py", line 426, in Build
> self.BuildModule('gcc')
>   File "./mingw-gcc-build.py", line 473, in BuildModule
> self.RunCommand(cmd, module, 'build')
>   File "./mingw-gcc-build.py", line 511, in RunCommand
> 'See output log at %s' % self.config.Relative(logFile)
> Exception: Failed to build gcc
> See output log at ./build/log.txt
> 
> Thanks,
> Yaron Shragai
> yshra...@draper.com
> 
>   
> Notice: This email and any attachments may contain proprietary (Draper
> non-public) and/or export-controlled information of Draper. If you are not
> the intended recipient of this email, please immediately notify the sender
> by replying to this email and immediately destroy all copies of this
> email. 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

-- 
==

[edk2] build failure trying to build gcc cross-compiler

2016-12-12 Thread Shragai, Yaron
Hello,
I am trying to build the Tianocore source from 
https://github.com/tianocore/edk2, as per the instructions here: 
https://github.com/tianocore/tianocore.github.io/wiki/Common-instructions-for-Unix

I am runnin on a Virtualbox VM running Ubuntu Desktop LTS.

I get as far as the "Build gcc x64 UEFI cross compiler" section.
The script mingw-gcc-build.py contains hardcoded references to download 
binutils and gcc.
In the case of binutils, it references a version that no longer exists in the 
archive (version 2.20.51.0.5).
In the case of gcc, it references version 4.3.0, on ftpmirror.gnu.org/gcc/, 
which redirects to other mirror sites, many of which are blocked by my firewall.
I tried getting around this by downloaded the files myself, and commented out 
the part of the script that downloads the sources (the call to sources.GetAll() 
- lines 553-558).
I downloaded binutils version 2.24.51.0.2, and gcc vesion 2.24.51.0.2.
It appears that binutils built, but gcc is not building.
Any advice?
Is there an updated version of mingw-gcc-build.py?

Extracting ./src/gcc-4.3.0.tar.bz2:
Extracting ./src/binutils-2.24.51.0.2.tar.bz2:
binutils [config] ... [done]
binutils [build] ... [done]
binutils [install] ... [done]
binutils module is now built and installed
gcc [config] ... [done]
gcc [build] ... [failed!]
Traceback (most recent call last):
  File "./mingw-gcc-build.py", line 564, in 
App()
  File "./mingw-gcc-build.py", line 562, in __init__
Builder(sources, config).Build()
  File "./mingw-gcc-build.py", line 426, in Build
self.BuildModule('gcc')
  File "./mingw-gcc-build.py", line 473, in BuildModule
self.RunCommand(cmd, module, 'build')
  File "./mingw-gcc-build.py", line 511, in RunCommand
'See output log at %s' % self.config.Relative(logFile)
Exception: Failed to build gcc
See output log at ./build/log.txt

Thanks,
Yaron Shragai
yshra...@draper.com

  
Notice: This email and any attachments may contain proprietary (Draper 
non-public) and/or export-controlled information of Draper. If you are not the 
intended recipient of this email, please immediately notify the sender by 
replying to this email and immediately destroy all copies of this email.
  
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] How to silence a build?

2016-12-12 Thread Michael Zimmermann
these build command options are probably what you want:

  -s, --silent  Make use of silent mode of (n)make.
  -q, --quiet   Disable all messages except FATAL ERRORS.
  -v, --verbose Turn on verbose output with informational messages
printed, including library instances selected, final
dependency expression, and warning messages, etc.
  -d DEBUG, --debug=DEBUG
Enable debug messages at specified level.

Thanks,
Michael

On Mon, Dec 12, 2016 at 7:34 PM, Andrew Fish  wrote:
>
>> On Dec 12, 2016, at 10:27 AM, Ryan Harkin  wrote:
>>
>> Hello all,
>>
>> Perhaps someone here can save me trying to decrypt the EDK2 build system.
>>
>> When I build EDK2, I get lots of output like this single line
>> generated for compiling a single source file:
>>
>> "/linaro/extra-data/ci/workspace-lsk/tools/gcc/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc"
>> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/ArmPlatformPkg/ArmVExpressPkg/Include
>> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM
>> -g -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds
>> -ffunction-sections -fdata-sections -include AutoGen.h -fno-common
>> -DSTRING_ARRAY_NAME=UiAppStrings -g -Os -fshort-wchar
>> -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include
>> AutoGen.h -fno-common -mlittle-endian -fno-short-enums -fverbose-asm
>> -funsigned-char -ffunction-sections -fdata-sections -fno-builtin
>> -Wno-address -fno-asynchronous-unwind-tables -save-temps -O0
>> -mcmodel=small -c -o
>> /linaro/extra-data/ci/workspace-lsk/uefi/edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC5/AARCH64/MdeModulePkg/Application/UiApp/UiApp/OUTPUT/./String.obj
>> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdeModulePkg/Application/UiApp
>> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC5/AARCH64/MdeModulePkg/Application/UiApp/UiApp/DEBUG
>> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdePkg
>> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdePkg/Include
>> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdePkg/Include/AArch64
>> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdeModulePkg
>> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdeModulePkg/Include
>> /linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdeModulePkg/Application/UiApp/String.c
>>
>> When I build the linux kernel, I see output like this:
>>
>>  CC  kernel/nsproxy.o
>>  OBJCOPY arch/arm64/kernel/efi-entry.stub.o
>>
>> Is there an option to make EDK2 do something like this?
>>
>> Or can someone point me where I might look so I can think about
>> implementing it?
>
> Ryan,
>
> The content of Conf/build_rule.txt is used to construct the makefiles. The 
> rules under  will get translated into the generated makefiles. 
> If you prepend an @ that makefile line should no longer echo.
>
> The Conf/build_rule.txt will get copied from the 
> BaseTools/Conf//build_rule.template if it does not exist when you run 
> edksetup.sh.
>
> You can always add an @print line to print out anything you want.
>
> Thanks,
>
> Andrew Fish
>
>
>>  I've had a look around and wasn't able to work out
>> what was generating the output.  I guess that means my chances of
>> changing the behaviour are slim too...
>>
>> Thanks,
>> Ryan.
>> ___
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
>
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] How to silence a build?

2016-12-12 Thread Andrew Fish

> On Dec 12, 2016, at 10:27 AM, Ryan Harkin  wrote:
> 
> Hello all,
> 
> Perhaps someone here can save me trying to decrypt the EDK2 build system.
> 
> When I build EDK2, I get lots of output like this single line
> generated for compiling a single source file:
> 
> "/linaro/extra-data/ci/workspace-lsk/tools/gcc/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc"
> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/ArmPlatformPkg/ArmVExpressPkg/Include
> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM
> -g -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds
> -ffunction-sections -fdata-sections -include AutoGen.h -fno-common
> -DSTRING_ARRAY_NAME=UiAppStrings -g -Os -fshort-wchar
> -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include
> AutoGen.h -fno-common -mlittle-endian -fno-short-enums -fverbose-asm
> -funsigned-char -ffunction-sections -fdata-sections -fno-builtin
> -Wno-address -fno-asynchronous-unwind-tables -save-temps -O0
> -mcmodel=small -c -o
> /linaro/extra-data/ci/workspace-lsk/uefi/edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC5/AARCH64/MdeModulePkg/Application/UiApp/UiApp/OUTPUT/./String.obj
> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdeModulePkg/Application/UiApp
> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC5/AARCH64/MdeModulePkg/Application/UiApp/UiApp/DEBUG
> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdePkg
> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdePkg/Include
> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdePkg/Include/AArch64
> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdeModulePkg
> -I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdeModulePkg/Include
> /linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdeModulePkg/Application/UiApp/String.c
> 
> When I build the linux kernel, I see output like this:
> 
>  CC  kernel/nsproxy.o
>  OBJCOPY arch/arm64/kernel/efi-entry.stub.o
> 
> Is there an option to make EDK2 do something like this?
> 
> Or can someone point me where I might look so I can think about
> implementing it?

Ryan,

The content of Conf/build_rule.txt is used to construct the makefiles. The 
rules under  will get translated into the generated makefiles. If 
you prepend an @ that makefile line should no longer echo. 

The Conf/build_rule.txt will get copied from the 
BaseTools/Conf//build_rule.template if it does not exist when you run 
edksetup.sh. 

You can always add an @print line to print out anything you want. 

Thanks,

Andrew Fish


>  I've had a look around and wasn't able to work out
> what was generating the output.  I guess that means my chances of
> changing the behaviour are slim too...
> 
> Thanks,
> Ryan.
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] How to silence a build?

2016-12-12 Thread Ryan Harkin
Hello all,

Perhaps someone here can save me trying to decrypt the EDK2 build system.

When I build EDK2, I get lots of output like this single line
generated for compiling a single source file:

"/linaro/extra-data/ci/workspace-lsk/tools/gcc/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc"
 
-I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/ArmPlatformPkg/ArmVExpressPkg/Include
-I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM
-g -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds
-ffunction-sections -fdata-sections -include AutoGen.h -fno-common
-DSTRING_ARRAY_NAME=UiAppStrings -g -Os -fshort-wchar
-fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include
AutoGen.h -fno-common -mlittle-endian -fno-short-enums -fverbose-asm
-funsigned-char -ffunction-sections -fdata-sections -fno-builtin
-Wno-address -fno-asynchronous-unwind-tables -save-temps -O0
-mcmodel=small -c -o
/linaro/extra-data/ci/workspace-lsk/uefi/edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC5/AARCH64/MdeModulePkg/Application/UiApp/UiApp/OUTPUT/./String.obj
-I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdeModulePkg/Application/UiApp
-I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC5/AARCH64/MdeModulePkg/Application/UiApp/UiApp/DEBUG
-I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdePkg
-I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdePkg/Include
-I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdePkg/Include/AArch64
-I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdeModulePkg
-I/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdeModulePkg/Include
/linaro/extra-data/ci/workspace-lsk/uefi/edk2/MdeModulePkg/Application/UiApp/String.c

When I build the linux kernel, I see output like this:

  CC  kernel/nsproxy.o
  OBJCOPY arch/arm64/kernel/efi-entry.stub.o

Is there an option to make EDK2 do something like this?

Or can someone point me where I might look so I can think about
implementing it?  I've had a look around and wasn't able to work out
what was generating the output.  I guess that means my chances of
changing the behaviour are slim too...

Thanks,
Ryan.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] $ escape sequence at build_rule.txt

2016-12-12 Thread Andrew Fish

> On Dec 12, 2016, at 2:31 AM, peter.kirme...@ts.fujitsu.com wrote:
> 
> Hi all,
> 
> I tried to add a AWK replacement into the build_rules to become part of the 
> generated makefiles:
> 
>
>"$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}" infile.in > 
> outfile.out
> 
> Unfortunately I don't get it, how the dollar sign can be escaped to the 
> doubled $$ which is used by make for placing a single $ at the command.
> 
> Can someone help?
> 

Peter,

Do you think the build_rules.txt parse is removing one of the $? I'm not sure 
if this will work but what happens if you use 4 $? 

What do you see in the generated makefile?

Thanks,

Andrew Fish

> Thanks,
>  Peter
> 
> ---
> Peter Kirmeier
> Senior Firmware Developer
> Client Computing Devices Engineering
> 
> FUJITSU
> Buergermeister-Ulrich-Strasse 100, 86199 Augsburg, Germany
> Tel.: +49 (821) 804 3227
> Fax: +49 (821) 804 83227
> E-mail: peter.kirme...@ts.fujitsu.com
> Web: ts.fujitsu.com
> Company: Fujitsu Technology Solutions GmbH / ts.fujitsu.com/imprint
> This communication contains information that is confidential, proprietary in 
> nature and/or privileged.  It is for the exclusive use of the intended 
> recipient(s). If you are not the intended recipient(s) or the person 
> responsible for delivering it to the intended recipient(s), please note that 
> any form of dissemination, distribution or copying of this communication is 
> strictly prohibited and may be unlawful. If you have received this 
> communication in error, please immediately notify the sender and delete the 
> original communication. Thank you for your cooperation.
> Please be advised that neither Fujitsu, its affiliates, its employees or 
> agents accept liability for any errors, omissions or damages caused by delays 
> of receipt or by any virus infection in this message or its attachments, or 
> which may otherwise arise as a result of this e-mail transmission.
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Xen-devel] [PATCH RFC 10/14] UefiCpuPkg/BaseXApicX2ApicLib: Fix initialisation on my system and ...

2016-12-12 Thread Anthony PERARD
On Fri, Dec 09, 2016 at 10:43:30AM +, Andrew Cooper wrote:
> On 09/12/16 06:48, Kinney, Michael D wrote:
> > Hi Anthony,
> >
> > Can you provide more details on why you want to expose internal APIs
> > in the library class?
> >
> > What is the specific issue?  Is the Local APIC in your environment 
> > not behaving the same as real HW?
> 
> Xen's LAPIC emulation should match real hardware (because we might even
> substitute it for real hardware APIC virtualisation support).
> 
> If Xen's LAPIC doesn't behave like real hardware, we should fix that,
> but first we should understand what the correct behaviour should be.

I'll try to find out what the real hardware is doing.

At least, I think there where nothing in the Intel manual about the
initial counter been reset.

-- 
Anthony PERARD
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH RFC 10/14] UefiCpuPkg/BaseXApicX2ApicLib: Fix initialisation on my system and ...

2016-12-12 Thread Anthony PERARD
On Fri, Dec 09, 2016 at 06:48:47AM +, Kinney, Michael D wrote:
> Hi Anthony,
> 
> Can you provide more details on why you want to expose internal APIs
> in the library class?

I think I'm only using WriteLocalApicReg() to change the init counter.
Maybe I can just call InitializeApicTimer() again instead.

-- 
Anthony PERARD
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] $ escape sequence at build_rule.txt

2016-12-12 Thread peter.kirme...@ts.fujitsu.com
Hi all,

I tried to add a AWK replacement into the build_rules to become part of the 
generated makefiles:


"$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}" infile.in > 
outfile.out

Unfortunately I don't get it, how the dollar sign can be escaped to the doubled 
$$ which is used by make for placing a single $ at the command.

Can someone help?

Thanks,
  Peter

---
Peter Kirmeier
Senior Firmware Developer
Client Computing Devices Engineering

FUJITSU
Buergermeister-Ulrich-Strasse 100, 86199 Augsburg, Germany
Tel.: +49 (821) 804 3227
Fax: +49 (821) 804 83227
E-mail: peter.kirme...@ts.fujitsu.com
Web: ts.fujitsu.com
Company: Fujitsu Technology Solutions GmbH / ts.fujitsu.com/imprint
This communication contains information that is confidential, proprietary in 
nature and/or privileged.  It is for the exclusive use of the intended 
recipient(s). If you are not the intended recipient(s) or the person 
responsible for delivering it to the intended recipient(s), please note that 
any form of dissemination, distribution or copying of this communication is 
strictly prohibited and may be unlawful. If you have received this 
communication in error, please immediately notify the sender and delete the 
original communication. Thank you for your cooperation.
Please be advised that neither Fujitsu, its affiliates, its employees or agents 
accept liability for any errors, omissions or damages caused by delays of 
receipt or by any virus infection in this message or its attachments, or which 
may otherwise arise as a result of this e-mail transmission.

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel