49 #define _COMPONENT ACPI_NAMESPACE
101 u8 sort_direction,
char *sort_key_name);
109 #define ACPI_SORT_ASCENDING 0
110 #define ACPI_SORT_DESCENDING 1
134 {
"_ALR", acpi_ns_repair_ALR},
135 {
"_CID", acpi_ns_repair_CID},
136 {
"_FDE", acpi_ns_repair_FDE},
137 {
"_GTM", acpi_ns_repair_FDE},
138 {
"_HID", acpi_ns_repair_HID},
139 {
"_PSS", acpi_ns_repair_PSS},
140 {
"_TSS", acpi_ns_repair_TSS},
144 #define ACPI_FDE_FIELD_COUNT 5
145 #define ACPI_FDE_BYTE_BUFFER_SIZE 5
146 #define ACPI_FDE_DWORD_BUFFER_SIZE (ACPI_FDE_FIELD_COUNT * sizeof (u32))
177 predefined = acpi_ns_match_repairable_name(node);
179 return (validate_status);
206 this_name = acpi_ns_repairable_names;
239 status = acpi_ns_check_sorted_list(data, return_object, 2, 1,
241 "AmbientIlluminance");
275 switch (return_object->
common.type) {
289 "Incorrect return buffer length %u, expected %u",
290 return_object->
buffer.length,
300 if (!buffer_object) {
306 byte_buffer = return_object->
buffer.pointer;
311 *dword_buffer = (
u32) *byte_buffer;
317 "%s Expanded Byte Buffer to expected DWord Buffer\n",
328 *return_object_ptr = buffer_object;
358 u16 original_ref_count;
364 status = acpi_ns_repair_HID(data, return_object_ptr);
376 element_ptr = return_object->
package.elements;
377 for (i = 0; i < return_object->
package.count; i++) {
378 original_element = *element_ptr;
379 original_ref_count = original_element->
common.reference_count;
381 status = acpi_ns_repair_HID(data, element_ptr);
388 if (original_element != *element_ptr) {
392 (*element_ptr)->common.reference_count =
436 if (return_object->
string.length == 0) {
438 "Invalid zero-length _HID or _CID string"));
459 source = return_object->
string.pointer;
460 if (*source ==
'*') {
462 new_string->
string.length--;
465 "%s: Removed invalid leading asterisk\n",
477 for (dest = new_string->
string.pointer; *source; dest++, source++) {
482 *return_object_ptr = new_string;
523 status = acpi_ns_check_sorted_list(data, return_object, 5, 1,
553 u32 outer_element_count;
566 status = acpi_ns_check_sorted_list(data, return_object, 6, 0,
578 outer_elements = return_object->
package.elements;
579 outer_element_count = return_object->
package.count;
581 for (i = 0; i < outer_element_count; i++) {
582 elements = (*outer_elements)->
package.elements;
583 obj_desc = elements[1];
585 if ((
u32) obj_desc->
integer.value > previous_value) {
588 "SubPackage[%u,%u] - suspicious power dissipation values",
592 previous_value = (
u32) obj_desc->
integer.value;
623 u8 sort_direction,
char *sort_key_name)
625 u32 outer_element_count;
645 outer_elements = return_object->
package.elements;
646 outer_element_count = return_object->
package.count;
647 if (!outer_element_count) {
658 for (i = 0; i < outer_element_count; i++) {
668 if ((*outer_elements)->package.count < expected_count) {
672 elements = (*outer_elements)->
package.elements;
673 obj_desc = elements[sort_index];
684 (obj_desc->
integer.value < previous_value)) ||
686 (obj_desc->
integer.value > previous_value))) {
687 acpi_ns_sort_list(return_object->
package.elements,
688 outer_element_count, sort_index,
694 "%s: Repaired unsorted list - now sorted by %s\n",
699 previous_value = (
u32) obj_desc->
integer.value;
736 for (i = 1; i <
count; i++) {
737 for (j = (count - 1); j >=
i; j--) {
747 temp_obj = elements[j - 1];
748 elements[j - 1] = elements[
j];
749 elements[
j] = temp_obj;