OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Feb 22, 2020 11:46 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Bare Bones and Meaty Skeleton cleanup
PostPosted: Wed Nov 27, 2019 9:33 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1561
Location: Athens, GA, USA
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
μή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίαν
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.


Top
 Profile  
 
 Post subject: Re: Bare Bones and Meaty Skeleton cleanup
PostPosted: Wed Nov 27, 2019 1:09 pm 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 3628
Location: Chichester, UK
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.


Top
 Profile  
 
 Post subject: Re: Bare Bones and Meaty Skeleton cleanup
PostPosted: Thu Nov 28, 2019 6:23 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 1813
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.


Top
 Profile  
 
 Post subject: Re: Bare Bones and Meaty Skeleton cleanup
PostPosted: Thu Nov 28, 2019 9:44 am 
Offline
Member
Member
User avatar

Joined: Mon Sep 03, 2018 2:25 am
Posts: 56
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).


Top
 Profile  
 
 Post subject: Re: Bare Bones and Meaty Skeleton cleanup
PostPosted: Thu Nov 28, 2019 12:35 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1561
Location: Athens, GA, USA
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
μή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίαν
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.


Top
 Profile  
 
 Post subject: Re: Bare Bones and Meaty Skeleton cleanup
PostPosted: Thu Nov 28, 2019 1:50 pm 
Offline
Member
Member
User avatar

Joined: Mon Sep 03, 2018 2:25 am
Posts: 56
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).


Top
 Profile  
 
 Post subject: Re: Bare Bones and Meaty Skeleton cleanup
PostPosted: Tue Dec 10, 2019 5:04 am 
Offline
Member
Member
User avatar

Joined: Mon May 22, 2017 5:56 am
Posts: 197
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".

_________________
In Soviet Turkvimistan, keys bind YOU!


Top
 Profile  
 
 Post subject: Re: Bare Bones and Meaty Skeleton cleanup
PostPosted: Tue Dec 10, 2019 8:57 am 
Offline
Member
Member
User avatar

Joined: Mon Sep 03, 2018 2:25 am
Posts: 56
Quote:
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


Top
 Profile  
 
 Post subject: Re: Bare Bones and Meaty Skeleton cleanup
PostPosted: Tue Dec 10, 2019 9:47 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 1813
Bochs supports UEFI well enough to boot an operating system.


Top
 Profile  
 
 Post subject: Re: Bare Bones and Meaty Skeleton cleanup
PostPosted: Tue Dec 10, 2019 9:52 am 
Offline
Member
Member
User avatar

Joined: Mon Sep 03, 2018 2:25 am
Posts: 56
Huh TIL, my bad


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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