[rtems commit] i386: GDTR manipulation functions parameters changed to use explicit width types

Gedare Bloom gedare at rtems.org
Thu Nov 20 14:53:05 UTC 2014


Module:    rtems
Branch:    master
Commit:    d885b2b2137aeffdbbae586e9de4c014f784ca01
Changeset: http://git.rtems.org/rtems/commit/?id=d885b2b2137aeffdbbae586e9de4c014f784ca01

Author:    Jan Dolezal <dolezj21 at fel.cvut.cz>
Date:      Thu Nov 20 15:00:28 2014 +0100

i386: GDTR manipulation functions parameters changed to use explicit width types

---

 c/src/lib/libcpu/i386/cpu.h  | 6 ++++--
 c/src/lib/libcpu/i386/idtr.S | 6 +++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/c/src/lib/libcpu/i386/cpu.h b/c/src/lib/libcpu/i386/cpu.h
index 4c56731..e14acc4 100644
--- a/c/src/lib/libcpu/i386/cpu.h
+++ b/c/src/lib/libcpu/i386/cpu.h
@@ -28,6 +28,8 @@
  */
 #include <rtems/score/interrupts.h>
 
+#include <stdint.h>
+
 /*
  *  Segment Access Routines
  *
@@ -261,13 +263,13 @@ typedef struct {
  * the actual value of GDT register.
  */
 extern void i386_get_info_from_GDTR (segment_descriptors** table,
-				     unsigned* limit);
+                                     uint16_t* limit);
 /*
  * C callable function enabling to change the value of GDT register. Must be called
  * with interrupts masked at processor level!!!.
  */
 extern void i386_set_GDTR (segment_descriptors*,
-			   unsigned limit);
+                           uint16_t limit);
 
 /*
  * C callable function enabling to set up one raw interrupt handler
diff --git a/c/src/lib/libcpu/i386/idtr.S b/c/src/lib/libcpu/i386/idtr.S
index b77bd14..48ce1df 100644
--- a/c/src/lib/libcpu/i386/idtr.S
+++ b/c/src/lib/libcpu/i386/idtr.S
@@ -69,7 +69,7 @@ SYM (i386_set_IDTR):
  * C callable function enabling to get easilly usable info from
  * the actual value of GDT register.
 extern void i386_get_info_from_GDTR (segment_descriptors** table,
-				     unsigned* limit);
+                                     uint16_t* limit);
  */
 
 SYM (i386_get_info_from_GDTR):
@@ -85,7 +85,7 @@ SYM (i386_get_info_from_GDTR):
 	movl	eax, (ecx)
 
 	movzwl	(esp), eax	    /* get limit */
-	movl	eax, (edx)
+	movw	ax, (edx)
 
 	addl	$6, esp		    /* restore %esp */
 	ret
@@ -93,7 +93,7 @@ SYM (i386_get_info_from_GDTR):
 /*
  * C callable function enabling to change the value of GDT register.
  * Must be called with interrupts masked at processor level!!!.
- *   extern void i386_set_GDTR (segment_descriptors*, unsigned limit);
+ *   extern void i386_set_GDTR (segment_descriptors*, uint16_t limit);
  */
 SYM (i386_set_GDTR):
 



More information about the vc mailing list