summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386/startup/ldsegs.S')
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/ldsegs.S27
1 files changed, 23 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
index 8e082909d7..63f5052f80 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
+++ b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
@@ -52,16 +52,35 @@ BEGIN_CODE
EXTERN (Timer_exit)
EXTERN (clockOff)
- .p2align 4
/*----------------------------------------------------------------------------+
| delay
+------------------------------------------------------------------------------
-| Delay is needed after doing I/O. We do it by writing to a non-existent port.
+| Delay is needed after doing I/O.
+|
+| The outb version is OK on most machines BUT the loop version ...
+|
+| will delay for 1us on 1Gz machine, it will take a little bit
+| longer on slower machines, however, it does not matter because we
+| are going to call this function only a few times
+
+----------------------------------------------------------------------------*/
-SYM(delay):
- outb al, $0x80 # about 1uS delay
+ .p2align 4
+ .globl _delay
+ .globl delay
+delay:
+_delay:
+/*
+ outb %al, $0xED # about 1uS delay on most machines
+*/
+/*
+
+ movl $0x200, %eax
+delay1:
+ dec %eax
+ jnz delay1
ret
+
/*-------------------------------------------------------------------------+
| Function: _load_segments
| Description: Current environment is standard PC booted by grub.