MCPcopy Create free account
hub / github.com/coreboot/coreboot / msr_shr

Function msr_shr

util/msrtool/msrutils.c:136–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136struct msr msr_shr(const struct msr a, const uint8_t bits) {
137 struct msr ret;
138
139 ret.hi = bits < 32 ? a.hi >> bits : 0;
140 ret.lo = bits < 32 ? a.lo >> bits : 0;
141
142 if (bits < 32)
143 ret.lo |= bits ? a.hi << (32 - bits) : 0;
144 else
145 ret.lo |= a.hi >> (bits - 32);
146
147 return ret;
148}
149
150void msr_and(struct msr *a, const struct msr b) {
151 a->hi &= b.hi;

Callers 3

print_bitvalFunction · 0.85
decodemsrFunction · 0.85
diff_msrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected