vof.h (1211B)
1/* 2 * Virtual Open Firmware 3 * 4 * SPDX-License-Identifier: GPL-2.0-or-later 5 */ 6#include <stdarg.h> 7 8typedef unsigned char uint8_t; 9typedef unsigned short uint16_t; 10typedef unsigned long uint32_t; 11typedef unsigned long long uint64_t; 12#define NULL (0) 13typedef unsigned long ihandle; 14typedef unsigned long phandle; 15typedef int size_t; 16 17/* globals */ 18extern void _prom_entry(void); /* OF CI entry point (i.e. this firmware) */ 19 20void do_boot(unsigned long addr, unsigned long r3, unsigned long r4); 21 22/* libc */ 23int strlen(const char *s); 24int strcmp(const char *s1, const char *s2); 25void *memcpy(void *dest, const void *src, size_t n); 26int memcmp(const void *ptr1, const void *ptr2, size_t n); 27void *memmove(void *dest, const void *src, size_t n); 28void *memset(void *dest, int c, size_t size); 29 30/* CI wrappers */ 31void ci_panic(const char *str); 32phandle ci_finddevice(const char *path); 33uint32_t ci_getprop(phandle ph, const char *propname, void *prop, int len); 34 35/* booting from -kernel */ 36void boot_from_memory(uint64_t initrd, uint64_t initrdsize); 37 38/* Entry points for CI and RTAS */ 39extern uint32_t ci_entry(uint32_t params); 40extern unsigned long hv_rtas(unsigned long params); 41extern unsigned int hv_rtas_size;