Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PANIC! 00000001 #67

Closed
ArsenShnurkov opened this issue Jun 14, 2014 · 10 comments
Closed

PANIC! 00000001 #67

ArsenShnurkov opened this issue Jun 14, 2014 · 10 comments
Assignees
Labels

Comments

@ArsenShnurkov
Copy link

When I am trying to start "Run-HelloWorld.sh" (on debian),
the qemu launches,
SYSLINUX 3.72 says "Booting: MBI=0x00010090, entry=0x00400030",
then pink-over-blue text "PANIC! 00000001" appears at the top left corner of qemu window.

@tgiphil tgiphil added the Bug label Jun 14, 2014
@tgiphil tgiphil self-assigned this Jun 14, 2014
@ArsenShnurkov
Copy link
Author

this sample code also gives panic message - http://pastehtml.com/view/ea137scgl.html

Mosa.Kernel.x86 VirtualPageAllocator.Reserve(67108864) have pages = 254 (and 16385 was requested)

TotalPages(1040640) < ReserveMemory(33554432)

i added command line argument -m 512M into the ./Run/Run-QEMU.sh

now the system reboots in line
https://github.com/mosa/MOSA-Project/blob/master/Source/Mosa.Kernel.x86/PageTable.cs#L42

@charsleysa
Copy link
Member

Hi @ArsenShnurkov

I've tried to replicate your issues but cannot replicate them on Windows.

Can you please make sure that you have the latest copy of the repository.

Can you please make sure that your setup of QEMU matches the Windows setup.

@tgiphil
Copy link
Member

tgiphil commented Jun 15, 2014

I was able to re-create the problem on Windows by copying the Linux/Mono generated assemblies to Windows.

The test suite runs fine except for a few failed cases related to double/single floating point. But this would not explain the crashes.

@charsleysa
Copy link
Member

@tgiphil could it possibly be something to do with Endianess?

If I recall correctly the field value emitter in the Metadata stage doesn't use an endian aware emitter since I kept that code mostly the same.

@ArsenShnurkov
Copy link
Author

It is definitely related to Page Tables & Directory filling.
I rewrote Mosa.Kernel.x86 PageTable class
and it works for me now.

@tgiphil
Copy link
Member

tgiphil commented Jun 15, 2014

Great! Check it in and I will test on Windows.

@ArsenShnurkov
Copy link
Author

@tgiphil
Copy link
Member

tgiphil commented Jun 16, 2014

This change exposed what I believe is a bug in the register allocator. It attempts to generate a move between two memory locations - which is not feasible on the x86.

I'll try to hunt it down and fix it tonight.

@tgiphil
Copy link
Member

tgiphil commented Jul 1, 2014

@ArsenShnurkov - I believe the bug has been fixed in ImproveRegisterAllocator branch in my repo. The register allocator was refactored. At the moment the very basic (no thrills) register allocator has been implemented and tested successfully on Windows. However, can you please test it on your Linux platform?

@ArsenShnurkov
Copy link
Author

works for me (I just tested your branch as is, without any patches)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants