Subversion Repositories HelenOS

Rev

Rev 2441 | Rev 3707 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2441 Rev 3071
Line 103... Line 103...
103
            map_sdt(h);
103
            map_sdt(h);
104
            if (*((uint32_t *) &h->signature[0]) == *((uint32_t *) &signature_map[j].signature[0])) {
104
            if (*((uint32_t *) &h->signature[0]) == *((uint32_t *) &signature_map[j].signature[0])) {
105
                if (!acpi_sdt_check((uint8_t *) h))
105
                if (!acpi_sdt_check((uint8_t *) h))
106
                    goto next;
106
                    goto next;
107
                *signature_map[j].sdt_ptr = h;
107
                *signature_map[j].sdt_ptr = h;
108
                printf("%#zp: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);
108
                printf("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);
109
            }
109
            }
110
        }
110
        }
111
next:
111
next:
112
        ;
112
        ;
113
    }
113
    }
Line 124... Line 124...
124
            map_sdt(h);
124
            map_sdt(h);
125
            if (*((uint32_t *) &h->signature[0]) == *((uint32_t *) &signature_map[j].signature[0])) {
125
            if (*((uint32_t *) &h->signature[0]) == *((uint32_t *) &signature_map[j].signature[0])) {
126
                if (!acpi_sdt_check((uint8_t *) h))
126
                if (!acpi_sdt_check((uint8_t *) h))
127
                    goto next;
127
                    goto next;
128
                *signature_map[j].sdt_ptr = h;
128
                *signature_map[j].sdt_ptr = h;
129
                printf("%#zp: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);
129
                printf("%p: ACPI %s\n", *signature_map[j].sdt_ptr, signature_map[j].description);
130
            }
130
            }
131
        }
131
        }
132
next:
132
next:
133
        ;
133
        ;
134
    }
134
    }
Line 158... Line 158...
158
    }
158
    }
159
 
159
 
160
    return;
160
    return;
161
 
161
 
162
rsdp_found:
162
rsdp_found:
163
    printf("%#zp: ACPI Root System Description Pointer\n", acpi_rsdp);
163
    printf("%p: ACPI Root System Description Pointer\n", acpi_rsdp);
164
 
164
 
165
    acpi_rsdt = (struct acpi_rsdt *) (unative_t) acpi_rsdp->rsdt_address;
165
    acpi_rsdt = (struct acpi_rsdt *) (unative_t) acpi_rsdp->rsdt_address;
166
    if (acpi_rsdp->revision) acpi_xsdt = (struct acpi_xsdt *) ((uintptr_t) acpi_rsdp->xsdt_address);
166
    if (acpi_rsdp->revision) acpi_xsdt = (struct acpi_xsdt *) ((uintptr_t) acpi_rsdp->xsdt_address);
167
 
167
 
168
    if (acpi_rsdt) map_sdt((struct acpi_sdt_header *) acpi_rsdt);
168
    if (acpi_rsdt) map_sdt((struct acpi_sdt_header *) acpi_rsdt);
169
    if (acpi_xsdt) map_sdt((struct acpi_sdt_header *) acpi_xsdt);  
169
    if (acpi_xsdt) map_sdt((struct acpi_sdt_header *) acpi_xsdt);  
170
 
170
 
171
    if (acpi_rsdt && !acpi_sdt_check((uint8_t *) acpi_rsdt)) {
171
    if (acpi_rsdt && !acpi_sdt_check((uint8_t *) acpi_rsdt)) {
172
        printf("RSDT: %s\n", "bad checksum");
172
        printf("RSDT: bad checksum\n");
173
        return;
173
        return;
174
    }
174
    }
175
    if (acpi_xsdt && !acpi_sdt_check((uint8_t *) acpi_xsdt)) {
175
    if (acpi_xsdt && !acpi_sdt_check((uint8_t *) acpi_xsdt)) {
176
        printf("XSDT: %s\n", "bad checksum");
176
        printf("XSDT: bad checksum\n");
177
        return;
177
        return;
178
    }
178
    }
179
 
179
 
180
    if (acpi_xsdt) configure_via_xsdt();
180
    if (acpi_xsdt) configure_via_xsdt();
181
    else if (acpi_rsdt) configure_via_rsdt();
181
    else if (acpi_rsdt) configure_via_rsdt();