Check-in [d97335e6ed]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:some asm_shims added
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descriptor
Files: files | file ages | folders
SHA1:d97335e6ed44858987497b6b4833371679481ec5
User & Date: Alisad 2018-12-14 16:05:53
Context
2018-12-14
16:05
some asm_shims added Leaf check-in: d97335e6ed user: Alisad tags: descriptor
2018-11-13
06:39
Added trunk's greeter check-in: 8e1bed5819 user: maxi tags: descriptor
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to include/asm_shims/shims.h.

65
66
67
68
69
70
71
72





















	static inline void sidt(void *pointer)
	{
		asm volatile("sidt (%0)"
					 :
					 : "r"(pointer));
	}
}



























|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
	static inline void sidt(void *pointer)
	{
		asm volatile("sidt (%0)"
					 :
					 : "r"(pointer));
	}

    static inline void cpuid(uint32_t initial_eax, uint32_t* eax, uint32_t* ebx, uint32_t* ecx, uint32_t* edx)
    {
        asm volatile("cpuid"
                     : "=a"(*eax), "=b"(*ebx), "=c"(*ecx), "=d"(*edx)
                     : "a"(initial_eax), "c"(0));
    }

    static inline void rdmsr(uint32_t ecx, uint32_t* edx, uint32_t* eax)
    {
        asm volatile("rdmsr"
                     : "=a"(*eax), "=d"(*edx)
                     : "c"(ecx));
    }

    static inline void wrmsr(uint32_t ecx, uint32_t edx, uint32_t eax)
    {
        asm volatile("wrmsr"
                     :
                     : "a"(eax), "c"(ecx), "d"(edx));
    }
}