Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Sep 2002 22:23:08 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 17963 for review
Message-ID:  <200209230523.g8N5N8D5024292@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17963

Change 17963 by peter@peter_overcee on 2002/09/22 22:22:41

	x86-64 tss.h

Affected files ...

.. //depot/projects/hammer/sys/x86_64/include/tss.h#4 edit

Differences ...

==== //depot/projects/hammer/sys/x86_64/include/tss.h#4 (text+ko) ====

@@ -41,37 +41,33 @@
 #define _MACHINE_TSS_H_ 1
 
 /*
- * Intel 386 Context Data Type
+ * x86-64 Context Data Type
+ *
+ * The alignment is pretty messed up here due to reuse of the original 32 bit
+ * fields.  It might be worth trying to set the tss on a +4 byte offset to
+ * make the 64 bit fields aligned in practice.
  */
-
-struct i386tss {
-	int	tss_link;	/* actually 16 bits: top 16 bits must be zero */
-	int	tss_esp0; 	/* kernel stack pointer privilege level 0 */
-	int	tss_ss0;	/* actually 16 bits: top 16 bits must be zero */
-	int	tss_esp1; 	/* kernel stack pointer privilege level 1 */
-	int	tss_ss1;	/* actually 16 bits: top 16 bits must be zero */
-	int	tss_esp2; 	/* kernel stack pointer privilege level 2 */
-	int	tss_ss2;	/* actually 16 bits: top 16 bits must be zero */
-	int	tss_cr3; 	/* page table directory */
-	int	tss_eip; 	/* program counter */
-	int	tss_eflags; 	/* program status longword */
-	int	tss_eax;
-	int	tss_ecx;
-	int	tss_edx;
-	int	tss_ebx;
-	int	tss_esp; 	/* user stack pointer */
-	int	tss_ebp; 	/* user frame pointer */
-	int	tss_esi;
-	int	tss_edi;
-	int	tss_es;		/* actually 16 bits: top 16 bits must be zero */
-	int	tss_cs;		/* actually 16 bits: top 16 bits must be zero */
-	int	tss_ss;		/* actually 16 bits: top 16 bits must be zero */
-	int	tss_ds;		/* actually 16 bits: top 16 bits must be zero */
-	int	tss_fs;		/* actually 16 bits: top 16 bits must be zero */
-	int	tss_gs;		/* actually 16 bits: top 16 bits must be zero */
-	int	tss_ldt;	/* actually 16 bits: top 16 bits must be zero */
-	int	tss_ioopt;	/* options & io offset bitmap: currently zero */
-				/* XXX unimplemented .. i/o permission bitmap */
+#pragma pack(1)
+struct x86_64tss {
+	u_int32_t	tss_rsvd0;
+	u_int64_t	tss_rsp0; 	/* kernel stack pointer ring 0 */
+	u_int64_t	tss_rsp1; 	/* kernel stack pointer ring 1 */
+	u_int64_t	tss_rsp2; 	/* kernel stack pointer ring 2 */
+	u_int32_t	tss_rsvd1;
+	u_int32_t	tss_rsvd2;
+	u_int32_t	tss_rsvd3;
+	u_int64_t	tss_ist1;	/* Interrupt stack table 1 */
+	u_int64_t	tss_ist2;	/* Interrupt stack table 2 */
+	u_int64_t	tss_ist3;	/* Interrupt stack table 3 */
+	u_int64_t	tss_ist4;	/* Interrupt stack table 4 */
+	u_int64_t	tss_ist5;	/* Interrupt stack table 5 */
+	u_int64_t	tss_ist6;	/* Interrupt stack table 6 */
+	u_int64_t	tss_ist7;	/* Interrupt stack table 7 */
+	u_int32_t	tss_rsvd4;
+	u_int32_t	tss_rsvd5;
+	u_int16_t	tss_rsvd6;
+	u_int16_t	tss_iobase;	/* io bitmap offset */
 };
+#pragma pack()
 
 #endif /* _MACHINE_TSS_H_ */

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209230523.g8N5N8D5024292>