Lines Matching +full:dma +full:- +full:info
3 * Module Name: rsmisc - Miscellaneous resource descriptors
11 * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
108 * any of its subsidiaries will export/re-export any technical data, process,
130 * 3. Neither the names of the above-listed copyright holders nor the names
160 #define INIT_RESOURCE_TYPE(i) i->ResourceOffset
161 #define INIT_RESOURCE_LENGTH(i) i->AmlOffset
162 #define INIT_TABLE_LENGTH(i) i->Value
164 #define COMPARE_OPCODE(i) i->ResourceOffset
165 #define COMPARE_TARGET(i) i->AmlOffset
166 #define COMPARE_VALUE(i) i->Value
173 * PARAMETERS: Resource - Pointer to the resource descriptor
174 * Aml - Where the AML descriptor is returned
175 * Info - Pointer to appropriate conversion table
188 ACPI_RSCONVERT_INFO *Info) in AcpiRsConvertAmlToResource() argument
203 if (!Info) in AcpiRsConvertAmlToResource()
210 /* Each internal resource struct is expected to be 32-bit aligned */ in AcpiRsConvertAmlToResource()
214 Resource, Resource->Type, Resource->Length)); in AcpiRsConvertAmlToResource()
225 Count = INIT_TABLE_LENGTH (Info); in AcpiRsConvertAmlToResource()
234 Source = ACPI_ADD_PTR (void, Aml, Info->AmlOffset); in AcpiRsConvertAmlToResource()
235 Destination = ACPI_ADD_PTR (void, Resource, Info->ResourceOffset); in AcpiRsConvertAmlToResource()
237 switch (Info->Opcode) in AcpiRsConvertAmlToResource()
243 memset (Resource, 0, INIT_RESOURCE_LENGTH (Info)); in AcpiRsConvertAmlToResource()
244 Resource->Type = INIT_RESOURCE_TYPE (Info); in AcpiRsConvertAmlToResource()
245 Resource->Length = INIT_RESOURCE_LENGTH (Info); in AcpiRsConvertAmlToResource()
261 ((ACPI_GET8 (Source) >> Info->Value) & 0x01)); in AcpiRsConvertAmlToResource()
269 ((ACPI_GET8 (Source) >> Info->Value) & 0x03)); in AcpiRsConvertAmlToResource()
277 ((ACPI_GET8 (Source) >> Info->Value) & 0x07)); in AcpiRsConvertAmlToResource()
285 ((ACPI_GET8 (Source) >> Info->Value) & 0x3F)); in AcpiRsConvertAmlToResource()
293 Resource->Length = Resource->Length + in AcpiRsConvertAmlToResource()
294 (Info->Value * (ItemCount - 1)); in AcpiRsConvertAmlToResource()
302 Resource->Length = Resource->Length + in AcpiRsConvertAmlToResource()
303 (Info->Value * (ItemCount - 1)); in AcpiRsConvertAmlToResource()
308 Target = ACPI_ADD_PTR (void, Aml, Info->Value); in AcpiRsConvertAmlToResource()
309 ItemCount = ACPI_GET16 (Target) - ACPI_GET16 (Source); in AcpiRsConvertAmlToResource()
311 Resource->Length = Resource->Length + ItemCount; in AcpiRsConvertAmlToResource()
321 Resource->Length = Resource->Length + (Info->Value * ItemCount); in AcpiRsConvertAmlToResource()
329 Target = ACPI_ADD_PTR (void, Aml, (Info->Value + 2)); in AcpiRsConvertAmlToResource()
334 Target = ACPI_ADD_PTR (void, Aml, Info->Value); in AcpiRsConvertAmlToResource()
335 ItemCount = ACPI_GET16 (Target) - ACPI_GET16 (Source); in AcpiRsConvertAmlToResource()
341 ItemCount = Aml->LargeHeader.ResourceLength + in AcpiRsConvertAmlToResource()
342 sizeof (AML_RESOURCE_LARGE_HEADER) - in AcpiRsConvertAmlToResource()
346 Resource->Length = Resource->Length + ItemCount; in AcpiRsConvertAmlToResource()
353 ItemCount = Temp16 - Info->Value; in AcpiRsConvertAmlToResource()
355 Resource->Length = Resource->Length + ItemCount; in AcpiRsConvertAmlToResource()
363 sizeof (AML_RESOURCE_LARGE_HEADER)) - in AcpiRsConvertAmlToResource()
364 Temp16 - Info->Value; in AcpiRsConvertAmlToResource()
366 Resource->Length = Resource->Length + ItemCount; in AcpiRsConvertAmlToResource()
372 Resource->Length = Resource->Length + Info->Value; in AcpiRsConvertAmlToResource()
380 * Raw data move. Use the Info value field unless ItemCount has in AcpiRsConvertAmlToResource()
383 if (Info->Value) in AcpiRsConvertAmlToResource()
385 ItemCount = Info->Value; in AcpiRsConvertAmlToResource()
387 AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode); in AcpiRsConvertAmlToResource()
395 (Resource->Length - ItemCount * 2)); in AcpiRsConvertAmlToResource()
401 AcpiRsMoveData (Target, Source, ItemCount, Info->Opcode); in AcpiRsConvertAmlToResource()
409 (Resource->Length - ItemCount)); in AcpiRsConvertAmlToResource()
415 AcpiRsMoveData (Target, Source, ItemCount, Info->Opcode); in AcpiRsConvertAmlToResource()
423 (Resource->Length - ItemCount)); in AcpiRsConvertAmlToResource()
428 Source = ACPI_ADD_PTR (void, Aml, Info->Value); in AcpiRsConvertAmlToResource()
429 AcpiRsMoveData (Target, Source, ItemCount, Info->Opcode); in AcpiRsConvertAmlToResource()
437 (Resource->Length - ItemCount)); in AcpiRsConvertAmlToResource()
444 void, Aml, (Temp16 + Info->Value)); in AcpiRsConvertAmlToResource()
445 AcpiRsMoveData (Target, Source, ItemCount, Info->Opcode); in AcpiRsConvertAmlToResource()
450 memset (Destination, Info->AmlOffset, Info->Value); in AcpiRsConvertAmlToResource()
455 Target = ACPI_ADD_PTR (char, Resource, Info->Value); in AcpiRsConvertAmlToResource()
473 Resource->Length += in AcpiRsConvertAmlToResource()
474 AcpiRsGetResourceSource (AmlResourceLength, Info->Value, in AcpiRsConvertAmlToResource()
484 Info->AmlOffset + (ItemCount * 4)); in AcpiRsConvertAmlToResource()
486 Resource->Length += in AcpiRsConvertAmlToResource()
488 (((ItemCount - 1) * sizeof (UINT32)) + Info->Value), in AcpiRsConvertAmlToResource()
494 * 8-bit encoded bitmask (DMA macro) in AcpiRsConvertAmlToResource()
499 Resource->Length += (ItemCount - 1); in AcpiRsConvertAmlToResource()
502 Target = ACPI_ADD_PTR (char, Resource, Info->Value); in AcpiRsConvertAmlToResource()
508 * 16-bit encoded bitmask (IRQ macro) in AcpiRsConvertAmlToResource()
515 Resource->Length += (ItemCount - 1); in AcpiRsConvertAmlToResource()
518 Target = ACPI_ADD_PTR (char, Resource, Info->Value); in AcpiRsConvertAmlToResource()
524 * Control - Exit conversion if not equal in AcpiRsConvertAmlToResource()
526 switch (Info->ResourceOffset) in AcpiRsConvertAmlToResource()
530 if (AmlResourceLength != Info->Value) in AcpiRsConvertAmlToResource()
538 if (ACPI_GET8 (Source) != Info->Value) in AcpiRsConvertAmlToResource()
546 ACPI_ERROR ((AE_INFO, "Invalid conversion sub-opcode")); in AcpiRsConvertAmlToResource()
557 Count--; in AcpiRsConvertAmlToResource()
558 Info++; in AcpiRsConvertAmlToResource()
566 Resource->Length = (UINT32) in AcpiRsConvertAmlToResource()
567 ACPI_ROUND_UP_TO_NATIVE_WORD (Resource->Length); in AcpiRsConvertAmlToResource()
577 * PARAMETERS: Resource - Pointer to the resource descriptor
578 * Aml - Where the AML descriptor is returned
579 * Info - Pointer to appropriate conversion table
592 ACPI_RSCONVERT_INFO *Info) in AcpiRsConvertResourceToAml() argument
606 if (!Info) in AcpiRsConvertResourceToAml()
615 Count = INIT_TABLE_LENGTH (Info); in AcpiRsConvertResourceToAml()
623 Source = ACPI_ADD_PTR (void, Resource, Info->ResourceOffset); in AcpiRsConvertResourceToAml()
624 Destination = ACPI_ADD_PTR (void, Aml, Info->AmlOffset); in AcpiRsConvertResourceToAml()
626 switch (Info->Opcode) in AcpiRsConvertResourceToAml()
630 memset (Aml, 0, INIT_RESOURCE_LENGTH (Info)); in AcpiRsConvertResourceToAml()
631 AmlLength = INIT_RESOURCE_LENGTH (Info); in AcpiRsConvertResourceToAml()
633 INIT_RESOURCE_TYPE (Info), AmlLength, Aml); in AcpiRsConvertResourceToAml()
651 ((ACPI_GET8 (Source) & 0x01) << Info->Value)); in AcpiRsConvertResourceToAml()
659 ((ACPI_GET8 (Source) & 0x03) << Info->Value)); in AcpiRsConvertResourceToAml()
667 ((ACPI_GET8 (Source) & 0x07) << Info->Value)); in AcpiRsConvertResourceToAml()
675 ((ACPI_GET8 (Source) & 0x3F) << Info->Value)); in AcpiRsConvertResourceToAml()
684 (AmlLength + (Info->Value * (ItemCount - 1))); in AcpiRsConvertResourceToAml()
700 Target = ACPI_ADD_PTR (void, Aml, Info->Value); in AcpiRsConvertResourceToAml()
711 AmlLength + (Info->Value * ItemCount)); in AcpiRsConvertResourceToAml()
725 Target = ACPI_ADD_PTR (void, Aml, Info->Value); in AcpiRsConvertResourceToAml()
737 ACPI_SET16 (Destination, ItemCount + Info->Value); in AcpiRsConvertResourceToAml()
751 AcpiRsSetResourceLength (Info->Value, Aml); in AcpiRsConvertResourceToAml()
759 if (Info->Value) in AcpiRsConvertResourceToAml()
761 ItemCount = Info->Value; in AcpiRsConvertResourceToAml()
763 AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode); in AcpiRsConvertResourceToAml()
771 AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode); in AcpiRsConvertResourceToAml()
781 AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode); in AcpiRsConvertResourceToAml()
787 (AmlLength - ItemCount)); in AcpiRsConvertResourceToAml()
789 AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode); in AcpiRsConvertResourceToAml()
795 (AmlLength - ItemCount)); in AcpiRsConvertResourceToAml()
797 AcpiRsMoveData (Destination, Source, ItemCount, Info->Opcode); in AcpiRsConvertResourceToAml()
802 /* Set the Resource Type, General Flags, and Type-Specific Flags */ in AcpiRsConvertResourceToAml()
821 AmlLength = AcpiRsSetResourceSource (Aml, Info->Value, Source); in AcpiRsConvertResourceToAml()
827 * 8-bit encoded bitmask (DMA macro) in AcpiRsConvertResourceToAml()
831 *ACPI_ADD_PTR (UINT8, Resource, Info->Value))); in AcpiRsConvertResourceToAml()
836 * 16-bit encoded bitmask (IRQ macro) in AcpiRsConvertResourceToAml()
839 Source, *ACPI_ADD_PTR (UINT8, Resource, Info->Value)); in AcpiRsConvertResourceToAml()
845 * Control - Exit conversion if less than or equal in AcpiRsConvertResourceToAml()
847 if (ItemCount <= Info->Value) in AcpiRsConvertResourceToAml()
855 * Control - Exit conversion if not equal in AcpiRsConvertResourceToAml()
857 switch (COMPARE_OPCODE (Info)) in AcpiRsConvertResourceToAml()
862 COMPARE_TARGET (Info)) != COMPARE_VALUE (Info)) in AcpiRsConvertResourceToAml()
870 ACPI_ERROR ((AE_INFO, "Invalid conversion sub-opcode")); in AcpiRsConvertResourceToAml()
877 * Control - Exit conversion if equal in AcpiRsConvertResourceToAml()
880 COMPARE_TARGET (Info)) == COMPARE_VALUE (Info)) in AcpiRsConvertResourceToAml()
892 Count--; in AcpiRsConvertResourceToAml()
893 Info++; in AcpiRsConvertResourceToAml()
904 if (Aml->ExtAddress64.RevisionID !=
910 if (Resource->Data.StartDpf.PerformanceRobustness >= 3)
915 if (((Aml->Irq.Flags & 0x09) == 0x00) ||
916 ((Aml->Irq.Flags & 0x09) == 0x09))
925 Aml->Irq.Flags));
929 Resource->Data.ExtendedIrq.InterruptCount = Temp8;
937 if (Resource->Data.Dma.Transfer == 0x03)
940 "Invalid DMA.Transfer preference (3)"));