riscv: Add SBI v0.2 extension definitions
[oweals/u-boot.git] / include / init.h
index 970a39a6a08f949616d81ec34a07ba5caee75e71..2a33a3fd1e41c54f35b973e9b0a0974b274198ce 100644 (file)
 
 #include <linux/types.h>
 
+struct global_data;
+
 #ifndef __ASSEMBLY__           /* put C only stuff in this section */
 
+/* Avoid using CONFIG_EFI_STUB directly as we may boot from other loaders */
+#ifdef CONFIG_EFI_STUB
+#define ll_boot_init() false
+#else
+#define ll_boot_init() true
+#endif
+
 /*
  * Function Prototypes
  */
@@ -97,6 +106,11 @@ int dram_init(void);
  */
 int dram_init_banksize(void);
 
+long get_ram_size(long *base, long size);
+phys_size_t get_effective_memsize(void);
+
+int testdram(void);
+
 /**
  * arch_reserve_stacks() - Reserve all necessary stacks
  *
@@ -221,6 +235,21 @@ void pci_init_board(void);
 
 void trap_init(unsigned long reloc_addr);
 
+/**
+ * main_loop() - Enter the main loop of U-Boot
+ *
+ * This normally runs the command line.
+ */
+void main_loop(void);
+
+#if defined(CONFIG_ARM)
+void relocate_code(ulong addr_moni);
+#else
+void relocate_code(ulong start_addr_sp, struct global_data *new_gd,
+                  ulong relocaddr)
+       __attribute__ ((noreturn));
+#endif
+
 #endif /* __ASSEMBLY__ */
 /* Put only stuff here that the assembler can digest */