amaneureka / AtomOS

A multitasking monolithic Kernel based x86 targeting Operating System written in C# from scratch aiming for high-level implementation of drivers in managed environment.
http://www.atomixos.com
BSD 3-Clause "New" or "Revised" License
1.26k stars 85 forks source link

Mono JIT Compiler version 4.2.1.0 Build failed #51

Open amaneureka opened 7 years ago

amaneureka commented 7 years ago

As reported by one of the user, Build is failing on version 4.2.1.0.

Error: UnImplemented Blt_Un

amaneureka commented 7 years ago

Also, PageFault in VM.

Full log:

Debugger Initalized
Heap Initialized!!
       Start Address::3224244416
       End Address  ::3225292992
Multiboot Found!!
       Address       ::3221233664
       VBEModeInfo   ::9144
       VBEControlInfo::8632
       Modules Count:1
       RamDisk:3232219136
       RamDisk-Size:1538386
       Flags:3693
Parsing Memory Map
New Heap Setup!!
       Start Address::3233759232
       End Address  ::3267313664
@Paging:: Directory: 3223900160
GDT Setup!!
       Base Address::3233759232
IDT Setup!!
       Table Address::3233759278
       Entry Address::3233759284
       IDT-Loaded
[Thread]: Start()
Initializing interval timer
VBE Init()
Virtual Frame Buffer: 3758096384
Secondary Frame Buffer: 3762290688
Resolution: 1280x768x4
Interrupt Handler Registered: 127
Boot Init()
Unhandled Interrupt: 14
Stack Dump::
Error Code: 0
EIP: 43353392
CS: 8
EBP: 3224244344
ESP: 3224244312
EAX: 3601648691
EBX: 1624310589
ECX: 0
EDX: 5
EDI: 3233780898
ESI: 3233780982
CR2: 43353392
Thread-ID: 1

Reported by @jammln

amaneureka commented 7 years ago

Issue:

Mono return 0x10 Storage size of Delegate type. which break many internal functions. Like delegate handling which assume 0xC for Intptr storage and 0x10 for object.

Made a dirty hack by returning the size of Delegate 0x14.

amaneureka commented 7 years ago

Long term fix? Change Delegate Handling class to assume minimum storage size of 0x10. That certainly is difficult but need to handle some other way. Also assert the minimum storage size assumption wherever necessary.