diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-02-01 10:23:17 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-02-01 10:23:17 +0100 |
commit | 28ad4e661610353efec655fdf147a46e156bf46e (patch) | |
tree | e830a6f8cfa91507114c1bc52f3c45356d235b15 /sys/src/9/pc/mp.h | |
parent | 06bc19c28f3bd1528f669626eb9826226decabd9 (diff) |
pc kernel: split mpstartap() and squidboy into separate file... stuff for amd64
Diffstat (limited to 'sys/src/9/pc/mp.h')
-rw-r--r-- | sys/src/9/pc/mp.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/src/9/pc/mp.h b/sys/src/9/pc/mp.h index 145cd02bc..4090f343e 100644 --- a/sys/src/9/pc/mp.h +++ b/sys/src/9/pc/mp.h @@ -12,6 +12,8 @@ typedef struct { /* floating pointer */ uchar reserved[3]; } _MP_; +#define _MP_sz (4+4+1+1+1+1+1+3) + typedef struct { /* configuration table header */ uchar signature[4]; /* "PCMP" */ ushort length; /* total table length */ @@ -27,6 +29,8 @@ typedef struct { /* configuration table header */ uchar reserved; } PCMP; +#define PCMPsz (4+2+1+1+20+4+2+2+4+2+1+1) + typedef struct { /* processor table entry */ uchar type; /* entry type (0) */ uchar apicno; /* local APIC id */ @@ -37,12 +41,16 @@ typedef struct { /* processor table entry */ uchar reserved[8]; } PCMPprocessor; +#define PCMPprocessorsz (1+1+1+1+4+4+8) + typedef struct { /* bus table entry */ uchar type; /* entry type (1) */ uchar busno; /* bus id */ char string[6]; /* bus type string */ } PCMPbus; +#define PCMPbussz (1+1+6) + typedef struct { /* I/O APIC table entry */ uchar type; /* entry type (2) */ uchar apicno; /* I/O APIC id */ @@ -51,6 +59,8 @@ typedef struct { /* I/O APIC table entry */ ulong addr; /* I/O APIC address */ } PCMPioapic; +#define PCMPioapicsz (1+1+1+1+4) + typedef struct { /* interrupt table entry */ uchar type; /* entry type ([34]) */ uchar intr; /* interrupt type */ @@ -61,6 +71,8 @@ typedef struct { /* interrupt table entry */ uchar intin; /* destination APIC [L]INTIN# */ } PCMPintr; +#define PCMPintrsz (1+1+2+1+1+1+1) + typedef struct { /* system address space mapping entry */ uchar type; /* entry type (128) */ uchar length; /* of this entry (20) */ @@ -70,6 +82,8 @@ typedef struct { /* system address space mapping entry */ ulong addrlength[2]; } PCMPsasm; +#define PCMPsasmsz (1+1+1+1+8+8) + typedef struct { /* bus hierarchy descriptor entry */ uchar type; /* entry type (129) */ uchar length; /* of this entry (8) */ @@ -79,6 +93,8 @@ typedef struct { /* bus hierarchy descriptor entry */ uchar reserved[3]; } PCMPhierarchy; +#define PCMPhirarchysz (1+1+1+1+1+3) + typedef struct { /* compatibility bus address space modifier entry */ uchar type; /* entry type (130) */ uchar length; /* of this entry (8) */ @@ -87,6 +103,8 @@ typedef struct { /* compatibility bus address space modifier entry */ ulong range; /* predefined range list */ } PCMPcbasm; +#define PCMPcbasmsz (1+1+1+1+4) + enum { /* table entry types */ PcmpPROCESSOR = 0x00, /* one entry per processor */ PcmpBUS = 0x01, /* one entry per bus */ @@ -233,6 +251,7 @@ extern int mpintrinit(Bus*, PCMPintr*, int, int); extern void mpinit(void); extern int mpintrenable(Vctl*); extern void mpshutdown(void); +extern void mpstartap(Apic*); extern Bus* mpbus; extern Bus* mpbuslast; |