coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
spd_cache.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __SPD_CACHE_H
4 #define __SPD_CACHE_H
5 
6 #include <spd_bin.h>
7 #include <stddef.h>
8 #include <stdint.h>
9 
10 #define SPD_CACHE_FMAP_NAME (CONFIG_SPD_CACHE_FMAP_NAME)
11 #define SC_SPD_NUMS (CONFIG_DIMM_MAX)
12 #define SC_SPD_OFFSET(n) (CONFIG_DIMM_SPD_SIZE * n)
13 #define SC_CRC_OFFSET (CONFIG_DIMM_MAX * CONFIG_DIMM_SPD_SIZE)
14 #define SC_SPD_TOTAL_LEN (CONFIG_DIMM_MAX * CONFIG_DIMM_SPD_SIZE)
15 #define SC_SPD_LEN (CONFIG_DIMM_SPD_SIZE)
16 #define SC_CRC_LEN (sizeof(uint16_t))
17 
18 enum cb_err update_spd_cache(struct spd_block *blk);
19 enum cb_err load_spd_cache(uint8_t **spd_cache, size_t *spd_cache_sz);
20 bool spd_cache_is_valid(uint8_t *spd_cache, size_t spd_cache_sz);
21 bool check_if_dimm_changed(u8 *spd_cache, struct spd_block *blk);
22 enum cb_err spd_fill_from_cache(uint8_t *spd_cache, struct spd_block *blk);
23 
24 #endif
cb_err
coreboot error codes
Definition: cb_err.h:15
bool check_if_dimm_changed(u8 *spd_cache, struct spd_block *blk)
Definition: spd_cache.c:150
enum cb_err load_spd_cache(uint8_t **spd_cache, size_t *spd_cache_sz)
Definition: spd_cache.c:92
enum cb_err spd_fill_from_cache(uint8_t *spd_cache, struct spd_block *blk)
Definition: spd_cache.c:195
enum cb_err update_spd_cache(struct spd_block *blk)
Definition: spd_cache.c:35
bool spd_cache_is_valid(uint8_t *spd_cache, size_t spd_cache_sz)
Definition: spd_cache.c:117
uint8_t u8
Definition: stdint.h:45
unsigned char uint8_t
Definition: stdint.h:8
Definition: ddr4.c:86