coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
storage.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef __COMMONLIB_STORAGE_STORAGE_H__
4 #define __COMMONLIB_STORAGE_STORAGE_H__
5 
6 #include <stdint.h>
7 #include <commonlib/storage.h>
8 
9 #define DMA_MINALIGN (64)
10 #define ROUND(a, b) (((a) + (b) - 1) & ~((b) - 1))
11 #define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) \
12  char __##name[ROUND(size * sizeof(type), DMA_MINALIGN) + \
13  DMA_MINALIGN - 1]; \
14  type *name = (type *) ALIGN_UP((uintptr_t)__##name, DMA_MINALIGN)
15 
16 /* NOOPs mirroring ARM's cache API, since x86 devices usually cache snoop */
17 #define dcache_invalidate_by_mva(addr, len)
18 #define dcache_clean_invalidate_by_mva(addr, len)
19 
20 /* Storage support routines */
23  uint64_t count, int is_read);
24 
25 #endif /* __COMMONLIB_STORAGE_STORAGE_H__ */
static struct storage_media media
Definition: sd_media.c:21
unsigned long long uint64_t
Definition: stdint.h:17
int storage_block_setup(struct storage_media *media, uint64_t start, uint64_t count, int is_read)
Definition: storage.c:250
int storage_startup(struct storage_media *media)
Definition: storage.c:121
#define count