]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/9/pc/mp.h
kernel: cleanup the software mouse cursor mess
[plan9front.git] / sys / src / 9 / pc / mp.h
index 145cd02bcb081130fa88baf5f8e915af395566e1..4090f343e2aa2b498636d1fd014266f0d7c77673 100644 (file)
@@ -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;