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

Function read_500

util/inteltool/memory.c:27–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27static u16 read_500 (int channel, u16 addr, int split)
28{
29 uint32_t val;
30 write_mchbar32 (0x500 + (channel << 10), 0);
31 while (read_mchbar32 (0x500 + (channel << 10)) & 0x800000);
32 write_mchbar32 (0x500 + (channel << 10), 0x80000000 | (((read_mchbar8 (0x246 + (channel << 10)) >> 2) & 3) + 0xb88 - addr));
33 while (read_mchbar32 (0x500 + (channel << 10)) & 0x800000);
34 val = read_mchbar32 (0x508 + (channel << 10));
35
36 return val & ((1 << split) - 1);
37}
38
39static inline u16 get_lane_offset (int slot, int rank, int lane)
40{

Callers 2

dump_timingsFunction · 0.70
print_mchbarFunction · 0.70

Calls 3

write_mchbar32Function · 0.85
read_mchbar8Function · 0.85
read_mchbar32Function · 0.70

Tested by

no test coverage detected