LOADALL

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
JJeronimo
Member
Member
Posts: 202
Joined: Wed Oct 18, 2006 3:29 pm

LOADALL

Post by JJeronimo »

LOADALL existed in 286 as 0Fh 05h and then re-emerged in the 386 as 0Fh 07h, where the 286 version was emulated by most BIOSes.

Then, in the AMD K6-2 (by the time of the PentiumPro), it vanished because it's original opcodes were defined for SYSCALL and SYSRET. Right?

So... we can't run DPMI program's in Windows 95 if we are running the OS in a Pentium III, isn't it? (it would crash, ahaha!)


PS: This is not strictly related to OSdev. However, the LOADALL instruction is of special interest to the field, so I asked the question here.

JJ
User avatar
B.E
Member
Member
Posts: 275
Joined: Sat Oct 21, 2006 5:29 pm
Location: Brisbane Australia
Contact:

Post by B.E »

I did a quick search on this instruction (As it's a undocumented instruction, I don't think it's in the manual), An explanation can be found at Load Instruction
Image
Microsoft: "let everyone run after us. We'll just INNOV~1"
JJeronimo
Member
Member
Posts: 202
Joined: Wed Oct 18, 2006 3:29 pm

Post by JJeronimo »

B.E wrote:I did a quick search on this instruction (As it's a undocumented instruction, I don't think it's in the manual), An explanation can be found at Load Instruction
I had already read that article and it doesn't answer my question...

LOADALL isn't supported in processor families later than the one where SYSCALL/SYSRET were invented, is it?

JJ
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,
JJeronimo wrote:
B.E wrote:I did a quick search on this instruction (As it's a undocumented instruction, I don't think it's in the manual), An explanation can be found at Load Instruction
I had already read that article and it doesn't answer my question...

LOADALL isn't supported in processor families later than the one where SYSCALL/SYSRET were invented, is it?
The article clearly states that there's one LOADALL instruction that's supported on 80286 only, and a different LOADALL instruction that's supported on 80386 only (that has a different opcode and takes data in a different format).

80486 and later CPUs don't have any LOADALL of any kind; unless you count the RSM instruction which is surprisingly similar except you must be in SMM mode to use it (and you can't get into SMM mode without an "extremely chipset-specific" hack, which may not even be possible for some BIOSs/chipsets)....

For all sane purposes, LOADALL is a waste of time for an OS developer - I doubt it's supported on CPUs from other manufacturers, and I doubt any OS has a reason to use it (even if it was supported on all CPUs the OS supports).


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
JJeronimo
Member
Member
Posts: 202
Joined: Wed Oct 18, 2006 3:29 pm

Post by JJeronimo »

Brendan wrote:The article clearly states that there's one LOADALL instruction that's supported on 80286 only, and a different LOADALL instruction that's supported on 80386 only (that has a different opcode and takes data in a different format).
And that is much less known than the 286 one.

[/quote]80486 and later CPUs don't have any LOADALL of any kind; unless you count the RSM instruction which is surprisingly similar except you must be in SMM mode to use it (and you can't get into SMM mode without an "extremely chipset-specific" hack, which may not even be possible for some BIOSs/chipsets)....[/quote]

http://www.nondot.org/sabre/os/files/Pr ... OADALL.txt
This article states (second paragraph) that there is a 286 version (the 0F 05) and a "386/486/Pentium [(0F 07)] LOADALL instruction"...
For all sane purposes, LOADALL is a waste of time for an OS developer - I doubt it's supported on CPUs from other manufacturers, and I doubt any OS has a reason to use it (even if it was supported on all CPUs the OS supports).
Once I tried to enter Unreal Mode with it on a 486SX.

JJ
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,
JJeronimo wrote:http://www.nondot.org/sabre/os/files/ProtectedMode/LOADALL.txt
This article states (second paragraph) that there is a 286 version (the 0F 05) and a "386/486/Pentium [(0F 07)] LOADALL instruction"...
From NASM's manual:
This instruction, in its two different-opcode forms, is apparently supported on most 286 processors, some 386 and possibly some 486. The opcode differs between the 286 and the 386.
From the article linked to by B.E.:
Due to the large number of systems programs that use 286 LOADALL, all 386 and 486 BIOS's must emu1ate the 286 LOADALL instruction (opcode 0F05). On the 386 and 486, the 286 LOADALL instruction generates an invalid opcode exception. The BIOS traps this exception and does its best to emulate the functionality of the LOADALL instruction, but perfect emulation is impossible without using LOADALL itself. Using 386 LOADALL to emulate 286 LOADALL can be done, but has its risks. First of all, the 486 does not have a LOADALL instruction. Second, Intel has threatened to remove LOADALL from the 386 mask.
JJeronimo wrote:
For all sane purposes, LOADALL is a waste of time for an OS developer - I doubt it's supported on CPUs from other manufacturers, and I doubt any OS has a reason to use it (even if it was supported on all CPUs the OS supports).
Once I tried to enter Unreal Mode with it on a 486SX.
I'll assume it didn't work, or you would have written "I entered Unreal mode" instead of "I tried to enter Unreal Mode".... :wink:


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
JJeronimo
Member
Member
Posts: 202
Joined: Wed Oct 18, 2006 3:29 pm

Post by JJeronimo »

Brendan wrote:
Once I tried to enter Unreal Mode with it on a 486SX.
I'll assume it didn't work, or you would have written "I entered Unreal mode" instead of "I tried to enter Unreal Mode".... :wink:
Fine guess...
;-)

JJ
Post Reply