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

Function parse_memory

payloads/coreinfo/coreboot_module.c:104–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104static void parse_memory(unsigned char *ptr)
105{
106 struct cb_memory *mem = (struct cb_memory *)ptr;
107 int max = (MEM_RANGE_COUNT(mem) > MAX_MEMORY_COUNT)
108 ? MAX_MEMORY_COUNT : MEM_RANGE_COUNT(mem);
109 int i;
110
111 for (i = 0; i < max; i++) {
112 struct cb_memory_range *range =
113 (struct cb_memory_range *)MEM_RANGE_PTR(mem, i);
114
115 memcpy(&cb_info.range[i], range, sizeof(*range));
116 }
117
118 cb_info.mem_count = max;
119 cb_info.mem_actual = MEM_RANGE_COUNT(mem);
120}
121
122static void parse_mainboard(unsigned char *ptr)
123{

Callers 1

parse_headerFunction · 0.70

Calls 1

memcpyFunction · 0.50

Tested by

no test coverage detected