diff options
author | Robert Moore <Robert.Moore@intel.com> | 2021-09-29 12:53:23 -0700 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2021-09-29 12:53:23 -0700 |
commit | a586f7cf5fd8e702d85ab53393249264e76894b6 (patch) | |
tree | 1b1e18416da9e85a45b653d462576423fa9c0ac9 | |
parent | b9c69f81a05c45611c91ea9cbce8756078d76233 (diff) | |
download | acpica-a586f7cf5fd8e702d85ab53393249264e76894b6.tar.gz |
Updated the check for usage of _CRS, _DIS, _PRS, and _SRS objects
New/latest rules: Under a Device Object:
1) If _PRS is present, must have _CRS and _SRS
2) If _SRS is present, must have _PRS (_PRS requires _CRS and _SRS)
3) If _DIS is present, must have _SRS (_SRS requires _PRS, _PRS requires _CRS and _SRS)
4) If _SRS is present, probably should have a _DIS (Remark only)
-rw-r--r-- | source/compiler/aslmethod.c | 70 |
1 files changed, 26 insertions, 44 deletions
diff --git a/source/compiler/aslmethod.c b/source/compiler/aslmethod.c index 5bec65e86..4b3b66a5a 100644 --- a/source/compiler/aslmethod.c +++ b/source/compiler/aslmethod.c @@ -559,74 +559,56 @@ MtMethodAnalysisWalkBegin ( * * Under the Device Object: * - * 1) If _DIS is present, must have a _CRS, _PRS, and _SRS - * 2) If _PRS is present, must have a _CRS and _SRS - * 3) If _SRS is present, must have a _CRS and _PRS + * 1) If _PRS present, must have _CRS and _SRS + * 2) If _SRS present, must have _PRS (_PRS requires _CRS and _SRS) + * 3) If _DIS present, must have _SRS (_SRS requires _PRS, _PRS requires _CRS and _SRS) + * 4) If _SRS present, probably should have a _DIS (Remark only) */ CrsExists = ApFindNameInDeviceTree (METHOD_NAME__CRS, Op); DisExists = ApFindNameInDeviceTree (METHOD_NAME__DIS, Op); PrsExists = ApFindNameInDeviceTree (METHOD_NAME__PRS, Op); SrsExists = ApFindNameInDeviceTree (METHOD_NAME__SRS, Op); - /* 1) If _DIS is present, must have a _CRS, _PRS, and _SRS */ + /* 1) If _PRS is present, must have a _CRS and _SRS */ - if (DisExists) + if (PrsExists) { if (!CrsExists) { AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op, - "_DIS is missing a _CRS, requires a _CRS, _PRS, and a _SRS"); - } - - if (!PrsExists) - { - AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op, - "_DIS is missing a _PRS, requires a _CRS, _PRS, and a _SRS"); + "Device has a _PRS, missing a _CRS, required"); } - if (!SrsExists) { AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op, - "_DIS is missing a _SRS, requires a _CRS, _PRS, and a _SRS"); + "Device has a _PRS, missing a _SRS, required"); } } - /* 2) If _PRS is present, must have a _CRS and _SRS */ + /* 2) If _SRS is present, must have _PRS (_PRS requires _CRS and _SRS) */ - if (PrsExists) + if ((SrsExists) && (!PrsExists)) { - if (!CrsExists) - { - AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op, - "_PRS is missing a _CRS, requires a _CRS and a _SRS"); - } - - if (!SrsExists) - { - AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op, - "_PRS is missing a _SRS, requires a _CRS and a _SRS"); - } + AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op, + "Device has a _SRS, missing a _PRS, required"); } - /* 3) If _SRS is present, must have a _CRS and _PRS */ + /* 3) If _DIS is present, must have a _SRS */ - if (SrsExists) + if ((DisExists) && (!SrsExists)) { - if (!CrsExists) - { - AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op, - "_SRS is missing a _CRS, requires a _CRS and a _PRS"); - } - if (!PrsExists) - { - AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op, - "_SRS is missing a _PRS, requires a _CRS and a _PRS"); - } - if (!DisExists) - { - AslError (ASL_REMARK, ASL_MSG_MISSING_DEPENDENCY, Op, - "_SRS is missing a _DIS"); - } + AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op, + "Device has a _DIS, missing a _SRS, required"); + } + + /* + * 4) If _SRS is present, should have a _DIS (_PRS requires _CRS + * and _SRS) Remark only. + */ + if ((SrsExists) && (!DisExists)) + { + AslError (ASL_REMARK, ASL_MSG_MISSING_DEPENDENCY, Op, + "Device has a _SRS, no corresponding _DIS"); } break; |