Contents of /trunk/grub/patches/grub-0.97-intelmac.patch
Parent Directory | Revision Log
Revision 1053 -
(show annotations)
(download)
Fri Jun 25 10:52:50 2010 UTC (14 years, 3 months ago) by niro
File size: 1247 byte(s)
Fri Jun 25 10:52:50 2010 UTC (14 years, 3 months ago) by niro
File size: 1247 byte(s)
more patches and fixed ext4 patch
1 | --- grub-0.97.orig/stage2/asm.S 2004-06-19 18:55:22.000000000 +0200 |
2 | +++ grub-0.97/stage2/asm.S 2006-04-21 11:10:52.000000000 +0200 |
3 | @@ -1651,7 +1651,29 @@ |
4 | jnz 3f |
5 | ret |
6 | |
7 | -3: /* use keyboard controller */ |
8 | +3: /* |
9 | + * try to switch gateA20 using PORT92, the "Fast A20 and Init" |
10 | + * register |
11 | + */ |
12 | + mov $0x92, %dx |
13 | + inb %dx, %al |
14 | + /* skip the port92 code if it's unimplemented (read returns 0xff) */ |
15 | + cmpb $0xff, %al |
16 | + jz 6f |
17 | + |
18 | + /* set or clear bit1, the ALT_A20_GATE bit */ |
19 | + movb 4(%esp), %ah |
20 | + testb %ah, %ah |
21 | + jz 4f |
22 | + orb $2, %al |
23 | + jmp 5f |
24 | +4: and $0xfd, %al |
25 | + |
26 | + /* clear the INIT_NOW bit don't accidently reset the machine */ |
27 | +5: and $0xfe, %al |
28 | + outb %al, %dx |
29 | + |
30 | +6: /* use keyboard controller */ |
31 | pushl %eax |
32 | |
33 | call gloop1 |
34 | @@ -1661,9 +1683,12 @@ |
35 | |
36 | gloopint1: |
37 | inb $K_STATUS |
38 | + cmpb $0xff, %al |
39 | + jz gloopint1_done |
40 | andb $K_IBUF_FUL, %al |
41 | jnz gloopint1 |
42 | |
43 | +gloopint1_done: |
44 | movb $KB_OUTPUT_MASK, %al |
45 | cmpb $0, 0x8(%esp) |
46 | jz gdoit |
47 | @@ -1684,6 +1709,8 @@ |
48 | |
49 | gloop1: |
50 | inb $K_STATUS |
51 | + cmpb $0xff, %al |
52 | + jz gloop2ret |
53 | andb $K_IBUF_FUL, %al |
54 | jnz gloop1 |
55 | |
56 | @@ -1991,6 +2018,11 @@ |
57 | ENTRY(console_getkey) |
58 | push %ebp |
59 | |
60 | +wait_for_key: |
61 | + call EXT_C(console_checkkey) |
62 | + incl %eax |
63 | + jz wait_for_key |
64 | + |
65 | call EXT_C(prot_to_real) |
66 | .code16 |
67 |