fw.h 898 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2012 MIPS Technologies, Inc.
  7. */
  8. #ifndef __ASM_FW_H_
  9. #define __ASM_FW_H_
  10. #include <asm/bootinfo.h> /* For cleaner code... */
  11. extern int fw_argc;
  12. extern int *_fw_argv;
  13. extern int *_fw_envp;
  14. /*
  15. * Most firmware like YAMON, PMON, etc. pass arguments and environment
  16. * variables as 32-bit pointers. These take care of sign extension.
  17. */
  18. #define fw_argv(index) ((char *)(long)_fw_argv[(index)])
  19. #define fw_envp(index) ((char *)(long)_fw_envp[(index)])
  20. extern void fw_init_cmdline(void);
  21. extern char *fw_getcmdline(void);
  22. extern void fw_meminit(void);
  23. extern char *fw_getenv(char *name);
  24. extern unsigned long fw_getenvl(char *name);
  25. extern void fw_init_early_console(void);
  26. #endif /* __ASM_FW_H_ */