From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com []) by mx.groups.io with SMTP id smtpd.web08.10551.1620726526771786264 for ; Tue, 11 May 2021 02:49:04 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: nathaniel.l.desimone@intel.com) IronPort-SDR: UZWZiiw/NY85rVSxy7mgmGGKlhQpwHY48VZIdtLvNlR5KM78sPePGxggVKGHb+6uZ7KLGX+GRx hNq0VH2xp34g== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="199469671" X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="199469671" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 02:48:53 -0700 IronPort-SDR: OyotQCXptx0tzNyKWngIBvzXo2F5DVKQYaBW74PvitfjpIXMbRnze1l6hnMFDm/HdUGlwC4qHR bTzwMgyQRodA== X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="436574006" Received: from nldesimo-desk1.amr.corp.intel.com ([10.209.66.229]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 02:48:50 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Chasel Chiu , Mike Kinney , Isaac Oram , Mohamed Abbas , Michael Kubacki , Zachary Bobroff , Harikrishna Doppalapudi Subject: [edk2-platforms] [PATCH V1 11/18] PurleyOpenBoardPkg/Acpi/BoardAcpiDxe: Add PCxx.asi files Date: Tue, 11 May 2021 02:48:19 -0700 Message-Id: <20210511094826.12495-12-nathaniel.l.desimone@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20210511094826.12495-1-nathaniel.l.desimone@intel.com> References: <20210511094826.12495-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: Chasel Chiu Cc: Mike Kinney Cc: Isaac Oram Cc: Mohamed Abbas Cc: Michael Kubacki Cc: Zachary Bobroff Cc: Harikrishna Doppalapudi Signed-off-by: Nate DeSimone --- .../Acpi/BoardAcpiDxe/Dsdt/PC00.asi | 385 ++++++++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC01.asi | 255 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC02.asi | 255 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC03.asi | 260 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC04.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC05.asi | 233 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC06.asi | 328 +++++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC06Ejd.asi | 9 + .../Acpi/BoardAcpiDxe/Dsdt/PC07.asi | 259 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC08.asi | 262 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC09.asi | 260 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC10.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC11.asi | 231 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC12.asi | 324 +++++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC12Ejd.asi | 9 + .../Acpi/BoardAcpiDxe/Dsdt/PC13.asi | 256 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC14.asi | 259 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC15.asi | 259 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC16.asi | 231 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC17.asi | 231 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC18.asi | 342 ++++++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC18Ejd.asi | 9 + .../Acpi/BoardAcpiDxe/Dsdt/PC19.asi | 259 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC20.asi | 260 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC21.asi | 260 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC22.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC23.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC24.asi | 231 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC25.asi | 259 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC26.asi | 259 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC27.asi | 259 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC28.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC29.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC30.asi | 256 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC31.asi | 259 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC32.asi | 260 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC33.asi | 260 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC34.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC35.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC36.asi | 257 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC37.asi | 259 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC38.asi | 260 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC39.asi | 260 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC40.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC41.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC42.asi | 290 +++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC43.asi | 259 ++++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC44.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC45.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC46.asi | 232 +++++++++++ .../Acpi/BoardAcpiDxe/Dsdt/PC47.asi | 232 +++++++++++ 51 files changed, 12312 insertions(+) create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC00.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC01.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC02.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC03.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC04.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC05.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC06.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC06Ejd.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC07.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC08.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC09.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC10.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC11.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC12.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC12Ejd.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC13.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC14.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC15.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC16.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC17.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC18.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC18Ejd.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC19.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC20.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC21.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC22.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC23.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC24.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC25.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC26.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC27.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC28.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC29.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC30.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC31.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC32.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC33.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC34.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC35.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC36.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC37.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC38.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC39.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC40.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC41.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC42.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC43.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC44.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC45.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC46.asi create mode 100644 Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC47.asi diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC00.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC00.asi new file mode 100644 index 0000000000..aaf1237835 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC00.asi @@ -0,0 +1,385 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + // + // Set this root port to use the correct Proximity Domain + // + Name(_PXM, 0) + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + +#include "Pch.asi" +#include "PchApic.asi" + + +#define RESOURCE_CHUNK1_OFF 0 +#define RESOURCE_CHUNK2_OFF 16 //(RESOURCE_CHUNK1_OFF + 16) +#define RESOURCE_CHUNK3_OFF 24 //(RESOURCE_CHUNK2_OFF + 8) +#define RESOURCE_CHUNK4_OFF 40 //(RESOURCE_CHUNK3_OFF + 16) +#define RESOURCE_CHUNK5_OFF 56 //(RESOURCE_CHUNK4_OFF + 16) +#define RESOURCE_CHUNK6_OFF 82 //(RESOURCE_CHUNK5_OFF + 26) +#define RESOURCE_CHUNK7_OFF 108 //(RESOURCE_CHUNK6_OFF + 26) + +#define PciResourceStart Local0 +#define PciResourceLen Local1 + + Name(P0RS, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( // Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + IO( // Consumed resource (CF8-CFF) + Decode16, + 0x0cf8, + 0xcf8, + 1, + 8 + ) + + //RESOURCE_CHUNK3_OFF + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity + 0x0000, // Min + 0x0cf7, // Max + 0x0000, // Translation + 0x0cf8 // Range Length + ) + + //RESOURCE_CHUNK4_OFF + WORDIO( // Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // Descriptor Name + ) + + //RESOURCE_CHUNK6_OFF + DWORDMEMORY( // descriptor for Shadow RAM + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity + 0x00000000, // Min (calculated dynamically) + 0x00000000, // Max (calculated dynamically) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) + , + , + SRAM // DescriptorName populated so iASL doesn't flag 0 value fields and no tag as error + ) +/* + //RESOURCE_TPM + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity + 0xFED40000, // Min (calculated dynamically) + 0xFEDFFFFF, // Max = 4GB - 1MB (fwh + fwh alias...) + 0x00000000, // Translation + 0x000C0000 // Range Length (calculated dynamically) + ) +*/ + DWordMemory(ResourceProducer,PosDecode,MinFixed,MaxFixed,NonCacheable, + ReadWrite,0x00,0xFE010000,0xFE010FFF,0x00,0x1000) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of P0RS Buffer + + OperationRegion(TMEM, PCI_Config, 0x00, 0x100) + Field(TMEM, ByteAcc, NoLock, Preserve) { + Offset(0x40), + , 4, + BSEG, 4, + PAMS, 48, + Offset(0x52), + DIM0, 4, + DIM1, 4, + , 8, + DIM2, 4, + } + + Name(MTBL, Package(0x10) { + 0x0, + 0x20, + 0x20, + 0x30, + 0x40, + 0x40, + 0x60, + 0x80, + 0x80, + 0x80, + 0x80, + 0xc0, + 0x100, + 0x100, + 0x100, + 0x200 + }) + + Name(ERNG, Package(0xd) { + 0xc0000, + 0xc4000, + 0xc8000, + 0xcc000, + 0xd0000, + 0xd4000, + 0xd8000, + 0xdc000, + 0xe0000, + 0xe4000, + 0xe8000, + 0xec000, + 0xf0000 + }) + + Name(PAMB, Buffer(0x7) { + }) + + Method(EROM, 0x0, NotSerialized) { + CreateDWordField(P0RS, ^SRAM._MIN, RMIN) // Do not reference hard-coded address + CreateDWordField(P0RS, ^SRAM._MAX, RMAX) // Do not reference hard-coded address + CreateDWordField(P0RS, ^SRAM._LEN, RLEN) // Do not reference hard-coded address + CreateByteField(PAMB, 0x6, BREG) + Store(PAMS, PAMB) + Store(BSEG, BREG) + Store(0x0, RMIN) + Store(0x0, RMAX) + Store(0x0, RLEN) + Store(0x0, Local0) + While(LLess(Local0, 0xd)) + { + ShiftRight(Local0, 0x1, Local1) + Store(DerefOf(Index(PAMB, Local1, )), Local2) + If(And(Local0, 0x1, )) + { + ShiftRight(Local2, 0x4, Local2) + } + And(Local2, 0x3, Local2) + If(RMIN) + { + If(Local2) + { + Add(DerefOf(Index(ERNG, Local0, )), 0x3fff, RMAX) + If(LEqual(RMAX, 0xf3fff)) + { + Store(0xfffff, RMAX) + } + Subtract(RMAX, RMIN, RLEN) + Increment(RLEN) + } + Else + { + Store(0xc, Local0) + } + } + Else + { + If(Local2) + { + Store(DerefOf(Index(ERNG, Local0, )), RMIN) + Add(DerefOf(Index(ERNG, Local0, )), 0x3fff, RMAX) + If(LEqual(RMAX, 0xf3fff)) + { + Store(0xfffff, RMAX) + } + Subtract(RMAX, RMIN, RLEN) + Increment(RLEN) + } + Else + { + } + } + Increment(Local0) + } + } + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + EROM() + Return(P0RS) + } + + // + // Memory Riser UID will be in Interger form to support CPU Migration. + // First two digits will indicate Memory Device(01) and last two + // digits will represent the Memory Riser number. + // + Device (MHP0) { + // Within the IIO, read D5:F1 for Memory HP status + Name(_ADR, 0x00050001) // D5:F1 + Name(_UID, "00-00") + + // MHP0 - Config register for Slot status + OperationRegion(MHP0, PCI_Config, 0x00, 0x100) + Field(MHP0,ByteAcc,NoLock,Preserve) { + Offset(0x0E), + STM0,7, + } + } + + Device (MHP1) { + // Within the IIO, read D5:F1 for Memory HP status + Name(_ADR, 0x00050001) // D5:F1 + Name(_UID, "00-01") + + // MHP1 - Config register for Slot status + OperationRegion(MHP1, PCI_Config, 0x00, 0x100) + Field(MHP1,ByteAcc,NoLock,Preserve) { + Offset(0x1E), + STM1,7, + } + } diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC01.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC01.asi new file mode 100644 index 0000000000..1e61aac3f6 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC01.asi @@ -0,0 +1,255 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + // + // Set this root port to use the correct Proximity Domain + // + Name(_PXM, 0) + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + Store (0xE3, IO80) + \_SB.PC01.BR1A.OSHP () + \_SB.PC01.BR1B.OSHP () + \_SB.PC01.BR1C.OSHP () + \_SB.PC01.BR1D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 0, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Shift for IIO Stack 1 + ShiftRight(IIOH, 1, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR01, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR01 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR01) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC02.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC02.asi new file mode 100644 index 0000000000..65035cf70e --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC02.asi @@ -0,0 +1,255 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + // + // Set this root port to use the correct Proximity Domain + // + Name(_PXM, 0) + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC02.BR2A.OSHP () + \_SB.PC02.BR2B.OSHP () + \_SB.PC02.BR2C.OSHP () + \_SB.PC02.BR2D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 0, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Shift for IIO Stack 2 + ShiftRight(IIOH, 2, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR02, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR02 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR02) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC03.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC03.asi new file mode 100644 index 0000000000..c1af96c1b7 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC03.asi @@ -0,0 +1,260 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + // + // Set this root port to use the correct Proximity Domain + // + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(0) + } else { + Return(1) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC03.BR3A.OSHP () + \_SB.PC03.BR3B.OSHP () + \_SB.PC03.BR3C.OSHP () + \_SB.PC03.BR3D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 0, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Shift for IIO Stack 3 + ShiftRight(IIOH, 3, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR03, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR03 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR03) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC04.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC04.asi new file mode 100644 index 0000000000..f73f55d60f --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC04.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + // + // Set this root port to use the correct Proximity Domain + // + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(0) + } else { + Return(1) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 0, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Shift for IIO Stack 4 + ShiftRight(IIOH, 4, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR04, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR04 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR04) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC05.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC05.asi new file mode 100644 index 0000000000..7334dc56f1 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC05.asi @@ -0,0 +1,233 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + // + // Set this root port to use the correct Proximity Domain + // + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(0) + } else { + Return(1) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 0, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Shift for IIO Stack 5 + ShiftRight(IIOH, 5, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR05, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR05 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR05) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC06.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC06.asi new file mode 100644 index 0000000000..c4ddd10612 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC06.asi @@ -0,0 +1,328 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(1) + } else { + Return(2) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC06.QRP0.OSHP () + + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + // owning control method can't be reentrant, so _DSM must be Serialized + Method (_DSM, 4, Serialized) { // Device specific method + if(LEqual(Arg0,ToUUID("D8C1A3A6-BE9B-4C9B-91BF-C3CB81FC5DAF"))){ + Switch(ToInteger(Arg2)) { + case(0) {Return ( Buffer() {0x1F} )} // function indexes 1-4 supported + case(1) {Return (Buffer() {0x44, 0x52, 0x48, 0x31, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 } ) } // DRHD buffer containing relavent ATSR structure for I/O Hub n + + case(2) {Return (Buffer() {0x41, 0x54, 0x53, 0x31, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 } ) }// ATSR buffer containing relavent ATSR structure for I/O Hub n + case(3) {Return (Buffer() {0x52, 0x48, 0x53, 0x31, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 } ) }// RHSA buffer containing relavent ATSR structure for I/O Hub n + Default { } + } + } + Return (Buffer() {0}) + } + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 1, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 1 in bitmap (8 x Socket #) + ShiftRight(IIOH, 8, Local1) + // Shift for IIO Stack 0 + ShiftRight(Local1, 0, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA +/* TODO: ifdef does not work here, need to enable this code after PPO + // All PCI-Ex ports are dependent on IIOx stack + Name(_EDL, Package() { + \_SB.PC06.QRP0, \_SB.PC07.QR1A, \_SB.PC07.QR1B, \_SB.PC07.QR1C, \_SB.PC07.QR1D, + \_SB.PC08.QR2A, \_SB.PC08.QR2B, \_SB.PC08.QR2C, \_SB.PC08.QR2D, + \_SB.PC09.QR3A, \_SB.PC09.QR3B, \_SB.PC09.QR3C, \_SB.PC09.QR3D + }) +*/ + Name(PR06, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR06 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR06) + } + + // + // Memory Riser UID will be in Interger form to support CPU Migration. + // First two digits will indicate Memory Device(01) and last two + // digits will represent the Memory Riser number. + // + Device (MHP0) { + // Within the IIO, read D5:F1 for Memory HP status + Name(_ADR, 0x00050001) // D5:F1 + Name(_UID, "01-00") + + // MHP0 - Config register for Slot status + OperationRegion(MHP0, PCI_Config, 0xE, 2) + Field(MHP0,ByteAcc,NoLock,Preserve) { + STM2,7, + } + } + + Device (MHP1) { + // Within the IIO, read D5:F1 for Memory HP status + Name(_ADR, 0x00050001) // D5:F1 + Name(_UID, "01-01") + + // MHP1 - Config register for Slot status + OperationRegion(MHP1, PCI_Config, 0x1E, 2) + Field(MHP1,ByteAcc,NoLock,Preserve) { + STM3,7, + } + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC06Ejd.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC06Ejd.asi new file mode 100644 index 0000000000..bd53705140 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC06Ejd.asi @@ -0,0 +1,9 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + // Eject device if PC06 is removed. + Name(_EJD,"\\_SB.PC06") // Dependent on PC06 diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC07.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC07.asi new file mode 100644 index 0000000000..c2011b6ed2 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC07.asi @@ -0,0 +1,259 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(1) + } else { + Return(2) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC07.QR1A.OSHP () + \_SB.PC07.QR1B.OSHP () + \_SB.PC07.QR1C.OSHP () + \_SB.PC07.QR1D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 1, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 1 in bitmap (8 x Socket #) + ShiftRight(IIOH, 8, Local1) + // Shift for IIO Stack 1 + ShiftRight(Local1, 1, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR07, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR07 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR07) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC08.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC08.asi new file mode 100644 index 0000000000..373575105a --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC08.asi @@ -0,0 +1,262 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(1) + } else { + Return(2) + } + } + +// +// Moving _OSC method to respective stack PCXX.asi. +// + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC08.QR2A.OSHP () + \_SB.PC08.QR2B.OSHP () + \_SB.PC08.QR2C.OSHP () + \_SB.PC08.QR2D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 1, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 1 in bitmap (8 x Socket #) + ShiftRight(IIOH, 8, Local1) + // Shift for IIO Stack 2 + ShiftRight(Local1, 2, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR08, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR08 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR08) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC09.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC09.asi new file mode 100644 index 0000000000..4908507c19 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC09.asi @@ -0,0 +1,260 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(1) + } else { + Return(3) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC09.QR3A.OSHP () + \_SB.PC09.QR3B.OSHP () + \_SB.PC09.QR3C.OSHP () + \_SB.PC09.QR3D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 1, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 1 in bitmap (8 x Socket #) + ShiftRight(IIOH, 8, Local1) + // Shift for IIO Stack 3 + ShiftRight(Local1, 3, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR09, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR09 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR09) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC10.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC10.asi new file mode 100644 index 0000000000..274280715c --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC10.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(1) + } else { + Return(3) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 1, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 1 in bitmap (8 x Socket #) + ShiftRight(IIOH, 8, Local1) + // Shift for IIO Stack 4 + ShiftRight(Local1, 4, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR10, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR10 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR10) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC11.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC11.asi new file mode 100644 index 0000000000..a3fcda98e0 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC11.asi @@ -0,0 +1,231 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(1) + } else { + Return(3) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 1, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 1 in bitmap (8 x Socket #) + ShiftRight(IIOH, 8, Local1) + // Shift for IIO Stack 5 + ShiftRight(Local1, 5, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR11, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR11 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR11) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC12.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC12.asi new file mode 100644 index 0000000000..8d0ea8c4b2 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC12.asi @@ -0,0 +1,324 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(2) + } else { + Return(4) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC12.RRP0.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + // owning control method can't be reentrant, so _DSM must be Serialized + Method (_DSM, 4, Serialized) { // Device specific method + if(LEqual(Arg0,ToUUID("D8C1A3A6-BE9B-4C9B-91BF-C3CB81FC5DAF"))){ + Switch(ToInteger(Arg2)) { + case(0) {Return ( Buffer() {0x1F} )} // function indexes 1-4 supported + case(1) {Return (Buffer() {0x44, 0x52, 0x48, 0x32, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 } ) } // DRHD buffer containing relavent ATSR structure for I/O Hub n + + case(2) {Return (Buffer() {0x41, 0x54, 0x53, 0x32, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 } ) }// ATSR buffer containing relavent ATSR structure for I/O Hub n + case(3) {Return (Buffer() {0x52, 0x48, 0x53, 0x32, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 } ) }// RHSA buffer containing relavent ATSR structure for I/O Hub n + Default { } + } + } + Return (Buffer() {0}) + } + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 2, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 2 in bitmap (8 x Socket #) + ShiftRight(IIOH, 16, Local1) + // Shift for IIO Stack 0 + ShiftRight(Local1, 0, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA +/* TODO: ifdef does not work here, need to enable this code after PPO + // All PCI-Ex ports are dependent on IIO2 + Name(_EDL, Package() { + \_SB.PC12.RRP0, \_SB.PC13.RR1A, \_SB.PC13.RR1B, \_SB.PC13.RR1C, \_SB.PC13.RR1D, + \_SB.PC14.RR2A, \_SB.PC14.RR2B, \_SB.PC14.RR2C, \_SB.PC14.RR2D, + \_SB.PC15.RR3A, \_SB.PC15.RR3B, \_SB.PC15.RR3C, \_SB.PC15.RR3D + }) +*/ + Name(PR12, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR12 Buffer + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR12) + } + + // + // Memory Riser UID will be in Interger form to support CPU Migration. + // First two digits will indicate Memory Device(01) and last two + // digits will represent the Memory Riser number. + // + Device (MHP0) { + // Within the IIO, read D5:F1 for Memory HP status + Name(_ADR, 0x00050001) // D5:F1 + Name(_UID, "02-00") + + // MHP0 - Config register for Slot status + OperationRegion(MHP0, PCI_Config, 0xE, 2) + Field(MHP0,ByteAcc,NoLock,Preserve) { + STM4,7, + } + } + + Device (MHP1) { + // Within the IIO, read D5:F1 for Memory HP status + Name(_ADR, 0x00050001) // D5:F1 + Name(_UID, "02-01") + + // MHP1 - Config register for Slot status + OperationRegion(MHP1, PCI_Config, 0x1E, 2) + Field(MHP1,ByteAcc,NoLock,Preserve) { + STM5,7, + } + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC12Ejd.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC12Ejd.asi new file mode 100644 index 0000000000..6969f3f503 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC12Ejd.asi @@ -0,0 +1,9 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + // Eject device if PC12 is removed. + Name(_EJD,"\\_SB.PC12") // Dependent on PC12 diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC13.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC13.asi new file mode 100644 index 0000000000..f53903cad1 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC13.asi @@ -0,0 +1,256 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(2) + } else { + Return(4) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC13.RR1A.OSHP () + \_SB.PC13.RR1B.OSHP () + \_SB.PC13.RR1C.OSHP () + \_SB.PC13.RR1D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 2, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 2 in bitmap (8 x Socket #) + ShiftRight(IIOH, 16, Local1) + // Shift for IIO Stack 1 + ShiftRight(Local1, 1, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR13, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR13 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR13) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC14.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC14.asi new file mode 100644 index 0000000000..6eee61de72 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC14.asi @@ -0,0 +1,259 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(2) + } else { + Return(4) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + //Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC14.RR2A.OSHP () + \_SB.PC14.RR2B.OSHP () + \_SB.PC14.RR2C.OSHP () + \_SB.PC14.RR2D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 2, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 2 in bitmap (8 x Socket #) + ShiftRight(IIOH, 16, Local1) + // Shift for IIO Stack 2 + ShiftRight(Local1, 2, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR14, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR14 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR14) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC15.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC15.asi new file mode 100644 index 0000000000..b9b0349d34 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC15.asi @@ -0,0 +1,259 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(2) + } else { + Return(5) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC15.RR3A.OSHP () + \_SB.PC15.RR3B.OSHP () + \_SB.PC15.RR3C.OSHP () + \_SB.PC15.RR3D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 2, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 2 in bitmap (8 x Socket #) + ShiftRight(IIOH, 16, Local1) + // Shift for IIO Stack 3 + ShiftRight(Local1, 3, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR15, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR15 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR15) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC16.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC16.asi new file mode 100644 index 0000000000..6d288be750 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC16.asi @@ -0,0 +1,231 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(2) + } else { + Return(5) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 2, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 2 in bitmap (8 x Socket #) + ShiftRight(IIOH, 16, Local1) + // Shift for IIO Stack 4 + ShiftRight(Local1, 4, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR16, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR16 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR16) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC17.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC17.asi new file mode 100644 index 0000000000..ecee6b9937 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC17.asi @@ -0,0 +1,231 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(2) + } else { + Return(5) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 2, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 2 in bitmap (8 x Socket #) + ShiftRight(IIOH, 16, Local1) + // Shift for IIO Stack 5 + ShiftRight(Local1, 5, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR17, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR17 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR17) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC18.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC18.asi new file mode 100644 index 0000000000..bf8ad0ca3a --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC18.asi @@ -0,0 +1,342 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(3) + } else { + Return(6) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC18.SRP0.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + // owning control method can't be reentrant, so _DSM must be Serialized + Method (_DSM, 4, Serialized) { // Device specific method + if(LEqual(Arg0,ToUUID("D8C1A3A6-BE9B-4C9B-91BF-C3CB81FC5DAF"))){ + Switch(ToInteger(Arg2)) { + case(0) {Return ( Buffer() {0x1F} )} // function indexes 1-4 supported + case(1) {Return (Buffer() {0x44, 0x52, 0x48, 0x33, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 } ) } // DRHD buffer containing relavent ATSR structure for I/O Hub n + + case(2) {Return (Buffer() {0x41, 0x54, 0x53, 0x33, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 } ) }// ATSR buffer containing relavent ATSR structure for I/O Hub n + case(3) {Return (Buffer() {0x52, 0x48, 0x53, 0x33, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 } ) }// RHSA buffer containing relavent ATSR structure for I/O Hub n + Default { } + } + } + Return (Buffer() {0}) + } + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 3, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 3 in bitmap (8 x Socket #) + ShiftRight(IIOH, 24, Local1) + // Shift for IIO Stack 0 + ShiftRight(Local1, 0, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA +/* TODO: ifdef does not work here, need to enable this code after PPO + // All PCI-Ex ports are dependent on IIO3 + Name(_EDL, Package() { + \_SB.PC18.SRP0, \_SB.PC19.SR1A, \_SB.PC19.SR1B, \_SB.PC19.SR1C, \_SB.PC19.SR1D, + \_SB.PC20.SR2A, \_SB.PC20.SR2B, \_SB.PC20.SR2C, \_SB.PC20.SR2D, + \_SB.PC21.SR3A, \_SB.PC21.SR3B, \_SB.PC21.SR3C, \_SB.PC21.SR3D + }) + + Method(_EJ0, 1) { + Notify(\_SB.PC18.SRP0, Arg0) + Notify(\_SB.PC19.SR1A, Arg0) + Notify(\_SB.PC19.SR1B, Arg0) + Notify(\_SB.PC19.SR1C, Arg0) + Notify(\_SB.PC19.SR1D, Arg0) + Notify(\_SB.PC20.SR2A, Arg0) + Notify(\_SB.PC20.SR2B, Arg0) + Notify(\_SB.PC20.SR2C, Arg0) + Notify(\_SB.PC20.SR2D, Arg0) + Notify(\_SB.PC21.SR3A, Arg0) + Notify(\_SB.PC21.SR3B, Arg0) + Notify(\_SB.PC21.SR3C, Arg0) + Notify(\_SB.PC21.SR3D, Arg0) + \_SB.GSMI(3, 3) //EVENT_IIO_HP, IIO ID + } +*/ + Name(PR18, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIXH - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR18 Buffer + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR18) + } + + // + // Memory Riser UID will be in Interger form to support CPU Migration. + // First two digits will indicate Memory Device(01) and last two + // digits will represent the Memory Riser number. + // + Device (MHP0) { + // Within the IIO, read D5:F1 for Memory HP status + Name(_ADR, 0x00050001) // D5:F1 + Name(_UID, "03-00") + + // MHP0 - Config register for Slot status + OperationRegion(MHP0, PCI_Config, 0xE, 2) + Field(MHP0,ByteAcc,NoLock,Preserve) { + STM6,7, + } + } + + Device (MHP1) { + // Within the IIO, read D5:F1 for Memory HP status + Name(_ADR, 0x00050001) // D5:F1 + Name(_UID, "03-01") + + // MHP1 - Config register for Slot status + OperationRegion(MHP1, PCI_Config, 0x1E, 2) + Field(MHP1,ByteAcc,NoLock,Preserve) { + STM7,7, + } + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC18Ejd.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC18Ejd.asi new file mode 100644 index 0000000000..466163cacc --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC18Ejd.asi @@ -0,0 +1,9 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + // Eject device if PC18 is removed. + Name(_EJD,"\\_SB.PC18") // Dependent on PC18 diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC19.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC19.asi new file mode 100644 index 0000000000..d54e11fc64 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC19.asi @@ -0,0 +1,259 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(3) + } else { + Return(6) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC19.SR1A.OSHP () + \_SB.PC19.SR1B.OSHP () + \_SB.PC19.SR1C.OSHP () + \_SB.PC19.SR1D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 3, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 3 in bitmap (8 x Socket #) + ShiftRight(IIOH, 24, Local1) + // Shift for IIO Stack + ShiftRight(Local1, 1, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR19, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR19 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR19) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC20.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC20.asi new file mode 100644 index 0000000000..6a3c340378 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC20.asi @@ -0,0 +1,260 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(3) + } else { + Return(6) + } + } + + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC20.SR2A.OSHP () + \_SB.PC20.SR2B.OSHP () + \_SB.PC20.SR2C.OSHP () + \_SB.PC20.SR2D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 3, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 3 in bitmap (8 x Socket #) + ShiftRight(IIOH, 24, Local1) + // Shift for IIO Stack + ShiftRight(Local1, 2, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR20, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR20 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR20) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC21.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC21.asi new file mode 100644 index 0000000000..b4600b9476 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC21.asi @@ -0,0 +1,260 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(3) + } else { + Return(7) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC21.SR3A.OSHP () + \_SB.PC21.SR3B.OSHP () + \_SB.PC21.SR3C.OSHP () + \_SB.PC21.SR3D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 3, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 3 in bitmap (8 x Socket #) + ShiftRight(IIOH, 24, Local1) + // Shift for IIO Stack 3 + ShiftRight(Local1, 3, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR21, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR21 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR21) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC22.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC22.asi new file mode 100644 index 0000000000..aaf798453e --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC22.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(3) + } else { + Return(7) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 3, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 3 in bitmap (8 x Socket #) + ShiftRight(IIOH, 24, Local1) + // Shift for IIO Stack 4 + ShiftRight(Local1, 4, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR22, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR22 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR22) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC23.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC23.asi new file mode 100644 index 0000000000..8d4ff618cb --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC23.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(3) + } else { + Return(7) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 3, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 3 in bitmap (8 x Socket #) + ShiftRight(IIOH, 24, Local1) + // Shift for IIO Stack 5 + ShiftRight(Local1, 5, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR23, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR23 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR23) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC24.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC24.asi new file mode 100644 index 0000000000..e62913a7cf --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC24.asi @@ -0,0 +1,231 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(4) + } else { + Return(8) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 4, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 4 in bitmap (8 x Socket #) + ShiftRight(IIOH, 32, Local1) + // Shift for IIO Stack 0 + ShiftRight(Local1, 0, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR24, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR24 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR24) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC25.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC25.asi new file mode 100644 index 0000000000..43779e6b56 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC25.asi @@ -0,0 +1,259 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(4) + } else { + Return(8) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC25.CR1A.OSHP () + \_SB.PC25.CR1B.OSHP () + \_SB.PC25.CR1C.OSHP () + \_SB.PC25.CR1D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 4, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 4 in bitmap (8 x Socket #) + ShiftRight(IIOH, 32, Local1) + // Shift for IIO Stack 1 + ShiftRight(Local1, 1, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR25, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR25 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR25) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC26.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC26.asi new file mode 100644 index 0000000000..28a6784e0e --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC26.asi @@ -0,0 +1,259 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(4) + } else { + Return(8) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC26.CR2A.OSHP () + \_SB.PC26.CR2B.OSHP () + \_SB.PC26.CR2C.OSHP () + \_SB.PC26.CR2D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 4, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 4 in bitmap (8 x Socket #) + ShiftRight(IIOH, 32, Local1) + // Shift for IIO Stack 2 + ShiftRight(Local1, 2, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR26, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR26 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR26) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC27.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC27.asi new file mode 100644 index 0000000000..c6657242a4 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC27.asi @@ -0,0 +1,259 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(4) + } else { + Return(9) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC27.CR3A.OSHP () + \_SB.PC27.CR3B.OSHP () + \_SB.PC27.CR3C.OSHP () + \_SB.PC27.CR3D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 4, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 4 in bitmap (8 x Socket #) + ShiftRight(IIOH, 32, Local1) + // Shift for IIO Stack 3 + ShiftRight(Local1, 3, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR27, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR27 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR27) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC28.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC28.asi new file mode 100644 index 0000000000..1d5a489cd2 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC28.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(4) + } else { + Return(9) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 4, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 4 in bitmap (8 x Socket #) + ShiftRight(IIOH, 32, Local1) + // Shift for IIO Stack 4 + ShiftRight(Local1, 4, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR28, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR28 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR28) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC29.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC29.asi new file mode 100644 index 0000000000..3678f10cc0 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC29.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(4) + } else { + Return(9) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 4, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 4 in bitmap (8 x Socket #) + ShiftRight(IIOH, 32, Local1) + // Shift for IIO Stack 5 + ShiftRight(Local1, 5, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR29, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR29 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR29) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC30.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC30.asi new file mode 100644 index 0000000000..d0bec9972d --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC30.asi @@ -0,0 +1,256 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(5) + } else { + Return(10) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC30.TRP0.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 5, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 5 in bitmap (8 x Socket #) + ShiftRight(IIOH, 40, Local1) + // Shift for IIO Stack 0 + ShiftRight(Local1, 0, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR30, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR30 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR30) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC31.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC31.asi new file mode 100644 index 0000000000..e141868896 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC31.asi @@ -0,0 +1,259 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(5) + } else { + Return(10) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC31.TR1A.OSHP () + \_SB.PC31.TR1B.OSHP () + \_SB.PC31.TR1C.OSHP () + \_SB.PC31.TR1D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 5, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 5 in bitmap (8 x Socket #) + ShiftRight(IIOH, 40, Local1) + // Shift for IIO Stack 1 + ShiftRight(Local1, 1, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR31, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR31 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR31) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC32.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC32.asi new file mode 100644 index 0000000000..6b16fb096e --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC32.asi @@ -0,0 +1,260 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(5) + } else { + Return(10) + } + } + + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC32.TR2A.OSHP () + \_SB.PC32.TR2B.OSHP () + \_SB.PC32.TR2C.OSHP () + \_SB.PC32.TR2D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 5, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 5 in bitmap (8 x Socket #) + ShiftRight(IIOH, 40, Local1) + // Shift for IIO Stack 2 + ShiftRight(Local1, 2, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR32, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR32 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR32) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC33.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC33.asi new file mode 100644 index 0000000000..1b4566d4f5 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC33.asi @@ -0,0 +1,260 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(5) + } else { + Return(11) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC33.TR3A.OSHP () + \_SB.PC33.TR3B.OSHP () + \_SB.PC33.TR3C.OSHP () + \_SB.PC33.TR3D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 5, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 5 in bitmap (8 x Socket #) + ShiftRight(IIOH, 40, Local1) + // Shift for IIO Stack 3 + ShiftRight(Local1, 3, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR33, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR33 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR33) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC34.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC34.asi new file mode 100644 index 0000000000..fa58f4e60c --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC34.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(5) + } else { + Return(11) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 5, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 5 in bitmap (8 x Socket #) + ShiftRight(IIOH, 40, Local1) + // Shift for IIO Stack 4 + ShiftRight(Local1, 4, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR34, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR34 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR34) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC35.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC35.asi new file mode 100644 index 0000000000..e0bbe6adf2 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC35.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(5) + } else { + Return(11) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 5, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 5 in bitmap (8 x Socket #) + ShiftRight(IIOH, 40, Local1) + // Shift for IIO Stack 5 + ShiftRight(Local1, 5, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR35, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR35 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR35) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC36.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC36.asi new file mode 100644 index 0000000000..a3d906aafd --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC36.asi @@ -0,0 +1,257 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(6) + } else { + Return(12) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC36.URP0.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 6, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 6 in bitmap (8 x Socket #) + ShiftRight(IIOH, 48, Local1) + // Shift for IIO Stack 0 + ShiftRight(Local1, 0, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR36, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR36 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR36) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC37.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC37.asi new file mode 100644 index 0000000000..8cd169311c --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC37.asi @@ -0,0 +1,259 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(6) + } else { + Return(12) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC37.UR1A.OSHP () + \_SB.PC37.UR1B.OSHP () + \_SB.PC37.UR1C.OSHP () + \_SB.PC37.UR1D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 6, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 6 in bitmap (8 x Socket #) + ShiftRight(IIOH, 48, Local1) + // Shift for IIO Stack 1 + ShiftRight(Local1, 1, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR37, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR37 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR37) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC38.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC38.asi new file mode 100644 index 0000000000..d0d766954d --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC38.asi @@ -0,0 +1,260 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(6) + } else { + Return(12) + } + } + + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC38.UR2A.OSHP () + \_SB.PC38.UR2B.OSHP () + \_SB.PC38.UR2C.OSHP () + \_SB.PC38.UR2D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 6, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 6 in bitmap (8 x Socket #) + ShiftRight(IIOH, 48, Local1) + // Shift for IIO Stack 2 + ShiftRight(Local1, 2, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR38, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR38 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR38) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC39.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC39.asi new file mode 100644 index 0000000000..5c37da53ec --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC39.asi @@ -0,0 +1,260 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(6) + } else { + Return(13) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC39.UR3A.OSHP () + \_SB.PC39.UR3B.OSHP () + \_SB.PC39.UR3C.OSHP () + \_SB.PC39.UR3D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 6, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 6 in bitmap (8 x Socket #) + ShiftRight(IIOH, 48, Local1) + // Shift for IIO Stack 3 + ShiftRight(Local1, 3, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR39, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR39 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR39) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC40.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC40.asi new file mode 100644 index 0000000000..d16d46b466 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC40.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(6) + } else { + Return(13) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 6, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 6 in bitmap (8 x Socket #) + ShiftRight(IIOH, 48, Local1) + // Shift for IIO Stack 4 + ShiftRight(Local1, 4, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR40, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR40 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR40) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC41.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC41.asi new file mode 100644 index 0000000000..73dd6567fc --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC41.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(6) + } else { + Return(13) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 6, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 6 in bitmap (8 x Socket #) + ShiftRight(IIOH, 48, Local1) + // Shift for IIO Stack 5 + ShiftRight(Local1, 5, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR41, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR41 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR41) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC42.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC42.asi new file mode 100644 index 0000000000..7efc2854dc --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC42.asi @@ -0,0 +1,290 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(7) + } else { + Return(14) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC42.VRP0.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + // owning control method can't be reentrant, so _DSM must be Serialized + Method (_DSM, 4, Serialized) { // Device specific method + if(LEqual(Arg0,ToUUID("D8C1A3A6-BE9B-4C9B-91BF-C3CB81FC5DAF"))){ + Switch(ToInteger(Arg2)) { + case(0) {Return ( Buffer() {0x1F} )} // function indexes 1-4 supported + case(1) {Return (Buffer() {0x44, 0x52, 0x48, 0x33, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 } ) } // DRHD buffer containing relavent ATSR structure for I/O Hub n + + case(2) {Return (Buffer() {0x41, 0x54, 0x53, 0x33, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 } ) }// ATSR buffer containing relavent ATSR structure for I/O Hub n + case(3) {Return (Buffer() {0x52, 0x48, 0x53, 0x33, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00, + 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 } ) }// RHSA buffer containing relavent ATSR structure for I/O Hub n + Default { } + } + } + Return (Buffer() {0}) + } + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 7, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 7 in bitmap (8 x Socket #) + ShiftRight(IIOH, 56, Local1) + // Shift for IIO Stack 0 + ShiftRight(Local1, 0, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR42, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR42 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR42) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC43.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC43.asi new file mode 100644 index 0000000000..c3a9e250a6 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC43.asi @@ -0,0 +1,259 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(7) + } else { + Return(14) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Only allow native hot plug control if OS supports + // * ASPM + // * MSI/MSI-X + // + If (LOr(AHPE, LNotEqual(And(SUPP, 0x16), 0x16))) { // Conditions not met? + And(CTRL, 0x1E, CTRL) // Mask bit 0 to deny. + Sleep(1000) + } + + // + // Never allow SHPC (no SHPC controller in system) + // + And(CTRL, 0x1D, CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + If (Not(And(CDW1,1))) { // Query Flag Clear? + // + // Disable GPEs for Features granted native control + // + If (And(CTRL, 0x01)) { // Native Hot plug control granted? + \_SB.PC43.VR1A.OSHP () + \_SB.PC43.VR1B.OSHP () + \_SB.PC43.VR1C.OSHP () + \_SB.PC43.VR1D.OSHP () + + Store (0x01, GPSH) // Clear Hotplug SCI Enable in GPE0 + } + } + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 7, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 7 in bitmap (8 x Socket #) + ShiftRight(IIOH, 56, Local1) + // Shift for IIO Stack 1 + ShiftRight(Local1, 1, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR43, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR43 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR43) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC44.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC44.asi new file mode 100644 index 0000000000..aecee85a33 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC44.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(7) + } else { + Return(14) + } + } + + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 7, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 7 in bitmap (8 x Socket #) + ShiftRight(IIOH, 56, Local1) + // Shift for IIO Stack 2 + ShiftRight(Local1, 2, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR44, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR44 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR44) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC45.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC45.asi new file mode 100644 index 0000000000..dc7d050938 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC45.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(7) + } else { + Return(15) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 7, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 7 in bitmap (8 x Socket #) + ShiftRight(IIOH, 56, Local1) + // Shift for IIO Stack 3 + ShiftRight(Local1, 3, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR45, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR45 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR45) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC46.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC46.asi new file mode 100644 index 0000000000..4ad40d819a --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC46.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(7) + } else { + Return(15) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 7, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 7 in bitmap (8 x Socket #) + ShiftRight(IIOH, 56, Local1) + // Shift for IIO Stack 4 + ShiftRight(Local1, 4, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR46, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR46 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR46) + } + diff --git a/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC47.asi b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC47.asi new file mode 100644 index 0000000000..b2daca6242 --- /dev/null +++ b/Platform/Intel/PurleyOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/PC47.asi @@ -0,0 +1,232 @@ +/** @file + +Copyright (c) 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + + Name (SUPP, 0) + Name (CTRL, 0) + + Method(_PXM) { + if (LEqual (CLOD, 0)) { + Return(7) + } else { + Return(15) + } + } + + Method(_OSC,4) { + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,0,CDW1) + If (LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) { + + // + // Create DWord-addressable fields from the capabilities Buffer + // + CreateDWordField(Arg3,4,CDW2) + + // + // Fill 3rd capability DWORD only if the count is greater than 2. + // + If(LGreater(Arg2,2)) { + CreateDWordField(Arg3,8,CDW3) + } + + // + // Save Capabilities DWord2 & 3 + // + Store(CDW2,SUPP) + Store(CDW3,CTRL) + + // + // Disable Native PCIe AER handling from OS so that it uses Firmware First model in WHEA + // + And (CTRL, 0x17, CTRL) + + + If (LNotEqual(Arg1,one)) { // unknown revision + Or(CDW1,0x08,CDW1) + } + + If(LNotEqual(CDW3,CTRL)) { // capabilities bits were masked + Or(CDW1,0x10,CDW1) + } + // + // update DWORD3 in the buffer + // + Store(CTRL,CDW3) + Return(Arg3) + + } Else { + // + // Just indicate unrecognized UUID + // Leave it at that + // + Or (CDW1,4,CDW1) + Store (0xEE, IO80) + Return(Arg3) + } + } // End _OSC + + + Method(_STA){ + // Have to account for logical offline condition which IIOx stack is still in QPI fabric, but not OS visible + ShiftRight(PRBM, 7, Local1) + And(Local1, 0x1, Local1) + // Check if Socket is present + if(LEqual(Local1, 0x1)) { + // Account for Socket 7 in bitmap (8 x Socket #) + ShiftRight(IIOH, 56, Local1) + // Shift for IIO Stack 5 + ShiftRight(Local1, 5, Local1) + And(Local1, 0x1, Local1) + // Check if IIO Stack is present + if(LEqual(Local1, 0x1)) { + // IIOx stack present and logically online + Return(0x0F) + } + } + // IIOx stack logically offline + Return(0x00) + + } // End Method STA + + Name(PR47, ResourceTemplate() { + //RESOURCE_CHUNK1_OFF + WORDBusNumber( //Bus number resource (0); the bridge produces bus numbers for its subsequent buses + ResourceProducer, // bit 0 of general flags is 1 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, // PosDecode + 0x0000, // Granularity (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX1 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX1 - Patched by ACPI Platform Driver during POST) + , + , + FIX1 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //: Off board video card not detected in device manager when it is connected to CPU + //RESOURCE_CHUNK5_OFF + DWORDMEMORY( // descriptor for video RAM on video card + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, + MinFixed, // Range is fixed + MaxFixed, // Range is Fixed + Cacheable, + ReadWrite, + 0x00000000, // Granularity (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max (FIX5 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (FIX5 - Patched by ACPI Platform Driver during POST) + , + , + FIX5 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //RESOURCE_CHUNK2_OFF + WORDIO( //Consumed-and-produced resource (all I/O above CFF) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX2 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0001, // Range Length = Max-Min+1 (FIX2 - Patched by ACPI Platform Driver during POST) + , + , + FIX2 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX6 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX6 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + //Off board video card not detected in device manager when it is connected to CPU + //Descriptor for IO space of the video card. + WORDIO( // Consumed-and-produced resource (all I/O below CF8) + ResourceProducer, // bit 0 of general flags is 0 + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + PosDecode, + EntireRange, + 0x0000, // Granularity (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Min (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Max (FIX7 - Patched by ACPI Platform Driver during POST) + 0x0000, // Translation + 0x0000, // Range Length + , + , + FIX7 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_32bit + // + DWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000, // Granularity (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Min (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX3 - Patched by ACPI Platform Driver during POST) + 0x00000000, // Translation + 0x00000000, // Range Length (calculated dynamically) (FIX3 - Patched by ACPI Platform Driver during POST) + , + , + FIX3 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + + // + // PCI RESOURCE_64bit + // + QWORDMemory( // Consumed-and-produced resource(all of memory space) + ResourceProducer, // bit 0 of general flags is 0 + PosDecode, // positive Decode + MinFixed, // Range is fixed + MaxFixed, // Range is fixed + NonCacheable, + ReadWrite, + 0x00000000000, // Granularity (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Min (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Max = 4GB - 1MB (fwh + fwh alias) (FIX4 - Patched by ACPI Platform Driver during POST) + 0x00000000000, // Translation + 0x00000000000, // Range Length (calculated dynamically) (FIX4 - Patched by ACPI Platform Driver during POST) + , + , + FIX4 // DescriptorName populated so iASL outputs offset for it in a .h file + ) + }) // end of PR47 Buffer + + + // Current resource template return + Method(_CRS, 0x0, NotSerialized) { + Return(PR47) + } + -- 2.27.0.windows.1