ReactOS 0.4.15-dev-7918-g2a2556c
rsutils.c
Go to the documentation of this file.
1/*******************************************************************************
2 *
3 * Module Name: rsutils - Utilities for the resource manager
4 *
5 ******************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2022, 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 MERCHANTABILITY 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 "acnamesp.h"
47#include "acresrc.h"
48
49
50#define _COMPONENT ACPI_RESOURCES
51 ACPI_MODULE_NAME ("rsutils")
52
53
54/*******************************************************************************
55 *
56 * FUNCTION: AcpiRsDecodeBitmask
57 *
58 * PARAMETERS: Mask - Bitmask to decode
59 * List - Where the converted list is returned
60 *
61 * RETURN: Count of bits set (length of list)
62 *
63 * DESCRIPTION: Convert a bit mask into a list of values
64 *
65 ******************************************************************************/
66
70 UINT8 *List)
71{
72 UINT8 i;
73 UINT8 BitCount;
74
75
77
78
79 /* Decode the mask bits */
80
81 for (i = 0, BitCount = 0; Mask; i++)
82 {
83 if (Mask & 0x0001)
84 {
85 List[BitCount] = i;
86 BitCount++;
87 }
88
89 Mask >>= 1;
90 }
91
92 return (BitCount);
93}
94
95
96/*******************************************************************************
97 *
98 * FUNCTION: AcpiRsEncodeBitmask
99 *
100 * PARAMETERS: List - List of values to encode
101 * Count - Length of list
102 *
103 * RETURN: Encoded bitmask
104 *
105 * DESCRIPTION: Convert a list of values to an encoded bitmask
106 *
107 ******************************************************************************/
108
109UINT16
111 UINT8 *List,
112 UINT8 Count)
113{
114 UINT32 i;
115 UINT16 Mask;
116
117
119
120
121 /* Encode the list into a single bitmask */
122
123 for (i = 0, Mask = 0; i < Count; i++)
124 {
125 Mask |= (0x1 << List[i]);
126 }
127
128 return (Mask);
129}
130
131
132/*******************************************************************************
133 *
134 * FUNCTION: AcpiRsMoveData
135 *
136 * PARAMETERS: Destination - Pointer to the destination descriptor
137 * Source - Pointer to the source descriptor
138 * ItemCount - How many items to move
139 * MoveType - Byte width
140 *
141 * RETURN: None
142 *
143 * DESCRIPTION: Move multiple data items from one descriptor to another. Handles
144 * alignment issues and endian issues if necessary, as configured
145 * via the ACPI_MOVE_* macros. (This is why a memcpy is not used)
146 *
147 ******************************************************************************/
148
149void
151 void *Destination,
152 void *Source,
153 UINT16 ItemCount,
154 UINT8 MoveType)
155{
156 UINT32 i;
157
158
160
161
162 /* One move per item */
163
164 for (i = 0; i < ItemCount; i++)
165 {
166 switch (MoveType)
167 {
168 /*
169 * For the 8-bit case, we can perform the move all at once
170 * since there are no alignment or endian issues
171 */
172 case ACPI_RSC_MOVE8:
176
177 memcpy (Destination, Source, ItemCount);
178 return;
179
180 /*
181 * 16-, 32-, and 64-bit cases must use the move macros that perform
182 * endian conversion and/or accommodate hardware that cannot perform
183 * misaligned memory transfers
184 */
185 case ACPI_RSC_MOVE16:
187
191 break;
192
193 case ACPI_RSC_MOVE32:
194
198 break;
199
200 case ACPI_RSC_MOVE64:
201
205 break;
206
207 default:
208
209 return;
210 }
211 }
212}
213
214
215/*******************************************************************************
216 *
217 * FUNCTION: AcpiRsSetResourceLength
218 *
219 * PARAMETERS: TotalLength - Length of the AML descriptor, including
220 * the header and length fields.
221 * Aml - Pointer to the raw AML descriptor
222 *
223 * RETURN: None
224 *
225 * DESCRIPTION: Set the ResourceLength field of an AML
226 * resource descriptor, both Large and Small descriptors are
227 * supported automatically. Note: Descriptor Type field must
228 * be valid.
229 *
230 ******************************************************************************/
231
232void
236{
237 ACPI_RS_LENGTH ResourceLength;
238
239
241
242
243 /* Length is the total descriptor length minus the header length */
244
245 ResourceLength = (ACPI_RS_LENGTH)
247
248 /* Length is stored differently for large and small descriptors */
249
250 if (Aml->SmallHeader.DescriptorType & ACPI_RESOURCE_NAME_LARGE)
251 {
252 /* Large descriptor -- bytes 1-2 contain the 16-bit length */
253
255 &Aml->LargeHeader.ResourceLength, &ResourceLength);
256 }
257 else
258 {
259 /*
260 * Small descriptor -- bits 2:0 of byte 0 contain the length
261 * Clear any existing length, preserving descriptor type bits
262 */
263 Aml->SmallHeader.DescriptorType = (UINT8)
264 ((Aml->SmallHeader.DescriptorType &
266 | ResourceLength);
267 }
268}
269
270
271/*******************************************************************************
272 *
273 * FUNCTION: AcpiRsSetResourceHeader
274 *
275 * PARAMETERS: DescriptorType - Byte to be inserted as the type
276 * TotalLength - Length of the AML descriptor, including
277 * the header and length fields.
278 * Aml - Pointer to the raw AML descriptor
279 *
280 * RETURN: None
281 *
282 * DESCRIPTION: Set the DescriptorType and ResourceLength fields of an AML
283 * resource descriptor, both Large and Small descriptors are
284 * supported automatically
285 *
286 ******************************************************************************/
287
288void
293{
295
296
297 /* Set the Resource Type */
298
299 Aml->SmallHeader.DescriptorType = DescriptorType;
300
301 /* Set the Resource Length */
302
304}
305
306
307/*******************************************************************************
308 *
309 * FUNCTION: AcpiRsStrcpy
310 *
311 * PARAMETERS: Destination - Pointer to the destination string
312 * Source - Pointer to the source string
313 *
314 * RETURN: String length, including NULL terminator
315 *
316 * DESCRIPTION: Local string copy that returns the string length, saving a
317 * strcpy followed by a strlen.
318 *
319 ******************************************************************************/
320
321static UINT16
323 char *Destination,
324 char *Source)
325{
326 UINT16 i;
327
328
330
331
332 for (i = 0; Source[i]; i++)
333 {
334 Destination[i] = Source[i];
335 }
336
337 Destination[i] = 0;
338
339 /* Return string length including the NULL terminator */
340
341 return ((UINT16) (i + 1));
342}
343
344
345/*******************************************************************************
346 *
347 * FUNCTION: AcpiRsGetResourceSource
348 *
349 * PARAMETERS: ResourceLength - Length field of the descriptor
350 * MinimumLength - Minimum length of the descriptor (minus
351 * any optional fields)
352 * ResourceSource - Where the ResourceSource is returned
353 * Aml - Pointer to the raw AML descriptor
354 * StringPtr - (optional) where to store the actual
355 * ResourceSource string
356 *
357 * RETURN: Length of the string plus NULL terminator, rounded up to native
358 * word boundary
359 *
360 * DESCRIPTION: Copy the optional ResourceSource data from a raw AML descriptor
361 * to an internal resource descriptor
362 *
363 ******************************************************************************/
364
367 ACPI_RS_LENGTH ResourceLength,
368 ACPI_RS_LENGTH MinimumLength,
369 ACPI_RESOURCE_SOURCE *ResourceSource,
371 char *StringPtr)
372{
374 UINT8 *AmlResourceSource;
375
376
378
379
380 TotalLength = ResourceLength + sizeof (AML_RESOURCE_LARGE_HEADER);
381 AmlResourceSource = ACPI_ADD_PTR (UINT8, Aml, MinimumLength);
382
383 /*
384 * ResourceSource is present if the length of the descriptor is longer
385 * than the minimum length.
386 *
387 * Note: Some resource descriptors will have an additional null, so
388 * we add 1 to the minimum length.
389 */
390 if (TotalLength > (ACPI_RSDESC_SIZE) (MinimumLength + 1))
391 {
392 /* Get the ResourceSourceIndex */
393
394 ResourceSource->Index = AmlResourceSource[0];
395
396 ResourceSource->StringPtr = StringPtr;
397 if (!StringPtr)
398 {
399 /*
400 * String destination pointer is not specified; Set the String
401 * pointer to the end of the current ResourceSource structure.
402 */
403 ResourceSource->StringPtr = ACPI_ADD_PTR (
404 char, ResourceSource, sizeof (ACPI_RESOURCE_SOURCE));
405 }
406
407 /*
408 * In order for the Resource length to be a multiple of the native
409 * word, calculate the length of the string (+1 for NULL terminator)
410 * and expand to the next word multiple.
411 *
412 * Zero the entire area of the buffer.
413 */
415 ACPI_CAST_PTR (char, &AmlResourceSource[1])) + 1;
416
418
419 memset (ResourceSource->StringPtr, 0, TotalLength);
420
421 /* Copy the ResourceSource string to the destination */
422
423 ResourceSource->StringLength = AcpiRsStrcpy (
424 ResourceSource->StringPtr,
425 ACPI_CAST_PTR (char, &AmlResourceSource[1]));
426
427 return ((ACPI_RS_LENGTH) TotalLength);
428 }
429
430 /* ResourceSource is not present */
431
432 ResourceSource->Index = 0;
433 ResourceSource->StringLength = 0;
434 ResourceSource->StringPtr = NULL;
435 return (0);
436}
437
438
439/*******************************************************************************
440 *
441 * FUNCTION: AcpiRsSetResourceSource
442 *
443 * PARAMETERS: Aml - Pointer to the raw AML descriptor
444 * MinimumLength - Minimum length of the descriptor (minus
445 * any optional fields)
446 * ResourceSource - Internal ResourceSource
447
448 *
449 * RETURN: Total length of the AML descriptor
450 *
451 * DESCRIPTION: Convert an optional ResourceSource from internal format to a
452 * raw AML resource descriptor
453 *
454 ******************************************************************************/
455
459 ACPI_RS_LENGTH MinimumLength,
460 ACPI_RESOURCE_SOURCE *ResourceSource)
461{
462 UINT8 *AmlResourceSource;
463 ACPI_RSDESC_SIZE DescriptorLength;
464
465
467
468
469 DescriptorLength = MinimumLength;
470
471 /* Non-zero string length indicates presence of a ResourceSource */
472
473 if (ResourceSource->StringLength)
474 {
475 /* Point to the end of the AML descriptor */
476
477 AmlResourceSource = ACPI_ADD_PTR (UINT8, Aml, MinimumLength);
478
479 /* Copy the ResourceSourceIndex */
480
481 AmlResourceSource[0] = (UINT8) ResourceSource->Index;
482
483 /* Copy the ResourceSource string */
484
485 strcpy (ACPI_CAST_PTR (char, &AmlResourceSource[1]),
486 ResourceSource->StringPtr);
487
488 /*
489 * Add the length of the string (+ 1 for null terminator) to the
490 * final descriptor length
491 */
492 DescriptorLength += ((ACPI_RSDESC_SIZE)
493 ResourceSource->StringLength + 1);
494 }
495
496 /* Return the new total length of the AML descriptor */
497
498 return (DescriptorLength);
499}
500
501
502/*******************************************************************************
503 *
504 * FUNCTION: AcpiRsGetPrtMethodData
505 *
506 * PARAMETERS: Node - Device node
507 * RetBuffer - Pointer to a buffer structure for the
508 * results
509 *
510 * RETURN: Status
511 *
512 * DESCRIPTION: This function is called to get the _PRT value of an object
513 * contained in an object specified by the handle passed in
514 *
515 * If the function fails an appropriate status will be returned
516 * and the contents of the callers buffer is undefined.
517 *
518 ******************************************************************************/
519
523 ACPI_BUFFER *RetBuffer)
524{
525 ACPI_OPERAND_OBJECT *ObjDesc;
527
528
529 ACPI_FUNCTION_TRACE (RsGetPrtMethodData);
530
531
532 /* Parameters guaranteed valid by caller */
533
534 /* Execute the method, no parameters */
535
538 if (ACPI_FAILURE (Status))
539 {
541 }
542
543 /*
544 * Create a resource linked list from the byte stream buffer that comes
545 * back from the _CRS method execution.
546 */
547 Status = AcpiRsCreatePciRoutingTable (ObjDesc, RetBuffer);
548
549 /* On exit, we must delete the object returned by EvaluateObject */
550
551 AcpiUtRemoveReference (ObjDesc);
553}
554
555
556/*******************************************************************************
557 *
558 * FUNCTION: AcpiRsGetCrsMethodData
559 *
560 * PARAMETERS: Node - Device node
561 * RetBuffer - Pointer to a buffer structure for the
562 * results
563 *
564 * RETURN: Status
565 *
566 * DESCRIPTION: This function is called to get the _CRS value of an object
567 * contained in an object specified by the handle passed in
568 *
569 * If the function fails an appropriate status will be returned
570 * and the contents of the callers buffer is undefined.
571 *
572 ******************************************************************************/
573
577 ACPI_BUFFER *RetBuffer)
578{
579 ACPI_OPERAND_OBJECT *ObjDesc;
581
582
583 ACPI_FUNCTION_TRACE (RsGetCrsMethodData);
584
585
586 /* Parameters guaranteed valid by caller */
587
588 /* Execute the method, no parameters */
589
592 if (ACPI_FAILURE (Status))
593 {
595 }
596
597 /*
598 * Make the call to create a resource linked list from the
599 * byte stream buffer that comes back from the _CRS method
600 * execution.
601 */
602 Status = AcpiRsCreateResourceList (ObjDesc, RetBuffer);
603
604 /* On exit, we must delete the object returned by evaluateObject */
605
606 AcpiUtRemoveReference (ObjDesc);
608}
609
610
611/*******************************************************************************
612 *
613 * FUNCTION: AcpiRsGetPrsMethodData
614 *
615 * PARAMETERS: Node - Device node
616 * RetBuffer - Pointer to a buffer structure for the
617 * results
618 *
619 * RETURN: Status
620 *
621 * DESCRIPTION: This function is called to get the _PRS value of an object
622 * contained in an object specified by the handle passed in
623 *
624 * If the function fails an appropriate status will be returned
625 * and the contents of the callers buffer is undefined.
626 *
627 ******************************************************************************/
628
632 ACPI_BUFFER *RetBuffer)
633{
634 ACPI_OPERAND_OBJECT *ObjDesc;
636
637
638 ACPI_FUNCTION_TRACE (RsGetPrsMethodData);
639
640
641 /* Parameters guaranteed valid by caller */
642
643 /* Execute the method, no parameters */
644
647 if (ACPI_FAILURE (Status))
648 {
650 }
651
652 /*
653 * Make the call to create a resource linked list from the
654 * byte stream buffer that comes back from the _CRS method
655 * execution.
656 */
657 Status = AcpiRsCreateResourceList (ObjDesc, RetBuffer);
658
659 /* On exit, we must delete the object returned by evaluateObject */
660
661 AcpiUtRemoveReference (ObjDesc);
663}
664
665
666/*******************************************************************************
667 *
668 * FUNCTION: AcpiRsGetAeiMethodData
669 *
670 * PARAMETERS: Node - Device node
671 * RetBuffer - Pointer to a buffer structure for the
672 * results
673 *
674 * RETURN: Status
675 *
676 * DESCRIPTION: This function is called to get the _AEI value of an object
677 * contained in an object specified by the handle passed in
678 *
679 * If the function fails an appropriate status will be returned
680 * and the contents of the callers buffer is undefined.
681 *
682 ******************************************************************************/
683
687 ACPI_BUFFER *RetBuffer)
688{
689 ACPI_OPERAND_OBJECT *ObjDesc;
691
692
693 ACPI_FUNCTION_TRACE (RsGetAeiMethodData);
694
695
696 /* Parameters guaranteed valid by caller */
697
698 /* Execute the method, no parameters */
699
702 if (ACPI_FAILURE (Status))
703 {
705 }
706
707 /*
708 * Make the call to create a resource linked list from the
709 * byte stream buffer that comes back from the _CRS method
710 * execution.
711 */
712 Status = AcpiRsCreateResourceList (ObjDesc, RetBuffer);
713
714 /* On exit, we must delete the object returned by evaluateObject */
715
716 AcpiUtRemoveReference (ObjDesc);
718}
719
720
721/*******************************************************************************
722 *
723 * FUNCTION: AcpiRsGetMethodData
724 *
725 * PARAMETERS: Handle - Handle to the containing object
726 * Path - Path to method, relative to Handle
727 * RetBuffer - Pointer to a buffer structure for the
728 * results
729 *
730 * RETURN: Status
731 *
732 * DESCRIPTION: This function is called to get the _CRS or _PRS value of an
733 * object contained in an object specified by the handle passed in
734 *
735 * If the function fails an appropriate status will be returned
736 * and the contents of the callers buffer is undefined.
737 *
738 ******************************************************************************/
739
743 const char *Path,
744 ACPI_BUFFER *RetBuffer)
745{
746 ACPI_OPERAND_OBJECT *ObjDesc;
748
749
750 ACPI_FUNCTION_TRACE (RsGetMethodData);
751
752
753 /* Parameters guaranteed valid by caller */
754
755 /* Execute the method, no parameters */
756
759 Path, ACPI_BTYPE_BUFFER, &ObjDesc);
760 if (ACPI_FAILURE (Status))
761 {
763 }
764
765 /*
766 * Make the call to create a resource linked list from the
767 * byte stream buffer that comes back from the method
768 * execution.
769 */
770 Status = AcpiRsCreateResourceList (ObjDesc, RetBuffer);
771
772 /* On exit, we must delete the object returned by EvaluateObject */
773
774 AcpiUtRemoveReference (ObjDesc);
776}
777
778
779/*******************************************************************************
780 *
781 * FUNCTION: AcpiRsSetSrsMethodData
782 *
783 * PARAMETERS: Node - Device node
784 * InBuffer - Pointer to a buffer structure of the
785 * parameter
786 *
787 * RETURN: Status
788 *
789 * DESCRIPTION: This function is called to set the _SRS of an object contained
790 * in an object specified by the handle passed in
791 *
792 * If the function fails an appropriate status will be returned
793 * and the contents of the callers buffer is undefined.
794 *
795 * Note: Parameters guaranteed valid by caller
796 *
797 ******************************************************************************/
798
802 ACPI_BUFFER *InBuffer)
803{
808
809
810 ACPI_FUNCTION_TRACE (RsSetSrsMethodData);
811
812
813 /* Allocate and initialize the evaluation information block */
814
816 if (!Info)
817 {
819 }
820
821 Info->PrefixNode = Node;
822 Info->RelativePathname = METHOD_NAME__SRS;
823 Info->Parameters = Args;
825
826 /*
827 * The InBuffer parameter will point to a linked list of
828 * resource parameters. It needs to be formatted into a
829 * byte stream to be sent in as an input parameter to _SRS
830 *
831 * Convert the linked list into a byte stream
832 */
835 if (ACPI_FAILURE (Status))
836 {
837 goto Cleanup;
838 }
839
840 /* Create and initialize the method parameter object */
841
843 if (!Args[0])
844 {
845 /*
846 * Must free the buffer allocated above (otherwise it is freed
847 * later)
848 */
849 ACPI_FREE (Buffer.Pointer);
851 goto Cleanup;
852 }
853
854 Args[0]->Buffer.Length = (UINT32) Buffer.Length;
855 Args[0]->Buffer.Pointer = Buffer.Pointer;
856 Args[0]->Common.Flags = AOPOBJ_DATA_VALID;
857 Args[1] = NULL;
858
859 /* Execute the method, no return value is expected */
860
862
863 /* Clean up and return the status from AcpiNsEvaluate */
864
866
867Cleanup:
868 ACPI_FREE (Info);
870}
unsigned short UINT16
unsigned long long UINT64
unsigned char UINT8
unsigned int UINT32
PRTL_UNICODE_STRING_BUFFER Path
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
char ** Args
Definition: acdebug.h:353
#define ACPI_FAILURE(a)
Definition: acexcep.h:95
#define AE_NO_MEMORY
Definition: acexcep.h:112
#define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK
Definition: aclocal.h:1304
#define ACPI_BTYPE_PACKAGE
Definition: aclocal.h:335
#define ACPI_BTYPE_BUFFER
Definition: aclocal.h:334
#define ACPI_RESOURCE_NAME_LARGE
Definition: aclocal.h:1300
#define ACPI_MOVE_16_TO_16(d, s)
Definition: acmacros.h:141
#define ACPI_MOVE_64_TO_64(d, s)
Definition: acmacros.h:155
#define ACPI_ROUND_UP_TO_NATIVE_WORD(a)
Definition: acmacros.h:254
#define ACPI_MOVE_32_TO_32(d, s)
Definition: acmacros.h:148
#define METHOD_NAME__SRS
Definition: acnames.h:73
#define METHOD_NAME__AEI
Definition: acnames.h:50
#define METHOD_NAME__CRS
Definition: acnames.h:55
#define METHOD_NAME__PRS
Definition: acnames.h:63
#define METHOD_NAME__PRT
Definition: acnames.h:64
ACPI_STATUS AcpiNsEvaluate(ACPI_EVALUATE_INFO *Info)
Definition: nseval.c:82
#define AOPOBJ_DATA_VALID
Definition: acobject.h:96
#define ACPI_MODULE_NAME(Name)
Definition: acoutput.h:216
#define ACPI_FUNCTION_ENTRY()
Definition: acoutput.h:484
#define return_ACPI_STATUS(s)
Definition: acoutput.h:496
#define ACPI_FUNCTION_TRACE(a)
Definition: acoutput.h:480
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:1302
@ ACPI_RSC_MOVE64
Definition: acresrc.h:109
@ ACPI_RSC_MOVE_SERIAL_VEN
Definition: acresrc.h:105
@ ACPI_RSC_MOVE_GPIO_RES
Definition: acresrc.h:103
@ ACPI_RSC_MOVE8
Definition: acresrc.h:106
@ ACPI_RSC_MOVE16
Definition: acresrc.h:107
@ ACPI_RSC_MOVE32
Definition: acresrc.h:108
@ ACPI_RSC_MOVE_SERIAL_RES
Definition: acresrc.h:104
@ ACPI_RSC_MOVE_GPIO_PIN
Definition: acresrc.h:102
ACPI_STATUS AcpiRsCreateResourceList(ACPI_OPERAND_OBJECT *AmlBuffer, ACPI_BUFFER *OutputBuffer)
Definition: rscreate.c:151
ACPI_STATUS AcpiRsCreatePciRoutingTable(ACPI_OPERAND_OBJECT *PackageObject, ACPI_BUFFER *OutputBuffer)
Definition: rscreate.c:234
ACPI_STATUS AcpiRsCreateAmlResources(ACPI_BUFFER *ResourceList, ACPI_BUFFER *OutputBuffer)
Definition: rscreate.c:462
UINT32 ACPI_RSDESC_SIZE
Definition: acrestyp.h:52
UINT16 ACPI_RS_LENGTH
Definition: acrestyp.h:51
#define ACPI_IGNORE_RETURN_VALUE
Definition: acstruct.h:231
#define ACPI_TYPE_BUFFER
Definition: actypes.h:690
#define ACPI_FREE(a)
Definition: actypes.h:386
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_ADD_PTR(t, a, b)
Definition: actypes.h:546
#define ACPI_CAST_PTR(t, p)
Definition: actypes.h:544
#define ACPI_ALLOCATE_LOCAL_BUFFER
Definition: actypes.h:1047
#define ACPI_ALLOCATE_ZEROED(a)
Definition: actypes.h:385
#define AcpiUtCreateInternalObject(t)
Definition: acutils.h:681
ACPI_STATUS AcpiUtEvaluateObject(ACPI_NAMESPACE_NODE *PrefixNode, const char *Path, UINT32 ExpectedReturnBtypes, ACPI_OPERAND_OBJECT **ReturnDesc)
Definition: uteval.c:73
void AcpiUtRemoveReference(ACPI_OPERAND_OBJECT *Object)
Definition: utdelete.c:790
UINT8 AcpiUtGetResourceHeaderLength(void *Aml)
Definition: utresrc.c:572
struct aml_resource_large_header AML_RESOURCE_LARGE_HEADER
Definition: bufpool.h:45
#define NULL
Definition: types.h:112
union node Node
Definition: types.h:1255
static const WCHAR Cleanup[]
Definition: register.c:80
unsigned int Mask
Definition: fpcontrol.c:82
ULONG Handle
Definition: gdb_input.c:15
Status
Definition: gdiplustypes.h:25
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3004
int Count
Definition: noreturn.cpp:7
ACPI_STATUS AcpiRsGetPrtMethodData(ACPI_NAMESPACE_NODE *Node, ACPI_BUFFER *RetBuffer)
Definition: rsutils.c:521
void AcpiRsSetResourceLength(ACPI_RSDESC_SIZE TotalLength, AML_RESOURCE *Aml)
Definition: rsutils.c:233
ACPI_STATUS AcpiRsGetAeiMethodData(ACPI_NAMESPACE_NODE *Node, ACPI_BUFFER *RetBuffer)
Definition: rsutils.c:685
static UINT16 AcpiRsStrcpy(char *Destination, char *Source)
Definition: rsutils.c:322
ACPI_STATUS AcpiRsGetPrsMethodData(ACPI_NAMESPACE_NODE *Node, ACPI_BUFFER *RetBuffer)
Definition: rsutils.c:630
UINT8 AcpiRsDecodeBitmask(UINT16 Mask, UINT8 *List)
Definition: rsutils.c:68
ACPI_STATUS AcpiRsSetSrsMethodData(ACPI_NAMESPACE_NODE *Node, ACPI_BUFFER *InBuffer)
Definition: rsutils.c:800
ACPI_RSDESC_SIZE AcpiRsSetResourceSource(AML_RESOURCE *Aml, ACPI_RS_LENGTH MinimumLength, ACPI_RESOURCE_SOURCE *ResourceSource)
Definition: rsutils.c:457
void AcpiRsSetResourceHeader(UINT8 DescriptorType, ACPI_RSDESC_SIZE TotalLength, AML_RESOURCE *Aml)
Definition: rsutils.c:289
UINT16 AcpiRsEncodeBitmask(UINT8 *List, UINT8 Count)
Definition: rsutils.c:110
ACPI_STATUS AcpiRsGetMethodData(ACPI_HANDLE Handle, const char *Path, ACPI_BUFFER *RetBuffer)
Definition: rsutils.c:741
ACPI_STATUS AcpiRsGetCrsMethodData(ACPI_NAMESPACE_NODE *Node, ACPI_BUFFER *RetBuffer)
Definition: rsutils.c:575
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
void AcpiRsMoveData(void *Destination, void *Source, UINT16 ItemCount, UINT8 MoveType)
Definition: rsutils.c:150
#define memset(x, y, z)
Definition: compat.h:39
Definition: dlist.c:348
_In_ ULONG TotalLength
Definition: usbdlib.h:158
_In_ ULONG _In_ PVOID _In_ LONG DescriptorType
Definition: usbdlib.h:160
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550