eNET_start.S 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * (C) Copyright 2008
  3. * Graeme Russ, graeme.russ@gmail.com.
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #include "hardware.h"
  24. /* board early intialization */
  25. .globl early_board_init
  26. early_board_init:
  27. /* No 32-bit board specific initialisation */
  28. jmp *%ebp /* return to caller */
  29. .globl show_boot_progress_asm
  30. show_boot_progress_asm:
  31. movb %al, %dl /* Create Working Copy */
  32. andb $0x80, %dl /* Mask in only Error bit */
  33. shrb $0x02, %dl /* Shift Error bit to Error LED */
  34. andb $0x0f, %al /* Mask out 'Error' bit */
  35. orb %dl, %al /* Mask in ERR LED */
  36. movw $LED_LATCH_ADDRESS, %dx
  37. outb %al, %dx
  38. jmp *%ebp /* return to caller */
  39. .globl cpu_halt_asm
  40. cpu_halt_asm:
  41. movb $0x0f, %al
  42. movw $LED_LATCH_ADDRESS, %dx
  43. outb %al, %dx
  44. hlt
  45. jmp cpu_halt_asm