Subversion Repositories HelenOS-historic

Rev

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

Rev 206 Rev 268
Line 93... Line 93...
93
     * Find Root System Description Pointer
93
     * Find Root System Description Pointer
94
     * 1. search first 1K of EBDA
94
     * 1. search first 1K of EBDA
95
     * 2. search 128K starting at 0xe0000
95
     * 2. search 128K starting at 0xe0000
96
     */
96
     */
97
 
97
 
98
    addr[0] = (__u8 *) ebda;
98
    addr[0] = (__u8 *) PA2KA(ebda);
99
    for (i = (ebda ? 0 : 1); i < 2; i++) {
99
    for (i = (ebda ? 0 : 1); i < 2; i++) {
100
        for (j = 0; j < length[i]; j += 16) {
100
        for (j = 0; j < length[i]; j += 16) {
101
            if (*((__u64 *) &addr[i][j]) == *sig && rsdp_check(&addr[i][j])) {
101
            if (*((__u64 *) &addr[i][j]) == *sig && rsdp_check(&addr[i][j])) {
102
                acpi_rsdp = (struct acpi_rsdp *) &addr[i][j];
102
                acpi_rsdp = (struct acpi_rsdp *) &addr[i][j];
103
                goto rsdp_found;
103
                goto rsdp_found;
Line 108... Line 108...
108
    return;
108
    return;
109
 
109
 
110
rsdp_found:
110
rsdp_found:
111
    printf("%L: ACPI Root System Description Pointer\n", acpi_rsdp);
111
    printf("%L: ACPI Root System Description Pointer\n", acpi_rsdp);
112
 
112
 
113
    acpi_rsdt = (struct acpi_rsdt *) acpi_rsdp->rsdt_address;
113
    acpi_rsdt = (struct acpi_rsdt *) (__native) acpi_rsdp->rsdt_address;
114
    if (acpi_rsdp->revision) acpi_xsdt = (struct acpi_xsdt *) ((__address) acpi_rsdp->xsdt_address);
114
    if (acpi_rsdp->revision) acpi_xsdt = (struct acpi_xsdt *) ((__address) acpi_rsdp->xsdt_address);
115
 
115
 
116
    if (acpi_rsdt) map_sdt((struct acpi_sdt_header *) acpi_rsdt);
116
    if (acpi_rsdt) map_sdt((struct acpi_sdt_header *) acpi_rsdt);
117
    if (acpi_xsdt) map_sdt((struct acpi_sdt_header *) acpi_xsdt);  
117
    if (acpi_xsdt) map_sdt((struct acpi_sdt_header *) acpi_xsdt);  
118
 
118
 
Line 134... Line 134...
134
{
134
{
135
    int i, j, cnt = (acpi_rsdt->header.length - sizeof(struct acpi_sdt_header))/sizeof(__u32);
135
    int i, j, cnt = (acpi_rsdt->header.length - sizeof(struct acpi_sdt_header))/sizeof(__u32);
136
   
136
   
137
    for (i=0; i<cnt; i++) {
137
    for (i=0; i<cnt; i++) {
138
        for (j=0; j<sizeof(signature_map)/sizeof(struct acpi_signature_map); j++) {
138
        for (j=0; j<sizeof(signature_map)/sizeof(struct acpi_signature_map); j++) {
139
            struct acpi_sdt_header *h = (struct acpi_sdt_header *) acpi_rsdt->entry[i];
139
            struct acpi_sdt_header *h = (struct acpi_sdt_header *) (__native) acpi_rsdt->entry[i];
140
       
140
       
141
            map_sdt(h);
141
            map_sdt(h);
142
            if (*((__u32 *) &h->signature[0])==*((__u32 *) &signature_map[j].signature[0])) {
142
            if (*((__u32 *) &h->signature[0])==*((__u32 *) &signature_map[j].signature[0])) {
143
                if (!acpi_sdt_check((__u8 *) h))
143
                if (!acpi_sdt_check((__u8 *) h))
144
                    goto next;
144
                    goto next;