神舟战神DSM的一些记录

 果农   2020-01-01 05:08   1332 人阅读  0 条评论
into_all method label _DSM set_label begin XDSM end;
into_all method code_regex _DSM replaceall_matched begin XDSM end;
into_all all code_regex HDAS replaceall_matched begin HDEF end;  
into_all all label HDAS set_label begin HDEF end;  
into_all all label PPMC set_label begin PMCR end;  
into_all all code_regex PPMC replaceall_matched begin PMCR end;  
into_all all label HECI set_label begin IMEI end;  
into_all all code_regex LID0 replaceall_matched begin LIDA end;  
into_all all label LID0 set_label begin LIDA end;  
into method label ADBG replace_content begin Return(0) end;  
into_all method label _DSM set_label begin XDSM end;  
into_all method code_regex _DSM replaceall_matched begin XDSM end;  
into_all method code_regex Windows\s2015 replace_matched begin Darwin end;  

into method label _WAK code_regex ([\s\S]*) replace_matched  
begin  
If (LOr(LLess(Arg0,1),LGreater(Arg0,5))) { Store(3,Arg0) }\n  
%1  
end;  
into method label SWAK insert  
begin  
Notify (LIDA, 0x02)\n  
end;  

into device label BUS0 parent_adr 0x001F0003 remove_entry;  
into device name_adr 0x001F0003 insert  
begin  
Device (BUS0)\n  
{\n  
    Name (_CID, "smbus")\n  
    Name (_ADR, Zero)\n  
    Device (DVL0)\n  
    {\n  
        Name (_ADR, 0x57)\n  
        Name (_CID, "diagsvault")\n  
        Method (_DSM, 4, NotSerialized)\n  
        {\n  
            If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } )   }\n  
            Return (Package() { "address", 0x57 })\n  
        }\n  
    }\n  
}\n  
end;  
  
into device label MCHC parent_label PCI0 remove_entry;
into device label PCI0 insert begin
Device (MCHC)\n
{\n
    Name (_ADR, Zero)\n
}
end;

into device name_hid PNP0000 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0100 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0B00 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0103 code_regex IRQNoFlags\s\(\)\n\s+\{.*\} removeall_matched;
into device name_hid PNP0103 code_regex Name\s\(([^,]+),\sResourceTemplate\s\(\).*\n\s+\{((?:.|\n)*)\}\) replace_matched
begin
Name (%1, ResourceTemplate()\n
{\n
    IRQNoFlags() { 0, 8, 11, 15 }\n
%2
})\n
end;

into method label _STA parent_hid PNP0103 remove_entry;
into device name_hid PNP0103 code_regex Name\s\(_STA\,\s+0x0F\) remove_matched;
into device name_hid PNP0103 insert
begin
Name (_STA, 0x0F)\n
end;

into method label _CRS parent_hid PNP0103 remove_entry;
into device name_hid PNP0103 insert
begin
Method (_CRS, 0, NotSerialized)\n
{\n
    Return (BUF0)\n
}\n
end;

into device label LIDP remove_entry;
into definitionblock code_regex . insert
begin
Device (LIDP)\n
{\n
    Name (_HID, "FAN00000")\n
    Name (PLID, 0xFFFF)\n
// Poll for _LID status changes, notify if different\n
    Method (FCPU, 0, Serialized)\n
    {\n
        Store(\_SB.LIDA._LID(), Local0)\n
        if (LNotEqual(Local0, PLID))\n
        {\n
            Store(Local0, PLID)\n
            Notify(\_SB.LIDA, 0x80)\n
        }\n
    }\n
}\n
end;
into method label PNOT replace_content begin // nothing end;
into method label _DSM parent_adr 0x001F0000 remove_entry;
into device name_adr 0x001F0000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
                        "AAPL,slot-name", \n
                        Buffer (0x09) {\n
                            "Built In"\n
                        }, \n
                        "device_type", \n
                        Buffer (0x0F)\n
                        {\n
                            "LPC Controller"\n
                        }, \n
                        "device-id", \n
                        Buffer (0x04)\n
                        {\n
                             0x09, 0x3B, 0x00, 0x00\n        
                        }, \n
                        "compatible", \n
                        Buffer (0x0D)\n
                        {\n
                            "pci8086,3b09"\n
                        }, \n
                        "name", \n
                        Buffer (0x33)\n
                        {\n
                            "Intel Skylake PCH - LPC Controller/eSPI Controller"\n
                        }, \n
                        "model", \n
                        Buffer (0x33)\n
                        {\n
                            "Intel Skylake PCH - LPC Controller/eSPI Controller"\n
                        }\n
    })\n
}\n
end;

