Linux X86/x86_64 Will Now Always Reserve the First 1MB of RAM (phoronix.com) 77
AmiMoJo shares a report from Phoronix: The Linux x86/x86_64 kernel code already had logic in place for reserving portions of the first 1MB of RAM to avoid the BIOS or kernel potentially clobbering that space among other reasons while now Linux 5.13 is doing away with that 'wankery' and will just unconditionally always reserve the first 1MB of RAM. The Linux kernel was already catering to Intel Sandy Bridge graphics accessing memory below the 1MB mark, the first 64K of memory are known to be corrupted by some BIOSes, and similar problems coming up in that low area of memory. But rather than dealing with all that logic and other possible niche cases besides the EGA/VGA frame-buffer and BIOS, the kernel is playing it safe and just always reserving the first 1MB of RAM so it will not get clobbered by the kernel.
LIM EMS will benefit too (Score:5, Funny)
Re:LIM EMS will benefit too (Score:5, Funny)
Finally I can run DesqView !!!
Re: (Score:2)
The first 1MB of memory is after all MS-DOS territory. And that's where you'd use EMS.
I can hear it now... (Score:4, Interesting)
..."but what f I need that RAM?"
I did have Linux on a system with 8MB RAM, way back in the mid-nineties, but even having been in the situation I could accept the resource loss.
Now if only I could bear to part with my 2GB iomega Jaz drive...
Re: (Score:2)
Re: (Score:3)
Re: (Score:3)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
But as The123king said, it's not likely to filter through to many of those embedded devices for a while yet due to the lag in that world.
Re: I can hear it now... (Score:2)
Re: (Score:2)
Basically I'm saying there will be an impact here, but it'
Re: (Score:2)
I did have Linux on a system with 8MB RAM, way back in the mid-nineties
Now I'm having flashbacks. I think the lowest spec'd system I ever installed Linux on was an 80386SX at 40 MHz with 4MB RAM, but there's a possibility I tried it on one of our 16 MHz 386SX machines, just to see how it would run. The 40 MHz machine worked as a serial port server, with a couple of 16550 UART cards talking to some VT220 terminals. (We were using pine for email in those days, and had onions tied to our belts, as that was the fashion of the time.) For a while, my main portable was an old ActionN [vogons.org]
Re: (Score:3)
Lowest I ever put Linux on was a Macintosh Centris 660AV, a 25MHz 68040. I think I had an 8MB SIMM in addition to the 4MB soldered on for a whopping 12MB, but it possibly has a 16MB SIMM and 4MB on board for 20MB. Can't remember now.
16.9 bogomips if I remember the output of /proc/cpuinfo correctly.
At the time I did this I was rocking a 350MHz AMD K6-2, probably with something like 512MB RAM. Eventually I upgraded that AMD machine to 1.5GB RAM, there's a market sweet-spot where RAM is old enough that dema
Re: (Score:1)
Re: (Score:2)
Those are not running x86 architecture cpus however.
Re: (Score:2)
Now if only I could bear to part with my 2GB iomega Jaz drive...
You have a functional iomega Jaz drive? This should be on the Slashdot front page!
Re: (Score:2)
He never said it was functional
Re: (Score:2)
Re: (Score:2)
It worked the last time I used it.
It's an internal SCSI model, I suspect that helped prolong its life since it was less subject to casual jostling/shock compared to iomega's external products.
Damn thing set me back $400. To a poor college student that was a lot of money. Now I look at my 256GB memory card for my DSLR and I wonder why I bother keeping the Jaz2.
Re: (Score:2)
It's an internal SCSI model, I suspect that helped prolong its life since it was less subject to casual jostling/shock compared to iomega's external products.
A school I went to at the time used the internal Jaz drives for audio and video production. The fact they were internal didn't help the failure rate. The disks themselves had to be well protected. A damaged disk could damage the drive as well. That damaged drive could then damage more disks, and cascade through all of them.
Re: (Score:2)
I think that's why mine never failed, I was the only user of my drive and I never shared disks with anyone, so my disks never left my desk. They were either on the shelf or in the drive.
Re: (Score:2)
But... (Score:1)
Re:But... (Score:5, Funny)
Not his fault you're trying to run x86-64 binaries on a Z80. Recompile, maybe it works.
Re: (Score:2)
Just load Z80 microcode into one of the CPU kernels.
Imagine the speed of CP/M on a modern kernel at 3.0+ GHz with caches. About 1000 times faster than back in the days.
Re: But... (Score:2)
Every character to the console or serial port was its own system call on CP/M. A modern architecture like amd64 has pretty significant overhead for syscalls versus the simple jumps through the Zero Page(CP/M) or PSP(DOS). I'm sure the multi-GHz modern CPU is still faster by a lot, but the gains are somewhat suppress by the worse architecture.
Re: (Score:2)
Re: (Score:2)
Not one call per character all the time. I seem to remember that you could output a $ terminated string. (No, really.)
The internet remembers better than I do. That was BDOS function 9
LD DE, address_of_string
LD CL, 9
CALL 5
But, yes, there are a lot of functions that just output a single character.
Easier solution (Score:3, Funny)
Just by systems that don't have the first MB of RAM.
Re:Easier solution (Score:4, Interesting)
I predict that soon someone will map that free 1MiB somewhere else to fulfill some purpose. Then the logic to plug the corner cases will get really complex and someone will get their computer security PhD by coming up with some new aliasing attack, which will then become the basis of a new strain of ransomware.
This is always how these things happen.
Late to the party (Score:5, Informative)
https://www.phoronix.com/scan.... [phoronix.com]
tl;dr : Windows has been unconditionally reserving the first 1MB of RAM on both Intel and AMD systems for about 11 years now.
Re: (Score:2)
Of course, one could argue it's unfair to compare a minimal Linux distribution with a Windows bundle, but that is the limitation they set themselves.
* Last I checked, Windows "embedded" requires a top of the line desktop from the year 2000, and x86 only, and special BIOS, so they can still account for b
Re: (Score:3)
Re:Late to the party (Score:4, Interesting)
And there's good use cases for x86 with 512MB of memory - virtual machines. Yes, I know things like Docker, Kubernetes, or whatever is the container-flavour-of-choice now are popular, but "proper" or "traditional" VMs are still necessary for decent isolation. If you can run a proper VM with 512MB of memory, then you can fit a lot more VMs on that one machine.
Re: (Score:2)
Re: (Score:2)
Back when I was a tester, I'd run a few VMs for testing on my measly 16GB of laptop, while still requiring most of the rest of that 16GB for developing/compiling/debugging. Do you really think an employer would shell out for yet another computer if they could avoid it? It's not all abo
Re: (Score:2)
Re: (Score:2)
Yet that insanity is reality for a lot of people in big corporations, trying to get the work done with what their IT department has decided they will get access to.
And for a lot of researchers who have no fix office to run their systems on, but have to rely on their laptop - simply because there is no space anywhere to put one of those old workstations.
And for piles and piles of students, who often end up in much deeper water than they ought to, needing to find limits on systems before they can get any kind
Re: (Score:2)
Right people don't understand the cost of behind the glass in the dataceneter vs PCs.
Every company everywhere would have a raspi sized SOC-C thing glued to the back of displays, and be using some kind of virtual desktop solution rather than PCs if it worked like the GP thinks. It would way easier cheaper to manage but its not.
Lets say you have like 2000 PC users - that is a lot of idle resources but to have enough to give them a similar experience even thin provisioned in the DC its still a slam dunk the PC
Re: (Score:2)
Yeah, but Windows memory requirements have been in the GBs for longer, so they can afford that assumption.
11 years ago the average shitbox PC had 1-2GB of RAM, hell most $300 Netbooks had that much. Linux could afford that assumption just as well.
I think you just haven't realised how old you've gotten and what PC specs were like 11 years ago.
Re:Late to the party (Score:5, Funny)
Re: (Score:1)
https://www.phoronix.com/scan.... [phoronix.com]
tl;dr : Windows has been unconditionally reserving the first 1MB of RAM on both Intel and AMD systems for about 11 years now.
How long did it take for Microsoft to pick up the (password) salt shaker? Have they found it yet?
It's a bit silly for Microsoft to be bragging about party attendance when they were blackout drunk slamming shots of 190-proof Backwards Compatibility for a couple of decades.
Re: (Score:3)
Linux was trying to be clever by only allocating areas known to cause problems, but it just wasn't worth the effort for the sake of about 512k of RAM split into small chunks that it allowed to be used.
Please list the faulty BIOS/ products (Score:2)
Re: Please list the faulty BIOS/ products (Score:2)
Honestly I think the open source folks need to publish stand alone unit tests for BIOS and Linux compatibility. Something that a firmware engineer can setup easily that exposes the problems Linux typically faces. Not everyone would run it but if it saves one shitty laptop it's worth it for both the OEM and Linux community.
Anybody else remember⦠(Score:1)
When Linux ran on a 386 system with only 1MB ram total
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Ok I totally thought that was going in the direction of a "Pepperidge Farms remembers . . ." joke.
Greedy. (Score:5, Funny)
Greedy. 640K ought to be enough for anybody.
ARM (Score:5, Interesting)
Not directly related, but this is one of the reasons the ARM architecture is more efficient than x86 these days. BIOS corruption issues? This stuff should have gone away 20 years ago. When a PC in BIOS mode boots up, it still acts like it's going to boot into DOS. Microsoft, and Intel, need to pull an Apple, rip the band-aid off, and summarily dump all that legacy junk. It's gobbling up opcodes, silicon, and creating system weirdness that doesn't need to be there.
Sure, maybe some new machines need to still boot into real mode for some reason. License that junk out to someone else, just like you can still buy second-sourced i486 cores if you need them.
Re: ARM (Score:2)
Re: (Score:2)
Re:ARM (Score:5, Informative)
Modern PCs don't act like they are going to boot DOS. In fact most ship with the compatibility module needed to boot DOS disabled.
The issue is that the UEFI often has bugs, as do some firmwares and drivers like the mentioned Intel graphics.
Getting rid of the BIOS wouldn't help, it would just be replaced by something else equally buggy. If Macs do get away with it (does anyone know if they keep that 1MB available?) it's only because Apple can get bugs fixed, not because ARM is somehow better.
This isn't new either. AmigaOS reserved the first 4 bytes of RAM because writing to null pointers was such a common error and would crash the system if something important was kept there. AmigaOS apps look at address 4 to find the base address of system libraries that let them bootstrap.
Re: (Score:3)
Modern PCs don't act like they are going to boot DOS. In fact most ship with the compatibility module needed to boot DOS disabled.
The problem isn't BIOS per se, it's the cruft needed in the CPU to support old addressing modes to support BIOS boot. Does anything else use the old 16-bit addressing modes any more?
Intel has already done this with Itanium. No 16-bit support at all, using EFI. I know someone who wrote drivers for Itanium systems (3d workstation cards), and said the weirdness in developing on a new ISA was negated by not having to futz around with the giant list of weird memory and addressing crap you have to worry about wi
Re: (Score:2)
Not really. ARM in practice has had the following benefits:
-More companies doing design work targeting the low cost market that is embedded. ARM therefore prioritized all sorts of nuanced sleep behaviors. Meanwhile those sleep behaviors (e.g. 'suspend', but still able to wake every 10 seconds or so to process very specific work) were not a feature desired by the desktop/laptop market). Around Windows 8 release, x86 chips largely gained these capabilities as well.
-OS and application ecosystem designed aroun
Re: (Score:3)
All this legacy junk is awkward to be sure, but by runtime it's pretty much gone, with little more than some awkward memory map to contend with.
Memory modes aren't handled in microcode. They have to be supported by the MMU, which is all silicon. Ever see how much space the memory controller eats up on an x86 die? That's four operating modes, each with, at least, a half dozen addressing modes each, along with a few extensions. In every modern OS the CPU is using one of those. When booting UEFI, two are *never* used, and Virtual X86 is only used when you are using an emulator.
Heck, modern x86 still supports PAE, which, I think, a couple of databases
Forsight (Score:5, Funny)
This is essentially why I built my current system with 32.001GB of memory.
A whole 1 MB? (Score:2)
so 640Kb wasn't enough? (Score:2)
I'm having weird flashbacks....
rename emacs (Score:2)
Emacs should then be renamed to nmacs.
Re: (Score:3)
Don't be absurd. That would change the variable type from REAL to INTEGER.
Some people just like to wreck havoc, I guess.
Re: (Score:2)
That's ok as long as they're in the same COMMON block.
So....Yea (Score:1)
New C lesson (Score:1)
So in C, "pointers" are just numbered boxes for storing numbers. You set the pointer to the number of box you want to use. The you can put things in the boxes.
int main(const int argc, char* const* argv)
{
int *pi0 = 0;
int *pi1 = 1;
*pi0 = 2;
*pi1 = 3;
print( "sum=%d\n", *pi0+*pi1 );
}
2MByte (Score:3)
My lowest spec linux/unix/posix system was a 386sx16 with 2MByte of memory. Using a manually optimized and build kernel I could do some textmode work - even at 100x60 character through the use of the ancient SVGATextMode toolchain but barelly anything else. I am ignoring the WRT54 router I tried using with 2MByte because it got me nowhere. Even addin 0,5MByte additional memory was greatly appreciated. Thankfully I got some 8MByte of memory for free shortly after that and besides that particulary awful 386sx16 I always had 8-16MByte.
Btw, my lowest resource x86 was a non-IBM-compliant 8088 with 16kByte of memory and a tape drive at school. Funny enough it was able to run some very early self booting games like Psi5 Trading Company in pure text mode.
On the other hand, my first computer ever was a CBM3032 with only 32kByte. Now imagine reserving 1MByte of memory on that one...
Re: (Score:2)
never mind CBM, look at the early Apple ][ models.
There were *two* 12k configurations available. The first was a straight 12k, contiguous. The second, though, had a 4k hole after the first 4k, so that both pages of hires graphics could be used.
The memory was in the same holes; there were three dip sockets for which a header was made that specified the locations of each bank of memory, with three identical plugs used. You could use both 16k and 4k banks at the same time, for 20k, 24k, and (I think) 36k c