Page 2 of 3
Posted: Mon Mar 10, 2008 5:19 pm
by elderK
It amazes me how flamey people get over such simple things.
False Advertising is simply a topic name, I am not actually implying anyone is falsely advertising jack. I understand perfectly well that the processors are capable of addressing 32/whatever bits of address space.
Also, its moronic to rely on $E820. What happens when E820 isnt available?
There must be a way to do it all, without having to RELY on the BIOS, or atleast as little as possible.
As for Memory-mapped Hardware being patched directly into the physical address space, no, the Hardware takes priority, for a simple reason - Its HARDWIRED. It will be wired in such a way, on the chipset, so that it DOES appear in a certain memory range.
~Z
Posted: Mon Mar 10, 2008 5:29 pm
by Brynet-Inc
zeii wrote:Also, its moronic to rely on $E820. What happens when E820 isnt available?
There must be a way to do it all, without having to RELY on the BIOS, or atleast as little as possible.
How is it "moronic"? All modern OS's that have an x86 port rely on the BIOS for obtaining a memory map.
The only other method, as mentioned before.. is manual probing, which isn't easy to do correctly.
Re: False advertising?
Posted: Mon Mar 10, 2008 6:30 pm
by Brendan
Hi,
zeii wrote:That odd thought simply being whether or not 32bit machines can actually use all 4GiB of RAM (should the full 4GiB be installed).
32-bit machines have 32-bit general registers, which has nothing to do with physical address space size.
Physical address space size on modern 32-bit 80x86 (e.g. Pentium 4 Williamette, before long mode came out) is 64 GB (36-bit physical addressing). But, this has nothing to do with RAM.
If the motherboard actually supports 64 GB of RAM (almost none of them do) then you'd probably only be able to use 63 GB of it (assuming the OS supports PAE or PSE36, and some OSs don't, for e.g. DOS).
zeii wrote:Also, its moronic to rely on $E820. What happens when E820 isnt available?
There must be a way to do it all, without having to RELY on the BIOS, or atleast as little as possible.
To detect RAM chip sizes correctly you need to mess with RAM chip configuration, which is impossible to do while your code is running in RAM (you need to do it from ROM). Manual probing is a dodgy hack to get around this.
However, how much RAM is installed is irrelevant - an OS couldn't care less. What an OS cares about is usable RAM, not installed RAM. These are different things because some RAM is used by the firmware and other things. For example, the RAM from 0x000A0000 to 0x000C0000 is typically used for SMM code, the RAM from 0x000C0000 to 0x000FFFFF is typically used for "ROMs" (that aren't actually ROMs) and there's normally some RAM used by ACPI; and there may be onboard video using part of the RAM for video memory (32 MB of RAM is used for this on one of my computers).
zeii wrote:As for Memory-mapped Hardware being patched directly into the physical address space, no, the Hardware takes priority, for a simple reason - Its HARDWIRED. It will be wired in such a way, on the chipset, so that it DOES appear in a certain memory range.
I don't think anything is actually "hardwired". The CPU's accesses go to the memory controller (in the northbridge) which determines if the access should go to RAM or should be sent to the PCI bus (or AGP); and everything on the PCI bus is controlled by bridges and BARs. All of this is programmable (but all of it is typically programmed correctly by firmware, and it's normally beyond the scope of operating systems). The only other thing is the local APIC (accesses to the local APIC can be resolved inside the CPU, without any external activity), but the local APIC can be disabled or relocated.
In general everything is configurable by software. For example, in theory, given enough information about the chipset, I can't think of any reason to prevent you from disabling all RAM, disabling all devices and disabling everything else, so that the entire physical address space is completely empty (except the CPU would crash because there's nothing left for it to execute).
However, while you're learning how to mess with things like memory controllers you'd also be learning why you don't want to mess with things like memory controllers...
Cheers,
Brendan
Posted: Mon Mar 10, 2008 6:40 pm
by bewing
At the beginning of my OS project, I was also hoping for a little while that I could turn off all the mappings from 0xA0000 to 0xFFFFF, and actually have my memory be contiguous -- oh lovely thought. I don't really want to use any BIOS after boot -- and even if I did, I could recopy it out of ROM temporarily, I thought. And what the hell is a Mappable Page in that region? Some legacy Expanded Memory thing? And I want to be using the LFB for graphics, not the silly low memory areas.
However:
1) Way back in the mid '80s, this kind of thing was much more important to do -- the ratio of unusable RAM to physical RAM was much worse. They really NEEDED that RAM back. And nobody managed to figure out how to do it then, in all that time.
B) ACPI, EBDA, VBE mode flipping, and the fact that "locking" the BIOS RAM area is still completely chipset spefic make it ... difficult, shall we say.
IV) This nasty overlaying of RAM with other crud has been designed in as part of PC architecture for a very long time. If you want it done better, you've got to mass produce a box with a better internal design.
Posted: Tue Mar 11, 2008 3:11 am
by zaleschiemilgabriel
What's "moronic" is that THEY do not release the stupid %$#$ %$#@@$% $@@ $@# $% @$ specifications to the public so that anyone can write their own OS. All this arguing is very relative to proprietary specifications. The BIOS, be it as accessible as it is, only offers support for legacy operating systems, like DOS. Everything else is new, including the way to access all physical memory. If you talk directly to the memory controller you can basically access all memory anyway you want.
If PAE is what is used to do that, then a simple YES or NO answer to my previous question would solve this argument, with the specification that if you happen to have a system that doesn't support PAE, you're XXXed.
Now, could someone please close this topic so we can get on with what's important?
Posted: Tue Mar 11, 2008 9:18 am
by jal
Brynet-Inc wrote:The only other method, as mentioned before.. is manual probing, which isn't easy to do correctly.
Or, although theoretical, going to the chipset (the way the BIOS does it). Theoretical because you'd need drivers for every chipset, but possible - in theory.
JAL
Posted: Tue Mar 11, 2008 9:19 am
by jal
zaleschiemilgabriel wrote:What's "moronic" is that THEY do not release
"they"? You have some conspiracy theory to share?
Now, could someone please close this topic so we can get on with what's important?
Hey, I can pretty much decide on my own what to do. Don't need you telling me. Just press the "stop watching this thread" link and you needn't bother here again.
JAL
Posted: Wed Mar 12, 2008 4:44 am
by JamesM
What's "moronic" is that THEY do not release the stupid %$#$ %$#@@$% $@@ $@# $% @$ specifications to the public so that anyone can write their own OS.
It's not moronic, it's a business practice. BIOS specifications are closed - as is the Windows source, Apple MacOSX source, etc etc etc.
Posted: Wed Mar 12, 2008 5:04 am
by 01000101
Why would they make public things such as BIOS source? the company that made it was paid a bazillion dollars to craft such a product, I don't think they need 'community coders' helping in the project, why take the revenue cut?
Posted: Wed Mar 12, 2008 5:16 am
by zaleschiemilgabriel
And to think computers wouldn't even exist today if it wasn't for enthusiastic people...
But no more! Now it's all about the money. TIME = MONEY. Nobody really cares about development anymore, it's the time and money that are important.
Posted: Wed Mar 12, 2008 5:21 am
by nekros
zaleschiemilgabriel wrote:And to think computers wouldn't even exist today if it wasn't for enthusiastic people...
But no more! Now it's all about the money. TIME = MONEY. Nobody really cares about development anymore, it's the time and money that are important.
And that, my friend, is why there is so much crap software out there.
Posted: Sat Mar 15, 2008 11:39 pm
by elderK
Amen!
~Z
Posted: Mon Mar 17, 2008 6:00 am
by JamesM
TIME = MONEY. Nobody really cares about development anymore, it's the time and money that are important.
Wow. Seeing a lot of zealotism in this thread
. Time has always equalled money, and it always will, in all areas of business. Originally computing was not suitable for the masses, and thus not suitable for business, so things ticked along at whatever pace the researchers felt like. Now it is big and suitable for the masses, businesses have become involved which churn out programs and hardware for profit. Nothing wrong with that, that's the way the world works.
The important thing is the quality of products. In every industry there are going to be the bad companies (chinese sweatshops, Electronic Arts etc) and the good companies. You have the choice not to buy from those "bad" companies.
And the quality of computing products as a whole has hardly deteriorated - you cannot say that hobbyist programmers make the best software!
Posted: Mon Mar 17, 2008 6:57 am
by 01000101
[pre post]Starcraft rocks![/pre post]
I agree.
When 100 people get paid to create a product, they are NOT being rivaled by the guy down the road who decides to code in his free-time.
Money is spent to better product output time and quality.
Posted: Mon Mar 17, 2008 5:05 pm
by zaleschiemilgabriel
JamesM wrote:Time has always equalled money, and it always will, in all areas of business.
Time also equals fun sometimes, and other things.
Also, things other than time could equal money, like fun.
So if you consider, say writing an operating system, to be fun you're bound to get more confidence and passion, and even time spent into it than if you think you're doing it for the money. Money is boring and wasteful.