[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A20 delay






Ooops, forgot to attach the patch.



Thanks,

Aleksey


diff -r -C 2 /home/ayr/r-src/rtems-4.0.0-orig/c/src/lib/libbsp/i386/pc386/start/start16.s ./start/start16.s
*** /home/ayr/r-src/rtems-4.0.0-orig/c/src/lib/libbsp/i386/pc386/start/start16.s	Mon Oct  5 18:36:05 1998
--- ./start/start16.s	Wed Dec 15 21:23:34 1999
***************
*** 116,119 ****
--- 116,123 ----
  	call	empty_8042
  
+         call    delay
+         call    delay
+         call    delay
+ 
  	movl	%cs:HDRSTART + HDROFF, %eax	#
  	pushl	%eax				# jump to start of 32 bit code
***************
*** 121,133 ****
  
  /*----------------------------------------------------------------------------+
! | delay
! +------------------------------------------------------------------------------
! | Delay is needed after doing I/O. We do it by writing to a non-existent port.
! +----------------------------------------------------------------------------*/
! 	.globl _delay
! 	.globl delay
  delay:
! _delay:
! 	outb	%al, $0xED	# about 1uS delay
  	ret
  
--- 125,138 ----
  
  /*----------------------------------------------------------------------------+
! | delay16
! | It 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
! +-----------------------------------------------------------------------------*/
! 	.p2align 4
  delay:
! 	movl    $0x200, %eax
! more:	dec     %ax
! 	jnz     more
  	ret
  
***************
*** 140,147 ****
  | and we probably couldn't proceed anyway.
  +----------------------------------------------------------------------------*/
! 	.globl _empty_8042
! 	.globl empty_8042
  empty_8042:
- _empty_8042:
  	call	delay
  	inb	$0x64, %al	# 8042 status port
--- 145,150 ----
  | and we probably couldn't proceed anyway.
  +----------------------------------------------------------------------------*/
! 	.p2align 4
  empty_8042:
  	call	delay
  	inb	$0x64, %al	# 8042 status port
diff -r -C 2 /home/ayr/r-src/rtems-4.0.0-orig/c/src/lib/libbsp/i386/pc386/startup/ldsegs.s ./startup/ldsegs.s
*** /home/ayr/r-src/rtems-4.0.0-orig/c/src/lib/libbsp/i386/pc386/startup/ldsegs.s	Thu Jul 23 18:02:28 1998
--- ./startup/ldsegs.s	Wed Dec 15 21:25:32 1999
***************
*** 54,65 ****
  	EXTERN (clockOff)
  
- 	.p2align 4
  /*----------------------------------------------------------------------------+
! | delay
! +------------------------------------------------------------------------------
! | Delay is needed after doing I/O. We do it by writing to a non-existent port.
! +----------------------------------------------------------------------------*/
  SYM(delay):
! 	outb	al, $0xED	# about 1uS delay
  	ret
  
--- 54,72 ----
  	EXTERN (clockOff)
  
  /*----------------------------------------------------------------------------+
! |         Function: delay
! |      Description: Uncalibrated delay. This function will provide delay 
! |                   of 1us on 1Gz CPU, it will take a little bit longer 
! |                   on slower machines, however, we are not going to call
! |                   it often anyway
! | Global Variables: None.
! |        Arguments: None.
! |          Returns: Nothing. 
! ------------------------------------------------------------------------------*/
! 	.p2align 4
  SYM(delay):
! 	movl    $0x200, eax
! more:	dec     eax
! 	jnz     more
  	ret