diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-05-28 17:45:17 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-05-28 17:45:17 +0000 |
commit | 96efaf679bbafd8368de2d6e1c5ce9dfb502a30d (patch) | |
tree | a93e2ad4232396f12fe186f41b819d74b1bcb75d | |
parent | Added defaults for PPC_ABI and PPC_ASM so every PowerPC does not (diff) | |
download | rtems-96efaf679bbafd8368de2d6e1c5ce9dfb502a30d.tar.bz2 |
Renamed delay() to avoid conflicts since it is a common name that
was in particular used by the ttcp test.
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/include/bsp.h | 3 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/start/start16.S | 24 | ||||
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/startup/ldsegs.S | 34 |
3 files changed, 32 insertions, 29 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/include/bsp.h b/c/src/lib/libbsp/i386/pc386/include/bsp.h index 88e1ab6e24..dc1d2e497e 100644 --- a/c/src/lib/libbsp/i386/pc386/include/bsp.h +++ b/c/src/lib/libbsp/i386/pc386/include/bsp.h @@ -143,6 +143,8 @@ extern int rtems_dec21140_driver_attach (struct rtems_bsdnet_ifconfig *config); #define Clear_tm27_intr() #define Lower_tm27_intr() +/* does anyone need this? if so, report it so we can rename this macro */ +#if 0 /*-------------------------------------------------------------------------+ | Simple spin delay in microsecond units for device drivers. | This is very dependent on the clock speed of the target. @@ -152,6 +154,7 @@ extern int rtems_dec21140_driver_attach (struct rtems_bsdnet_ifconfig *config); rtems_unsigned32 _cnt = _microseconds; \ asm volatile ("0: nop; mov %0,%0; loop 0b" : "=c"(_cnt) : "0"(_cnt)); \ } +#endif /*-------------------------------------------------------------------------+ | Convert microseconds to ticks and ticks to microseconds. diff --git a/c/src/lib/libbsp/i386/pc386/start/start16.S b/c/src/lib/libbsp/i386/pc386/start/start16.S index d9aea202f3..520895de47 100644 --- a/c/src/lib/libbsp/i386/pc386/start/start16.S +++ b/c/src/lib/libbsp/i386/pc386/start/start16.S @@ -109,16 +109,16 @@ _start16: outb %al, $0x60 call empty_8042 - call delay - call delay - call delay + call pc386_delay + call pc386_delay + call pc386_delay movl %cs:HDRSTART + HDROFF, %eax # pushl %eax # jump to start of 32 bit code ret # /*----------------------------------------------------------------------------+ -| delay +| pc386_delay +------------------------------------------------------------------------------ | Delay is needed after doing I/O. | @@ -131,10 +131,10 @@ _start16: | NOTE: Saving the content of the EAX register just in case. - Rosimildo. +----------------------------------------------------------------------------*/ .p2align 4 - .globl _delay - .globl delay -delay: -_delay: + .globl _pc386_delay + .globl pc386_delay +pc386_delay: +_pc386_delay: pushl %eax #if defined(USE_OUTB_FOR_DELAY) outb %al, $0x80 # about 1uS delay on most machines @@ -142,9 +142,9 @@ _delay: #else movl $0x200, %eax -delay1: +pc386_delay1: dec %eax - jnz delay1 + jnz pc386_delay1 #endif popl %eax ret @@ -162,11 +162,11 @@ delay1: .globl empty_8042 empty_8042: _empty_8042: - call delay + call pc386_delay inb $0x64, %al # 8042 status port testb $0x01, %al # output buffer? jz no_output - call delay + call pc386_delay in $0x60, %al # read it jmp empty_8042 no_output: diff --git a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S index 87fc02f0f4..6d7ec06022 100644 --- a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S +++ b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S @@ -50,7 +50,7 @@ BEGIN_CODE EXTERN (clockOff) /*----------------------------------------------------------------------------+ -| delay +| pc386_delay +------------------------------------------------------------------------------ | Delay is needed after doing I/O. | @@ -64,17 +64,17 @@ BEGIN_CODE #define DELAY_USE_OUTB .p2align 4 - .globl _delay - .globl delay -delay: -_delay: + .globl _pc386_delay + .globl pc386_delay +pc386_delay: +_pc386_delay: #ifdef DELAY_USE_OUTB outb al, $0x80 # about 1uS delay on most machines #else movl $0x200, eax -delay1: +pc386_delay1: dec eax - jnz delay1 + jnz pc386_delay1 #endif ret @@ -123,36 +123,36 @@ next_step: movb $0x11, al /* initialization sequence */ outb al, $0x20 /* send it to 8259A-1 */ - call SYM(delay) + call SYM(pc386_delay) outb al, $0xA0 /* and to 8259A-2 */ - call SYM(delay) + call SYM(pc386_delay) movb $0x20, al /* start of hardware int's (0x20) */ outb al, $0x21 - call SYM(delay) + call SYM(pc386_delay) movb $0x28, al /* start of hardware int's 2 (0x28) */ outb al, $0xA1 - call SYM(delay) + call SYM(pc386_delay) movb $0x04, al /* 8259-1 is master */ outb al, $0x21 - call SYM(delay) + call SYM(pc386_delay) movb $0x02, al /* 8259-2 is slave */ outb al, $0xA1 - call SYM(delay) + call SYM(pc386_delay) movb $0x01, al /* 8086 mode for both */ outb al, $0x21 - call SYM(delay) + call SYM(pc386_delay) outb al, $0xA1 - call SYM(delay) + call SYM(pc386_delay) movb $0xFF, al /* mask off all interrupts for now */ outb al, $0xA1 - call SYM(delay) + call SYM(pc386_delay) movb $0xFB, al /* mask all irq's but irq2 which */ outb al, $0x21 /* is cascaded */ - call SYM(delay) + call SYM(pc386_delay) movw $0xFFFB, SYM(i8259s_cache) /* set up same values in cache */ |