Jump to content

RehabMan

RehabMan

Member Since 25 Jun 2012
Offline Last Active Today, 02:07 AM
*****

Topics I've Started

Converting an EISAID number to text/EISAID string (and back)

22 November 2015 - 12:58 AM

Let's say you're trying to understand how to detect different trackpads that may be installed in a laptop in ACPI code.

Consider this code:
                    Method (_HID, 0, NotSerialized)  // _HID: Hardware ID
                    {
                        If (LEqual (PS2V, 0x02))
                        {
                            If (And (OBID, 0x04))
                            {
                                Return (0x372B2E4F)
                            }
                            Else
                            {
                                Return (0x362B2E4F)
                            }
                        }
                        Else
                        {
                            If (LEqual (PS2V, 0x03))
                            {
                                Return (0x130FD041)
                            }
                            Else
                            {
                                If (LEqual (PS2V, One))
                                {
                                    If (And (OBID, 0x04))
                                    {
                                        Return (0x24068416)
                                    }
                                    Else
                                    {
                                        Return (0x23068416)
                                    }
                                }
                                Else
                                {
                                    Return (0x130FD041)
                                }
                            }
                        }
                    }

                    Method (_CID, 0, NotSerialized)  // _CID: Compatible ID
                    {
                        If (LEqual (PS2V, 0x02))
                        {
                            Return (Package (0x03)
                            {
                                0x130FD041, 
                                0x02002E4F, 
                                0x002B2E4F
                            })
                        }
                        Else
                        {
                            If (LEqual (PS2V, 0x03))
                            {
                                Return (0x130FD041)
                            }
                            Else
                            {
                                If (LEqual (PS2V, One))
                                {
                                    Return (Package (0x02)
                                    {
                                        0x8416, 
                                        0x130FD041
                                    })
                                }
                                Else
                                {
                                    Return (0x130FD041)
                                }
                            }
                        }
                    }
But what do all the numbers mean?

Turns out they are values that represent EISA identifiers. 32-bit numbers that represent strings like 'PNP0F13' (0x130FD041).

To make it easier, I created a script to do it, attached.

Usage:
SPEEDY-OSX:Projects RehabMan$ ./eisaid.sh
usage: eisaid.sh 0x[eisa-number], or eisaid.sh [eisaid-string]
SPEEDY-OSX:Projects RehabMan$ ./eisaid.sh 0x24068416
EisaId string for 0x24068416: ETD0624
SPEEDY-OSX:Projects RehabMan$ ./eisaid.sh ETD0624
EisaId("ETD0624") value: 0x24068416
SPEEDY-OSX:Projects RehabMan$ ./eisaid.sh SYN2B1C
EisaId("SYN2B1C") value: 0x1c2b2e4f
SPEEDY-OSX:Projects RehabMan$ ./eisaid.sh 0x1c2b2e4f
EisaId string for 0x1c2b2e4f: SYN2B1C
© 2016 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy