Hi,
For now I am implementing syscalls and for the time being it goes very well.
First I implemented the interrupts version and it works, so i was going further
with amd's syscall. But after I coded everything and wanted to test it with an
emulator, i got some problems.
1. When i use Virtual PC or VirtualBox they say, that syscall isn't there. But why?
My computer has syscall/sysret, don't they just use the same cpu like the host?
Or maybe they just don't support it?
2. When i use Bochs it emulates an intel cpu with sysenter/sysexit, but I want
to check my syscall function. Is there a way to change it by an option to amd?
Just change the vendor string doesn't work. Or have I to recompile Bochs to get
an amd cpu emulation?
Thanks for the little help^^.
Tarrox
syscall and the emulators
Re: syscall and the emulators
tarrox wrote:Hi,
For now I am implementing syscalls and for the time being it goes very well.
First I implemented the interrupts version and it works, so i was going further
with amd's syscall. But after I coded everything and wanted to test it with an
emulator, i got some problems.
1. When i use Virtual PC or VirtualBox they say, that syscall isn't there. But why?
My computer has syscall/sysret, don't they just use the same cpu like the host?
Or maybe they just don't support it?
2. When i use Bochs it emulates an intel cpu with sysenter/sysexit, but I want
to check my syscall function. Is there a way to change it by an option to amd?
Just change the vendor string doesn't work. Or have I to recompile Bochs to get
an amd cpu emulation?
Thanks for the little help^^.
Tarrox
SYSCALL/SYSRET is a feature of x86-64 CPU, not necessary AMD. Bochs will report SYSCALL/SYSRET available on any CPU supporting x86-64.
Default release build already compiled to support x86-64, you could use the same (or similar) build script.
Stanislav
Re: syscall and the emulators
SYSCALL/SYSRET is the implementation of AMD, Intel uses SYSENTER/SYSEXIT and bochs is able to emulate the Intel ones, but i want him to emulate an AMD prozessor to test SYSCALL/SYSRET. So I am asking how to make bochs emulate an AMD cpu and not an Intel one.stlw wrote: SYSCALL/SYSRET is a feature of x86-64 CPU, not necessary AMD. Bochs will report SYSCALL/SYSRET available on any CPU supporting x86-64.
Default release build already compiled to support x86-64, you could use the same (or similar) build script.
Stanislav
- 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: syscall and the emulators
The trick I use to get bochs to emulate an AMD processor is to enable 3dnow.
I could pull some other tricks, but that means patching the source. (Which I basically did to get it to emulate a Cyrix) - Speaking of which, those patches are in the tracker and stanislav hates them
I could pull some other tricks, but that means patching the source. (Which I basically did to get it to emulate a Cyrix) - Speaking of which, those patches are in the tracker and stanislav hates them
Re: syscall and the emulators
As the one who wrote Bochs CPU implementation I know what I am talking aboutSYSCALL/SYSRET is the implementation of AMD, Intel uses SYSENTER/SYSEXIT and bochs is able to emulate the Intel ones, but i want him to emulate an AMD prozessor to test SYSCALL/SYSRET. So I am asking how to make bochs emulate an AMD cpu and not an Intel one
It is just a fact.
SYSCALL/SYSRET are in all x86-64 processors - no matters AMD or Intel. BTW, you could just open Intel SDM Vol2b and see SYSCALL/SYSRET there.
Stanislav
Re: syscall and the emulators
Who said I hate them ?Combuster wrote:The trick I use to get bochs to emulate an AMD processor is to enable 3dnow.
I could pull some other tricks, but that means patching the source. (Which I basically did to get it to emulate a Cyrix) - Speaking of which, those patches are in the tracker and stanislav hates them
Stanislav
Re: syscall and the emulators
The reason they are in Intel x86-64 is that Intel copied AMDs 64-bit extensions, which requires them. SYSCALL/SYSRET are however also present in 32-bit AMD processors.stlw wrote:SYSCALL/SYSRET are in all x86-64 processors - no matters AMD or Intel.
JAL