OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.0 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../grub/mactel.patch
  5. # Copyright (C) 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- T2-COPYRIGHT-NOTE-END ---
  16. Pasted together out of the OpenSolaris forum ,-) to allow booting
  17. on Macintosh Intel hardware, such as the MacBooks and the like.
  18. - Rene Rebe <rene@exactcode.de>
  19. --- grub-0.97/stage2/asm.S.vanilla 2006-05-31 19:43:15.858048750 +0200
  20. +++ grub-0.97/stage2/asm.S 2006-05-31 19:47:11.584780750 +0200
  21. @@ -1651,7 +1651,29 @@
  22. jnz 3f
  23. ret
  24. -3: /* use keyboard controller */
  25. +3: /*
  26. + * try to switch gateA20 using PORT92, the "Fast A20 and Init"
  27. + * register
  28. + */
  29. + mov $0x92, %dx
  30. + inb %dx, %al
  31. + /* skip the port92 code if it's unimplemented (read returns 0xff) */
  32. + cmpb $0xff, %al
  33. + jz 6f
  34. +
  35. + /* set or clear bit1, the ALT_A20_GATE bit */
  36. + movb 4(%esp), %ah
  37. + testb %ah, %ah
  38. + jz 4f
  39. + orb $2, %al
  40. + jmp 5f
  41. +4: and $0xfd, %al
  42. +
  43. + /* clear the INIT_NOW bit; don't accidently reset the machine */
  44. +5: and $0xfe, %al
  45. + outb %al, %dx
  46. +
  47. +6: /* use keyboard controller */
  48. pushl %eax
  49. call gloop1
  50. @@ -1661,9 +1683,12 @@
  51. gloopint1:
  52. inb $K_STATUS
  53. + cmpb $0xff, %al
  54. + jz gloopint1_done
  55. andb $K_IBUF_FUL, %al
  56. jnz gloopint1
  57. +gloopint1_done:
  58. movb $KB_OUTPUT_MASK, %al
  59. cmpb $0, 0x8(%esp)
  60. jz gdoit
  61. @@ -1684,6 +1709,8 @@
  62. gloop1:
  63. inb $K_STATUS
  64. + cmpb $0xff, %al
  65. + jz gloop2ret
  66. andb $K_IBUF_FUL, %al
  67. jnz gloop1
  68. @@ -1991,6 +2018,11 @@
  69. ENTRY(console_getkey)
  70. push %ebp
  71. +wait_for_key:
  72. + call EXT_C(console_checkkey)
  73. + incl %eax
  74. + jz wait_for_key
  75. +
  76. call EXT_C(prot_to_real)
  77. .code16