ReactOS  0.4.14-dev-606-g14ebc0b
rsmisc.c
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * Module Name: rsmisc - Miscellaneous resource descriptors
4  *
5  ******************************************************************************/
6 
7 /*
8  * Copyright (C) 2000 - 2019, Intel Corp.
9  * All rights reserved.
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  * 1. Redistributions of source code must retain the above copyright
15  * notice, this list of conditions, and the following disclaimer,
16  * without modification.
17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18  * substantially similar to the "NO WARRANTY" disclaimer below
19  * ("Disclaimer") and any redistribution must be conditioned upon
20  * including a substantially similar Disclaimer requirement for further
21  * binary redistribution.
22  * 3. Neither the names of the above-listed copyright holders nor the names
23  * of any contributors may be used to endorse or promote products derived
24  * from this software without specific prior written permission.
25  *
26  * Alternatively, this software may be distributed under the terms of the
27  * GNU General Public License ("GPL") version 2 as published by the Free
28  * Software Foundation.
29  *
30  * NO WARRANTY
31  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41  * POSSIBILITY OF SUCH DAMAGES.
42  */
43 
44 #include "acpi.h"
45 #include "accommon.h"
46 #include "acresrc.h"
47 
48 #define _COMPONENT ACPI_RESOURCES
49  ACPI_MODULE_NAME ("rsmisc")
50 
51 
52 #define INIT_RESOURCE_TYPE(i) i->ResourceOffset
53 #define INIT_RESOURCE_LENGTH(i) i->AmlOffset
54 #define INIT_TABLE_LENGTH(i) i->Value
55 
56 #define COMPARE_OPCODE(i) i->ResourceOffset
57 #define COMPARE_TARGET(i) i->AmlOffset
58 #define COMPARE_VALUE(i) i->Value
59 
60 
61 /*******************************************************************************
62  *
63  * FUNCTION: AcpiRsConvertAmlToResource
64  *
65  * PARAMETERS: Resource - Pointer to the resource descriptor
66  * Aml - Where the AML descriptor is returned
67  * Info - Pointer to appropriate conversion table
68  *
69  * RETURN: Status
70  *
71  * DESCRIPTION: Convert an external AML resource descriptor to the corresponding
72  * internal resource descriptor
73  *
74  ******************************************************************************/
75 
81 {
82  ACPI_RS_LENGTH AmlResourceLength;
83  void *Source;
84  void *Destination;
85  char *Target;
86  UINT8 Count;
87  UINT8 FlagsMode = FALSE;
88  UINT16 ItemCount = 0;
89  UINT16 Temp16 = 0;
90 
91 
92  ACPI_FUNCTION_TRACE (RsConvertAmlToResource);
93 
94 
95  if (!Info)
96  {
98  }
99 
100  if (((ACPI_SIZE) Resource) & 0x3)
101  {
102  /* Each internal resource struct is expected to be 32-bit aligned */
103 
105  "Misaligned resource pointer (get): %p Type 0x%2.2X Length %u",
106  Resource, Resource->Type, Resource->Length));
107  }
108 
109  /* Extract the resource Length field (does not include header length) */
110 
111  AmlResourceLength = AcpiUtGetResourceLength (Aml);
112 
113  /*
114  * First table entry must be ACPI_RSC_INITxxx and must contain the
115  * table length (# of table entries)
116  */
118  while (Count)
119  {
120  /*
121  * Source is the external AML byte stream buffer,
122  * destination is the internal resource descriptor
123  */
124  Source = ACPI_ADD_PTR (void, Aml, Info->AmlOffset);
125  Destination = ACPI_ADD_PTR (void, Resource, Info->ResourceOffset);
126 
127  switch (Info->Opcode)
128  {
129  case ACPI_RSC_INITGET:
130  /*
131  * Get the resource type and the initial (minimum) length
132  */
134  Resource->Type = INIT_RESOURCE_TYPE (Info);
135  Resource->Length = INIT_RESOURCE_LENGTH (Info);
136  break;
137 
138  case ACPI_RSC_INITSET:
139  break;
140 
141  case ACPI_RSC_FLAGINIT:
142 
143  FlagsMode = TRUE;
144  break;
145 
146  case ACPI_RSC_1BITFLAG:
147  /*
148  * Mask and shift the flag bit
149  */
151  ((ACPI_GET8 (Source) >> Info->Value) & 0x01));
152  break;
153 
154  case ACPI_RSC_2BITFLAG:
155  /*
156  * Mask and shift the flag bits
157  */
159  ((ACPI_GET8 (Source) >> Info->Value) & 0x03));
160  break;
161 
162  case ACPI_RSC_3BITFLAG:
163  /*
164  * Mask and shift the flag bits
165  */
167  ((ACPI_GET8 (Source) >> Info->Value) & 0x07));
168  break;
169 
170  case ACPI_RSC_COUNT:
171 
172  ItemCount = ACPI_GET8 (Source);
173  ACPI_SET8 (Destination, ItemCount);
174 
175  Resource->Length = Resource->Length +
176  (Info->Value * (ItemCount - 1));
177  break;
178 
179  case ACPI_RSC_COUNT16:
180 
181  ItemCount = AmlResourceLength;
182  ACPI_SET16 (Destination, ItemCount);
183 
184  Resource->Length = Resource->Length +
185  (Info->Value * (ItemCount - 1));
186  break;
187 
189 
190  Target = ACPI_ADD_PTR (void, Aml, Info->Value);
191  ItemCount = ACPI_GET16 (Target) - ACPI_GET16 (Source);
192 
193  Resource->Length = Resource->Length + ItemCount;
194  ItemCount = ItemCount / 2;
195  ACPI_SET16 (Destination, ItemCount);
196  break;
197 
199 
200  ItemCount = ACPI_GET8 (Source);
201  ACPI_SET8 (Destination, ItemCount);
202 
203  Resource->Length = Resource->Length + (Info->Value * ItemCount);
204  break;
205 
207  /*
208  * Vendor data is optional (length/offset may both be zero)
209  * Examine vendor data length field first
210  */
211  Target = ACPI_ADD_PTR (void, Aml, (Info->Value + 2));
212  if (ACPI_GET16 (Target))
213  {
214  /* Use vendor offset to get resource source length */
215 
216  Target = ACPI_ADD_PTR (void, Aml, Info->Value);
217  ItemCount = ACPI_GET16 (Target) - ACPI_GET16 (Source);
218  }
219  else
220  {
221  /* No vendor data to worry about */
222 
223  ItemCount = Aml->LargeHeader.ResourceLength +
224  sizeof (AML_RESOURCE_LARGE_HEADER) -
225  ACPI_GET16 (Source);
226  }
227 
228  Resource->Length = Resource->Length + ItemCount;
229  ACPI_SET16 (Destination, ItemCount);
230  break;
231 
233 
234  ItemCount = ACPI_GET16 (Source) - Info->Value;
235 
236  Resource->Length = Resource->Length + ItemCount;
237  ACPI_SET16 (Destination, ItemCount);
238  break;
239 
241 
242  ItemCount = (AmlResourceLength +
243  sizeof (AML_RESOURCE_LARGE_HEADER)) -
244  ACPI_GET16 (Source) - Info->Value;
245 
246  Resource->Length = Resource->Length + ItemCount;
247  ACPI_SET16 (Destination, ItemCount);
248  break;
249 
250  case ACPI_RSC_LENGTH:
251 
252  Resource->Length = Resource->Length + Info->Value;
253  break;
254 
255  case ACPI_RSC_MOVE8:
256  case ACPI_RSC_MOVE16:
257  case ACPI_RSC_MOVE32:
258  case ACPI_RSC_MOVE64:
259  /*
260  * Raw data move. Use the Info value field unless ItemCount has
261  * been previously initialized via a COUNT opcode
262  */
263  if (Info->Value)
264  {
265  ItemCount = Info->Value;
266  }
267  AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode);
268  break;
269 
271 
272  /* Generate and set the PIN data pointer */
273 
274  Target = (char *) ACPI_ADD_PTR (void, Resource,
275  (Resource->Length - ItemCount * 2));
277 
278  /* Copy the PIN data */
279 
280  Source = ACPI_ADD_PTR (void, Aml, ACPI_GET16 (Source));
281  AcpiRsMoveData (Target, Source, ItemCount, Info->Opcode);
282  break;
283 
285 
286  /* Generate and set the ResourceSource string pointer */
287 
288  Target = (char *) ACPI_ADD_PTR (void, Resource,
289  (Resource->Length - ItemCount));
291 
292  /* Copy the ResourceSource string */
293 
294  Source = ACPI_ADD_PTR (void, Aml, ACPI_GET16 (Source));
295  AcpiRsMoveData (Target, Source, ItemCount, Info->Opcode);
296  break;
297 
299 
300  /* Generate and set the Vendor Data pointer */
301 
302  Target = (char *) ACPI_ADD_PTR (void, Resource,
303  (Resource->Length - ItemCount));
305 
306  /* Copy the Vendor Data */
307 
308  Source = ACPI_ADD_PTR (void, Aml, Info->Value);
309  AcpiRsMoveData (Target, Source, ItemCount, Info->Opcode);
310  break;
311 
313 
314  /* Generate and set the ResourceSource string pointer */
315 
316  Target = (char *) ACPI_ADD_PTR (void, Resource,
317  (Resource->Length - ItemCount));
319 
320  /* Copy the ResourceSource string */
321 
322  Source = ACPI_ADD_PTR (
323  void, Aml, (ACPI_GET16 (Source) + Info->Value));
324  AcpiRsMoveData (Target, Source, ItemCount, Info->Opcode);
325  break;
326 
327  case ACPI_RSC_SET8:
328 
329  memset (Destination, Info->AmlOffset, Info->Value);
330  break;
331 
332  case ACPI_RSC_DATA8:
333 
334  Target = ACPI_ADD_PTR (char, Resource, Info->Value);
336  break;
337 
338  case ACPI_RSC_ADDRESS:
339  /*
340  * Common handler for address descriptor flags
341  */
343  {
345  }
346  break;
347 
348  case ACPI_RSC_SOURCE:
349  /*
350  * Optional ResourceSource (Index and String)
351  */
352  Resource->Length +=
353  AcpiRsGetResourceSource (AmlResourceLength, Info->Value,
354  Destination, Aml, NULL);
355  break;
356 
357  case ACPI_RSC_SOURCEX:
358  /*
359  * Optional ResourceSource (Index and String). This is the more
360  * complicated case used by the Interrupt() macro
361  */
362  Target = ACPI_ADD_PTR (char, Resource,
363  Info->AmlOffset + (ItemCount * 4));
364 
365  Resource->Length +=
366  AcpiRsGetResourceSource (AmlResourceLength, (ACPI_RS_LENGTH)
367  (((ItemCount - 1) * sizeof (UINT32)) + Info->Value),
369  break;
370 
371  case ACPI_RSC_BITMASK:
372  /*
373  * 8-bit encoded bitmask (DMA macro)
374  */
376  if (ItemCount)
377  {
378  Resource->Length += (ItemCount - 1);
379  }
380 
381  Target = ACPI_ADD_PTR (char, Resource, Info->Value);
382  ACPI_SET8 (Target, ItemCount);
383  break;
384 
385  case ACPI_RSC_BITMASK16:
386  /*
387  * 16-bit encoded bitmask (IRQ macro)
388  */
389  ACPI_MOVE_16_TO_16 (&Temp16, Source);
390 
391  ItemCount = AcpiRsDecodeBitmask (Temp16, Destination);
392  if (ItemCount)
393  {
394  Resource->Length += (ItemCount - 1);
395  }
396 
397  Target = ACPI_ADD_PTR (char, Resource, Info->Value);
398  ACPI_SET8 (Target, ItemCount);
399  break;
400 
401  case ACPI_RSC_EXIT_NE:
402  /*
403  * Control - Exit conversion if not equal
404  */
405  switch (Info->ResourceOffset)
406  {
408 
409  if (AmlResourceLength != Info->Value)
410  {
411  goto Exit;
412  }
413  break;
414 
416 
417  if (ACPI_GET8 (Source) != Info->Value)
418  {
419  goto Exit;
420  }
421  break;
422 
423  default:
424 
425  ACPI_ERROR ((AE_INFO, "Invalid conversion sub-opcode"));
427  }
428  break;
429 
430  default:
431 
432  ACPI_ERROR ((AE_INFO, "Invalid conversion opcode"));
434  }
435 
436  Count--;
437  Info++;
438  }
439 
440 Exit:
441  if (!FlagsMode)
442  {
443  /* Round the resource struct length up to the next boundary (32 or 64) */
444 
445  Resource->Length = (UINT32)
447  }
449 }
450 
451 
452 /*******************************************************************************
453  *
454  * FUNCTION: AcpiRsConvertResourceToAml
455  *
456  * PARAMETERS: Resource - Pointer to the resource descriptor
457  * Aml - Where the AML descriptor is returned
458  * Info - Pointer to appropriate conversion table
459  *
460  * RETURN: Status
461  *
462  * DESCRIPTION: Convert an internal resource descriptor to the corresponding
463  * external AML resource descriptor.
464  *
465  ******************************************************************************/
466 
470  AML_RESOURCE *Aml,
472 {
473  void *Source = NULL;
474  void *Destination;
475  char *Target;
476  ACPI_RSDESC_SIZE AmlLength = 0;
477  UINT8 Count;
478  UINT16 Temp16 = 0;
479  UINT16 ItemCount = 0;
480 
481 
482  ACPI_FUNCTION_TRACE (RsConvertResourceToAml);
483 
484 
485  if (!Info)
486  {
488  }
489 
490  /*
491  * First table entry must be ACPI_RSC_INITxxx and must contain the
492  * table length (# of table entries)
493  */
495 
496  while (Count)
497  {
498  /*
499  * Source is the internal resource descriptor,
500  * destination is the external AML byte stream buffer
501  */
502  Source = ACPI_ADD_PTR (void, Resource, Info->ResourceOffset);
503  Destination = ACPI_ADD_PTR (void, Aml, Info->AmlOffset);
504 
505  switch (Info->Opcode)
506  {
507  case ACPI_RSC_INITSET:
508 
510  AmlLength = INIT_RESOURCE_LENGTH (Info);
512  INIT_RESOURCE_TYPE (Info), AmlLength, Aml);
513  break;
514 
515  case ACPI_RSC_INITGET:
516  break;
517 
518  case ACPI_RSC_FLAGINIT:
519  /*
520  * Clear the flag byte
521  */
522  ACPI_SET8 (Destination, 0);
523  break;
524 
525  case ACPI_RSC_1BITFLAG:
526  /*
527  * Mask and shift the flag bit
528  */
530  ((ACPI_GET8 (Source) & 0x01) << Info->Value));
531  break;
532 
533  case ACPI_RSC_2BITFLAG:
534  /*
535  * Mask and shift the flag bits
536  */
538  ((ACPI_GET8 (Source) & 0x03) << Info->Value));
539  break;
540 
541  case ACPI_RSC_3BITFLAG:
542  /*
543  * Mask and shift the flag bits
544  */
546  ((ACPI_GET8 (Source) & 0x07) << Info->Value));
547  break;
548 
549  case ACPI_RSC_COUNT:
550 
551  ItemCount = ACPI_GET8 (Source);
552  ACPI_SET8 (Destination, ItemCount);
553 
554  AmlLength = (UINT16)
555  (AmlLength + (Info->Value * (ItemCount - 1)));
556  break;
557 
558  case ACPI_RSC_COUNT16:
559 
560  ItemCount = ACPI_GET16 (Source);
561  AmlLength = (UINT16) (AmlLength + ItemCount);
562  AcpiRsSetResourceLength (AmlLength, Aml);
563  break;
564 
566 
567  ItemCount = ACPI_GET16 (Source);
568  ACPI_SET16 (Destination, AmlLength);
569 
570  AmlLength = (UINT16) (AmlLength + ItemCount * 2);
571  Target = ACPI_ADD_PTR (void, Aml, Info->Value);
572  ACPI_SET16 (Target, AmlLength);
573  AcpiRsSetResourceLength (AmlLength, Aml);
574  break;
575 
577 
578  ItemCount = ACPI_GET16 (Source);
579  ACPI_SET16 (Destination, ItemCount);
580 
581  AmlLength = (UINT16) (
582  AmlLength + (Info->Value * ItemCount));
583  AcpiRsSetResourceLength (AmlLength, Aml);
584  break;
585 
587 
588  /* Set resource source string length */
589 
590  ItemCount = ACPI_GET16 (Source);
591  ACPI_SET16 (Destination, AmlLength);
592 
593  /* Compute offset for the Vendor Data */
594 
595  AmlLength = (UINT16) (AmlLength + ItemCount);
596  Target = ACPI_ADD_PTR (void, Aml, Info->Value);
597 
598  /* Set vendor offset only if there is vendor data */
599 
600  ACPI_SET16 (Target, AmlLength);
601 
602  AcpiRsSetResourceLength (AmlLength, Aml);
603  break;
604 
606 
607  ItemCount = ACPI_GET16 (Source);
608  ACPI_SET16 (Destination, ItemCount + Info->Value);
609  AmlLength = (UINT16) (AmlLength + ItemCount);
610  AcpiRsSetResourceLength (AmlLength, Aml);
611  break;
612 
614 
615  ItemCount = ACPI_GET16 (Source);
616  AmlLength = (UINT16) (AmlLength + ItemCount);
617  AcpiRsSetResourceLength (AmlLength, Aml);
618  break;
619 
620  case ACPI_RSC_LENGTH:
621 
622  AcpiRsSetResourceLength (Info->Value, Aml);
623  break;
624 
625  case ACPI_RSC_MOVE8:
626  case ACPI_RSC_MOVE16:
627  case ACPI_RSC_MOVE32:
628  case ACPI_RSC_MOVE64:
629 
630  if (Info->Value)
631  {
632  ItemCount = Info->Value;
633  }
634  AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode);
635  break;
636 
638 
639  Destination = (char *) ACPI_ADD_PTR (void, Aml,
641  Source = * (UINT16 **) Source;
642  AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode);
643  break;
644 
646 
647  /* Used for both ResourceSource string and VendorData */
648 
649  Destination = (char *) ACPI_ADD_PTR (void, Aml,
651  Source = * (UINT8 **) Source;
652  AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode);
653  break;
654 
656 
657  Destination = (char *) ACPI_ADD_PTR (void, Aml,
658  (AmlLength - ItemCount));
659  Source = * (UINT8 **) Source;
660  AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode);
661  break;
662 
664 
665  Destination = (char *) ACPI_ADD_PTR (void, Aml,
666  (AmlLength - ItemCount));
667  Source = * (UINT8 **) Source;
668  AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode);
669  break;
670 
671  case ACPI_RSC_ADDRESS:
672 
673  /* Set the Resource Type, General Flags, and Type-Specific Flags */
674 
676  break;
677 
678  case ACPI_RSC_SOURCEX:
679  /*
680  * Optional ResourceSource (Index and String)
681  */
682  AmlLength = AcpiRsSetResourceSource (
683  Aml, (ACPI_RS_LENGTH) AmlLength, Source);
684  AcpiRsSetResourceLength (AmlLength, Aml);
685  break;
686 
687  case ACPI_RSC_SOURCE:
688  /*
689  * Optional ResourceSource (Index and String). This is the more
690  * complicated case used by the Interrupt() macro
691  */
692  AmlLength = AcpiRsSetResourceSource (Aml, Info->Value, Source);
693  AcpiRsSetResourceLength (AmlLength, Aml);
694  break;
695 
696  case ACPI_RSC_BITMASK:
697  /*
698  * 8-bit encoded bitmask (DMA macro)
699  */
702  *ACPI_ADD_PTR (UINT8, Resource, Info->Value)));
703  break;
704 
705  case ACPI_RSC_BITMASK16:
706  /*
707  * 16-bit encoded bitmask (IRQ macro)
708  */
709  Temp16 = AcpiRsEncodeBitmask (
710  Source, *ACPI_ADD_PTR (UINT8, Resource, Info->Value));
711  ACPI_MOVE_16_TO_16 (Destination, &Temp16);
712  break;
713 
714  case ACPI_RSC_EXIT_LE:
715  /*
716  * Control - Exit conversion if less than or equal
717  */
718  if (ItemCount <= Info->Value)
719  {
720  goto Exit;
721  }
722  break;
723 
724  case ACPI_RSC_EXIT_NE:
725  /*
726  * Control - Exit conversion if not equal
727  */
728  switch (COMPARE_OPCODE (Info))
729  {
731 
732  if (*ACPI_ADD_PTR (UINT8, Resource,
734  {
735  goto Exit;
736  }
737  break;
738 
739  default:
740 
741  ACPI_ERROR ((AE_INFO, "Invalid conversion sub-opcode"));
743  }
744  break;
745 
746  case ACPI_RSC_EXIT_EQ:
747  /*
748  * Control - Exit conversion if equal
749  */
750  if (*ACPI_ADD_PTR (UINT8, Resource,
752  {
753  goto Exit;
754  }
755  break;
756 
757  default:
758 
759  ACPI_ERROR ((AE_INFO, "Invalid conversion opcode"));
761  }
762 
763  Count--;
764  Info++;
765  }
766 
767 Exit:
769 }
770 
771 
772 #if 0
773 /* Previous resource validations */
774 
775  if (Aml->ExtAddress64.RevisionID !=
777  {
779  }
780 
781  if (Resource->Data.StartDpf.PerformanceRobustness >= 3)
782  {
784  }
785 
786  if (((Aml->Irq.Flags & 0x09) == 0x00) ||
787  ((Aml->Irq.Flags & 0x09) == 0x09))
788  {
789  /*
790  * Only [ActiveHigh, EdgeSensitive] or [ActiveLow, LevelSensitive]
791  * polarity/trigger interrupts are allowed (ACPI spec, section
792  * "IRQ Format"), so 0x00 and 0x09 are illegal.
793  */
795  "Invalid interrupt polarity/trigger in resource list, 0x%X",
796  Aml->Irq.Flags));
798  }
799 
800  Resource->Data.ExtendedIrq.InterruptCount = Temp8;
801  if (Temp8 < 1)
802  {
803  /* Must have at least one IRQ */
804 
806  }
807 
808  if (Resource->Data.Dma.Transfer == 0x03)
809  {
811  "Invalid DMA.Transfer preference (3)"));
813  }
814 #endif
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
#define ACPI_MOVE_16_TO_16(d, s)
Definition: acmacros.h:141
ACPI_RS_LENGTH AcpiRsGetResourceSource(ACPI_RS_LENGTH ResourceLength, ACPI_RS_LENGTH MinimumLength, ACPI_RESOURCE_SOURCE *ResourceSource, AML_RESOURCE *Aml, char *StringPtr)
Definition: rsutils.c:366
#define AE_AML_BAD_RESOURCE_LENGTH
Definition: acexcep.h:210
#define TRUE
Definition: types.h:120
#define INIT_RESOURCE_TYPE(i)
Definition: rsmisc.c:52
#define ACPI_GET16(ptr)
Definition: acmacros.h:58
#define AE_BAD_PARAMETER
Definition: acexcep.h:151
#define ACPI_WARNING(plist)
Definition: acoutput.h:238
#define ACPI_SET_BIT(target, bit)
Definition: actypes.h:533
UINT16 AcpiUtGetResourceLength(void *Aml)
Definition: utresrc.c:526
void AcpiRsMoveData(void *Destination, void *Source, UINT16 ItemCount, UINT8 MoveType)
Definition: rsutils.c:150
struct aml_resource_large_header AML_RESOURCE_LARGE_HEADER
ACPI_STATUS AcpiRsConvertResourceToAml(ACPI_RESOURCE *Resource, AML_RESOURCE *Aml, ACPI_RSCONVERT_INFO *Info)
Definition: rsmisc.c:468
#define COMPARE_VALUE(i)
Definition: rsmisc.c:58
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
UINT16 AcpiRsEncodeBitmask(UINT8 *List, UINT8 Count)
Definition: rsutils.c:110
#define ACPI_GET8(ptr)
Definition: acmacros.h:57
#define ACPI_RSC_COMPARE_AML_LENGTH
Definition: acresrc.h:117
void AcpiRsSetAddressCommon(AML_RESOURCE *Aml, ACPI_RESOURCE *Resource)
Definition: rsaddr.c:381
UINT32 ACPI_STATUS
Definition: actypes.h:460
struct TraceInfo Info
BOOLEAN AcpiRsGetAddressCommon(ACPI_RESOURCE *Resource, AML_RESOURCE *Aml)
Definition: rsaddr.c:322
void AcpiRsSetResourceHeader(UINT8 DescriptorType, ACPI_RSDESC_SIZE TotalLength, AML_RESOURCE *Aml)
Definition: rsutils.c:289
#define ACPI_CAST8(ptr)
Definition: acmacros.h:53
_Acquires_exclusive_lock_ Resource _Acquires_shared_lock_ Resource _Inout_ PERESOURCE Resource
Definition: cdprocs.h:848
unsigned int UINT32
ACPI_RSDESC_SIZE AcpiRsSetResourceSource(AML_RESOURCE *Aml, ACPI_RS_LENGTH MinimumLength, ACPI_RESOURCE_SOURCE *ResourceSource)
Definition: rsutils.c:457
#define ACPI_MODULE_NAME(Name)
Definition: acoutput.h:216
#define COMPARE_TARGET(i)
Definition: rsmisc.c:57
smooth NULL
Definition: ftsmooth.c:416
#define AE_INFO
Definition: acoutput.h:230
ACPI_STATUS AcpiRsConvertAmlToResource(ACPI_RESOURCE *Resource, AML_RESOURCE *Aml, ACPI_RSCONVERT_INFO *Info)
Definition: rsmisc.c:77
#define COMPARE_OPCODE(i)
Definition: rsmisc.c:56
#define ACPI_ROUND_UP_TO_NATIVE_WORD(a)
Definition: acmacros.h:254
static void Exit(void)
Definition: sock.c:1331
UINT8 AcpiRsDecodeBitmask(UINT16 Mask, UINT8 *List)
Definition: rsutils.c:68
#define AE_SUPPORT
Definition: acexcep.h:123
#define INIT_RESOURCE_LENGTH(i)
Definition: rsmisc.c:53
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2891
_Must_inspect_result_ typedef _In_ ULONG _In_ BOOLEAN Target
Definition: iotypes.h:1068
#define INIT_TABLE_LENGTH(i)
Definition: rsmisc.c:54
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ACPI_SET8(ptr, val)
Definition: acmacros.h:61
#define AML_RESOURCE_EXTENDED_ADDRESS_REVISION
Definition: amlresrc.h:347
#define AE_BAD_DATA
Definition: acexcep.h:154
#define AE_AML_BAD_RESOURCE_VALUE
Definition: acexcep.h:208
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_RSC_COMPARE_VALUE
Definition: acresrc.h:118
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
unsigned short UINT16
UINT32 ACPI_RSDESC_SIZE
Definition: acrestyp.h:52
UINT16 ACPI_RS_LENGTH
Definition: acrestyp.h:51
#define ACPI_ERROR(plist)
Definition: acoutput.h:240
void AcpiRsSetResourceLength(ACPI_RSDESC_SIZE TotalLength, AML_RESOURCE *Aml)
Definition: rsutils.c:233
#define ACPI_ADD_PTR(t, a, b)
Definition: actypes.h:546
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167
#define ACPI_SET16(ptr, val)
Definition: acmacros.h:62
#define ACPI_CAST_PTR(t, p)
Definition: actypes.h:544
unsigned char UINT8
#define memset(x, y, z)
Definition: compat.h:39
#define AE_OK
Definition: acexcep.h:97
#define AE_AML_INVALID_RESOURCE_TYPE
Definition: acexcep.h:202
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 const char BOOLEAN UINT8 * Aml
Definition: acpixf.h:1293