| 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 |
* Bug 276: |
| 30 |
* |
| 31 |
* SUMMARY: 'Large Reference Count' on AML code with LoadTable/UnLoad in a slack mode |
| 32 |
* |
| 33 |
* Note: Check the result of this test manually that there are no |
| 34 |
* 'Large Reference Count' reported. |
| 35 |
* |
| 36 |
* Note: these 'Large Reference Count' could be detected automatically by Do utility |
| 37 |
*/ |
| 38 |
Method (MC76, 0, Serialized) |
| 39 |
{ |
| 40 |
Name (ERR5, 0x00) |
| 41 |
Name (ERRS, 0x00) |
| 42 |
Name (TMT0, 0x00) |
| 43 |
Name (TCLL, 0x00) |
| 44 |
Name (RMRC, 0x00) |
| 45 |
Name (RP0P, Package (0x08){}) |
| 46 |
Name (NRMT, "") |
| 47 |
Name (STST, "STST") |
| 48 |
Name (TCNP, Package (0x09) |
| 49 |
{ |
| 50 |
"compilation", |
| 51 |
"functional", |
| 52 |
"complex", |
| 53 |
"exceptions", |
| 54 |
"bug-demo", |
| 55 |
"service", |
| 56 |
"mt", |
| 57 |
"Identity2MS", |
| 58 |
"IMPL" |
| 59 |
}) |
| 60 |
Method (TCN0, 1, NotSerialized) |
| 61 |
{ |
| 62 |
Local7 = "?" |
| 63 |
Local7 = DerefOf (TCNP [Arg0]) |
| 64 |
Return (Local7) |
| 65 |
} |
| 66 |
|
| 67 |
Method (MMM0, 0, NotSerialized) |
| 68 |
{ |
| 69 |
ERRS++ |
| 70 |
} |
| 71 |
|
| 72 |
Method (MC73, 0, Serialized) |
| 73 |
{ |
| 74 |
Name (DDBH, 0x00) |
| 75 |
Method (M000, 0, NotSerialized) |
| 76 |
{ |
| 77 |
} |
| 78 |
|
| 79 |
Method (M001, 0, NotSerialized) |
| 80 |
{ |
| 81 |
} |
| 82 |
|
| 83 |
DDBH = LoadTable ("OEM1", "", "", "", "", 0x01) |
| 84 |
MMM0 () |
| 85 |
Unload (DDBH) |
| 86 |
Debug = "OEM1 unloaded" |
| 87 |
} |
| 88 |
|
| 89 |
Method (MMM2, 5, NotSerialized) |
| 90 |
{ |
| 91 |
} |
| 92 |
|
| 93 |
Method (MMM3, 0, Serialized) |
| 94 |
{ |
| 95 |
Name (B000, Buffer (0x04){}) |
| 96 |
Concatenate (":", TCN0 (TCLL), Local1) |
| 97 |
Concatenate (Local1, ":", Local0) |
| 98 |
Concatenate (Local0, "?", Local1) |
| 99 |
Concatenate (Local1, ":", Local0) |
| 100 |
Concatenate (Local0, NRMT, Local1) |
| 101 |
Concatenate (Local1, ":", Local0) |
| 102 |
Local7 = (ERRS - ERR5) /* \MC76.ERR5 */ |
| 103 |
Concatenate (Local0, "FAIL:Errors # ", Local2) |
| 104 |
Concatenate (Local2, Local7, Local0) |
| 105 |
Concatenate (Local0, Local1, Local2) |
| 106 |
Debug = Local2 |
| 107 |
Concatenate (":", STST, Local2) |
| 108 |
Concatenate (Local2, Local1, Local0) |
| 109 |
RP0P [RMRC] = Local0 |
| 110 |
} |
| 111 |
|
| 112 |
Method (MMM1, 0, NotSerialized) |
| 113 |
{ |
| 114 |
MMM2 (0x00, 0x00, 0x00, 0x00, 0x00) |
| 115 |
MMM3 () |
| 116 |
} |
| 117 |
|
| 118 |
Method (MMM4, 1, NotSerialized) |
| 119 |
{ |
| 120 |
TMT0 = Timer |
| 121 |
} |
| 122 |
|
| 123 |
Method (MMM5, 0, NotSerialized) |
| 124 |
{ |
| 125 |
MMM4 (0x00) |
| 126 |
MC73 () |
| 127 |
MMM1 () |
| 128 |
} |
| 129 |
|
| 130 |
MMM5 () |
| 131 |
} |