mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-22 10:59:51 +03:00
Kernel: Allow specifying ecx with CPUID
Some CPUID functions (e.g. 0xb) require input values in ecx.
This commit is contained in:
parent
d14d68c462
commit
123087e235
Notes:
sideshowbarker
2024-07-18 04:45:25 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/123087e2358 Pull-request: https://github.com/SerenityOS/serenity/pull/9797
@ -12,9 +12,9 @@ namespace Kernel {
|
||||
|
||||
class CPUID {
|
||||
public:
|
||||
explicit CPUID(u32 function) { asm volatile("cpuid"
|
||||
explicit CPUID(u32 function, u32 ecx = 0) { asm volatile("cpuid"
|
||||
: "=a"(m_eax), "=b"(m_ebx), "=c"(m_ecx), "=d"(m_edx)
|
||||
: "a"(function), "c"(0)); }
|
||||
: "a"(function), "c"(ecx)); }
|
||||
u32 eax() const { return m_eax; }
|
||||
u32 ebx() const { return m_ebx; }
|
||||
u32 ecx() const { return m_ecx; }
|
||||
|
Loading…
Reference in New Issue
Block a user