Lines Matching refs:cbh
56 static void cb_table_init(struct cb_header *cbh) in cb_table_init() argument
58 memset(cbh, 0, sizeof(struct cb_header)); in cb_table_init()
59 memcpy(cbh->signature, "LBIO", 4); in cb_table_init()
60 cbh->header_bytes = sizeof(struct cb_header); in cb_table_init()
73 static u32 cb_table_add_entry(struct cb_header *cbh, struct cb_record *cbr) in cb_table_add_entry() argument
75 cbh->table_bytes += cbr->size; in cb_table_add_entry()
76 cbh->table_entries++; in cb_table_add_entry()
89 static void cb_table_finalize(struct cb_header *cbh) in cb_table_finalize() argument
91 struct cb_record *cbr = (struct cb_record *)(cbh + 1); in cb_table_finalize()
93 cbh->table_checksum = compute_ip_checksum(cbr, cbh->table_bytes); in cb_table_finalize()
94 cbh->header_checksum = compute_ip_checksum(cbh, cbh->header_bytes); in cb_table_finalize()
99 struct cb_header *cbh = (struct cb_header *)addr; in write_coreboot_table() local
108 cb_table_init(cbh); in write_coreboot_table()
109 cbr = (struct cb_record *)(cbh + 1); in write_coreboot_table()
145 cbr = (struct cb_record *)cb_table_add_entry(cbh, cbr); in write_coreboot_table()
168 cbr = (struct cb_record *)cb_table_add_entry(cbh, cbr); in write_coreboot_table()
171 cb_table_finalize(cbh); in write_coreboot_table()