aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude/acpi/madt.h
blob: 10e0d4292890a8f2d423e74e30210bc7b7c8d8db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/* ----------------------------------------------------------------------- *
 *
 *   Copyright 2006 Erwan Velu - All Rights Reserved
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
 *   Boston MA 02111-1307, USA; either version 2 of the License, or
 *   (at your option) any later version; incorporated herein by reference.
 *
 * ----------------------------------------------------------------------- */

#ifndef MADT_H
#define MADT_H
#include <inttypes.h>
#include <stdbool.h>

enum {
    PROCESSOR_LOCAL_APIC = 0,
    IO_APIC = 1,
    INTERRUPT_SOURCE_OVERRIDE = 2,
    NMI = 3,
    LOCAL_APIC_NMI_STRUCTURE = 4,
    LOCAL_APIC_ADDRESS_OVERRIDE_STRUCTURE = 5,
    IO_SAPIC = 6,
    LOCAL_SAPIC = 7,
    PLATEFORM_INTERRUPT_SOURCES = 8
};

#define MAX_SLP 255

typedef struct {
    uint8_t length;
    uint8_t acpi_id;
    uint8_t apic_id;
    uint32_t flags;
} s_processor_local_apic;

typedef struct {
    uint32_t address;
    uint8_t signature[4 + 1];
    uint32_t length;
    uint8_t revision;
    uint8_t checksum;
    uint8_t oem_id[6 + 1];
    uint8_t oem_table_id[8 + 1];
    uint32_t oem_revision;
    uint8_t creator_id[4 + 1];
    uint32_t creator_revision;
    uint32_t local_apic_address;
    uint32_t flags;
    s_processor_local_apic processor_local_apic[MAX_SLP];
    uint8_t processor_local_apic_count;
} s_madt;

#endif