34 printk(
BIOS_INFO,
"MMAP window: SPI flash base=0x%lx, Host base=0x%lx, Size=0x%zx\n",
35 flash_base, host_base, size);
88 uintptr_t fixed_win_host_base, fixed_win_flash_base;
89 uintptr_t ext_win_host_base, ext_win_flash_base;
90 size_t fixed_win_size, ext_win_size;
106 fixed_win_host_base = 4ULL *
GiB - fixed_win_size;
107 fixed_win_flash_base = bios_start +
bios_size - fixed_win_size;
113 _Static_assert(CONFIG_EXT_BIOS_WIN_BASE != 0,
"Extended BIOS window base cannot be 0!");
114 _Static_assert(CONFIG_EXT_BIOS_WIN_SIZE != 0,
"Extended BIOS window size cannot be 0!");
123 ext_win_size =
MIN(CONFIG_EXT_BIOS_WIN_SIZE,
bios_size - fixed_win_size);
126 ext_win_host_base = CONFIG_EXT_BIOS_WIN_BASE + CONFIG_EXT_BIOS_WIN_SIZE -
128 ext_win_flash_base = fixed_win_flash_base - ext_win_size;
130 ext_win_flash_base, ext_win_size);
uint32_t spi_flash_get_mmap_windows(struct flash_mmap_window *table)
const struct region_device * boot_device_ro(void)
#define printk(level,...)
size_t fast_spi_get_bios_region(size_t *bios_size)
static struct region_device rdev
#define BIOS_INFO
BIOS_INFO - Expected events.
_Static_assert(sizeof(hls_t)==HLS_SIZE, "HLS_SIZE must equal to sizeof(hls_t)")
static size_t region_sz(const struct region *r)
static size_t region_device_sz(const struct region_device *rdev)
void xlate_window_init(struct xlate_window *window, const struct region_device *access_dev, size_t sub_region_offset, size_t sub_region_size)
void mem_region_device_ro_init(struct mem_region_device *mdev, void *base, size_t size)
static void * rdev_mmap_full(const struct region_device *rd)
void xlate_region_device_ro_init(struct xlate_region_device *xdev, size_t window_count, const struct xlate_window *window_arr, size_t parent_size)
static size_t region_offset(const struct region *r)
static struct xlate_window real_dev_windows[TOTAL_DECODE_WINDOWS]
static void initialize_window(enum window_type type, uintptr_t host_base, uintptr_t flash_base, size_t size)
static struct xlate_region_device real_dev
void fast_spi_get_ext_bios_window(uintptr_t *base, size_t *size)
static struct mem_region_device shadow_devs[TOTAL_DECODE_WINDOWS]
static void bios_mmap_init(void)
struct region_device rdev
struct region_device rdev