From owner-freebsd-current@freebsd.org Wed Apr 19 12:26:57 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1323D44017 for ; Wed, 19 Apr 2017 12:26:57 +0000 (UTC) (envelope-from decui@microsoft.com) Received: from APC01-HK2-obe.outbound.protection.outlook.com (mail-hk2apc01on0130.outbound.protection.outlook.com [104.47.124.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6168E1D39; Wed, 19 Apr 2017 12:26:56 +0000 (UTC) (envelope-from decui@microsoft.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=pgMYPOo/1rUoPD5Yr/fxxAEzggaM1v1P7NW3AS6QAHE=; b=o86sEG0300cTblqLBS8WAAHK/h+ogEgoqvaGlyj/AqN3BYsgagzq5Cb9Tsjajrgcfiv6SM2seiImbPO7rCAVRmnmBtmHa80KCFU4ODngjALJtE39mFB57Uw+MTtEzK1fHBeE/Ei5LrdWSqM/UKuKjC4+ieeKG/uhFIQasCG1JOc= Received: from HK2P15301MB0003.APCP153.PROD.OUTLOOK.COM (10.170.151.145) by HK2P15301MB0004.APCP153.PROD.OUTLOOK.COM (10.170.151.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1061.1; Wed, 19 Apr 2017 12:26:51 +0000 Received: from HK2P15301MB0003.APCP153.PROD.OUTLOOK.COM ([10.170.151.145]) by HK2P15301MB0003.APCP153.PROD.OUTLOOK.COM ([10.170.151.145]) with mapi id 15.01.1061.003; Wed, 19 Apr 2017 12:26:51 +0000 From: Dexuan Cui To: Jung-uk Kim , Yanmin Qiao CC: "freebsd-current@freebsd.org" Subject: Add support for ACPI Module Device ACPI0004? Thread-Topic: Add support for ACPI Module Device ACPI0004? Thread-Index: AdK5Bn25Dro7P4OHStiOHYshQNXMIQ== Date: Wed, 19 Apr 2017 12:26:51 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: FreeBSD.org; dkim=none (message not signed) header.d=none;FreeBSD.org; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [167.220.255.48] x-microsoft-exchange-diagnostics: 1; HK2P15301MB0004; 7:5l1CRJSo/PNZsLXERQemW8WZtK5fxmiyMnsx57UQRbzFWpUcIFHdc6CyFuGLThJ3MFnoQZx4gr2hiPsR0OQQYsn0XAyi7gX2sXycyzApNxsU0lY9wgtgAKOTC41tYGHtRD7duCPNFfpWB40Y+Ew+lMubrkb+Dcaej25hNqpcm/N6PLbxrov3CJoXO5ncKsnhYuTBgjyzxZbbmPr4eXPQ1TAYtLlsge7/TilKjjS3vBLpDh8hJ0dxINtVy1p2nHc1b61I3XegiJE9Hsv81H865YE9hXUdyleJnWiC7OsOGv8/EVJ/KamkkD/26dpUWCHOKvrPP/dg5HZ6+fBdp2b0h70XMY4Hfk0r27yAWymqB9Q= x-ld-processed: 72f988bf-86f1-41af-91ab-2d7cd011db47,ExtAddr x-ms-office365-filtering-correlation-id: d1c5e335-b889-452a-893e-08d4871f5bc2 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075); SRVR:HK2P15301MB0004; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(6055026)(61426038)(61427038)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:HK2P15301MB0004; BCL:0; PCL:0; RULEID:; SRVR:HK2P15301MB0004; x-forefront-prvs: 028256169F x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39400400002)(39410400002)(39840400002)(39860400002)(39450400003)(39850400002)(55016002)(86612001)(6116002)(3846002)(575784001)(33656002)(2421001)(305945005)(102836003)(74316002)(10090500001)(38730400002)(86362001)(53936002)(54356999)(189998001)(122556002)(7696004)(7736002)(50986999)(5660300001)(6636002)(9686003)(3280700002)(3660700001)(2906002)(4326008)(66066001)(1511001)(8676002)(81166006)(8936002)(2900100001)(25786009)(5005710100001)(6506006)(450100002)(10290500002)(6436002)(77096006); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2P15301MB0004; H:HK2P15301MB0003.APCP153.PROD.OUTLOOK.COM; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Apr 2017 12:26:51.3879 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2P15301MB0004 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2017 12:26:57 -0000 The ACPI firmware of Hyper-V UEFI VM has a Module Device whose Hardware ID is "ACPI0004". The module device has a _CRS object defining some MMIO ranges, which are needed when physical PCIe devices are passed through to the VM. Currently it looks FreeBSD doesn't make use of the ACPI module device and hence the _CRS object can't be easily retrieved by Hyper-V VMBus driver. Can we add the support of "ACPI0004" with the below one-line change? Looking forward to your suggestion! --- a/sys/dev/acpica/acpi_resource.c +++ b/sys/dev/acpica/acpi_resource.c @@ -653,7 +653,7 @@ MODULE_DEPEND(acpi_sysresource, acpi, 1, 1, 1); static int acpi_sysres_probe(device_t dev) { - static char *sysres_ids[] =3D { "PNP0C01", "PNP0C02", NULL }; + static char *sysres_ids[] =3D { "PNP0C01", "PNP0C02", "ACPI0004", NULL= }; if (acpi_disabled("sysresource") || ACPI_ID_PROBE(device_get_parent(dev), dev, sysres_ids) =3D=3D NULL) Thanks, -- Dexuan