Deleted Added
full compact
exconvrt.c (99146) exconvrt.c (99679)
1/******************************************************************************
2 *
3 * Module Name: exconvrt - Object conversion routines
1/******************************************************************************
2 *
3 * Module Name: exconvrt - Object conversion routines
4 * $Revision: 32 $
4 * $Revision: 37 $
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.

--- 100 unchanged lines hidden (view full) ---

113 * such license, approval or letter.
114 *
115 *****************************************************************************/
116
117
118#define __EXCONVRT_C__
119
120#include "acpi.h"
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.

--- 100 unchanged lines hidden (view full) ---

113 * such license, approval or letter.
114 *
115 *****************************************************************************/
116
117
118#define __EXCONVRT_C__
119
120#include "acpi.h"
121#include "acparser.h"
122#include "acnamesp.h"
123#include "acinterp.h"
121#include "acinterp.h"
124#include "acevents.h"
125#include "amlcode.h"
122#include "amlcode.h"
126#include "acdispat.h"
127
128
129#define _COMPONENT ACPI_EXECUTER
130 ACPI_MODULE_NAME ("exconvrt")
131
132
133/*******************************************************************************
134 *

--- 13 unchanged lines hidden (view full) ---

148AcpiExConvertToInteger (
149 ACPI_OPERAND_OBJECT *ObjDesc,
150 ACPI_OPERAND_OBJECT **ResultDesc,
151 ACPI_WALK_STATE *WalkState)
152{
153 UINT32 i;
154 ACPI_OPERAND_OBJECT *RetDesc;
155 UINT32 Count;
123
124
125#define _COMPONENT ACPI_EXECUTER
126 ACPI_MODULE_NAME ("exconvrt")
127
128
129/*******************************************************************************
130 *

--- 13 unchanged lines hidden (view full) ---

144AcpiExConvertToInteger (
145 ACPI_OPERAND_OBJECT *ObjDesc,
146 ACPI_OPERAND_OBJECT **ResultDesc,
147 ACPI_WALK_STATE *WalkState)
148{
149 UINT32 i;
150 ACPI_OPERAND_OBJECT *RetDesc;
151 UINT32 Count;
156 char *Pointer;
152 UINT8 *Pointer;
157 ACPI_INTEGER Result;
153 ACPI_INTEGER Result;
158 UINT32 IntegerSize = sizeof (ACPI_INTEGER);
154 ACPI_STATUS Status;
159
160
161 ACPI_FUNCTION_TRACE_PTR ("ExConvertToInteger", ObjDesc);
162
163
155
156
157 ACPI_FUNCTION_TRACE_PTR ("ExConvertToInteger", ObjDesc);
158
159
164 switch (ObjDesc->Common.Type)
160 switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
165 {
166 case ACPI_TYPE_INTEGER:
167 *ResultDesc = ObjDesc;
168 return_ACPI_STATUS (AE_OK);
169
170 case ACPI_TYPE_STRING:
161 {
162 case ACPI_TYPE_INTEGER:
163 *ResultDesc = ObjDesc;
164 return_ACPI_STATUS (AE_OK);
165
166 case ACPI_TYPE_STRING:
171 Pointer = ObjDesc->String.Pointer;
167 Pointer = (UINT8 *) ObjDesc->String.Pointer;
172 Count = ObjDesc->String.Length;
173 break;
174
175 case ACPI_TYPE_BUFFER:
168 Count = ObjDesc->String.Length;
169 break;
170
171 case ACPI_TYPE_BUFFER:
176 Pointer = (char *) ObjDesc->Buffer.Pointer;
172 Pointer = ObjDesc->Buffer.Pointer;
177 Count = ObjDesc->Buffer.Length;
178 break;
179
180 default:
181 return_ACPI_STATUS (AE_TYPE);
182 }
183
184 /*
173 Count = ObjDesc->Buffer.Length;
174 break;
175
176 default:
177 return_ACPI_STATUS (AE_TYPE);
178 }
179
180 /*
185 * Create a new integer
186 */
187 RetDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
188 if (!RetDesc)
189 {
190 return_ACPI_STATUS (AE_NO_MEMORY);
191 }
192
193 /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
194
195 if (WalkState->MethodNode->Flags & ANOBJ_DATA_WIDTH_32)
196 {
197 /*
198 * We are running a method that exists in a 32-bit ACPI table.
199 * Truncate the value to 32 bits by zeroing out the upper 32-bit field
200 */
201 IntegerSize = sizeof (UINT32);
202 }
203
204 /*
205 * Convert the buffer/string to an integer. Note that both buffers and
206 * strings are treated as raw data - we don't convert ascii to hex for
207 * strings.
208 *
209 * There are two terminating conditions for the loop:
210 * 1) The size of an integer has been reached, or
211 * 2) The end of the buffer or string has been reached
212 */
213 Result = 0;
214
215 /* Transfer no more than an integer's worth of data */
216
181 * Convert the buffer/string to an integer. Note that both buffers and
182 * strings are treated as raw data - we don't convert ascii to hex for
183 * strings.
184 *
185 * There are two terminating conditions for the loop:
186 * 1) The size of an integer has been reached, or
187 * 2) The end of the buffer or string has been reached
188 */
189 Result = 0;
190
191 /* Transfer no more than an integer's worth of data */
192
217 if (Count > IntegerSize)
193 if (Count > AcpiGbl_IntegerByteWidth)
218 {
194 {
219 Count = IntegerSize;
195 Count = AcpiGbl_IntegerByteWidth;
220 }
221
222 /*
223 * String conversion is different than Buffer conversion
224 */
196 }
197
198 /*
199 * String conversion is different than Buffer conversion
200 */
225 switch (ObjDesc->Common.Type)
201 switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
226 {
227 case ACPI_TYPE_STRING:
228
202 {
203 case ACPI_TYPE_STRING:
204
229 /* TBD: Need to use 64-bit ACPI_STRTOUL */
230
231 /*
232 * Convert string to an integer
233 * String must be hexadecimal as per the ACPI specification
234 */
205 /*
206 * Convert string to an integer
207 * String must be hexadecimal as per the ACPI specification
208 */
235 Result = ACPI_STRTOUL (Pointer, NULL, 16);
209 Status = AcpiUtStrtoul64 ((char *) Pointer, 16, &Result);
210 if (ACPI_FAILURE (Status))
211 {
212 return_ACPI_STATUS (Status);
213 }
236 break;
237
238
239 case ACPI_TYPE_BUFFER:
240
241 /*
242 * Buffer conversion - we simply grab enough raw data from the
243 * buffer to fill an integer
244 */
245 for (i = 0; i < Count; i++)
246 {
247 /*
248 * Get next byte and shift it into the Result.
249 * Little endian is used, meaning that the first byte of the buffer
250 * is the LSB of the integer
251 */
252 Result |= (((ACPI_INTEGER) Pointer[i]) << (i * 8));
253 }
254 break;
214 break;
215
216
217 case ACPI_TYPE_BUFFER:
218
219 /*
220 * Buffer conversion - we simply grab enough raw data from the
221 * buffer to fill an integer
222 */
223 for (i = 0; i < Count; i++)
224 {
225 /*
226 * Get next byte and shift it into the Result.
227 * Little endian is used, meaning that the first byte of the buffer
228 * is the LSB of the integer
229 */
230 Result |= (((ACPI_INTEGER) Pointer[i]) << (i * 8));
231 }
232 break;
233
234
235 default:
236 /* No other types can get here */
237 break;
255 }
256
238 }
239
240 /*
241 * Create a new integer
242 */
243 RetDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
244 if (!RetDesc)
245 {
246 return_ACPI_STATUS (AE_NO_MEMORY);
247 }
248
257 /* Save the Result, delete original descriptor, store new descriptor */
258
259 RetDesc->Integer.Value = Result;
260
261 if (*ResultDesc == ObjDesc)
262 {
263 if (WalkState->Opcode != AML_STORE_OP)
264 {

--- 23 unchanged lines hidden (view full) ---

288ACPI_STATUS
289AcpiExConvertToBuffer (
290 ACPI_OPERAND_OBJECT *ObjDesc,
291 ACPI_OPERAND_OBJECT **ResultDesc,
292 ACPI_WALK_STATE *WalkState)
293{
294 ACPI_OPERAND_OBJECT *RetDesc;
295 UINT32 i;
249 /* Save the Result, delete original descriptor, store new descriptor */
250
251 RetDesc->Integer.Value = Result;
252
253 if (*ResultDesc == ObjDesc)
254 {
255 if (WalkState->Opcode != AML_STORE_OP)
256 {

--- 23 unchanged lines hidden (view full) ---

280ACPI_STATUS
281AcpiExConvertToBuffer (
282 ACPI_OPERAND_OBJECT *ObjDesc,
283 ACPI_OPERAND_OBJECT **ResultDesc,
284 ACPI_WALK_STATE *WalkState)
285{
286 ACPI_OPERAND_OBJECT *RetDesc;
287 UINT32 i;
296 UINT32 IntegerSize = sizeof (ACPI_INTEGER);
297 UINT8 *NewBuf;
298
299
300 ACPI_FUNCTION_TRACE_PTR ("ExConvertToBuffer", ObjDesc);
301
302
288 UINT8 *NewBuf;
289
290
291 ACPI_FUNCTION_TRACE_PTR ("ExConvertToBuffer", ObjDesc);
292
293
303 switch (ObjDesc->Common.Type)
294 switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
304 {
305 case ACPI_TYPE_INTEGER:
306
307 /*
295 {
296 case ACPI_TYPE_INTEGER:
297
298 /*
308 * Create a new Buffer
299 * Create a new Buffer object
309 */
310 RetDesc = AcpiUtCreateInternalObject (ACPI_TYPE_BUFFER);
311 if (!RetDesc)
312 {
313 return_ACPI_STATUS (AE_NO_MEMORY);
314 }
315
300 */
301 RetDesc = AcpiUtCreateInternalObject (ACPI_TYPE_BUFFER);
302 if (!RetDesc)
303 {
304 return_ACPI_STATUS (AE_NO_MEMORY);
305 }
306
316 /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
317
318 if (WalkState->MethodNode->Flags & ANOBJ_DATA_WIDTH_32)
319 {
320 /*
321 * We are running a method that exists in a 32-bit ACPI table.
322 * Use only 32 bits of the Integer for conversion.
323 */
324 IntegerSize = sizeof (UINT32);
325 }
326
327 /* Need enough space for one integer */
328
307 /* Need enough space for one integer */
308
329 RetDesc->Buffer.Length = IntegerSize;
330 NewBuf = ACPI_MEM_CALLOCATE (IntegerSize);
309 NewBuf = ACPI_MEM_CALLOCATE (AcpiGbl_IntegerByteWidth);
331 if (!NewBuf)
332 {
333 ACPI_REPORT_ERROR
334 (("ExConvertToBuffer: Buffer allocation failure\n"));
335 AcpiUtRemoveReference (RetDesc);
336 return_ACPI_STATUS (AE_NO_MEMORY);
337 }
338
339 /* Copy the integer to the buffer */
340
310 if (!NewBuf)
311 {
312 ACPI_REPORT_ERROR
313 (("ExConvertToBuffer: Buffer allocation failure\n"));
314 AcpiUtRemoveReference (RetDesc);
315 return_ACPI_STATUS (AE_NO_MEMORY);
316 }
317
318 /* Copy the integer to the buffer */
319
341 for (i = 0; i < IntegerSize; i++)
320 for (i = 0; i < AcpiGbl_IntegerByteWidth; i++)
342 {
343 NewBuf[i] = (UINT8) (ObjDesc->Integer.Value >> (i * 8));
344 }
321 {
322 NewBuf[i] = (UINT8) (ObjDesc->Integer.Value >> (i * 8));
323 }
324
325 /* Complete buffer object initialization */
326
327 RetDesc->Buffer.Flags |= AOPOBJ_DATA_VALID;
345 RetDesc->Buffer.Pointer = NewBuf;
328 RetDesc->Buffer.Pointer = NewBuf;
329 RetDesc->Buffer.Length = AcpiGbl_IntegerByteWidth;
346
347 /* Return the new buffer descriptor */
348
349 *ResultDesc = RetDesc;
350 break;
351
352
353 case ACPI_TYPE_STRING:

--- 33 unchanged lines hidden (view full) ---

387AcpiExConvertToAscii (
388 ACPI_INTEGER Integer,
389 UINT32 Base,
390 UINT8 *String)
391{
392 UINT32 i;
393 UINT32 j;
394 UINT32 k = 0;
330
331 /* Return the new buffer descriptor */
332
333 *ResultDesc = RetDesc;
334 break;
335
336
337 case ACPI_TYPE_STRING:

--- 33 unchanged lines hidden (view full) ---

371AcpiExConvertToAscii (
372 ACPI_INTEGER Integer,
373 UINT32 Base,
374 UINT8 *String)
375{
376 UINT32 i;
377 UINT32 j;
378 UINT32 k = 0;
395 UINT8 HexDigit;
379 char HexDigit;
396 ACPI_INTEGER Digit;
397 UINT32 Remainder;
398 UINT32 Length = sizeof (ACPI_INTEGER);
399 BOOLEAN LeadingZero = TRUE;
400
401
402 ACPI_FUNCTION_ENTRY ();
403

--- 5 unchanged lines hidden (view full) ---

409 Remainder = 0;
410 for (i = ACPI_MAX_DECIMAL_DIGITS; i > 0 ; i--)
411 {
412 /* Divide by nth factor of 10 */
413
414 Digit = Integer;
415 for (j = 1; j < i; j++)
416 {
380 ACPI_INTEGER Digit;
381 UINT32 Remainder;
382 UINT32 Length = sizeof (ACPI_INTEGER);
383 BOOLEAN LeadingZero = TRUE;
384
385
386 ACPI_FUNCTION_ENTRY ();
387

--- 5 unchanged lines hidden (view full) ---

393 Remainder = 0;
394 for (i = ACPI_MAX_DECIMAL_DIGITS; i > 0 ; i--)
395 {
396 /* Divide by nth factor of 10 */
397
398 Digit = Integer;
399 for (j = 1; j < i; j++)
400 {
417 AcpiUtShortDivide (&Digit, 10, &Digit, &Remainder);
401 (void) AcpiUtShortDivide (&Digit, 10, &Digit, &Remainder);
418 }
419
420 /* Create the decimal digit */
421
422 if (Digit != 0)
423 {
424 LeadingZero = FALSE;
425 }

--- 16 unchanged lines hidden (view full) ---

442 HexDigit = AcpiUtHexToAsciiChar (Integer, (j * 4));
443 if (HexDigit != ACPI_ASCII_ZERO)
444 {
445 LeadingZero = FALSE;
446 }
447
448 if (!LeadingZero)
449 {
402 }
403
404 /* Create the decimal digit */
405
406 if (Digit != 0)
407 {
408 LeadingZero = FALSE;
409 }

--- 16 unchanged lines hidden (view full) ---

426 HexDigit = AcpiUtHexToAsciiChar (Integer, (j * 4));
427 if (HexDigit != ACPI_ASCII_ZERO)
428 {
429 LeadingZero = FALSE;
430 }
431
432 if (!LeadingZero)
433 {
450 String[k] = HexDigit;
434 String[k] = (UINT8) HexDigit;
451 k++;
452 }
453 }
454 break;
455
456 default:
457 break;
458 }

--- 36 unchanged lines hidden (view full) ---

495 UINT32 Base,
496 UINT32 MaxLength,
497 ACPI_WALK_STATE *WalkState)
498{
499 ACPI_OPERAND_OBJECT *RetDesc;
500 UINT32 i;
501 UINT32 Index;
502 UINT32 StringLength;
435 k++;
436 }
437 }
438 break;
439
440 default:
441 break;
442 }

--- 36 unchanged lines hidden (view full) ---

479 UINT32 Base,
480 UINT32 MaxLength,
481 ACPI_WALK_STATE *WalkState)
482{
483 ACPI_OPERAND_OBJECT *RetDesc;
484 UINT32 i;
485 UINT32 Index;
486 UINT32 StringLength;
503 UINT32 IntegerSize = sizeof (ACPI_INTEGER);
504 UINT8 *NewBuf;
505 UINT8 *Pointer;
506
507
508 ACPI_FUNCTION_TRACE_PTR ("ExConvertToString", ObjDesc);
509
510
487 UINT8 *NewBuf;
488 UINT8 *Pointer;
489
490
491 ACPI_FUNCTION_TRACE_PTR ("ExConvertToString", ObjDesc);
492
493
511 switch (ObjDesc->Common.Type)
494 switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
512 {
513 case ACPI_TYPE_INTEGER:
514
495 {
496 case ACPI_TYPE_INTEGER:
497
515 /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
516
517 if (WalkState->MethodNode->Flags & ANOBJ_DATA_WIDTH_32)
518 {
519 /*
520 * We are running a method that exists in a 32-bit ACPI table.
521 * Use only 32 bits of the Integer
522 */
523 IntegerSize = sizeof (UINT32);
524 }
525
526 StringLength = IntegerSize * 2;
498 StringLength = AcpiGbl_IntegerByteWidth * 2;
527 if (Base == 10)
528 {
529 StringLength = ACPI_MAX_DECIMAL_DIGITS;
530 }
531
532 /*
533 * Create a new String
534 */
535 RetDesc = AcpiUtCreateInternalObject (ACPI_TYPE_STRING);
536 if (!RetDesc)
537 {
538 return_ACPI_STATUS (AE_NO_MEMORY);
539 }
540
541 /* Need enough space for one ASCII integer plus null terminator */
542
499 if (Base == 10)
500 {
501 StringLength = ACPI_MAX_DECIMAL_DIGITS;
502 }
503
504 /*
505 * Create a new String
506 */
507 RetDesc = AcpiUtCreateInternalObject (ACPI_TYPE_STRING);
508 if (!RetDesc)
509 {
510 return_ACPI_STATUS (AE_NO_MEMORY);
511 }
512
513 /* Need enough space for one ASCII integer plus null terminator */
514
543 NewBuf = ACPI_MEM_CALLOCATE (StringLength + 1);
515 NewBuf = ACPI_MEM_CALLOCATE ((ACPI_SIZE) StringLength + 1);
544 if (!NewBuf)
545 {
546 ACPI_REPORT_ERROR
547 (("ExConvertToString: Buffer allocation failure\n"));
548 AcpiUtRemoveReference (RetDesc);
549 return_ACPI_STATUS (AE_NO_MEMORY);
550 }
551
516 if (!NewBuf)
517 {
518 ACPI_REPORT_ERROR
519 (("ExConvertToString: Buffer allocation failure\n"));
520 AcpiUtRemoveReference (RetDesc);
521 return_ACPI_STATUS (AE_NO_MEMORY);
522 }
523
552
553 /* Convert */
554
555 i = AcpiExConvertToAscii (ObjDesc->Integer.Value, Base, NewBuf);
556
557 /* Null terminate at the correct place */
558
559 if (MaxLength < i)
560 {

--- 49 unchanged lines hidden (view full) ---

610
611 /* String length is the lesser of the Max or the actual length */
612
613 if (MaxLength < StringLength)
614 {
615 StringLength = MaxLength;
616 }
617
524 /* Convert */
525
526 i = AcpiExConvertToAscii (ObjDesc->Integer.Value, Base, NewBuf);
527
528 /* Null terminate at the correct place */
529
530 if (MaxLength < i)
531 {

--- 49 unchanged lines hidden (view full) ---

581
582 /* String length is the lesser of the Max or the actual length */
583
584 if (MaxLength < StringLength)
585 {
586 StringLength = MaxLength;
587 }
588
618 NewBuf = ACPI_MEM_CALLOCATE (StringLength + 1);
589 NewBuf = ACPI_MEM_CALLOCATE ((ACPI_SIZE) StringLength + 1);
619 if (!NewBuf)
620 {
621 ACPI_REPORT_ERROR
622 (("ExConvertToString: Buffer allocation failure\n"));
623 AcpiUtRemoveReference (RetDesc);
624 return_ACPI_STATUS (AE_NO_MEMORY);
625 }
626
627 /*
628 * Convert each byte of the buffer to two ASCII characters plus a space.
629 */
630 Pointer = ObjDesc->Buffer.Pointer;
631 Index = 0;
632 for (i = 0, Index = 0; i < ObjDesc->Buffer.Length; i++)
633 {
590 if (!NewBuf)
591 {
592 ACPI_REPORT_ERROR
593 (("ExConvertToString: Buffer allocation failure\n"));
594 AcpiUtRemoveReference (RetDesc);
595 return_ACPI_STATUS (AE_NO_MEMORY);
596 }
597
598 /*
599 * Convert each byte of the buffer to two ASCII characters plus a space.
600 */
601 Pointer = ObjDesc->Buffer.Pointer;
602 Index = 0;
603 for (i = 0, Index = 0; i < ObjDesc->Buffer.Length; i++)
604 {
634 Index = AcpiExConvertToAscii (Pointer[i], Base, &NewBuf[Index]);
605 Index = AcpiExConvertToAscii ((ACPI_INTEGER) Pointer[i], Base, &NewBuf[Index]);
635
636 NewBuf[Index] = ' ';
637 Index++;
638 }
639
640 /* Null terminate */
641
642 NewBuf [Index-1] = 0;
643 RetDesc->Buffer.Pointer = NewBuf;
644 RetDesc->String.Length = ACPI_STRLEN ((char *) NewBuf);
645
606
607 NewBuf[Index] = ' ';
608 Index++;
609 }
610
611 /* Null terminate */
612
613 NewBuf [Index-1] = 0;
614 RetDesc->Buffer.Pointer = NewBuf;
615 RetDesc->String.Length = ACPI_STRLEN ((char *) NewBuf);
616
646
647 /* Return the new buffer descriptor */
648
649 if (*ResultDesc == ObjDesc)
650 {
651 if (WalkState->Opcode != AML_STORE_OP)
652 {
653 AcpiUtRemoveReference (ObjDesc);
654 }

--- 74 unchanged lines hidden (view full) ---

729 /*
730 * Named field can always handle conversions
731 */
732 break;
733
734 default:
735 /* No conversion allowed for these types */
736
617 /* Return the new buffer descriptor */
618
619 if (*ResultDesc == ObjDesc)
620 {
621 if (WalkState->Opcode != AML_STORE_OP)
622 {
623 AcpiUtRemoveReference (ObjDesc);
624 }

--- 74 unchanged lines hidden (view full) ---

699 /*
700 * Named field can always handle conversions
701 */
702 break;
703
704 default:
705 /* No conversion allowed for these types */
706
737 if (DestinationType != SourceDesc->Common.Type)
707 if (DestinationType != ACPI_GET_OBJECT_TYPE (SourceDesc))
738 {
739 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
740 "Target does not allow conversion of type %s to %s\n",
708 {
709 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
710 "Target does not allow conversion of type %s to %s\n",
741 AcpiUtGetTypeName ((SourceDesc)->Common.Type),
711 AcpiUtGetObjectTypeName (SourceDesc),
742 AcpiUtGetTypeName (DestinationType)));
743 Status = AE_TYPE;
744 }
745 }
746 break;
747
748
749 case ARGI_TARGETREF:

--- 25 unchanged lines hidden (view full) ---

775 case ACPI_TYPE_BUFFER:
776
777 /*
778 * The operand must be a Buffer. We can convert an
779 * Integer or String if necessary
780 */
781 Status = AcpiExConvertToBuffer (SourceDesc, ResultDesc, WalkState);
782 break;
712 AcpiUtGetTypeName (DestinationType)));
713 Status = AE_TYPE;
714 }
715 }
716 break;
717
718
719 case ARGI_TARGETREF:

--- 25 unchanged lines hidden (view full) ---

745 case ACPI_TYPE_BUFFER:
746
747 /*
748 * The operand must be a Buffer. We can convert an
749 * Integer or String if necessary
750 */
751 Status = AcpiExConvertToBuffer (SourceDesc, ResultDesc, WalkState);
752 break;
753
754
755 default:
756 Status = AE_AML_INTERNAL;
757 break;
783 }
784 break;
785
786
787 case ARGI_REFERENCE:
788 /*
789 * CreateXxxxField cases - we are storing the field object into the name
790 */

--- 4 unchanged lines hidden (view full) ---

795 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
796 "Unknown Target type ID 0x%X Op %s DestType %s\n",
797 GET_CURRENT_ARG_TYPE (WalkState->OpInfo->RuntimeArgs),
798 WalkState->OpInfo->Name, AcpiUtGetTypeName (DestinationType)));
799
800 Status = AE_AML_INTERNAL;
801 }
802
758 }
759 break;
760
761
762 case ARGI_REFERENCE:
763 /*
764 * CreateXxxxField cases - we are storing the field object into the name
765 */

--- 4 unchanged lines hidden (view full) ---

770 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
771 "Unknown Target type ID 0x%X Op %s DestType %s\n",
772 GET_CURRENT_ARG_TYPE (WalkState->OpInfo->RuntimeArgs),
773 WalkState->OpInfo->Name, AcpiUtGetTypeName (DestinationType)));
774
775 Status = AE_AML_INTERNAL;
776 }
777
803
804 /*
805 * Source-to-Target conversion semantics:
806 *
807 * If conversion to the target type cannot be performed, then simply
808 * overwrite the target with the new object and type.
809 */
810 if (Status == AE_TYPE)
811 {
812 Status = AE_OK;
813 }
814
815 return_ACPI_STATUS (Status);
816}
817
818
778 /*
779 * Source-to-Target conversion semantics:
780 *
781 * If conversion to the target type cannot be performed, then simply
782 * overwrite the target with the new object and type.
783 */
784 if (Status == AE_TYPE)
785 {
786 Status = AE_OK;
787 }
788
789 return_ACPI_STATUS (Status);
790}
791
792