Lines Matching refs:cbh
58 static void cb_table_init(struct cb_header *cbh) in cb_table_init() argument
60 memset(cbh, 0, sizeof(struct cb_header)); in cb_table_init()
61 memcpy(cbh->signature, "LBIO", 4); in cb_table_init()
62 cbh->header_bytes = sizeof(struct cb_header); in cb_table_init()
75 static u32 cb_table_add_entry(struct cb_header *cbh, struct cb_record *cbr) in cb_table_add_entry() argument
77 cbh->table_bytes += cbr->size; in cb_table_add_entry()
78 cbh->table_entries++; in cb_table_add_entry()
91 static void cb_table_finalize(struct cb_header *cbh) in cb_table_finalize() argument
93 struct cb_record *cbr = (struct cb_record *)(cbh + 1); in cb_table_finalize()
95 cbh->table_checksum = compute_ip_checksum(cbr, cbh->table_bytes); in cb_table_finalize()
96 cbh->header_checksum = compute_ip_checksum(cbh, cbh->header_bytes); in cb_table_finalize()
101 struct cb_header *cbh = (struct cb_header *)addr; in write_coreboot_table() local
110 cb_table_init(cbh); in write_coreboot_table()
111 cbr = (struct cb_record *)(cbh + 1); in write_coreboot_table()
147 cbr = (struct cb_record *)cb_table_add_entry(cbh, cbr); in write_coreboot_table()
170 cbr = (struct cb_record *)cb_table_add_entry(cbh, cbr); in write_coreboot_table()
173 cb_table_finalize(cbh); in write_coreboot_table()