flat assembler
Message board for the users of flat assembler.

Index > Main > Support for syscall/sysret by Intel?

Author
Thread Post new topic Reply to topic
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
Since when Intel started support for syscall/sysret? Their manuals keep silence except for sysenter/sysexit which have stepping and family that started to support them but not for syscall... They messed up support thru cpuid identication (my C2D E6300 (B2) shows 0 bit on syscall/sysret support 80000001). Microcode problem? Their support answered some stu... not wise words including something that i must sign as NDA to get some information - complete stupidity at all (that she answered:).
Is this in errata for the very first steppings of the first processors?
What your cpuid says on 8000_0001 syscall/sysret support?

However W7 x64 OS by MS actively uses only syscall (not sysenter) in its kernel then it ignores all flags returned by cpuid supposedly? Weird situation.

_________________
Any offers?
Post 01 Oct 2009, 07:56
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17715
Location: In your JS exploiting you and your system
revolution
SYSCALL/SYSRET are listed in the manuals, version 31, June 2009. Freely downloadable from the Intel site. Clearly states only valid in 64bit mode.

[edit] Going back through my manuals I see it was listed sometime after 2004 and on or before version 16, June 2005.
Post 01 Oct 2009, 08:02
View user's profile Send private message Visit poster's website Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
then you say that syscall/sysret is supported since 2004 CPUs? Regardless cpuid values? Or what? That's not the answer.
Again i been misread? Use cpuid and give results then there will be a statistics of right and wrong cpuid behaviors of ia-32e CPUs even w/o knowing the reason.
Post 01 Oct 2009, 08:32
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17715
Location: In your JS exploiting you and your system
revolution
From what I can tell, all 64bit capable CPUs support them when in 64bit mode. EDX bit 11, from CPUID 80000001, will be =1 when in 64bit mode and =0 when in 32bit mode.

Are you saying that some CPUs will not correctly report EDX bit 11?
Post 01 Oct 2009, 08:50
View user's profile Send private message Visit poster's website Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
OK! Found this paper Cross-vendor migration
Where popularly explained that cpuid behaves differently in ia-32e and ia-32e compat. mode. If cpuid executes in 32-bit mode (incl. ia-32e compat.) it states that no syscall available and in pure ia-32e then syscall available.
I thought cpuid has constant capabilities reports but not. for intel. What about AMD?

_________________
Any offers?
Post 01 Oct 2009, 08:56
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17715
Location: In your JS exploiting you and your system
revolution
IIRC AMD invented the syscall/sysret and support them in both 32 and 64 bit modes.

You cannot assume CPUID gives constant values, there are many settings that can affect values returned, in both AMD and Intel.
Post 01 Oct 2009, 09:08
View user's profile Send private message Visit poster's website Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
examples? Which settings exactly?

Here only the strict reason can explain that syscall bit is only set under ia-32e mode code/cpuid/ execution by intel but even setting MSRs to disable smth. like NX/XD will affect actual CPU behavior and not cpuid values I guess... who tryed?
Post 01 Oct 2009, 09:21
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17715
Location: In your JS exploiting you and your system
revolution
One example is just what you have been talking about above. Wink
Post 01 Oct 2009, 09:33
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17715
Location: In your JS exploiting you and your system
revolution
Another example is that you can change the brand string to arbitrary values.
Post 01 Oct 2009, 09:34
View user's profile Send private message Visit poster's website Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
In intel cpus? never heard of. Actually i doubt about cpuid volatility (except for those caps that can be run only under exact conditions: syscall/sysret caps under ia-32e only).
Another example - disable TSC in CR4 only leads to exception on execution in R3 not change the cpuid output.

Or your example implies microcode change during 2 cpuid executions?
Post 01 Oct 2009, 09:57
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17715
Location: In your JS exploiting you and your system
revolution
asmfan wrote:
In intel cpus?
Sure, why not. I think there are some SSE control registers that change some values in the CPUID, but I can't find any supporting docs to show that. I just seem to have this nagging thought in my head telling me I read it somewhere once while reading the Intel docs.
asmfan wrote:
never heard of. Actually i doubt about cpuid volatility (except for those caps that can be run only under exact conditions: syscall/sysret caps under ia-32e only).
http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/20734.pdf
Post 01 Oct 2009, 10:06
View user's profile Send private message Visit poster's website Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
What's about amd tech doc? There is 25481 describing cpuid. but can't find anithing about volatility of cpuid depending on anything else.
And that one (cpuid 80000001/syscall) Intel-only related. AMD doesn't have such at all as I know for now.
Let's say it's constant till said otherwise and revealed dependencies.
Post 01 Oct 2009, 10:42
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17715
Location: In your JS exploiting you and your system
revolution
The AMD doc shows how to change the brand string returned by CPUID.
Post 01 Oct 2009, 11:28
View user's profile Send private message Visit poster's website Reply with quote
asmfan



Joined: 11 Aug 2006
Posts: 392
Location: Russian
asmfan
Now i see it in 2.3 and table 6 shows which are modifiable. However this maybe can be applied only for old athlons (x32 only IIRC?) and not affects any other capabilities than mere naming moreover this ability not described in late cpuid specs for up-to-date cpus. Can't test it mysef no amd cpu but this is doubtful for me for recent cpus
The other point is that all capabilities are fixed and the MSRs/other regs (XCRx) are only enable/disable them but cpuid enumerates them all regardless enabled status.
Post 01 Oct 2009, 13:17
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.