http://www.rcollins.org/articles/loadal ... 3_doc.html
I found this document which speaks about this strange instruction.
It is powerfull... very powerfull I'd like to use it. Does anyone know if is implemented on newer processors under an other opcode or something similar? Is there any way to emulate it in a complete way?
The LOADALL instruction
Re: The LOADALL instruction
No, it has only been found on i286 and i386 according to the undocumented PC (book)... I also looked to see if any new processers found it, but I found nothing on the internet.. No it cannot be emulated on real hardware, because the CPU checks whether PM is enabled or not before letting you use paging, this was the biggest reseon it was used.
On both the i286 and i386 they also have different opcodes.
On both the i286 and i386 they also have different opcodes.
My hero, is Mel.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: The LOADALL instruction
There is a "loadall" instruction on all modern processors - it's called RSM. It's however heavily protected and therefore not usable from the context of an OS.
Re: The LOADALL instruction
thank you for the answers, what do you mean with heavily protected?
-
- Member
- Posts: 255
- Joined: Tue Jun 15, 2010 9:27 am
- Location: Flyover State, United States
- Contact:
Re: The LOADALL instruction
The processor has to be in system-management mode in order to execute the instruction, and the only way for that to happen as far as I recall is external to the CPU. It's only interesting/useful if you are writing firmware for SMM.
Re: The LOADALL instruction
I'm not sure it's powerful. The problem with this kind of opcodes that they save and load a full set of processor state (registers, paging etc. depending on opcode), and it's usually MUCH faster to keep track what's changed and save and load only those. That's the reason why no mainline OS use hardware task switching.Karlosoft wrote:http://www.rcollins.org/articles/loadall/tspec_a3_doc.html
I found this document which speaks about this strange instruction.
It is powerfull... very powerfull I'd like to use it. Does anyone know if is implemented on newer processors under an other opcode or something similar? Is there any way to emulate it in a complete way?
Re: The LOADALL instruction
The power of loadall is that you can load everything all the registers the hidden ones too. You can also load you cache descriptors XD this is powerfull XD
-
- Member
- Posts: 255
- Joined: Tue Jun 15, 2010 9:27 am
- Location: Flyover State, United States
- Contact:
Re: The LOADALL instruction
Did you read the article? Only two processors (286 and 386) supported LOADALL, and then the opcodes and format of the data were different. Would you like an operating system that only supports 386, or even worse, 286?
Not only that, it's really not that useful. You can load all of the registers, including the "hidden" ones, by setting up your descriptor tables correctly and loading most of the rest in the usual way.
Not only that, it's really not that useful. You can load all of the registers, including the "hidden" ones, by setting up your descriptor tables correctly and loading most of the rest in the usual way.
Re: The LOADALL instruction
I read the article, but it was a bit old, It has been written more than 10 years ago, this is why I wanted to know if it was any other more modern instruction of that kind on newer processors. I never take for granted what an article on a undocumented feature says
The most but not all. And the cache descriptors have to be valid one, and you have to switch in protected mode in order to update them (unreal mode isn' it?)
The most but not all. And the cache descriptors have to be valid one, and you have to switch in protected mode in order to update them (unreal mode isn' it?)