mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
parent
507a34b3d0
commit
44ace04b95
@ -50,4 +50,22 @@
|
|||||||
__VA_ARGS__; \
|
__VA_ARGS__; \
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define X86_64_CPUID_REGISTER(name, id, reg, ...) \
|
||||||
|
struct name : Genode::Register<64> \
|
||||||
|
{ \
|
||||||
|
static access_t read() \
|
||||||
|
{ \
|
||||||
|
Genode::uint32_t eax = id; \
|
||||||
|
Genode::uint32_t ebx = 0; \
|
||||||
|
Genode::uint32_t ecx = 0; \
|
||||||
|
Genode::uint32_t edx = 0; \
|
||||||
|
asm volatile ("cpuid" : "+a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)); \
|
||||||
|
return reg; \
|
||||||
|
} \
|
||||||
|
\
|
||||||
|
static void write(access_t const) { } \
|
||||||
|
\
|
||||||
|
__VA_ARGS__; \
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* _SRC__LIB__HW__SPEC__X86_64__REGISTER_MACROS_H_ */
|
#endif /* _SRC__LIB__HW__SPEC__X86_64__REGISTER_MACROS_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user