Subversion Repositories HelenOS-historic

Rev

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

Rev 331 Rev 334
Line 129... Line 129...
129
 
129
 
130
    /* calculate madt entries */
130
    /* calculate madt entries */
131
    for (h = &acpi_madt->apic_header[0]; h < end; h = (struct madt_apic_header *) (((__u8 *) h) + h->length)) {
131
    for (h = &acpi_madt->apic_header[0]; h < end; h = (struct madt_apic_header *) (((__u8 *) h) + h->length)) {
132
        madt_entries_index_cnt++;
132
        madt_entries_index_cnt++;
133
    }
133
    }
134
    printf("MADT: Found %d entries\n", madt_entries_index_cnt);
-
 
135
 
134
 
136
    /* create madt apic entries index array */
135
    /* create madt apic entries index array */
137
    madt_entries_index = (struct madt_apic_header * *) malloc(madt_entries_index_cnt * sizeof(struct madt_apic_header * *));
136
    madt_entries_index = (struct madt_apic_header * *) malloc(madt_entries_index_cnt * sizeof(struct madt_apic_header * *));
138
 
137
 
139
    __u32 index = 0;
138
    __u32 index = 0;
140
 
139
 
141
    for (h = &acpi_madt->apic_header[0]; h < end; h = (struct madt_apic_header *) (((__u8 *) h) + h->length)) {
140
    for (h = &acpi_madt->apic_header[0]; h < end; h = (struct madt_apic_header *) (((__u8 *) h) + h->length)) {
142
        madt_entries_index[index++] = h;
141
        madt_entries_index[index++] = h;
143
    }
142
    }
144
 
143
 
145
 
-
 
146
    /* Quicksort MADT index structure */
144
    /* Quicksort MADT index structure */
147
    qsort(madt_entries_index, madt_entries_index_cnt, sizeof(__address), &madt_cmp);
145
    qsort(madt_entries_index, madt_entries_index_cnt, sizeof(__address), &madt_cmp);
148
 
146
 
149
    /* Parse MADT entries */   
147
    /* Parse MADT entries */   
150
    for (index = 0; index < madt_entries_index_cnt - 1; index++) {
148
    for (index = 0; index < madt_entries_index_cnt - 1; index++) {