Something overwrittes memory after address space mapping
Posted: Sun Apr 25, 2021 11:05 am
Hi,
There is a small operating system I developed. I try to implement multitasking in kernel mode. I load my exe file into memory with dma controller and floppy disk. I hardcoded physical address 0x20000 for my program (I've tryed other addresses, it doesn't matter). If I do identity mapping of the first megabyte and start new process with the EIP register that is equal 0x20000 everything is fine. It works as expected. When I try to map 0x20000 of physical memory to 0 address of virtual address space something happens. Something overwrite 0x20000 physical memory address. I tryed analyze it, I tryed to find a bug in my code I didn't have any result. I hope somebody faced something similar. Thank you!
P.S. I attached normal and overwritted memory screenshots.
There is a small operating system I developed. I try to implement multitasking in kernel mode. I load my exe file into memory with dma controller and floppy disk. I hardcoded physical address 0x20000 for my program (I've tryed other addresses, it doesn't matter). If I do identity mapping of the first megabyte and start new process with the EIP register that is equal 0x20000 everything is fine. It works as expected. When I try to map 0x20000 of physical memory to 0 address of virtual address space something happens. Something overwrite 0x20000 physical memory address. I tryed analyze it, I tryed to find a bug in my code I didn't have any result. I hope somebody faced something similar. Thank you!
P.S. I attached normal and overwritted memory screenshots.