Changeset 96efaf67 in rtems
- Timestamp:
- 05/28/00 17:45:17 (23 years ago)
- Children:
- 9c948846
- Parents:
- 3704a9a
- Location:
- c/src/lib/libbsp/i386/pc386
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/i386/pc386/include/bsp.h
r3704a9a r96efaf67 144 144 #define Lower_tm27_intr() 145 145 146 /* does anyone need this? if so, report it so we can rename this macro */ 147 #if 0 146 148 /*-------------------------------------------------------------------------+ 147 149 | Simple spin delay in microsecond units for device drivers. … … 153 155 asm volatile ("0: nop; mov %0,%0; loop 0b" : "=c"(_cnt) : "0"(_cnt)); \ 154 156 } 157 #endif 155 158 156 159 /*-------------------------------------------------------------------------+ -
c/src/lib/libbsp/i386/pc386/start/start16.S
r3704a9a r96efaf67 110 110 call empty_8042 111 111 112 call delay113 call delay114 call delay112 call pc386_delay 113 call pc386_delay 114 call pc386_delay 115 115 116 116 movl %cs:HDRSTART + HDROFF, %eax # … … 119 119 120 120 /*----------------------------------------------------------------------------+ 121 | delay121 | pc386_delay 122 122 +------------------------------------------------------------------------------ 123 123 | Delay is needed after doing I/O. … … 132 132 +----------------------------------------------------------------------------*/ 133 133 .p2align 4 134 .globl _ delay135 .globl delay136 delay:137 _ delay:134 .globl _pc386_delay 135 .globl pc386_delay 136 pc386_delay: 137 _pc386_delay: 138 138 pushl %eax 139 139 #if defined(USE_OUTB_FOR_DELAY) … … 143 143 144 144 movl $0x200, %eax 145 delay1:145 pc386_delay1: 146 146 dec %eax 147 jnz delay1147 jnz pc386_delay1 148 148 #endif 149 149 popl %eax … … 163 163 empty_8042: 164 164 _empty_8042: 165 call delay165 call pc386_delay 166 166 inb $0x64, %al # 8042 status port 167 167 testb $0x01, %al # output buffer? 168 168 jz no_output 169 call delay169 call pc386_delay 170 170 in $0x60, %al # read it 171 171 jmp empty_8042 -
c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
r3704a9a r96efaf67 51 51 52 52 /*----------------------------------------------------------------------------+ 53 | delay53 | pc386_delay 54 54 +------------------------------------------------------------------------------ 55 55 | Delay is needed after doing I/O. … … 65 65 66 66 .p2align 4 67 .globl _ delay68 .globl delay69 delay:70 _ delay:67 .globl _pc386_delay 68 .globl pc386_delay 69 pc386_delay: 70 _pc386_delay: 71 71 #ifdef DELAY_USE_OUTB 72 72 outb al, $0x80 # about 1uS delay on most machines 73 73 #else 74 74 movl $0x200, eax 75 delay1:75 pc386_delay1: 76 76 dec eax 77 jnz delay177 jnz pc386_delay1 78 78 #endif 79 79 ret … … 124 124 movb $0x11, al /* initialization sequence */ 125 125 outb al, $0x20 /* send it to 8259A-1 */ 126 call SYM( delay)126 call SYM(pc386_delay) 127 127 outb al, $0xA0 /* and to 8259A-2 */ 128 call SYM( delay)128 call SYM(pc386_delay) 129 129 130 130 movb $0x20, al /* start of hardware int's (0x20) */ 131 131 outb al, $0x21 132 call SYM( delay)132 call SYM(pc386_delay) 133 133 movb $0x28, al /* start of hardware int's 2 (0x28) */ 134 134 outb al, $0xA1 135 call SYM( delay)135 call SYM(pc386_delay) 136 136 137 137 movb $0x04, al /* 8259-1 is master */ 138 138 outb al, $0x21 139 call SYM( delay)139 call SYM(pc386_delay) 140 140 movb $0x02, al /* 8259-2 is slave */ 141 141 outb al, $0xA1 142 call SYM( delay)142 call SYM(pc386_delay) 143 143 144 144 movb $0x01, al /* 8086 mode for both */ 145 145 outb al, $0x21 146 call SYM( delay)147 outb al, $0xA1 148 call SYM( delay)146 call SYM(pc386_delay) 147 outb al, $0xA1 148 call SYM(pc386_delay) 149 149 150 150 movb $0xFF, al /* mask off all interrupts for now */ 151 151 outb al, $0xA1 152 call SYM( delay)152 call SYM(pc386_delay) 153 153 movb $0xFB, al /* mask all irq's but irq2 which */ 154 154 outb al, $0x21 /* is cascaded */ 155 call SYM( delay)155 call SYM(pc386_delay) 156 156 157 157 movw $0xFFFB, SYM(i8259s_cache) /* set up same values in cache */
Note: See TracChangeset
for help on using the changeset viewer.