Loading...
> Creating the PS2 port keyboard driver part 1
View Course

Question by Svyatoslav Matveenko

There's the very big problem stopping me from continuing the course. There are some things I added to the OS, that were tested and worked perfectly. But when I was on lecture 83, after I compiled all code and tested it in QEMU, there were very strange things on the screen. I debugged it with GDB, and figured out, that the code is not going past the line 100 ("if (filesystems[i] != 0 && filesystems[i]->resolve(disk) == 0)") in file.c, where is the code for VFS. (I haven't changed that file anyhow), and the QEMU screen starts showing random symbols in top left corner at this moment. I solved that issue by removing the classic keyboard driver from Makefile, but then, when I added some changes myself, the problem appeared again, like if I exceeded some sort of kernel size bounds. Is that a memory error, or what can cause this issue?
P.S. I watched those random symbols appear for some time, and I saw that those symbols are in extended-ASCII order, and changing colors randomly, but in order too. Then, after a fixed period of time, the kernel panic message shows, but the actual panic message almost entirely composed of non-printable characters (I have no panic() call, that could print this).
I know it may seem like something random, but that's an actual issue.

Answered by Daniel McCarthy

Hello,
Apologizes for the delayed response I have been off work for new year break. Have you tried downloading the source code at lecture 83 and seeing if that works. Many people have completed this course before you so its more likely you made a mistake. You can then compare the source code on lecture 83 with the source code on your own repository.

Let me know how that goes and I can be of further assistance.

Many thanks,
Dan

Answered By Instructor

Followup question by Svyatoslav Matveenko

I did it, and it didn't help me. As I said, I removed the file from Makefile, and it worked, but then I just added several prints, and it happened again. And again it works without those prints.

Question Author

Followup question by Svyatoslav Matveenko

Also, it seems like it starts happening, when kernel .bin file exceeds 65536 bytes (16-bit bounds). Can it be a bootloader issue? And is there any way to fix it without splitting the kernel?

Question Author

Answered by Daniel McCarthy

Your saying that you downloaded the actual source code? And rebuilt it and it still did not work? That code has been ran by over 3000 students, in which case it must be something else going on, is your compiler 64 bit or 32 bit?

Can you please upload some screenshots of what is going on here: https://imgbb.com/ and send the link

Also please provide your linker.ld file and Makefile at pastebin.com and send those links too.

It is possible your sections are misaligned in your linker script, we do align them in this course, if you can send those I will be able to assist more.

Answered By Instructor