Hello community, here is the log from the commit of package fwts for openSUSE:Factory checked in at 2018-07-10 16:17:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fwts (Old) and /work/SRC/openSUSE:Factory/.fwts.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fwts" Tue Jul 10 16:17:06 2018 rev:35 rq:621832 version:18.06.02 Changes: -------- --- /work/SRC/openSUSE:Factory/fwts/fwts.changes 2018-05-19 15:42:59.725466037 +0200 +++ /work/SRC/openSUSE:Factory/.fwts.new/fwts.changes 2018-07-10 16:18:04.741290190 +0200 @@ -1,0 +2,30 @@ +Tue Jul 10 06:55:30 UTC 2018 - mplus...@suse.com + +- Dont build with -Werror (fixes build with gcc8) + +------------------------------------------------------------------- +Wed Jun 27 14:09:50 UTC 2018 - mplus...@suse.com + +- Update to version 18.06.02: + * ACPICA: Update to version 20180531 + * acpi: fadt: allow first reserved field to be 1 + * update_version.sh: also update version in snapcraft.yaml + * snapcraft.yaml: add in missing stage packages + * lib: fwts_set: fix API for fwts_set, add fwts_set_int + * lib: add small helpers top get/set /sys/power/pm_debug_messages + * acpi: s3: force enable /sys/power/pm_debug_messages + * acpi: s4: also check for file based swap files + * acpi: s4: force enable /sys/power/pm_debug_messages + * acpi: s3power: force enable /sys/power/pm_debug_messages + * acpi: hpet: fix getting invalid vendor ID and clock period + * acpica: fix linking issues when building non ACPI builds + * fwts_uefi: Fixing tiny typos in the uefi driver + * mtrr: fix incorrect type detection + +------------------------------------------------------------------- +Mon Jun 18 06:59:34 UTC 2018 - mplus...@suse.com + +- Update to version 18.05.01: + * No changelog available + +------------------------------------------------------------------- Old: ---- fwts-V18.05.00.tar.gz New: ---- fwts-V18.06.02.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fwts.spec ++++++ --- /var/tmp/diff_new_pack.ztLl1h/_old 2018-07-10 16:18:05.265289381 +0200 +++ /var/tmp/diff_new_pack.ztLl1h/_new 2018-07-10 16:18:05.265289381 +0200 @@ -17,7 +17,7 @@ Name: fwts -Version: 18.05.00 +Version: 18.06.02 Release: 0 Summary: Firmware Test Suite License: GPL-2.0-or-later @@ -57,6 +57,7 @@ %patch1 -p1 %build +find . -name Makefile.am -exec sed -i "s|-Werror||g" {} + autoreconf -fiv %configure \ --disable-static ++++++ fwts-V18.05.00.tar.gz -> fwts-V18.06.02.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/debian/changelog new/debian/changelog --- old/debian/changelog 2018-05-15 17:03:20.000000000 +0200 +++ new/debian/changelog 2018-06-21 10:56:44.000000000 +0200 @@ -1,3 +1,47 @@ +fwts (18.06.02-0ubuntu1) cosmic; urgency=medium + + [Colin Ian King] + * Revert "efi_runtime: build dkms for kernel that does not have efi_test" + (LP: #1777855) + + -- Ivan Hu <ivan...@ubuntu.com> Thu, 21 Jun 2018 16:53:26 +0800 + +fwts (18.06.01-0ubuntu1) cosmic; urgency=medium + + [Colin Ian King] + * snapcraft.yaml: fix name of staging package (LP: #1777662) + + -- Ivan Hu <ivan...@ubuntu.com> Thu, 21 Jun 2018 11:34:10 +0800 + +fwts (18.06.00-0ubuntu1) cosmic; urgency=medium + + [Alex Hung] + * acpi: fadt: allow first reserved field to be 1 + * efi_runtime: build dkms for kernel that does not have efi_test + + [Colin Ian King] + * update_version.sh: also update version in snapcraft.yaml + * snapcraft.yaml: add in missing stage packages + * ACPICA: Update to version 20180531 + * lib: fwts_set: fix API for fwts_set, add fwts_set_int + * lib: add small helpers top get/set /sys/power/pm_debug_messages + * acpi: s3: force enable /sys/power/pm_debug_messages (LP: #1772563) + * acpi: s4: also check for file based swap files + * acpi: s4: force enable /sys/power/pm_debug_messages (LP: #1772563) + * acpi: s3power: force enable /sys/power/pm_debug_messages (LP: #1772563) + * acpica: fix linking issues when building non ACPI builds + + [Ivan Hu] + * acpi: hpet: fix getting invalid vendor ID and clock period + + [Mathieu Trudel-Lapierre] + * fwts_uefi: Fixing tiny typos in the uefi driver + + [Stan Hung] + * mtrr: fix incorrect type detection + + -- Ivan Hu <ivan...@ubuntu.com> Tue, 19 Jun 2018 15:58:07 +0800 + fwts (18.05.00-0ubuntu1) cosmic; urgency=medium [Alex Hung] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapcraft.yaml new/snapcraft.yaml --- old/snapcraft.yaml 2018-05-15 17:03:20.000000000 +0200 +++ new/snapcraft.yaml 2018-06-21 10:56:44.000000000 +0200 @@ -1,5 +1,5 @@ name: fwts -version: V17.03.00 +version: V18.06.02 summary: The Firmware Test Suite (FWTS) description: This is a firmware test suite that performs sanity checks on system firmware. It is intended to identify BIOS and ACPI errors and if appropriate it will try to explain the errors and give advice to help workaround or fix firmware bugs. It is primarily intended to be a Linux-centric firmware troubleshooting tool. confinement: devmode @@ -8,6 +8,8 @@ fwts: plugin: autotools source: git://kernel.ubuntu.com/hwe/fwts + stage-packages: + - libfdt1 build-packages: - gcc - make diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpi/fadt/fadt.c new/src/acpi/fadt/fadt.c --- old/src/acpi/fadt/fadt.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpi/fadt/fadt.c 2018-06-21 10:56:44.000000000 +0200 @@ -395,6 +395,9 @@ { if (fadt->reserved == (uint8_t)0) fwts_passed(fw, "FADT first reserved field is zero."); + else if (fadt->reserved == (uint8_t)1) + fwts_passed(fw, "FADT first reserved field is one " + "(compatible with ACPI 1.0)."); else fwts_failed(fw, LOG_LEVEL_MEDIUM, "FADTReservedZero", "FADT first reserved field is not zero: 0x%02x", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpi/hpet/hpet.c new/src/acpi/hpet/hpet.c --- old/src/acpi/hpet/hpet.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpi/hpet/hpet.c 2018-06-21 10:56:44.000000000 +0200 @@ -428,12 +428,14 @@ return FWTS_ERROR; } - if (fwts_safe_memread32(hpet_base_v, HPET_REG_SIZE / 4) != FWTS_OK) { + if (fwts_safe_memread64(hpet_base_v, HPET_REG_SIZE / 8) != FWTS_OK) { fwts_log_info(fw, "Test skipped because HPET region cannot be read."); (void)fwts_munmap(hpet_base_v, HPET_REG_SIZE); return FWTS_SKIP; } + usleep(10); + hpet_id = *(uint64_t*) hpet_base_v; vendor_id = (hpet_id & 0xffff0000) >> 16; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpi/s3/s3.c new/src/acpi/s3/s3.c --- old/src/acpi/s3/s3.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpi/s3/s3.c 2018-06-21 10:56:44.000000000 +0200 @@ -493,6 +493,7 @@ int resume_too_long = 0; int awake_delay = s3_min_delay * 1000; int delta = (int)(s3_delay_delta * 1000.0); + int pm_debug; #if FWTS_ENABLE_LOGIND #if !GLIB_CHECK_VERSION(2,35,0) @@ -501,6 +502,9 @@ #endif #endif + (void)fwts_pm_debug_get(&pm_debug); + (void)fwts_pm_debug_set(1); + if (s3_multiple == 1) fwts_log_info(fw, "Defaulted to 1 test, use --s3-multiple=N to run more S3 cycles\n"); @@ -559,6 +563,10 @@ } } + /* Restore pm debug value */ + if (pm_debug != -1) + (void)fwts_pm_debug_set(pm_debug); + fwts_log_info(fw, "Completed S3 cycle(s)\n"); if (klog_errors > 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpi/s3power/s3power.c new/src/acpi/s3power/s3power.c --- old/src/acpi/s3power/s3power.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpi/s3power/s3power.c 2018-06-21 10:56:44.000000000 +0200 @@ -243,6 +243,7 @@ int status; int duration; int rc = FWTS_OK; + int pm_debug; bool offline; @@ -315,9 +316,16 @@ fwts_wakealarm_trigger(fw, s3power_sleep_delay); + (void)fwts_pm_debug_get(&pm_debug); + (void)fwts_pm_debug_set(1); + /* Do S3 here */ status = do_suspend(fwts_settings, 100, &duration, PM_SUSPEND); + /* Restore pm debug value */ + if (pm_debug != -1) + (void)fwts_pm_debug_set(pm_debug); + s3power_get_remaining_capacity(fw, &capacity_after_mAh, &capacity_after_mWh); s3power_difference(fw, capacity_before_mAh, capacity_after_mAh, battery_capacity_mAh, "mAh"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpi/s4/s4.c new/src/acpi/s4/s4.c --- old/src/acpi/s4/s4.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpi/s4/s4.c 2018-06-21 10:56:44.000000000 +0200 @@ -46,7 +46,8 @@ fwts_list* swap_devs; swap_devs = fwts_file_open_and_read("/proc/swaps"); - if (fwts_text_list_strstr(swap_devs, "/dev/") == NULL) { + if ((fwts_text_list_strstr(swap_devs, "/dev/") == NULL) && + (fwts_text_list_strstr(swap_devs, "file") == NULL)) { fwts_list_free(swap_devs, free); fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoSwap", "Cannot run hibernate test - machine appears to have NO swap."); @@ -364,6 +365,7 @@ int delta = (int)(s4_delay_delta * 1000.0); int tracing_buffer_size = -1; int ret = FWTS_OK; + int pm_debug; bool retried = false; #if FWTS_ENABLE_LOGIND @@ -373,6 +375,9 @@ #endif #endif + (void)fwts_pm_debug_get(&pm_debug); + (void)fwts_pm_debug_set(1); + if (s4_multiple == 1) fwts_log_info(fw, "Defaulted to run 1 test, run --s4-multiple=N to run more S4 cycles\n"); @@ -449,6 +454,10 @@ } } + /* Restore pm debug value */ + if (pm_debug != -1) + (void)fwts_pm_debug_set(pm_debug); + if (tracing_buffer_size > 0) { char tmp[32]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/fwts_acpica.c new/src/acpica/fwts_acpica.c --- old/src/acpica/fwts_acpica.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/fwts_acpica.c 2018-06-21 10:56:44.000000000 +0200 @@ -80,6 +80,7 @@ BOOLEAN AcpiGbl_AbortLoopOnTimeout = FALSE; BOOLEAN AcpiGbl_IgnoreErrors = FALSE; +BOOLEAN AcpiGbl_VerboseHandlers = FALSE; UINT8 AcpiGbl_RegionFillValue = 0; static ACPI_TABLE_DESC Tables[ACPI_MAX_INIT_TABLES]; /* ACPICA Table descriptors */ @@ -1368,5 +1369,6 @@ * when building with ACPI disabled and I have no idea why. */ unsigned char AcpiGbl_AbortLoopOnTimeout = FALSE; +unsigned char AcpiGbl_VerboseHandlers = FALSE; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/common/acfileio.c new/src/acpica/source/common/acfileio.c --- old/src/acpica/source/common/acfileio.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/common/acfileio.c 2018-06-21 10:56:44.000000000 +0200 @@ -401,16 +401,16 @@ return (AE_CTRL_TERMINATE); } - /* Validate the table signature/header (limited ASCII chars) */ - - Status = AcValidateTableHeader (File, TableOffset); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - if (GetOnlyAmlTables) { + /* Validate the table signature/header (limited ASCII chars) */ + + Status = AcValidateTableHeader (File, TableOffset); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + /* * Table must be an AML table (DSDT/SSDT). * Used for iASL -e option only. @@ -438,7 +438,12 @@ fseek (File, TableOffset, SEEK_SET); Count = fread (Table, 1, TableHeader.Length, File); - if (Count != (INT32) TableHeader.Length) + + /* + * Checks for data table headers happen later in the execution. Only verify + * for Aml tables at this point in the code. + */ + if (GetOnlyAmlTables && Count != (INT32) TableHeader.Length) { Status = AE_ERROR; goto ErrorExit; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/common/dmtbdump2.c new/src/acpica/source/common/dmtbdump2.c --- old/src/acpica/source/common/dmtbdump2.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/common/dmtbdump2.c 2018-06-21 10:56:44.000000000 +0200 @@ -265,6 +265,12 @@ Length = IortNode->Length - NodeOffset; break; + case ACPI_IORT_NODE_PMCG: + + InfoTable = AcpiDmTableInfoIort5; + Length = IortNode->Length - NodeOffset; + break; + default: AcpiOsPrintf ("\n**** Unknown IORT node type 0x%X\n", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/common/dmtbinfo2.c new/src/acpica/source/common/dmtbinfo2.c --- old/src/acpica/source/common/dmtbinfo2.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/common/dmtbinfo2.c 2018-06-21 10:56:44.000000000 +0200 @@ -290,6 +290,8 @@ {ACPI_DMT_IORTMEM, ACPI_IORT2_OFFSET (MemoryProperties), "Memory Properties", 0}, {ACPI_DMT_UINT32, ACPI_IORT2_OFFSET (AtsAttribute), "ATS Attribute", 0}, {ACPI_DMT_UINT32, ACPI_IORT2_OFFSET (PciSegmentNumber), "PCI Segment Number", 0}, + {ACPI_DMT_UINT8, ACPI_IORT2_OFFSET (MemoryAddressLimit), "Memory Size Limit", 0}, + {ACPI_DMT_UINT24, ACPI_IORT2_OFFSET (Reserved[0]), "Reserved", 0}, ACPI_DMT_TERMINATOR }; @@ -350,13 +352,22 @@ {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (PriGsiv), "PRI GSIV", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (GerrGsiv), "GERR GSIV", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (SyncGsiv), "Sync GSIV", 0}, - {ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Pxm), "Proximity Domain", 0}, - {ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Reserved1), "Reserved", 0}, - {ACPI_DMT_UINT16, ACPI_IORT4_OFFSET (Reserved2), "Reserved", 0}, + {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Pxm), "Proximity Domain", 0}, {ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (IdMappingIndex), "Device ID Mapping Index", 0}, ACPI_DMT_TERMINATOR }; +/* 0x05: PMCG */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoIort5[] = +{ + {ACPI_DMT_UINT64, ACPI_IORT5_OFFSET (Page0BaseAddress), "Page 0 Base Address", 0}, + {ACPI_DMT_UINT32, ACPI_IORT5_OFFSET (OverflowGsiv), "Overflow Interrupt GSIV", 0}, + {ACPI_DMT_UINT32, ACPI_IORT5_OFFSET (NodeReference), "Node Reference", 0}, + {ACPI_DMT_UINT64, ACPI_IORT5_OFFSET (Page1BaseAddress), "Page 1 Base Address", 0}, + ACPI_DMT_TERMINATOR +}; + /******************************************************************************* * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/compiler/aslload.c new/src/acpica/source/compiler/aslload.c --- old/src/acpica/source/compiler/aslload.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/compiler/aslload.c 2018-06-21 10:56:44.000000000 +0200 @@ -233,7 +233,11 @@ /* Dump the namespace if debug is enabled */ - AcpiNsDumpTables (ACPI_NS_ALL, ACPI_UINT32_MAX); + if (AcpiDbgLevel & ACPI_LV_TABLES) + { + AcpiNsDumpTables (ACPI_NS_ALL, ACPI_UINT32_MAX); + } + ACPI_FREE (WalkState); return (AE_OK); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/compiler/dttable1.c new/src/acpica/source/compiler/dttable1.c --- old/src/acpica/source/compiler/dttable1.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/compiler/dttable1.c 2018-06-21 10:56:44.000000000 +0200 @@ -1829,6 +1829,19 @@ NodeLength += Subtable->Length; break; + case ACPI_IORT_NODE_PMCG: + + Status = DtCompileTable (PFieldList, AcpiDmTableInfoIort5, + &Subtable); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + DtInsertSubtable (ParentTable, Subtable); + NodeLength += Subtable->Length; + break; + default: DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "IORT"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/compiler/dttemplate.h new/src/acpica/source/compiler/dttemplate.h --- old/src/acpica/source/compiler/dttemplate.h 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/compiler/dttemplate.h 2018-06-21 10:56:44.000000000 +0200 @@ -696,18 +696,18 @@ const unsigned char TemplateIort[] = { - 0x49,0x4F,0x52,0x54,0x90,0x01,0x00,0x00, /* 00000000 "IORT...." */ - 0x00,0x5F,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "._INTEL " */ + 0x49,0x4F,0x52,0x54,0xF8,0x01,0x00,0x00, /* 00000000 "IORT...." */ + 0x00,0x72,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".rINTEL " */ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */ 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ - 0x31,0x08,0x17,0x20,0x05,0x00,0x00,0x00, /* 00000020 "1.. ...." */ + 0x13,0x03,0x18,0x20,0x06,0x00,0x00,0x00, /* 00000020 "... ...." */ 0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "4......." */ 0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00, /* 00000030 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000040 "........" */ - 0x00,0x00,0x00,0x00,0x01,0x58,0x00,0x00, /* 00000048 ".....X.." */ + 0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00, /* 00000048 "........" */ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000050 "........" */ - 0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "D......." */ + 0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000058 "l......." */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 "........" */ 0x00,0x5C,0x5F,0x53,0x42,0x2E,0x50,0x43, /* 00000068 ".\_SB.PC" */ 0x49,0x30,0x2E,0x44,0x45,0x56,0x30,0x00, /* 00000070 "I0.DEV0." */ @@ -716,36 +716,49 @@ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000088 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000090 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000098 "........" */ - 0x00,0x00,0x00,0x00,0x02,0x34,0x00,0x00, /* 000000A0 ".....4.." */ - 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000A8 "........" */ - 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 " ......." */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A8 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C0 "........" */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C8 "........" */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D0 "........" */ - 0x03,0x60,0x00,0x01,0x00,0x00,0x00,0x00, /* 000000D8 ".`......" */ - 0x01,0x00,0x00,0x00,0x4C,0x00,0x00,0x00, /* 000000E0 "....L..." */ + 0x00,0x00,0x00,0x00,0x02,0x38,0x00,0x00, /* 000000C8 ".....8.." */ + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000D0 "........" */ + 0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D8 "$......." */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E0 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E8 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F0 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000F8 "........" */ - 0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 "<......." */ - 0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000108 "L......." */ + 0x00,0x00,0x00,0x00,0x03,0x60,0x00,0x01, /* 00000100 ".....`.." */ + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000108 "........" */ 0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000110 "L......." */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000118 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000120 "........" */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000128 "........" */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000130 "........" */ - 0x04,0x58,0x00,0x01,0x00,0x00,0x00,0x00, /* 00000138 ".X......" */ - 0x01,0x00,0x00,0x00,0x44,0x00,0x00,0x00, /* 00000140 "....D..." */ + 0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00, /* 00000128 "....<..." */ + 0x00,0x00,0x00,0x00,0x4C,0x00,0x00,0x00, /* 00000130 "....L..." */ + 0x00,0x00,0x00,0x00,0x4C,0x00,0x00,0x00, /* 00000138 "....L..." */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000140 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000148 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000150 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000158 "........" */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000160 "........" */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000168 "........" */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000170 "........" */ + 0x00,0x00,0x00,0x00,0x04,0x58,0x00,0x01, /* 00000160 ".....X.." */ + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000168 "........" */ + 0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000170 "D......." */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000178 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000180 "........" */ - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000188 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000188 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000190 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000198 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001A0 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001A8 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001B0 "........" */ + 0x00,0x00,0x00,0x00,0x05,0x3C,0x00,0x01, /* 000001B8 ".....<.." */ + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000001C0 "........" */ + 0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001C8 "(......." */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001D0 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001D8 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001E0 "........" */ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001E8 "........" */ + 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00 /* 000001F0 "........" */ }; const unsigned char TemplateIvrs[] = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/components/debugger/dbnames.c new/src/acpica/source/components/debugger/dbnames.c --- old/src/acpica/source/components/debugger/dbnames.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/components/debugger/dbnames.c 2018-06-21 10:56:44.000000000 +0200 @@ -522,6 +522,7 @@ } else { + Info.Count = 0; Info.OwnerId = ACPI_OWNER_ID_MAX; Info.DebugLevel = ACPI_UINT32_MAX; Info.DisplayType = ACPI_DISPLAY_SUMMARY | ACPI_DISPLAY_SHORT; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/components/debugger/dbobject.c new/src/acpica/source/components/debugger/dbobject.c --- old/src/acpica/source/components/debugger/dbobject.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/components/debugger/dbobject.c 2018-06-21 10:56:44.000000000 +0200 @@ -187,7 +187,17 @@ ACPI_WALK_STATE *WalkState) { ACPI_THREAD_STATE *Thread; + ACPI_NAMESPACE_NODE *Node; + + + Node = WalkState->MethodNode; + + /* There are no locals or arguments for the module-level code case */ + if (Node == AcpiGbl_RootNode) + { + return; + } /* Ignore control codes, they are not errors */ @@ -556,8 +566,15 @@ BOOLEAN DisplayLocals = FALSE; + Node = WalkState->MethodNode; ObjDesc = WalkState->MethodDesc; - Node = WalkState->MethodNode; + + /* There are no locals for the module-level code case */ + + if (Node == AcpiGbl_RootNode) + { + return; + } if (!Node) { @@ -635,6 +652,13 @@ Node = WalkState->MethodNode; ObjDesc = WalkState->MethodDesc; + /* There are no arguments for the module-level code case */ + + if (Node == AcpiGbl_RootNode) + { + return; + } + if (!Node) { AcpiOsPrintf ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/components/dispatcher/dsdebug.c new/src/acpica/source/components/dispatcher/dsdebug.c --- old/src/acpica/source/components/dispatcher/dsdebug.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/components/dispatcher/dsdebug.c 2018-06-21 10:56:44.000000000 +0200 @@ -251,6 +251,7 @@ ACPI_FUNCTION_TRACE (DsDumpMethodStack); + /* Ignore control codes, they are not errors */ if ((Status & AE_CODE_MASK) == AE_CODE_CONTROL) @@ -320,8 +321,13 @@ Op->Common.Next = NULL; #ifdef ACPI_DISASSEMBLER - AcpiOsPrintf ("Failed at "); - AcpiDmDisassemble (NextWalkState, Op, ACPI_UINT32_MAX); + if (WalkState->MethodNode != AcpiGbl_RootNode) + { + /* More verbose if not module-level code */ + + AcpiOsPrintf ("Failed at "); + AcpiDmDisassemble (NextWalkState, Op, ACPI_UINT32_MAX); + } #endif Op->Common.Next = Next; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/components/executer/exconfig.c new/src/acpica/source/components/executer/exconfig.c --- old/src/acpica/source/components/executer/exconfig.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/components/executer/exconfig.c 2018-06-21 10:56:44.000000000 +0200 @@ -678,6 +678,17 @@ "Received request to unload an ACPI table")); /* + * May 2018: Unload is no longer supported for the following reasons: + * 1) A correct implementation on some hosts may not be possible. + * 2) Other ACPI implementations do not correctly/fully support it. + * 3) It requires host device driver support which does not exist. + * (To properly support namespace unload out from underneath.) + * 4) This AML operator has never been seen in the field. + */ + ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED, + "AML Unload operator is not supported")); + + /* * Validate the handle * Although the handle is partially validated in AcpiExReconfiguration() * when it calls AcpiExResolveOperands(), the handle is more completely diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/components/namespace/nsdump.c new/src/acpica/source/components/namespace/nsdump.c --- old/src/acpica/source/components/namespace/nsdump.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/components/namespace/nsdump.c 2018-06-21 10:56:44.000000000 +0200 @@ -293,6 +293,7 @@ } #endif + /******************************************************************************* * * FUNCTION: AcpiNsDumpOneObject @@ -351,6 +352,7 @@ } Type = ThisNode->Type; + Info->Count++; /* Check if the owner matches */ @@ -815,6 +817,7 @@ return; } + Info.Count = 0; Info.DebugLevel = ACPI_LV_TABLES; Info.OwnerId = OwnerId; Info.DisplayType = DisplayType; @@ -823,6 +826,7 @@ ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES, AcpiNsDumpOneObject, NULL, (void *) &Info, NULL); + AcpiOsPrintf ("\nNamespace node count: %u\n\n", Info.Count); (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/components/parser/psloop.c new/src/acpica/source/components/parser/psloop.c --- old/src/acpica/source/components/parser/psloop.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/components/parser/psloop.c 2018-06-21 10:56:44.000000000 +0200 @@ -665,6 +665,19 @@ { return_ACPI_STATUS (Status); } + if (WalkState->Opcode == AML_SCOPE_OP) + { + /* + * If the scope op fails to parse, skip the body of the + * scope op because the parse failure indicates that the + * device may not exist. + */ + WalkState->ParserState.Aml = WalkState->Aml + 1; + WalkState->ParserState.Aml = + AcpiPsGetNextPackageEnd(&WalkState->ParserState); + WalkState->Aml = WalkState->ParserState.Aml; + ACPI_ERROR ((AE_INFO, "Skipping Scope block")); + } continue; } @@ -707,7 +720,32 @@ { return_ACPI_STATUS (Status); } - + if ((WalkState->ControlState) && + ((WalkState->ControlState->Control.Opcode == AML_IF_OP) || + (WalkState->ControlState->Control.Opcode == AML_WHILE_OP))) + { + /* + * If the if/while op fails to parse, we will skip parsing + * the body of the op. + */ + ParserState->Aml = + WalkState->ControlState->Control.AmlPredicateStart + 1; + ParserState->Aml = + AcpiPsGetNextPackageEnd (ParserState); + WalkState->Aml = ParserState->Aml; + + ACPI_ERROR ((AE_INFO, "Skipping While/If block")); + if (*WalkState->Aml == AML_ELSE_OP) + { + ACPI_ERROR ((AE_INFO, "Skipping Else block")); + WalkState->ParserState.Aml = WalkState->Aml + 1; + WalkState->ParserState.Aml = + AcpiPsGetNextPackageEnd (ParserState); + WalkState->Aml = ParserState->Aml; + } + ACPI_FREE(AcpiUtPopGenericState (&WalkState->ControlState)); + } + Op = NULL; continue; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/components/parser/psobject.c new/src/acpica/source/components/parser/psobject.c --- old/src/acpica/source/components/parser/psobject.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/components/parser/psobject.c 2018-06-21 10:56:44.000000000 +0200 @@ -154,6 +154,7 @@ #include "acparser.h" #include "amlcode.h" #include "acconvert.h" +#include "acnamesp.h" #define _COMPONENT ACPI_PARSER ACPI_MODULE_NAME ("psobject") @@ -722,6 +723,20 @@ { if (*Op) { + /* + * These Opcodes need to be removed from the namespace because they + * get created even if these opcodes cannot be created due to + * errors. + */ + if (((*Op)->Common.AmlOpcode == AML_REGION_OP) || + ((*Op)->Common.AmlOpcode == AML_DATA_REGION_OP)) + { + AcpiNsDeleteChildren ((*Op)->Common.Node); + AcpiNsRemoveNode ((*Op)->Common.Node); + (*Op)->Common.Node = NULL; + AcpiPsDeleteParseTree (*Op); + } + Status2 = AcpiPsCompleteThisOp (WalkState, *Op); if (ACPI_FAILURE (Status2)) { @@ -747,6 +762,20 @@ #endif WalkState->PrevOp = NULL; WalkState->PrevArgTypes = WalkState->ArgTypes; + + if (WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL) + { + /* + * There was something that went wrong while executing code at the + * module-level. We need to skip parsing whatever caused the + * error and keep going. One runtime error during the table load + * should not cause the entire table to not be loaded. This is + * because there could be correct AML beyond the parts that caused + * the runtime error. + */ + ACPI_ERROR ((AE_INFO, "Ignore error and continue table load")); + return_ACPI_STATUS (AE_OK); + } return_ACPI_STATUS (Status); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/components/parser/pswalk.c new/src/acpica/source/components/parser/pswalk.c --- old/src/acpica/source/components/parser/pswalk.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/components/parser/pswalk.c 2018-06-21 10:56:44.000000000 +0200 @@ -169,6 +169,8 @@ * ******************************************************************************/ +#include "amlcode.h" + void AcpiPsDeleteParseTree ( ACPI_PARSE_OBJECT *SubtreeRoot) @@ -176,19 +178,40 @@ ACPI_PARSE_OBJECT *Op = SubtreeRoot; ACPI_PARSE_OBJECT *Next = NULL; ACPI_PARSE_OBJECT *Parent = NULL; + UINT32 Level = 0; ACPI_FUNCTION_TRACE_PTR (PsDeleteParseTree, SubtreeRoot); + ACPI_DEBUG_PRINT ((ACPI_DB_PARSE_TREES, + " root %p\n", SubtreeRoot)); /* Visit all nodes in the subtree */ while (Op) { - /* Check if we are not ascending */ - if (Op != Parent) { + /* This is the descending case */ + + if (ACPI_IS_DEBUG_ENABLED (ACPI_LV_PARSE_TREES, _COMPONENT)) + { + /* This debug option will print the entire parse tree */ + + AcpiOsPrintf (" %*.s%s %p", (Level * 4), " ", + AcpiPsGetOpcodeName (Op->Common.AmlOpcode), Op); + + if (Op->Named.AmlOpcode == AML_INT_NAMEPATH_OP) + { + AcpiOsPrintf (" %4.4s", Op->Common.Value.String); + } + if (Op->Named.AmlOpcode == AML_STRING_OP) + { + AcpiOsPrintf (" %s", Op->Common.Value.String); + } + AcpiOsPrintf ("\n"); + } + /* Look for an argument or child of the current op */ Next = AcpiPsGetArg (Op, 0); @@ -197,6 +220,7 @@ /* Still going downward in tree (Op is not completed yet) */ Op = Next; + Level++; continue; } } @@ -221,6 +245,7 @@ } else { + Level--; Op = Parent; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/components/utilities/uterror.c new/src/acpica/source/components/utilities/uterror.c --- old/src/acpica/source/components/utilities/uterror.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/components/utilities/uterror.c 2018-06-21 10:56:44.000000000 +0200 @@ -352,20 +352,20 @@ { case AE_ALREADY_EXISTS: - AcpiOsPrintf (ACPI_MSG_BIOS_ERROR); + AcpiOsPrintf ("\n" ACPI_MSG_BIOS_ERROR); Message = "Failure creating"; break; case AE_NOT_FOUND: - AcpiOsPrintf (ACPI_MSG_BIOS_ERROR); - Message = "Failure looking up"; + AcpiOsPrintf ("\n" ACPI_MSG_BIOS_ERROR); + Message = "Could not resolve"; break; default: - AcpiOsPrintf (ACPI_MSG_ERROR); - Message = "Failure looking up"; + AcpiOsPrintf ("\n" ACPI_MSG_ERROR); + Message = "Failure resolving"; break; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/include/acdisasm.h new/src/acpica/source/include/acdisasm.h --- old/src/acpica/source/include/acdisasm.h 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/include/acdisasm.h 2018-06-21 10:56:44.000000000 +0200 @@ -449,6 +449,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3b[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort3c[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort4[]; +extern ACPI_DMTABLE_INFO AcpiDmTableInfoIort5[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortAcc[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortHdr[]; extern ACPI_DMTABLE_INFO AcpiDmTableInfoIortMap[]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/include/aclocal.h new/src/acpica/source/include/aclocal.h --- old/src/acpica/source/include/aclocal.h 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/include/aclocal.h 2018-06-21 10:56:44.000000000 +0200 @@ -284,7 +284,7 @@ * DescriptorType is used to differentiate between internal descriptors. * * The node is optimized for both 32-bit and 64-bit platforms: - * 28 bytes for the 32-bit case, 48 bytes for the 64-bit case. + * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case. * * Note: The DescriptorType and Type fields must appear in the identical * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT @@ -301,12 +301,10 @@ struct acpi_namespace_node *Parent; /* Parent node */ struct acpi_namespace_node *Child; /* First child */ struct acpi_namespace_node *Peer; /* First peer */ - struct acpi_namespace_node *OwnerList; /* All nodes owned by a table or method */ -/* - * The following fields are appended to the namespace node and - * are used by the ASL compiler and AML disassembler only - */ + /* + * The following fields are used by the ASL compiler and disassembler only + */ #ifdef ACPI_LARGE_NAMESPACE_NODE union acpi_parse_object *Op; void *MethodLocals; @@ -314,6 +312,7 @@ UINT32 Value; UINT32 Length; UINT8 ArgCount; + #endif } ACPI_NAMESPACE_NODE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/include/acoutput.h new/src/acpica/source/include/acoutput.h --- old/src/acpica/source/include/acoutput.h 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/include/acoutput.h 2018-06-21 10:56:44.000000000 +0200 @@ -223,7 +223,8 @@ #define ACPI_LV_ALLOCATIONS 0x00100000 #define ACPI_LV_FUNCTIONS 0x00200000 #define ACPI_LV_OPTIMIZATIONS 0x00400000 -#define ACPI_LV_VERBOSITY2 0x00700000 | ACPI_LV_VERBOSITY1 +#define ACPI_LV_PARSE_TREES 0x00800000 +#define ACPI_LV_VERBOSITY2 0x00F00000 | ACPI_LV_VERBOSITY1 #define ACPI_LV_ALL ACPI_LV_VERBOSITY2 /* Trace verbosity level 3 [Threading, I/O, and Interrupts] */ @@ -275,6 +276,7 @@ #define ACPI_DB_TABLES ACPI_DEBUG_LEVEL (ACPI_LV_TABLES) #define ACPI_DB_FUNCTIONS ACPI_DEBUG_LEVEL (ACPI_LV_FUNCTIONS) #define ACPI_DB_OPTIMIZATIONS ACPI_DEBUG_LEVEL (ACPI_LV_OPTIMIZATIONS) +#define ACPI_DB_PARSE_TREES ACPI_DEBUG_LEVEL (ACPI_LV_PARSE_TREES) #define ACPI_DB_VALUES ACPI_DEBUG_LEVEL (ACPI_LV_VALUES) #define ACPI_DB_OBJECTS ACPI_DEBUG_LEVEL (ACPI_LV_OBJECTS) #define ACPI_DB_ALLOCATIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALLOCATIONS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/include/acpixf.h new/src/acpica/source/include/acpixf.h --- old/src/acpica/source/include/acpixf.h 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/include/acpixf.h 2018-06-21 10:56:44.000000000 +0200 @@ -154,7 +154,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20180508 +#define ACPI_CA_VERSION 0x20180531 #include "acconfig.h" #include "actypes.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/include/actbinfo.h new/src/acpica/source/include/actbinfo.h --- old/src/acpica/source/include/actbinfo.h 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/include/actbinfo.h 2018-06-21 10:56:44.000000000 +0200 @@ -257,6 +257,7 @@ #define ACPI_IORT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU,f) #define ACPI_IORT3A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_GSI,f) #define ACPI_IORT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_V3,f) +#define ACPI_IORT5_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_PMCG,f) #define ACPI_IORTA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_MEMORY_ACCESS,f) #define ACPI_IORTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_NODE,f) #define ACPI_IORTM_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_ID_MAPPING,f) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/include/actbl2.h new/src/acpica/source/include/actbl2.h --- old/src/acpica/source/include/actbl2.h 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/include/actbl2.h 2018-06-21 10:56:44.000000000 +0200 @@ -213,7 +213,7 @@ * IORT - IO Remapping Table * * Conforms to "IO Remapping Table System Software on ARM Platforms", - * Document number: ARM DEN 0049C, May 2017 + * Document number: ARM DEN 0049D, March 2018 * ******************************************************************************/ @@ -250,7 +250,8 @@ ACPI_IORT_NODE_NAMED_COMPONENT = 0x01, ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02, ACPI_IORT_NODE_SMMU = 0x03, - ACPI_IORT_NODE_SMMU_V3 = 0x04 + ACPI_IORT_NODE_SMMU_V3 = 0x04, + ACPI_IORT_NODE_PMCG = 0x05 }; @@ -316,12 +317,18 @@ } ACPI_IORT_NAMED_COMPONENT; +/* Masks for Flags field above */ + +#define ACPI_IORT_NC_STALL_SUPPORTED (1) +#define ACPI_IORT_NC_PASID_BITS (31<<1) typedef struct acpi_iort_root_complex { UINT64 MemoryProperties; /* Memory access properties */ UINT32 AtsAttribute; UINT32 PciSegmentNumber; + UINT8 MemoryAddressLimit; /* Memory address size limit */ + UINT8 Reserved[3]; /* Reserved, must be zero */ } ACPI_IORT_ROOT_COMPLEX; @@ -383,9 +390,7 @@ UINT32 PriGsiv; UINT32 GerrGsiv; UINT32 SyncGsiv; - UINT8 Pxm; - UINT8 Reserved1; - UINT16 Reserved2; + UINT32 Pxm; UINT32 IdMappingIndex; } ACPI_IORT_SMMU_V3; @@ -399,9 +404,18 @@ /* Masks for Flags field above */ #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) -#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1) +#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1) #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3) +typedef struct acpi_iort_pmcg +{ + UINT64 Page0BaseAddress; + UINT32 OverflowGsiv; + UINT32 NodeReference; + UINT64 Page1BaseAddress; + +} ACPI_IORT_PMCG; + /******************************************************************************* * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/tools/acpiexec/aecommon.h new/src/acpica/source/tools/acpiexec/aecommon.h --- old/src/acpica/source/tools/acpiexec/aecommon.h 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/tools/acpiexec/aecommon.h 2018-06-21 10:56:44.000000000 +0200 @@ -190,6 +190,7 @@ extern BOOLEAN AcpiGbl_UseLocalFaultHandler; +extern BOOLEAN AcpiGbl_VerboseHandlers; extern BOOLEAN AcpiGbl_IgnoreErrors; extern BOOLEAN AcpiGbl_AbortLoopOnTimeout; extern UINT8 AcpiGbl_RegionFillValue; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/acpica/source/tools/acpiexec/aeexception.c new/src/acpica/source/tools/acpiexec/aeexception.c --- old/src/acpica/source/tools/acpiexec/aeexception.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/acpica/source/tools/acpiexec/aeexception.c 2018-06-21 10:56:44.000000000 +0200 @@ -162,6 +162,10 @@ void); +UINT32 SigintCount = 0; +#define ACPI_MAX_CONTROL_C 5 + + /****************************************************************************** * * FUNCTION: AeExceptionHandler @@ -194,35 +198,39 @@ Exception = AcpiFormatException (AmlStatus); - AcpiOsPrintf (AE_PREFIX - "Exception %s during execution\n", Exception); - if (Name) + if (AcpiGbl_VerboseHandlers) { - if (ACPI_COMPARE_NAME (&Name, ACPI_ROOT_PATHNAME)) + AcpiOsPrintf (AE_PREFIX + "Exception %s during execution\n", Exception); + + if (Name) { - AcpiOsPrintf (AE_PREFIX - "Evaluating executable code at [%s]\n", ACPI_NAMESPACE_ROOT); + if (ACPI_COMPARE_NAME (&Name, ACPI_ROOT_PATHNAME)) + { + AcpiOsPrintf (AE_PREFIX + "Evaluating executable code at [%s]\n", ACPI_NAMESPACE_ROOT); + } + else + { + AcpiOsPrintf (AE_PREFIX + "Evaluating Method or Node: [%4.4s]\n", (char *) &Name); + } } - else + + /* Be terse about loop timeouts */ + + if ((AmlStatus == AE_AML_LOOP_TIMEOUT) && AcpiGbl_AbortLoopOnTimeout) { - AcpiOsPrintf (AE_PREFIX - "Evaluating Method or Node: [%4.4s]\n", (char *) &Name); + AcpiOsPrintf (AE_PREFIX "Aborting loop after timeout\n"); + return (AE_OK); } - } - /* Be terse about loop timeouts */ - - if ((AmlStatus == AE_AML_LOOP_TIMEOUT) && AcpiGbl_AbortLoopOnTimeout) - { - AcpiOsPrintf (AE_PREFIX "Aborting loop after timeout\n"); - return (AE_OK); + AcpiOsPrintf ("\n" AE_PREFIX + "AML Opcode [%s], Method Offset ~%5.5X\n", + AcpiPsGetOpcodeName (Opcode), AmlOffset); } - AcpiOsPrintf ("\n" AE_PREFIX - "AML Opcode [%s], Method Offset ~%5.5X\n", - AcpiPsGetOpcodeName (Opcode), AmlOffset); - /* Invoke the _ERR method if present */ Status = AcpiGetHandle (NULL, "\\_ERR", &ErrHandle); @@ -321,6 +329,14 @@ signal(Sig, SIG_IGN); AcpiOsPrintf ("<Control-C>\n"); + /* Force exit on multiple control-c */ + + SigintCount++; + if (SigintCount >= ACPI_MAX_CONTROL_C) + { + exit (0); + } + /* Abort the application if there are no methods executing */ if (!AcpiGbl_MethodExecuting) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/bios/mtrr/mtrr.c new/src/bios/mtrr/mtrr.c --- old/src/bios/mtrr/mtrr.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/bios/mtrr/mtrr.c 2018-06-21 10:56:44.000000000 +0200 @@ -231,7 +231,7 @@ entry = fwts_list_data(struct mtrr_entry*, item); if (entry->end >= end && entry->start < end) { - end = entry->start; + end = (entry->start == 0) ? 0 : (entry->start - 1); if (end < start) end = start; else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/include/fwts.h new/src/lib/include/fwts.h --- old/src/lib/include/fwts.h 2018-05-15 17:03:20.000000000 +0200 +++ new/src/lib/include/fwts.h 2018-06-21 10:56:44.000000000 +0200 @@ -128,5 +128,6 @@ #include "fwts_pci.h" #include "fwts_safe_mem.h" #include "fwts_devicetree.h" +#include "fwts_pm_debug.h" #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/include/fwts_pm_debug.h new/src/lib/include/fwts_pm_debug.h --- old/src/lib/include/fwts_pm_debug.h 1970-01-01 01:00:00.000000000 +0100 +++ new/src/lib/include/fwts_pm_debug.h 2018-06-21 10:56:44.000000000 +0200 @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2013-2018 Canonical + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ +#ifndef __FWTS_PM_DEBUG_H__ +#define __FWTS_PM_DEBUG_H__ + +int fwts_pm_debug_get(int *value); +int fwts_pm_debug_set(const int value); + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/include/fwts_safe_mem.h new/src/lib/include/fwts_safe_mem.h --- old/src/lib/include/fwts_safe_mem.h 2018-05-15 17:03:20.000000000 +0200 +++ new/src/lib/include/fwts_safe_mem.h 2018-06-21 10:56:44.000000000 +0200 @@ -23,5 +23,6 @@ int fwts_safe_memcpy(void *dst, const void *src, const size_t n); int fwts_safe_memread(const void *src, const size_t n); int fwts_safe_memread32(const void *src, const size_t n); +int fwts_safe_memread64(const void *src, const size_t n); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/include/fwts_set.h new/src/lib/include/fwts_set.h --- old/src/lib/include/fwts_set.h 2018-05-15 17:03:20.000000000 +0200 +++ new/src/lib/include/fwts_set.h 2018-06-21 10:56:44.000000000 +0200 @@ -22,6 +22,7 @@ #include <stdio.h> -int fwts_set(const char *text, const char *file); +int fwts_set(const char *file, const char *text); +int fwts_set_int(const char *file, const int value); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/include/fwts_version.h new/src/lib/include/fwts_version.h --- old/src/lib/include/fwts_version.h 2018-05-15 17:03:20.000000000 +0200 +++ new/src/lib/include/fwts_version.h 2018-06-21 10:56:44.000000000 +0200 @@ -16,5 +16,5 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -#define FWTS_VERSION "V18.05.00" -#define FWTS_DATE "2018-05-15 15:03:20" +#define FWTS_VERSION "V18.06.02" +#define FWTS_DATE "2018-06-21 08:56:44" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/src/Makefile.am new/src/lib/src/Makefile.am --- old/src/lib/src/Makefile.am 2018-05-15 17:03:20.000000000 +0200 +++ new/src/lib/src/Makefile.am 2018-06-21 10:56:44.000000000 +0200 @@ -104,4 +104,5 @@ fwts_wakealarm.c \ fwts_pm_method.c \ fwts_safe_mem.c \ + fwts_pm_debug.c \ $(dt_sources) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/src/fwts_pm_debug.c new/src/lib/src/fwts_pm_debug.c --- old/src/lib/src/fwts_pm_debug.c 1970-01-01 01:00:00.000000000 +0100 +++ new/src/lib/src/fwts_pm_debug.c 2018-06-21 10:56:44.000000000 +0200 @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2018 Canonical + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "fwts.h" + +static const char pm_debug[] = "/sys/power/pm_debug_messages"; + +/* + * fwts_pm_debug_get + * get the current pm_debug_messages setting, value + * is also set to -1 if there is an error + */ +int fwts_pm_debug_get(int *value) +{ + int ret; + + ret = fwts_get_int(pm_debug, value); + if (ret != FWTS_OK) + *value = -1; + + return ret; +} + +/* + * fwts_pm_debug_set + * set the pm_debug_messages setting + */ +int fwts_pm_debug_set(const int value) +{ + return fwts_set_int(pm_debug, value); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/src/fwts_safe_mem.c new/src/lib/src/fwts_safe_mem.c --- old/src/lib/src/fwts_safe_mem.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/lib/src/fwts_safe_mem.c 2018-06-21 10:56:44.000000000 +0200 @@ -127,3 +127,38 @@ return FWTS_OK; } + +/* + * fwts_safe_memread64() + * check we can safely read a region of memory. This catches + * SIGSEGV/SIGBUS errors and returns FWTS_ERROR if it is not + * readable or FWTS_OK if it's OK. + * + * n = number of of 64 bit words to check + */ +int OPTIMIZE0 fwts_safe_memread64(const void *src, const size_t n) +{ + static uint64_t buffer[256]; + const uint64_t *ptr, *end = (uint64_t *)src + n; + uint64_t *bufptr; + const uint64_t *bufend = buffer + (sizeof(buffer) / sizeof(*buffer)); + + if (sigsetjmp(jmpbuf, 1) != 0) + return FWTS_ERROR; + + fwts_sig_handler_set(SIGSEGV, sig_handler, &old_segv_action); + fwts_sig_handler_set(SIGBUS, sig_handler, &old_bus_action); + + for (bufptr = buffer, ptr = src; ptr < end; ptr++) { + /* Force data to be read */ + __builtin_prefetch(ptr, 0, 3); + *bufptr = *ptr; + bufptr++; + bufptr = (bufptr >= bufend) ? buffer : bufptr; + } + + fwts_sig_handler_restore(SIGSEGV, &old_segv_action); + fwts_sig_handler_restore(SIGBUS, &old_bus_action); + + return FWTS_OK; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/src/fwts_set.c new/src/lib/src/fwts_set.c --- old/src/lib/src/fwts_set.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/lib/src/fwts_set.c 2018-06-21 10:56:44.000000000 +0200 @@ -27,15 +27,35 @@ * write text to a given file, used to set * values in /sys or /proc */ -int fwts_set(const char *text, const char *file) +int fwts_set(const char *file, const char *text) { FILE *fp; + int ret; if ((fp = fopen(file, "w")) == NULL) return FWTS_ERROR; - fprintf(fp, "%s\n", text); + ret = fprintf(fp, "%s\n", text); (void)fclose(fp); - return FWTS_OK; + return (ret < 0) ? FWTS_ERROR : FWTS_OK; +} + +/* + * fwts_set_int() + * write an int to a given file, used to set + * values in /sys or /proc + */ +int fwts_set_int(const char *file, const int value) +{ + FILE *fp; + int ret; + + if ((fp = fopen(file, "w")) == NULL) + return FWTS_ERROR; + + ret = fprintf(fp, "%d\n", value); + (void)fclose(fp); + + return (ret < 0) ? FWTS_ERROR : FWTS_OK; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/src/lib/src/fwts_uefi.c new/src/lib/src/fwts_uefi.c --- old/src/lib/src/fwts_uefi.c 2018-05-15 17:03:20.000000000 +0200 +++ new/src/lib/src/fwts_uefi.c 2018-06-21 10:56:44.000000000 +0200 @@ -506,13 +506,13 @@ if (attr & FWTS_UEFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS) { if (*str) strcat(str, ","); - strcat(str, "AuthenicatedWrite"); + strcat(str, "AuthenticatedWrite"); } if (attr & FWTS_UEFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) { if (*str) strcat(str, ","); - strcat(str, "TimeBaseAuthenicatedWrite"); + strcat(str, "TimeBasedAuthenticatedWrite"); } return str; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/update_version.sh new/update_version.sh --- old/update_version.sh 2018-05-15 17:03:20.000000000 +0200 +++ new/update_version.sh 2018-06-21 10:56:44.000000000 +0200 @@ -26,8 +26,14 @@ * */ EOF +# Update fwts_version echo '#define FWTS_VERSION "'$version'"' >> src/lib/include/fwts_version.h echo '#define FWTS_DATE "'`date --utc "+%F %T"`'"' >> src/lib/include/fwts_version.h +# Update snapcraft version +oldsnap_version=$(grep "version: " snapcraft.yaml | cut -d' ' -f2) +sed -i "s/version: ${oldsnap_version}/version: ${version}/" snapcraft.yaml +# Update git repo git add src/lib/include/fwts_version.h +git add snapcraft.yaml git commit -s -m"lib: fwts_version.h - update to $version" git tag -m'"Version '$1'"' $1