~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/seabios/src/std/mptable.h

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __MPTABLE_H
 
2
#define __MPTABLE_H
 
3
 
 
4
#include "types.h" // u32
 
5
 
 
6
#define MPTABLE_SIGNATURE 0x5f504d5f  // "_MP_"
 
7
 
 
8
struct mptable_floating_s {
 
9
    u32 signature;
 
10
    u32 physaddr;
 
11
    u8 length;
 
12
    u8 spec_rev;
 
13
    u8 checksum;
 
14
    u8 feature1;
 
15
    u8 feature2;
 
16
    u8 reserved[3];
 
17
};
 
18
 
 
19
#define MPCONFIG_SIGNATURE 0x504d4350  // "PCMP"
 
20
 
 
21
struct mptable_config_s {
 
22
    u32 signature;
 
23
    u16 length;
 
24
    u8 spec;
 
25
    u8 checksum;
 
26
    char oemid[8];
 
27
    char productid[12];
 
28
    u32 oemptr;
 
29
    u16 oemsize;
 
30
    u16 entrycount;
 
31
    u32 lapic;
 
32
    u16 exttable_length;
 
33
    u8 exttable_checksum;
 
34
    u8 reserved;
 
35
} PACKED;
 
36
 
 
37
#define MPT_TYPE_CPU 0
 
38
#define MPT_TYPE_BUS 1
 
39
#define MPT_TYPE_IOAPIC 2
 
40
#define MPT_TYPE_INTSRC 3
 
41
#define MPT_TYPE_LOCAL_INT 4
 
42
 
 
43
struct mpt_cpu {
 
44
    u8 type;
 
45
    u8 apicid;
 
46
    u8 apicver;
 
47
    u8 cpuflag;
 
48
    u32 cpusignature;
 
49
    u32 featureflag;
 
50
    u32 reserved[2];
 
51
} PACKED;
 
52
 
 
53
struct mpt_bus {
 
54
    u8 type;
 
55
    u8 busid;
 
56
    char bustype[6];
 
57
} PACKED;
 
58
 
 
59
struct mpt_ioapic {
 
60
    u8 type;
 
61
    u8 apicid;
 
62
    u8 apicver;
 
63
    u8 flags;
 
64
    u32 apicaddr;
 
65
} PACKED;
 
66
 
 
67
struct mpt_intsrc {
 
68
    u8 type;
 
69
    u8 irqtype;
 
70
    u16 irqflag;
 
71
    u8 srcbus;
 
72
    u8 srcbusirq;
 
73
    u8 dstapic;
 
74
    u8 dstirq;
 
75
} PACKED;
 
76
 
 
77
#endif // mptable.h