PDOS/x64

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
kerravon
Member
Member
Posts: 277
Joined: Fri Nov 17, 2006 5:26 am

PDOS/x64

Post by kerravon »

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.
User avatar
BigBuda
Member
Member
Posts: 104
Joined: Fri Sep 03, 2021 5:20 pm

Re: PDOS/x64

Post by BigBuda »

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
kerravon
Member
Member
Posts: 277
Joined: Fri Nov 17, 2006 5:26 am

Re: PDOS/x64

Post by kerravon »

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.
kerravon
Member
Member
Posts: 277
Joined: Fri Nov 17, 2006 5:26 am

Re: PDOS/x64

Post by kerravon »

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.
kerravon
Member
Member
Posts: 277
Joined: Fri Nov 17, 2006 5:26 am

Re: PDOS/x64

Post by kerravon »

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
Post Reply