From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31510C31E46 for ; Wed, 12 Jun 2019 17:01:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04B5D215EA for ; Wed, 12 Jun 2019 17:01:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730581AbfFLRBH (ORCPT ); Wed, 12 Jun 2019 13:01:07 -0400 Received: from foss.arm.com ([217.140.110.172]:57206 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728377AbfFLRBH (ORCPT ); Wed, 12 Jun 2019 13:01:07 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7D8962B; Wed, 12 Jun 2019 10:01:06 -0700 (PDT) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 932E53F73C; Wed, 12 Jun 2019 10:01:05 -0700 (PDT) Date: Wed, 12 Jun 2019 18:00:59 +0100 From: Sudeep Holla To: "Schmauss, Erik" Cc: Udit Kumar , ACPI Devel Maling List , "lenb@kernel.org" , Sudeep Holla , "Rafael J. Wysocki" Subject: Re: Help on named object in kernel Message-ID: <20190612170059.GA30299@e107155-lin> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Wed, Jun 12, 2019 at 04:37:09PM +0000, Schmauss, Erik wrote: > > > > -----Original Message----- > > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi- > > owner@vger.kernel.org] On Behalf Of Udit Kumar > > Sent: Wednesday, June 12, 2019 4:48 AM > > To: ACPI Devel Maling List > > Cc: lenb@kernel.org; Rafael J. Wysocki > > Subject: Help on named object in kernel > > > > Dear ACPI experts, > > I need your help on defining named objected in ACPI under _CRS. > > In my firmware, I have defined two addresses for my device using > > Memory32Fixed and QwordMemory under _CRS. > > These two addresses are 32-bit and 64-bit long respectively. > > For Memory32Fixed, I gave DescriptorName name as REG0 and for > > QwordMemory I gave DescriptorName as SATA. > > Could you give us the ASL for the code snippet that you're talking about? > IIUC, something like below(a very rough example based on the description above): Name (_CRS, ResourceTemplate (){ QwordMemory ( ResourceConsumer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x0, 0x700100520, 0x700100523, 0x0, 4, , , "SATA",) Memory32Fixed(ReadWrite, 0x3200000, 0x10000, "REG0") } Basically 2 or more entries of Memory/Address Space Resource Descriptor which can be identified in OSPM by DescriptorName. IOW if a device has 2 sets of registers/memory/address space associated with it, instead of relying on the order of declaration, identify them by the descriptor name provided in ASL namespace. -- Regards, Sudeep