Re: ISA -> ISA_ (Re: [GIT PATCH] ACPI patches for 2.6.25-rc6)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bob,
Wouldn't it be less confusing if the dis-assembler
also adding the trailing underscores to match what
is actually done by the interpreter?

thanks,
-Len

On Wednesday 26 March 2008, Moore, Robert wrote:
> References, ACPI specification 3.0b:
> 
> 
> 5.3  ACPI Namespace 
> 
> By convention, when an ASL compiler pads a name shorter than 4
> characters, it is done so with trailing underscores ('_'). See the
> language definition for AML NameSeg in Section 16, "ACPI Source Language
> Reference."
> 
> (Reference should point to section 18, AML reference)
> 
>  
> 
> 18.2.2   Name Objects Encoding
> 
> NameSeg            := <LeadNameChar NameChar NameChar NameChar>
> // Notice that NameSegs shorter than 4 characters are filled with
> // trailing underscores ('_'s).
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Moore, Robert 
> Sent: Wednesday, March 26, 2008 6:59 PM
> To: 'Len Brown'
> Cc: 'aystarik@xxxxxxxxx'; Lin, Ming M
> Subject: RE: Re: ISA -> ISA_ (Re: [GIT PATCH] ACPI patches for
> 2.6.25-rc6)
> 
> Whenever an ACPI namepath is parsed (each 4 character name within a
> namepath is called a "nameseg"), each nameseg is padded out with
> underscores if it is shorter than 4 characters. This happens whenever a
> named object is created and whenever a reference to a name is
> encountered.
> 
> Thus, internally, ALL namesegs are exactly 4 characters, no need to add
> code to handle variable-length namesegs.
> 
> Thus, smaller code and fewer bugs. This is also mentioned in the ACPI
> spec somewhere.
> 
> Bob
> 
> 
> Example:
> 
> Name (I, 0x1234)
> 
> Will be entered into the namespace as
> 
> I___
> 
> A reference to I such as
> 
> Store (\DEV0\I, Local0)
> 
> Will convert "I" to "I___" during AML parsing.
> 
> 
> 
> -----Original Message-----
> From: Len Brown [mailto:lenb@xxxxxxxxxx] 
> Sent: Wednesday, March 26, 2008 11:00 AM
> To: Moore, Robert
> Subject: Fwd: Re: ISA -> ISA_ (Re: [GIT PATCH] ACPI patches for
> 2.6.25-rc6)
> 
> Bob,
> can you comment on this thread?
> 
> thanks,
> -Len
> 
> ----------  Forwarded Message  ----------
> 
> Subject: Re: ISA -> ISA_ (Re: [GIT PATCH] ACPI patches for 2.6.25-rc6)
> Date: Wednesday 26 March 2008
> From: Alexey Starikovskiy < aystarik@xxxxxxxxx >
> To: Bjorn Helgaas <bjorn.helgaas@xxxxxx>
> 
> Bjorn Helgaas wrote:
> > I'm curious about how this works.  I disassembled the DSDT from
> > http://bugzilla.kernel.org/show_bug.cgi?id=4773 (I attached the
> disassembly
> > at http://bugzilla.kernel.org/attachment.cgi?id=15448&action=view),
> and
> > the _PRT contains "_SB" and "ISA" (no trailing underscores):
> >
> >                 Package (0x04)
> >                 {
> >                     0x000DFFFF, 
> >                     0x00, 
> >                     \_SB.PCI0.ISA.LNKA, 
> >                     0x00
> >                 }
> >
> > But by the time we get to acpi_pci_irq_add_entry(), we've added the
> > underscores somewhere (see
> > http://bugzilla.kernel.org/attachment.cgi?id=15423&action=view):
> >
> >   0000:00:0d[A] -> \_SB_.PCI0.ISA_.LNKA
> >
> > I don't know where this happens, but it certainly confused me, and
> > it seems like it could lead to other bugs.
> >   
> ACPI is supposed to add trailing underscore for pad all names to 4
> bytes.
> So ISA will be padded to ISA_.
> 
> Regards,
> Alex.
> 
> -------------------------------------------------------
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux