Actually the biggest problem out there today with the information available to new developers is exactly this: sources of information that are meant for a very specific platform, which do not show proper abstraction technique, professing themselves to be generic kernel theory. This pretty much confuses everything, and due to the lack of abstraction and proper component isolation it makes it very hard for newcomers to separate things that should be separate concepts, and they end up confusing many things with each other and generally making a mess.
I'm sure some saint is going to come and try to defend the OP and generally imply repeatedly that I'm a jerk, so I'll give concrete examples of why this series a bad thing: From this page alone:
http://www.thomasloven.com/P12/OSDEV-tu ... strapping/
The very first section, "linker script" makes a grievous error: You start off by saying, "The first thing we need is a linker script". Bam. 1. The linker script is very specific to GNU LD, and its format and everything is specific to GNU LD. Yet
the way you word that paragraph implies to a newbie that "A linker script" is something which is written exactly the way you gave it in the article, and it is a "required item" that makes up a kernel. Whereas if you're not using the GNU toolchain, the idea of a linker script is probably entirely unnecessary, since not all linkers use linker scripts. Statically stating a sequence of steps, and not clarifying, justifying or disambiguating any of it.
Then in that same paragraph, you go ahead and state something very architecture specific. You say,
"We want our kernel compiled to run at somewhere above 0xC0000000."
There are
many new developers who think that x86-32 is irrelevant and are moving directly into x86-64. You make
no mention of the fact that this kernel location is done because x86-32 has a 32-bit virtual address space, and so you're bascially trying to gauge how much space would be adequate for userspace and how much would be sufficient for the kernel. You also give another static idea: that the kernel
must have the address space split done as 3-GB-userspace-1-GB-kernelspace. NT does a 2GB-2GB split, and there are kernels which do not map the entire kernel into each process, and give the kernel its own address space. The OS/X kernel on x86-64 does this IIRC. Again, giving random steps, no explanation, no proper abstract theory, no justification of your statements. So imagine an excited newcomer goes and reads your "tutorials" and tries to do an x86-64 "barebones" or whatever he calls it, and then he moves on with a 3GB userspace for x86-64.
When GRUB loads the kernel, however paging will not be enabled, so it could only be loaded there if our system had three gigabytes of physical memory, which we can't always assume. Luckily, we can get GRUB to load the kernel to 0x100000, but make the kernel run as if it was at 0xC0100000 using a simple linker trick.
And here's a technical fallacy: GrUB cannot make your kernel run as if it were at any address. You have now made the newcomer associate functionality that GrUB does not have with GrUB, thereby blurring the lines of separation between distinct entities with distinct responsibilities. GrUB is told where to load the kernel in physical memory; you must make sure that the entry point for the kernel is also a physical address. These are your responsibilities. GrUB does not care about how your kernel is linked virtually.
Also, you cannot not make the kernel run as if it was loaded at 0xC0100000 until you enable paging; paging is the mechanism used to achieve that effect. Before that you should have the kernel linked physically, then you enable paging and do a "JMP imm32" instruction to load EIP with a virtual address
after you've enabled paging and mapped the kernel to the higher half; before that it should be executing in pure physical mode. The alternatives are to (1) use the "GDT trick", or (2) enable paging as soon as the kernel enters scope. But you don't make the kernel run "as if it was at 0xC0100000 using a linker script trick". First of all, the linker script has no effect on the address translation logic within the CPU which is what you use to
actually perform the tricks necessary to keep the kernel executing when paging is still off.
All of this is just in the
first paragraph, and along with it, in the simple skim I did, I saw other things, both major and minor, subtle and obvious, all of which work together to produce the combined effect of creating yet another highly misguided newcomer who then proceeds to compile the code in your "tutorial", see that it's not working the way he understood it, and then come and make a completely confused post.
I recommend you review the tutorial series and polish it up before releasing it again
By all means feel free to write new articles, and try to give out information, but please don't release possibly damaging information
EDIT:
I just went and looked at the table of contents again, and the next chapter is titled: "Screen printing". Please correctly rename it "Manipulating a VGA compatible card in alphanumeric mode". The VGA standard's alphanumeric mode is by no means a generic way of "printing to the screen", and outside the VGA standard there are actually very few modern video cards which, if not for support of the VGA standard, would support an alphanumeric mode of operation. The correct way to go about that chapter of the series is to state very clearly the following:
1. IBM-PC compatibles come with a "VGA function" as the PC manuals call it. This is a specified component of a PC compatible and can be assumed to be there. Since it is required on all PC-compatibles, modern PC-compatibles which have more powerful graphics card emulate the VGA function by having the card emulate a "VGA mode" which complies with the PC VGA standard.
2. That the article series is fixed to the x86-32/PC platform, so it assumes the use of a PC chipset for testing.
3. Since the tutorial kernel is written specifically for x86-32/IBM-PC, you can assume the presence of a card with a usable VGA mode.
4. Now you can go on to explaining how the VGA compatible card operates within alphanumeric mode.
But don't go about confusing things by making it seem like "in order to print to the screen, you must write characters to 0xB8000". This is again a case of unjustified absolute statements being presented to a newcomer, who then forms some set of flawed assumptions and goes about writing code based on it.
EDIT:
As a final note, don't feel shot down or anything: the majority of other "tutorial" series out there right now are just as bad or worse. This wasn't an attempt to bash you or anything: you probably didn't see those flaws yourself...which is why you should probably review and polish the series, then republish it. In reading Love4Boobies' comments on the site, it seems he was more interested in the correctness of your C coding, which is to me rather insignificant in comparison to the REAL monsters lurking in those pages: the set of both subtle and damaging flaws which come together to form the basis of terrible misconceptions in newcomers. He was more interested in the coding style, and I was more worried about the effect of the inaccuracy of the information presented and the implication it would have as a larger work after being read in its entirety.
--All the best
gravaera