summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-09-23 13:20:34 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-09-23 13:20:34 +0000
commit8a496e462e37f78fbbd20009f036623f062ccea1 (patch)
tree439d94e57e7aac3fc654885307c5c80c7fb564a9 /c/src/lib/libcpu
parentSwitched "NEW_GAS" flag. (diff)
downloadrtems-8a496e462e37f78fbbd20009f036623f062ccea1.tar.bz2
Patch from Aleksey (Quality Quorum <qqi@world.std.com>):
1. Finally fixes raw interrupts for pc386 2. Makes some minor cleanup in console and startup 3. Makes rtems_termios_dequeue_characters() to return count of outstanding chars - it allows to simplify console isrs a little bit. 4. pc386 uart modified to be friendlier to termios parameter changes, to have minor performance improvement and to take advantage of of above termios modification.
Diffstat (limited to 'c/src/lib/libcpu')
-rw-r--r--c/src/lib/libcpu/i386/cpu.c9
-rw-r--r--c/src/lib/libcpu/i386/idt.c9
2 files changed, 2 insertions, 16 deletions
diff --git a/c/src/lib/libcpu/i386/cpu.c b/c/src/lib/libcpu/i386/cpu.c
index 740516b106..5f44bd0d2b 100644
--- a/c/src/lib/libcpu/i386/cpu.c
+++ b/c/src/lib/libcpu/i386/cpu.c
@@ -47,13 +47,6 @@ rtems_raw_irq_hdl get_hdl_from_vector(rtems_vector_offset index)
i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
/* Convert limit into number of entries */
- limit = (limit + 1) >> 3;
-
- if(index >= limit) {
- return 0;
- }
-
- /* Convert limit into number of entries */
limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
if(index >= limit) {
@@ -279,7 +272,7 @@ int i386_set_gdt_entry (unsigned short segment_selector, unsigned base,
gdt_entry_tbl[segment_selector].present = 1; /* not present */
/*
- return 1;
+ * Now, reload all segment registers so the limit takes effect.
*/
asm volatile( "movw %%ds,%0 ; movw %0,%%ds
diff --git a/c/src/lib/libcpu/i386/idt.c b/c/src/lib/libcpu/i386/idt.c
index 740516b106..5f44bd0d2b 100644
--- a/c/src/lib/libcpu/i386/idt.c
+++ b/c/src/lib/libcpu/i386/idt.c
@@ -47,13 +47,6 @@ rtems_raw_irq_hdl get_hdl_from_vector(rtems_vector_offset index)
i386_get_info_from_IDTR (&idt_entry_tbl, &limit);
/* Convert limit into number of entries */
- limit = (limit + 1) >> 3;
-
- if(index >= limit) {
- return 0;
- }
-
- /* Convert limit into number of entries */
limit = (limit + 1) / sizeof(interrupt_gate_descriptor);
if(index >= limit) {
@@ -279,7 +272,7 @@ int i386_set_gdt_entry (unsigned short segment_selector, unsigned base,
gdt_entry_tbl[segment_selector].present = 1; /* not present */
/*
- return 1;
+ * Now, reload all segment registers so the limit takes effect.
*/
asm volatile( "movw %%ds,%0 ; movw %0,%%ds