From 89f77adedcc9fe4b55657f4a5c187647a239ecac Mon Sep 17 00:00:00 2001 From: aystarik Date: Wed, 29 Jun 2005 18:21:29 +0000 Subject: [PATCH] New data types/names; removed OUTRANGE macro. date 99.07.12.23.26.00; author rmoore1; state Exp; --- source/components/namespace/nsdump.c | 6 +++--- source/components/namespace/nseval.c | 17 +++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/source/components/namespace/nsdump.c b/source/components/namespace/nsdump.c index 2de9f82b3..292923e35 100644 --- a/source/components/namespace/nsdump.c +++ b/source/components/namespace/nsdump.c @@ -265,7 +265,7 @@ NsDumpOneObject ( /* Check the integrity of our data */ - if (OUTRANGE (Type, NsTypeNames)) + if (Type > INTERNAL_TYPE_MAX) { Type = TYPE_DefAny; /* prints as *ERROR* */ } @@ -311,7 +311,7 @@ NsDumpOneObject ( while (Value && (DebugLevel & TRACE_VALUES)) { - UINT8 bT = ((ACPI_OBJECT_INTERNAL *) Value)->ValType; + UINT8 bT = ((ACPI_OBJECT_INTERNAL *) Value)->Type; DEBUG_PRINT_RAW (TRACE_TABLES, @@ -332,7 +332,7 @@ NsDumpOneObject ( * the above-listed variants of ACPI_OBJECT_INTERNAL have * compatible mappings. */ - Value = ((ACPI_OBJECT_INTERNAL *)Value)->Buffer.Buffer; + Value = ((ACPI_OBJECT_INTERNAL *)Value)->Buffer.Pointer; } else { diff --git a/source/components/namespace/nseval.c b/source/components/namespace/nseval.c index 2a92617d1..e3e6a9dbb 100644 --- a/source/components/namespace/nseval.c +++ b/source/components/namespace/nseval.c @@ -356,9 +356,10 @@ NsEvaluateByHandle ( if (ReturnObject) { - /* Initialize the return value */ + /* Initialize the return value to an invalid object */ memset (ReturnObject, 0, sizeof (ACPI_OBJECT_INTERNAL)); + ReturnObject->Type = TYPE_Invalid; } @@ -396,15 +397,13 @@ BREAKPOINT3; * descriptor provided by the caller. */ - /* - * TBD: Translate to a different external object type here - */ - if (ReturnObject) { + /* Valid return object, copy the returned object that is on the stack */ + (*ReturnObject) = *((ACPI_OBJECT_INTERNAL *) ObjStack[ObjStackTop]); } - + /* * Now that the return value (object) has been copied, we must purge the stack * of the return value by deleting the object and popping the stack! @@ -428,6 +427,8 @@ BREAKPOINT3; ObjStackTop = 0; } + /* Map AE_RETURN_VALUE to AE_OK, we are done with it */ + Status = AE_OK; } @@ -579,9 +580,9 @@ NsGetObjectValue ( /* Construct a descriptor pointing to the name */ - ObjDesc->Lvalue.ValType = (UINT8) TYPE_Lvalue; + ObjDesc->Lvalue.Type = (UINT8) TYPE_Lvalue; ObjDesc->Lvalue.OpCode = (UINT8) AML_NameOp; - ObjDesc->Lvalue.Ref = (void *) ObjectEntry; + ObjDesc->Lvalue.Object = (void *) ObjectEntry; /*