Changeset ed0dd65 in mainline for arch/ia32/src/acpi


Ignore:
Timestamp:
2005-04-30T16:47:17Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
30ef8ce
Parents:
10a2e22
Message:

More ACPI work.
Initial MADT table parsing.

SMP renaming and reorganization to reflect there are more ways to bring SMP up.

Location:
arch/ia32/src/acpi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/acpi/acpi.c

    r10a2e22 red0dd65  
    7979void map_sdt(struct acpi_sdt_header *sdt)
    8080{
     81        int i, cnt, length;
     82
    8183        map_page_to_frame((__address) sdt, (__address) sdt, PAGE_NOT_CACHEABLE, 0);
     84       
     85        length = sdt->length + ((__address) sdt) - ((__address) sdt)&0xfffff000;
     86        cnt = length/PAGE_SIZE + (length%PAGE_SIZE>0);
     87       
     88        for (i = 1; i < cnt; i++)
     89                map_page_to_frame(((__address) sdt) + i*PAGE_SIZE, ((__address) sdt) + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0);
    8290}
    8391
  • arch/ia32/src/acpi/madt.c

    r10a2e22 red0dd65  
    2727 */
    2828
     29#include <arch/types.h>
    2930#include <arch/acpi/acpi.h>
    3031#include <arch/acpi/madt.h>
     32#include <arch/smp/apic.h>
    3133
    3234struct acpi_madt *acpi_madt = NULL;
     35
     36#ifdef __SMP__
     37
     38char *entry[] = {
     39        "L_APIC",
     40        "IO_APIC",
     41        "INTR_SRC_OVRD",
     42        "NMI_SRC",
     43        "L_APIC_NMI",
     44        "L_APIC_ADDR_OVRD",
     45        "IO_SAPIC",
     46        "L_SAPIC",
     47        "PLATFORM_INTR_SRC"
     48};
     49
     50void acpi_madt_parse(void)
     51{
     52        struct madt_apic_header *end = (struct madt_apic_header *) (((__u8 *) acpi_madt) + acpi_madt->header.length);
     53        struct madt_apic_header *h = &acpi_madt->apic_header[0];
     54
     55        l_apic = (__u32 *) acpi_madt->l_apic_address;
     56
     57        while (h < end) {
     58                switch (h->type) {
     59                        case MADT_L_APIC:
     60                        case MADT_IO_APIC:
     61                        case MADT_INTR_SRC_OVRD:
     62                        case MADT_NMI_SRC:
     63                        case MADT_L_APIC_NMI:
     64                        case MADT_L_APIC_ADDR_OVRD:
     65                        case MADT_IO_SAPIC:
     66                        case MADT_L_SAPIC:
     67                        case MADT_PLATFORM_INTR_SRC:
     68                                printf("MADT: skipping %s entry (type=%d)\n", entry[h->type], h->type);
     69                                break;
     70
     71                        default:
     72                                if (h->type >= MADT_RESERVED_SKIP_BEGIN && h->type <= MADT_RESERVED_SKIP_END) {
     73                                        printf("MADT: skipping reserved entry (type=%d)\n", h->type);
     74                                }
     75                                if (h->type >= MADT_RESERVED_OEM_BEGIN) {
     76                                        printf("MADT: skipping OEM entry (type=%d)\n", h->type);
     77                                }
     78                                break;
     79                }
     80                h = (struct madt_apic_header *) (((__u8 *) h) + h->length);
     81        }
     82
     83}
     84
     85#endif /* __SMP__ */
Note: See TracChangeset for help on using the changeset viewer.