wok annotate memtest/stuff/memtest86+-5.01-setup.patch @ rev 24123
Add Arkanoid
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Oct 06 08:15:26 2021 +0000 (2021-10-06) |
parents | 362c1f0b5004 |
children |
rev | line source |
---|---|
pascal@19171 | 1 --- memtest86+-5.01/setup.S |
pascal@19171 | 2 +++ memtest86+-5.01/setup.S |
pascal@19397 | 3 @@ -27,11 +27,11 @@ |
pascal@19171 | 4 #ljmp $INITSEG, $(reload - start + 0x200) |
pascal@19171 | 5 reload: |
pascal@19171 | 6 movw $INITSEG, %ax |
pascal@19171 | 7 - movw %ax, %ds |
pascal@19171 | 8 movw %ax, %es |
pascal@19171 | 9 movw %ax, %fs |
pascal@19397 | 10 + movw %ax, %gs |
pascal@19171 | 11 movw %ax, %ss # reset the stack to INITSEG:0x4000-12. |
pascal@19171 | 12 - movw %dx, %sp |
pascal@19171 | 13 + movw $0x4000-12, %sp |
pascal@19171 | 14 push %cs |
pascal@19171 | 15 pop %ds |
pascal@19171 | 16 lidt idt_48 - start # load idt with 0,0 |
pascal@19397 | 17 @@ -50,13 +50,13 @@ |
pascal@19179 | 18 jz alt_a20_done |
pascal@19179 | 19 |
pascal@19179 | 20 /* set or clear bit1, the ALT_A20_GATE bit */ |
pascal@19179 | 21 - movb 4(%esp), %ah |
pascal@19179 | 22 - testb %ah, %ah |
pascal@19179 | 23 - jz alt_a20_cont1 |
pascal@19179 | 24 + //movb 4(%esp), %ah |
pascal@19179 | 25 + //testb %ah, %ah |
pascal@19179 | 26 + //jz alt_a20_cont1 |
pascal@19179 | 27 orb $2, %al |
pascal@19179 | 28 - jmp alt_a20_cont2 |
pascal@19179 | 29 + //jmp alt_a20_cont2 |
pascal@19179 | 30 alt_a20_cont1: |
pascal@19179 | 31 - and $0xfd, %al |
pascal@19179 | 32 + //and $0xfd, %al |
pascal@19179 | 33 |
pascal@19179 | 34 /* clear the INIT_NOW bit; don't accidently reset the machine */ |
pascal@19179 | 35 alt_a20_cont2: |
pascal@19397 | 36 @@ -87,9 +87,9 @@ |
pascal@19171 | 37 movw $KERNEL_DS, %ax |
pascal@19171 | 38 movw %ax, %ds |
pascal@19171 | 39 movw %ax, %es |
pascal@19171 | 40 - movw %ax, %ss |
pascal@19171 | 41 movw %ax, %fs |
pascal@19397 | 42 movw %ax, %gs |
pascal@19171 | 43 + movw %ax, %ss |
pascal@19171 | 44 |
pascal@19171 | 45 data32 ljmp $KERNEL_CS, $(TSTLOAD <<4) # jmp offset 2000 of segment 0x10 (cs) |
pascal@19397 | 46 |
pascal@19397 | 47 @@ -100,18 +100,16 @@ |
pascal@19397 | 48 * No timeout is used - if this hangs there is something wrong with |
pascal@19397 | 49 * the machine, and we probably couldn't proceed anyway. |
pascal@19397 | 50 */ |
pascal@19397 | 51 +has_output: |
pascal@19397 | 52 + call delay |
pascal@19397 | 53 + inb $0x60, %al # read it |
pascal@19397 | 54 empty_8042: |
pascal@19397 | 55 call delay |
pascal@19397 | 56 inb $0x64, %al # 8042 status port |
pascal@19397 | 57 cmpb $0xff, %al # from grub-a20-patch, skip if not impl |
pascal@19397 | 58 jz empty_8042_ret |
pascal@19397 | 59 testb $1, %al # output buffer? |
pascal@19397 | 60 - jz no_output |
pascal@19397 | 61 - call delay |
pascal@19397 | 62 - inb $0x60, %al # read it |
pascal@19397 | 63 - jmp empty_8042 |
pascal@19397 | 64 - |
pascal@19397 | 65 -no_output: |
pascal@19397 | 66 + jnz has_output |
pascal@19397 | 67 testb $2, %al # is input buffer full? |
pascal@19397 | 68 jnz empty_8042 # yes - loop |
pascal@19397 | 69 empty_8042_ret: |