> -----Original Message----- > From: linux-acpi-owner@xxxxxxxxxxxxxxx <linux-acpi-owner@xxxxxxxxxxxxxxx> > On Behalf Of Sudeep Holla > Sent: Wednesday, June 12, 2019 10:31 PM > To: Schmauss, Erik <erik.schmauss@xxxxxxxxx> > Cc: Udit Kumar <udit.kumar@xxxxxxx>; ACPI Devel Maling List <linux- > acpi@xxxxxxxxxxxxxxx>; lenb@xxxxxxxxxx; Sudeep Holla > <sudeep.holla@xxxxxxx>; Rafael J. Wysocki <rafael@xxxxxxxxxx> > Subject: [EXT] Re: Help on named object in kernel > > Caution: EXT Email > > On Wed, Jun 12, 2019 at 04:37:09PM +0000, Schmauss, Erik wrote: > > > > > > > -----Original Message----- > > > From: linux-acpi-owner@xxxxxxxxxxxxxxx [mailto:linux-acpi- > > > owner@xxxxxxxxxxxxxxx] On Behalf Of Udit Kumar > > > Sent: Wednesday, June 12, 2019 4:48 AM > > > To: ACPI Devel Maling List <linux-acpi@xxxxxxxxxxxxxxx> > > > Cc: lenb@xxxxxxxxxx; Rafael J. Wysocki <rafael@xxxxxxxxxx> > > > 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. Thanks Sudeep, Shouldn't acpi frame work encapsulate descriptor name while adding resource. So that driver can rely on platform_get_resource_byname . In such way, same driver could be used with device tree and acpi based systems. I am not sure, if acpi_evaluate_xx sort of api would work for descriptor-name , even if this does it will be limited to acpi only. > -- > Regards, > Sudeep