Bare Bones and Meaty Skeleton cleanup

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Bare Bones and Meaty Skeleton cleanup

Post by Schol-R-LEA »

In a recent thread, JAAman claimed that the current x86 Bare Bones and Meaty Skeleton examples would no longer work as intended on a current-gen UEFI x86 system, and that they should be deprecated in favor of the UEFI Bare Bones, and re-wrting the latter to be more stand-alone. The discussion was specifically about support for text mode on systems which do not have CSM, and frankly I don't know of the accuracy of JAAman's assertions, but I thought it better to move the conversation here.

Assuming JAAman's assertion has merit (I expect it does, as it fits with what little I know about it), how should we proceed with cleaning this up?
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Bare Bones and Meaty Skeleton cleanup

Post by iansjack »

I'm not convinced that anything needs to be "cleaned up". Many, if not most, people here will be working with emulators and/or older machines for which the existing skeleton projects are entirely appropriate. By all means write complementary articles detailing development for UEFI machines, but let's not sweep the older stuff under the carpet.
Octocontrabass
Member
Member
Posts: 5568
Joined: Mon Mar 25, 2013 7:01 pm

Re: Bare Bones and Meaty Skeleton cleanup

Post by Octocontrabass »

I think it would be a good idea to add a warning that the example assumes legacy hardware and won't work correctly (if at all) when booted on a modern UEFI computer.

It would also be possible to rework them to use a LFB instead of assuming VGA text mode. This way, the same example would run regardless of the underlying firmware.
User avatar
thomtl
Member
Member
Posts: 66
Joined: Mon Sep 03, 2018 2:25 am

Re: Bare Bones and Meaty Skeleton cleanup

Post by thomtl »

You could add a note saying that if your system is UEFI you need to enable CSM and boot it in that mode. I don't see any reason for it not working on CSM(apart from buggy firmware but thats not the point).
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: Bare Bones and Meaty Skeleton cleanup

Post by Schol-R-LEA »

thomtl wrote:You could add a note saying that if your system is UEFI you need to enable CSM and boot it in that mode. I don't see any reason for it not working on CSM(apart from buggy firmware but thats not the point).
The specific claim by JAAman was that newer CPUs - the Pentium Gold series in particular - don't support CSM at all:
JAAman wrote:I don't believe there is any such thing as a "Pentium Gold" system which supports CSM
This seems a bit premature, but I don't know for certain. Yes, Intel has removal of CSM on their 2020 roadmap, but I don't know if they've actually removed it from any of the current chipsets or not, and I don't think that they had announced that intent in early 2017 (which is when the 4415U model CPUs came out, according to Intel's own page on them; note that it was originally branded as just Pentium, and the Pentium Gold label was a change made later that year, according to Wicked-Pedo). Neither Wikipedia's page on Kaby Lake processors nor WikiChip's page on the 4415U specifically mention removal of CSM, but that in itself means little.

While the point that newer chipsets won't support CSM soon is a valid one (and one I have made often enough myself), AFAICT most of the existing ones still do.

While I agree that the wiki should encourage a move to UEFI and post-CSM approaches to video modesetting (using the LFB, rendered fonts rather than text mode, etc.), I felt that it was something that needed to be discussed before any changes were made.
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
User avatar
thomtl
Member
Member
Posts: 66
Joined: Mon Sep 03, 2018 2:25 am

Re: Bare Bones and Meaty Skeleton cleanup

Post by thomtl »

AFAIK Intel NUCs already don't support CSM, however IMHO the wiki should first try to open up more to x86_64 before we go to UEFI. Currently everything on the wiki is assuming 32bit Protected mode and painting 64bit long mode as some impossible hurdle, while that is far from true. Since all UEFI pcs these days drop you off in 64bit long mode(afaik only a few obscure systems ever had 32bit pmode).
User avatar
eekee
Member
Member
Posts: 891
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: Bare Bones and Meaty Skeleton cleanup

Post by eekee »

I wrote a post for the other thread before I saw the link to this one, (good idea, Schol,) posting it here as more appropriate. Quotes are from the other thread. My biggest beef with obsoleting the old stuff is, sooner or later, we are going to get hobbyists with new or new-ish BIOS-based hardware designed for hobbyists. Also, my primary dev box is borderline for UEFI; a laptop of a type launched in 2007. And Bochs... does it still not support UEFI, or is our wiki info outdated?

At the same time, I would appreciate more and clearer UEFI info; I'm thinking of actually using it myself. I did not, for instance, know that almost all UEFI machines boot to 64-bit mode until I read thomtl's comment just now. I didn't even know 2007 was a transition year until I read JAAman's comments in the other thread.

JAAman wrote:unfortunately, that meaty skeleton tutorial is designed for computers from the 1980s, and will not work on anything but emulators today -- that computer is far too modern for the meaty skeleton tutorial to work on it

the meaty skeleton tutorial (and all the barebones ones too) should probably be removed from the wiki (or at least moved to an "old deprecated information" subsection)
That's too strong, there are BIOS-based devices still being produced. Some new devices were released last year for industry and hobbyists. Outside those fields, BIOS and legacy hardware support is only just now starting to go away. The key is knowing the difference between BIOS & legacy hardware on the one hand, and UEFI on the other. Perhaps a note should be added to the BIOS-based tutorials, perhaps the converse of this:
JAAman wrote:using UEFI, your code should work on all computers since 2012, most computers since 2007, and almost all emulators but will not work on most computers older than 2007
Perhaps the first page should be something like, "Know the difference between BIOS & UEFI".
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
User avatar
thomtl
Member
Member
Posts: 66
Joined: Mon Sep 03, 2018 2:25 am

Re: Bare Bones and Meaty Skeleton cleanup

Post by thomtl »

And Bochs... does it still not support UEFI, or is our wiki info outdated?
Bochs doesn't last time i checked, QEMU does though. And so do VMWare, VirtualBox probably too
User avatar
thomtl
Member
Member
Posts: 66
Joined: Mon Sep 03, 2018 2:25 am

Re: Bare Bones and Meaty Skeleton cleanup

Post by thomtl »

Huh TIL, my bad
Post Reply