OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Dec 01, 2023 7:35 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: PDOS/x64
PostPosted: Thu Aug 10, 2023 8:09 am 
Offline
Member
Member

Joined: Fri Nov 17, 2006 5:26 am
Posts: 205
It turns out that there is not very much "glue" code required to convert the UEFI OS (it meets my definition of OS, anyway), into a mini Win64 clone.

Especially the consistent calling convention in UEFI, MSVCRT.DLL and KERNEL32.DLL means not even assembler stubs (or C90 extensions) are required between these things.

So "University Challenge x64" available at http://pdos.org provides such a system, including toolchain, all public domain. Source code is on the UC386 disk.

One sample Win64 executable is provided.

The sample Win64 executable will exit, because I don't currently increment the runnum, because I haven't had this exact scenario before, and need to check the best way of doing that.

It would be really good to have some academic rigor applied to this.

ie what do you think of the design - or concept?

Note that the only thing missing is a C90-compliant compiler. I only have a subset of C90 available, and even that will only allow you to produce EFI applications. Not sure if Win64 can be supported via the same method - haven't looked into it.


Top
 Profile  
 
 Post subject: Re: PDOS/x64
PostPosted: Thu Aug 10, 2023 2:45 pm 
Offline
Member
Member
User avatar

Joined: Fri Sep 03, 2021 5:20 pm
Posts: 87
While I haven't had the chance to try out PDOS yet or look into it deeper, I did enjoy the humor on the site.

_________________
Writing a bootloader in under 15 minutes: https://www.youtube.com/watch?v=0E0FKjvTA0M


Top
 Profile  
 
 Post subject: Re: PDOS/x64
PostPosted: Thu Aug 10, 2023 10:00 pm 
Offline
Member
Member

Joined: Fri Nov 17, 2006 5:26 am
Posts: 205
BigBuda wrote:
While I haven't had the chance to try out PDOS yet or look into it deeper, I did enjoy the humor on the site.

Thanks. Glad someone appreciates it. You should check out my "rules" in the PDOS Discord channel too.


Top
 Profile  
 
 Post subject: Re: PDOS/x64
PostPosted: Wed Sep 06, 2023 10:23 pm 
Offline
Member
Member

Joined: Fri Nov 17, 2006 5:26 am
Posts: 205
kerravon wrote:
Note that the only thing missing is a C90-compliant compiler.

I now have a new public domain C compiler that is close enough to C90 compliance to cope with my entire OS/toolchain code base.

And the concept has basically been fully proven now - I have a mini Win64 clone. Completely public domain with C source code. Caveats - a little bit of the code is C99 rather than C90 ("long long" can't really be fully avoided in Win64 - but it is mostly avoided), and the C compiler is actually generated so the code is a bit difficult to read - but not totally impossible to modify.


Top
 Profile  
 
 Post subject: Re: PDOS/x64
PostPosted: Wed Sep 20, 2023 11:12 am 
Offline
Member
Member

Joined: Fri Nov 17, 2006 5:26 am
Posts: 205
kerravon wrote:
kerravon wrote:
Note that the only thing missing is a C90-compliant compiler.

And the concept has basically been fully proven now

This turned out to be premature. I received a Chinese computer (with a Chinese x64 even - Zhaoxin) - and expected it to work, but there were some faults in PDOS (not seen on Virtualbox) that could have been show-stoppers. So my heart was in my mouth as I struggled to find the various problems. But fortunately they were all resolved and you can see two photos of real hardware here: https://groups.io/g/hercules-380/message/2696


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group