into method label _PRW parent_adr 0x00140000 remove_entry;
into method label _PRW parent_adr 0x00140001 remove_entry;
into method label _PRW parent_adr 0x001F0003 remove_entry;
into method label _PRW parent_adr 0x00190000 remove_entry;
into method label _PRW parent_adr 0x001F0006 remove_entry;


into method label _PRW parent_label _SB.PCI0.XHC remove_entry;
into device name_adr 0x00140000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x00140001 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x001F0003 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x00190000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x00140000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x00140001 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x001F0003 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x00190000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;

into device name_adr 0x00140000 insert begin Method(_PRW) { Return(Package() { 0x6D, 0 }) } end;
into device name_adr 0x00140001 insert begin Method(_PRW) { Return(Package() { 0x6D, 0 }) } end;
into device name_adr 0x001F0003 insert begin Method(_PRW) { Return(Package() { 0x6D, 0 }) } end;
into device name_adr 0x00190000 insert begin Method(_PRW) { Return(Package() { 0x6D, 0 }) } end;
into device name_adr 0x001F0006 insert begin Method(_PRW) { Return(Package() { 0x6D, 0 }) } end;

into method label _DSM parent_adr 0x00140000 remove_entry;
into device name_adr 0x00140000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },\n
        "subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },\n
        "AAPL,current-available", 2100,\n
        "AAPL,current-extra", 2200,\n
        "AAPL,current-extra-in-sleep", 1600,\n
        "AAPL,device-internal", 0x02,\n
        "AAPL,max-port-current-in-sleep", 2100,\n
        "AAPL,slot-name", Buffer (){"Built In"}, \n
        "name", Buffer (){"Intel Sunrise Point PCH - USB 3.0 XHCI Controller"},\n 
        "model",Buffer (){"Intel Sunrise Point PCH - USB 3.0 XHCI Controller"},\n 
        "device_type", Buffer() { "USB" }\n
    })\n
}\n
end;
into method label _Q0D parent_hid PNP0C09 remove_entry;
into device name_hid PNP0C09 insert
begin
Method (_Q0D, 0, NotSerialized)\n
{\n
    P80H = 0x0D\n
    Notify (PWRB, 0x80)\n
}\n
end;
into method label _Q11 insert
begin
Notify (PS2K, 0x20)\n
Notify (PS2K, 0x0205)\n
Notify (PS2K, 0x0285)\n
end;

into method label _Q12 insert
begin
Notify (PS2K, 0x10)\n
Notify (PS2K, 0x0206)\n
Notify (PS2K, 0x0286)\n
end;

into method label XDSM parent_adr 0x001F0002 remove_entry;
into device name_adr 0x001F0002 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "AAPL,slot-name", Buffer (){"Built In"},\n 
        "name", Buffer (){"Intel Sunrise Point PCH - PMC Controller"},\n 
        "device_type", Buffer () {"PMC Controller"},\n 
        "model",Buffer (){"Intel Sunrise Point PCH - PMC Controller"}\n
    })\n
}\n
end;

into method label _DSM parent_adr 0x00170000 remove_entry;
into device name_adr 0x00170000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "AAPL,slot-name", Buffer (){"Built In"},\n 
        "name", Buffer (){"Intel Sunrise Point PCH - SATA AHCI Controller (Mobile)"},\n 
        "model",Buffer (){"Intel Sunrise Point PCH - SATA AHCI Controller (Mobile)"}\n
    })\n
}\n
end;


