Memory Wrap-Around (A20-Gate)
Memory Wrap-Around (A20-Gate)
..
Last edited by Perica on Sun Dec 03, 2006 9:02 pm, edited 2 times in total.
Re:Memory Wrap-Around (A20-Gate)
Perica: according to your tutorial on sourceforge:
Memory Wrap-Around does exactly what the name suggests, it makes the memory wrap around! So, for example - If you tried to Acess the Address 0xFFFF:0x0010 you would actually be acessing the Memory at 0x0000:0x0000
Memory Wrap-Around does exactly what the name suggests, it makes the memory wrap around! So, for example - If you tried to Acess the Address 0xFFFF:0x0010 you would actually be acessing the Memory at 0x0000:0x0000
Re:Memory Wrap-Around (A20-Gate)
..
Last edited by Perica on Sun Dec 03, 2006 9:02 pm, edited 1 time in total.
Re:Memory Wrap-Around (A20-Gate)
actually the tutorial was on BonaFide:(osdev.neopages.net)
Re:Memory Wrap-Around (A20-Gate)
btw perica. that tutorial was one of the best ive read on real mode.
Re:Memory Wrap-Around (A20-Gate)
..
Last edited by Perica on Sun Dec 03, 2006 9:05 pm, edited 1 time in total.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Memory Wrap-Around (A20-Gate)
what if your BIOS decided to start the PC with A20 gate enabled ? some BIOSes do, some don't, some other have an option for it ...
Your code seems okay for me ... maybe you could try to invalidate cache entries before you re-read ...
Your code seems okay for me ... maybe you could try to invalidate cache entries before you re-read ...
Re:Memory Wrap-Around (A20-Gate)
..
Last edited by Perica on Sun Dec 03, 2006 9:06 pm, edited 1 time in total.
Re:Memory Wrap-Around (A20-Gate)
my A20 code(works):
Code: Select all
;---enable a20 line---
jmp enable_a20
wait_for_controller: ;this waits for kbd controller to process data
xor al, al
in al, 0x64 ;check port 0x64
test al, 0x02 ;check for bit 1=1
jnz wait_for_controller ;if not 1, loop until 1
ret
enable_a20: ;begin a20 enable
cli ;disable interrupts
call wait_for_controller
mov al, 0xD1 ;send 0xD1
out 0x64, al
call wait_for_controller
mov al, 0xDF ;send 0xDF
out 0x60, al
call wait_for_controller
sti
Re:Memory Wrap-Around (A20-Gate)
..
Last edited by Perica on Sun Dec 03, 2006 9:06 pm, edited 2 times in total.
Re:Memory Wrap-Around (A20-Gate)
..
Last edited by Perica on Sun Dec 03, 2006 9:06 pm, edited 1 time in total.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Memory Wrap-Around (A20-Gate)
perica, were you able to determine whether BOCHS's bios boots with A20 enabled or disabled ? it could help other people to know it, imho