Perform FDT self-test.
190 ok (
strcmp (
string,
"SiFive HiFive Unleashed A00" ) == 0 );
196 ok (
memcmp (
string,
"SiFive HiFive Unleashed A00", 28 ) == 0 );
200 ok (
memcmp (
string,
"sifive,hifive-unleashed-a00\0" 201 "sifive,hifive-unleashed", 52 ) == 0 );
214 ok (
strcmp (
string,
"riscv,cpu-intc" ) == 0 );
217 ok (
strcmp (
string,
"sifive,uart0" ) == 0 );
223 ok (
strcmp (
string,
"sifive,uart0" ) == 0 );
230 ok (
u64 == 10000000000ULL );
244 ok (
fdt_path ( &
fdt,
"/soc/ethernet@10090000/ethernet-phy@0",
253 ok (
u64 == 0x100a0000 );
255 ok (
u64 == 0x1000 );
257 ok (
u64 == 0x10090000 );
259 ok (
u64 == 0x1000 );
268 ok (
strcmp (
string,
"sifive,uart0" ) == 0 );
272 ok (
strcmp (
string,
"gmii" ) == 0 );
288 ok (
fdt_path ( &
fdt,
"/soc/ethernet@10090000/ethernet-phy@0",
303 ok (
fdt_create ( &
hdr,
"hello world", 0xabcd0000, 0x00001234 ) == 0 );
307 ok (
strcmp (
string,
"hello world" ) == 0 );
309 ok (
u64 == 0xabcd0000 );
311 ok (
u64 == 0xabcd1234 );
int fdt_parent(struct fdt *fdt, unsigned int offset, unsigned int *parent)
Find parent node.
int fdt_alias(struct fdt *fdt, const char *name, unsigned int *offset)
Find node by alias.
size_t len
Length of tree.
int fdt_parse(struct fdt *fdt, struct fdt_header *hdr, size_t max_len)
Parse device tree.
static const uint8_t sifive_u[]
Simplified QEMU sifive_u device tree blob.
struct golan_inbox_hdr hdr
Message header.
int fdt_describe(struct fdt *fdt, unsigned int offset, struct fdt_descriptor *desc)
Describe device tree token.
int fdt_path(struct fdt *fdt, const char *path, unsigned int *offset)
Find node by path.
const char * fdt_strings(struct fdt *fdt, unsigned int offset, const char *name, unsigned int *count)
Find strings property.
unsigned long long uint64_t
struct ena_llq_option desc
Descriptor counts.
uint32_t fdt_phandle(struct fdt *fdt, unsigned int offset)
Get package handle (phandle) property.
int fdt_u32(struct fdt *fdt, unsigned int offset, const char *name, uint32_t *value)
Get 32-bit integer property.
void fdt_remove(struct fdt_header *hdr)
Remove device tree.
static unsigned int count
Number of entries.
const char * fdt_string(struct fdt *fdt, unsigned int offset, const char *name)
Find string property.
struct image * image_memory(const char *name, const void *data, size_t len)
Create registered image from block of memory.
void unregister_image(struct image *image)
Unregister executable image.
int strcmp(const char *first, const char *second)
Compare strings.
A device tree token descriptor.
uint16_t offset
Offset to command line.
static struct image * image_tag(struct image *image, struct image_tag *tag)
Tag image.
int fdt_create(struct fdt_header **hdr, const char *cmdline, physaddr_t initrd, size_t initrd_len)
Create device tree.
int fdt_u64(struct fdt *fdt, unsigned int offset, const char *name, uint64_t *value)
Get 64-bit integer property.
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
#define NULL
NULL pointer (VOID *)
int fdt_cells(struct fdt *fdt, unsigned int offset, const char *name, unsigned int index, unsigned int count, uint64_t *value)
Get integer property.