| 1 |
/* |
| 2 |
* Some or all of this work - Copyright (c) 2006 - 2021, Intel Corp. |
| 3 |
* All rights reserved. |
| 4 |
* |
| 5 |
* Redistribution and use in source and binary forms, with or without modification, |
| 6 |
* are permitted provided that the following conditions are met: |
| 7 |
* |
| 8 |
* Redistributions of source code must retain the above copyright notice, |
| 9 |
* this list of conditions and the following disclaimer. |
| 10 |
* Redistributions in binary form must reproduce the above copyright notice, |
| 11 |
* this list of conditions and the following disclaimer in the documentation |
| 12 |
* and/or other materials provided with the distribution. |
| 13 |
* Neither the name of Intel Corporation nor the names of its contributors |
| 14 |
* may be used to endorse or promote products derived from this software |
| 15 |
* without specific prior written permission. |
| 16 |
* |
| 17 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 18 |
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 19 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 20 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| 21 |
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 22 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 23 |
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 25 |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| 26 |
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 |
*/ |
| 28 |
/* |
| 29 |
* Resource Descriptor macros |
| 30 |
* |
| 31 |
* Short Vendor Resource Descriptor |
| 32 |
*/ |
| 33 |
Name (P40C, Package (0x08) |
| 34 |
{ |
| 35 |
ResourceTemplate () |
| 36 |
{ |
| 37 |
VendorShort () // Length = 0x00 |
| 38 |
{ |
| 39 |
} |
| 40 |
}, |
| 41 |
|
| 42 |
ResourceTemplate () |
| 43 |
{ |
| 44 |
VendorShort () // Length = 0x01 |
| 45 |
{ |
| 46 |
0xF1 // . |
| 47 |
} |
| 48 |
}, |
| 49 |
|
| 50 |
ResourceTemplate () |
| 51 |
{ |
| 52 |
VendorShort () // Length = 0x02 |
| 53 |
{ |
| 54 |
0xE1, 0xF2 // .. |
| 55 |
} |
| 56 |
}, |
| 57 |
|
| 58 |
ResourceTemplate () |
| 59 |
{ |
| 60 |
VendorShort () // Length = 0x03 |
| 61 |
{ |
| 62 |
0xD1, 0xE2, 0xF3 // ... |
| 63 |
} |
| 64 |
}, |
| 65 |
|
| 66 |
ResourceTemplate () |
| 67 |
{ |
| 68 |
VendorShort () // Length = 0x04 |
| 69 |
{ |
| 70 |
0x00, 0xD2, 0xE3, 0xF4 // .... |
| 71 |
} |
| 72 |
}, |
| 73 |
|
| 74 |
ResourceTemplate () |
| 75 |
{ |
| 76 |
VendorShort () // Length = 0x05 |
| 77 |
{ |
| 78 |
0xB1, 0xC2, 0x00, 0xE4, 0xF5 // ..... |
| 79 |
} |
| 80 |
}, |
| 81 |
|
| 82 |
ResourceTemplate () |
| 83 |
{ |
| 84 |
VendorShort () // Length = 0x06 |
| 85 |
{ |
| 86 |
0xA1, 0xB2, 0xC3, 0xD4, 0xE5, 0xF6 // ...... |
| 87 |
} |
| 88 |
}, |
| 89 |
|
| 90 |
ResourceTemplate () |
| 91 |
{ |
| 92 |
VendorShort () // Length = 0x07 |
| 93 |
{ |
| 94 |
0x00, 0xA2, 0xB3, 0x76, 0xD5, 0xE6, 0xF7 // ...v... |
| 95 |
} |
| 96 |
} |
| 97 |
}) |
| 98 |
/* |
| 99 |
ACPI Specification, Revision 3.0, September 2, 2004 |
| 100 |
6.4.2.7 Vendor-Defined Descriptor |
| 101 |
Vendor-Defined Descriptor layout: |
| 102 |
Byte 0 (Tag Bits): Value = 01110nnnB (0x71-0x77)(Type = 0, small item name = 0xE, length = (1-7)) |
| 103 |
Byte 1 to 7 - Vendor defined |
| 104 |
*/ |
| 105 |
Name (P40D, Package (0x08) |
| 106 |
{ |
| 107 |
ResourceTemplate () |
| 108 |
{ |
| 109 |
VendorShort () // Length = 0x00 |
| 110 |
{ |
| 111 |
} |
| 112 |
}, |
| 113 |
|
| 114 |
ResourceTemplate () |
| 115 |
{ |
| 116 |
VendorShort () // Length = 0x01 |
| 117 |
{ |
| 118 |
0xF1 // . |
| 119 |
} |
| 120 |
}, |
| 121 |
|
| 122 |
ResourceTemplate () |
| 123 |
{ |
| 124 |
VendorShort () // Length = 0x02 |
| 125 |
{ |
| 126 |
0xE1, 0xF2 // .. |
| 127 |
} |
| 128 |
}, |
| 129 |
|
| 130 |
ResourceTemplate () |
| 131 |
{ |
| 132 |
VendorShort () // Length = 0x03 |
| 133 |
{ |
| 134 |
0xD1, 0xE2, 0xF3 // ... |
| 135 |
} |
| 136 |
}, |
| 137 |
|
| 138 |
ResourceTemplate () |
| 139 |
{ |
| 140 |
VendorShort () // Length = 0x04 |
| 141 |
{ |
| 142 |
0x00, 0xD2, 0xE3, 0xF4 // .... |
| 143 |
} |
| 144 |
}, |
| 145 |
|
| 146 |
ResourceTemplate () |
| 147 |
{ |
| 148 |
VendorShort () // Length = 0x05 |
| 149 |
{ |
| 150 |
0xB1, 0xC2, 0x00, 0xE4, 0xF5 // ..... |
| 151 |
} |
| 152 |
}, |
| 153 |
|
| 154 |
ResourceTemplate () |
| 155 |
{ |
| 156 |
VendorShort () // Length = 0x06 |
| 157 |
{ |
| 158 |
0xA1, 0xB2, 0xC3, 0xD4, 0xE5, 0xF6 // ...... |
| 159 |
} |
| 160 |
}, |
| 161 |
|
| 162 |
ResourceTemplate () |
| 163 |
{ |
| 164 |
VendorShort () // Length = 0x07 |
| 165 |
{ |
| 166 |
0x00, 0xA2, 0xB3, 0x76, 0xD5, 0xE6, 0xF7 // ...v... |
| 167 |
} |
| 168 |
} |
| 169 |
}) |
| 170 |
Method (RT07, 0, Serialized) |
| 171 |
{ |
| 172 |
/* Emit test header, set the filename */ |
| 173 |
|
| 174 |
THDR (__METHOD__, "Short Vendor Resource Descriptor Macro", "vendorshort.asl") |
| 175 |
/* Main test case for packages above */ |
| 176 |
|
| 177 |
M330 (__METHOD__, 0x08, "p40c", P40C, P40D) |
| 178 |
} |