Is it possible to use the cpu to generate an interrupt for a specific cpu core in a multi-core processor?
Asked
Active
Viewed 201 times
0
-
1The answer is yes, but it depends on the environment. Please tell more about the situation you have, and share some code you have. – battlmonstr Mar 27 '19 at 20:57
-
What environmental specifics do you need? I'm not quite sure what that means. As far as code I don't even know how to go about sending an interrupt, what I'm trying to accomplish is more of general learning because I intend to do some fun things like making an OS, I'm currently playing around in the windows 7 (7601) kernel through a program I run that allows me to run bytecode in the kernel through CVE 2018-8120. – KeepForgettingMyUserName Mar 27 '19 at 21:14
-
you should be able to run code on any core in kernel mode. I'd find out how to do that first. in user mode you could spawn a thread and divide by zero from there, that would be like an interrupt. – battlmonstr Mar 27 '19 at 21:19
-
If I do that though I don't know what core my thread runs from in user mode, and even if there's a way to tell the windows OS what core affinity to use I want to know how to do it in a way that bypasses the OS. I'm currently looking at the intel's manual for x2apic, am I on the right track? – KeepForgettingMyUserName Mar 27 '19 at 21:21
-
1see this: https://stackoverflow.com/questions/980999/what-does-multicore-assembly-language-look-like seems possible, but there's no easy way without using OS threading functions – battlmonstr Mar 27 '19 at 21:25
-
1I guess that the term you're looking for is IPI (=Inter processor interrupt). But that is only available at a very basic level (OS level). IIRC this can be issued by the Local APIC. – zx485 Mar 27 '19 at 21:25
-
In this case, your CPU model number isn't really relevant. The hardware IPI mechanism / programming interface hasn't changed in a long time, as far as I know. – Peter Cordes Mar 27 '19 at 21:52