diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2019-12-13 16:51:08 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2019-12-13 16:51:08 +0000 |
commit | 856462eaaec9052a60d62b66076257e7fad337c7 (patch) | |
tree | f331b79154052fd6dc5f70c176975966370af8d9 /source/compiler/aslxref.c | |
parent | 858f47305dae045d81f39451ade697ba99b3266f (diff) |
Notes
Diffstat (limited to 'source/compiler/aslxref.c')
-rw-r--r-- | source/compiler/aslxref.c | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/source/compiler/aslxref.c b/source/compiler/aslxref.c index d903ef1ba876..8a1f1a4c5e7f 100644 --- a/source/compiler/aslxref.c +++ b/source/compiler/aslxref.c @@ -1055,7 +1055,7 @@ XfNamespaceLocateBegin ( NextOp = NextOp->Asl.Next; } - if (Node->Value != ASL_EXTERNAL_METHOD && + if (Node->Value != ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS && Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_EXTERNAL) { /* @@ -1064,8 +1064,17 @@ XfNamespaceLocateBegin ( */ if (PassedArgs != Node->Value) { - sprintf (AslGbl_MsgBuffer, "%s requires %u", Op->Asl.ExternalName, - Node->Value); + if (Node->Flags & ANOBJ_IS_EXTERNAL) + { + sprintf (AslGbl_MsgBuffer, + "according to previous use, %s requires %u", + Op->Asl.ExternalName, Node->Value); + } + else + { + sprintf (AslGbl_MsgBuffer, "%s requires %u", Op->Asl.ExternalName, + Node->Value); + } if (PassedArgs < Node->Value) { @@ -1077,6 +1086,22 @@ XfNamespaceLocateBegin ( } } } + + /* + * At this point, a method call to an external method has been + * detected. As of 11/19/2019, iASL does not support parameter counts + * for methods declared as external. Therefore, save the parameter + * count of the first method call and use this count check other + * method calls to ensure that the methods are being called with the + * same amount of parameters. + */ + else if (Node->Type == ACPI_TYPE_METHOD && + (Node->Flags & ANOBJ_IS_EXTERNAL) && + Node->Value == ASL_EXTERNAL_METHOD_UNKNOWN_PARAMS && + Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_EXTERNAL) + { + Node->Value = PassedArgs; + } } /* 4) Check for an ASL Field definition */ |