into method label _DSM parent_adr 0x001C0003 remove_entry;
into device label PXSX parent_adr 0x001C0003 remove_entry;
into device name_adr 0x001C0003 insert
begin
Device (SDXC) {\n
    Name (_ADR, Zero)  // _ADR: Address\n
    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method\n
    {\n
        If (LEqual (Arg2, Zero)){\n
            Return (Buffer (One){0x03})\n
        }\n
        Return (Package (){\n
            "AAPL,slot-name", Buffer (){"Card Reader"}, \n
            "built-in", Buffer (One){}, \n
            "hda-gfx",Buffer (){"onboard-1"}, \n
            "device_type", Buffer (){"SDXC"},\n 
            "name", Buffer (){"Realtek RTS5287 PCI-E Card Reader"}, \n
            "model", Buffer (){"Realtek RTS5287 PCI-E Card Reader"}\n
        })\n
    }\n
    Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for Wake\n
    {\n
        Return (GPRW (0x69, 0x04))\n
    }\n
    Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status\n
    {\n
        Return (HPCE)\n
    }\n
}\n
Device (GIGE){\n
    Name (_ADR, One)  // _ADR: Address\n
    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method\n
    {\n
        If (LEqual (Arg2, Zero)){Return (Buffer (One){0x03})}\n
        Return (Package (){\n
            "AAPL,slot-name", Buffer (){"PCI Slot 1"}, \n
            "name", Buffer (){"Realtek RTL8168/8111 PCI-E Gigabit Ethernet Adapter"}, \n
            "model", Buffer (){"Realtek RTL8168/8111 PCI-E Gigabit Ethernet Adapter"}, \n
            "hda-gfx", Buffer (){"onboard-1"}\n
        })\n
    }\n
}\n
end;

into method label _DSM parent_adr 0x001F0003 remove_entry;
into device name_adr 0x001F0003 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
    If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
    Return (Package()\n
    {\n
        "AAPL,slot-name", Buffer () {"Built In"}, \n
        "name", Buffer (){"Realtek ALC269 Audio Controller"}, \n
        "model", Buffer (){"Realtek ALC269 Audio Controller"}, \n
        "layout-id", Buffer (){0x06, 0x00, 0x00, 0x00},\n 
        "codec-id", Buffer (){0x69, 0x02, 0xEC, 0x10}, \n
        "hda-gfx", Buffer (){"onboard-1"}, \n
        "device_type", Buffer (){"Audio"}, \n
        "PinConfigurations", Buffer (){\n
            /* 0000 */  0x01, 0x47, 0x1C, 0x10, 0x01, 0x47, 0x1D, 0x00,\n
            /* 0008 */  0x01, 0x47, 0x1E, 0x13, 0x01, 0x47, 0x1F, 0x90,\n
            /* 0010 */  0x01, 0x87, 0x1C, 0x30, 0x01, 0x87, 0x1D, 0x10,\n
            /* 0018 */  0x01, 0x87, 0x1E, 0x81, 0x01, 0x87, 0x1F, 0x00,\n
            /* 0020 */  0x01, 0x27, 0x1C, 0x40, 0x01, 0x27, 0x1D, 0x00,\n
            /* 0028 */  0x01, 0x27, 0x1E, 0xA0, 0x01, 0x27, 0x1F, 0x90,\n
            /* 0030 */  0x01, 0x57, 0x1C, 0x50, 0x01, 0x57, 0x1D, 0x10,\n
            /* 0038 */  0x01, 0x57, 0x1E, 0x21, 0x01, 0x57, 0x1F, 0x00,\n
            /* 0040 */  0x01, 0xE7, 0x1C, 0x60, 0x01, 0xE7, 0x1D, 0x10,\n
            /* 0048 */  0x01, 0xE7, 0x1E, 0x41, 0x01, 0xE7, 0x1F, 0x01,\n
            /* 0050 */  0x01, 0x47, 0x0C, 0x02}\n
    })\n
}\n
end;
本文地址:http://haolie.net/post/722.html
版权声明:本文为原创文章,版权归 果农 所有,欢迎分享本文,转载请保留出处!

 发表评论


表情

还没有留言,还不快点抢沙发?