18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 38c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 48c2ecf20Sopenharmony_ci * for more details. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * SGI ARCS firmware interface library for the Linux kernel. 78c2ecf20Sopenharmony_ci * 88c2ecf20Sopenharmony_ci * Copyright (C) 1996 David S. Miller (davem@davemloft.net) 98c2ecf20Sopenharmony_ci * Copyright (C) 2001, 2002 Ralf Baechle (ralf@gnu.org) 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci#ifndef _ASM_SGIALIB_H 128c2ecf20Sopenharmony_ci#define _ASM_SGIALIB_H 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#include <linux/compiler.h> 158c2ecf20Sopenharmony_ci#include <asm/sgiarcs.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciextern struct linux_romvec *romvec; 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciextern int prom_flags; 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define PROM_FLAG_ARCS 1 228c2ecf20Sopenharmony_ci#define PROM_FLAG_USE_AS_CONSOLE 2 238c2ecf20Sopenharmony_ci#define PROM_FLAG_DONT_FREE_TEMP 4 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci/* Simple char-by-char console I/O. */ 268c2ecf20Sopenharmony_ciextern char prom_getchar(void); 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci/* Get next memory descriptor after CURR, returns first descriptor 298c2ecf20Sopenharmony_ci * in chain is CURR is NULL. 308c2ecf20Sopenharmony_ci */ 318c2ecf20Sopenharmony_ciextern struct linux_mdesc *prom_getmdesc(struct linux_mdesc *curr); 328c2ecf20Sopenharmony_ci#define PROM_NULL_MDESC ((struct linux_mdesc *) 0) 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci/* Called by prom_init to setup the physical memory pmemblock 358c2ecf20Sopenharmony_ci * array. 368c2ecf20Sopenharmony_ci */ 378c2ecf20Sopenharmony_ciextern void prom_meminit(void); 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci/* PROM device tree library routines. */ 408c2ecf20Sopenharmony_ci#define PROM_NULL_COMPONENT ((pcomponent *) 0) 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci/* This is called at prom_init time to identify the 438c2ecf20Sopenharmony_ci * ARC architecture we are running on 448c2ecf20Sopenharmony_ci */ 458c2ecf20Sopenharmony_ciextern void prom_identify_arch(void); 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci/* Environment variable routines. */ 488c2ecf20Sopenharmony_ciextern PCHAR ArcGetEnvironmentVariable(PCHAR name); 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci/* ARCS command line parsing. */ 518c2ecf20Sopenharmony_ciextern void prom_init_cmdline(int argc, LONG *argv); 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci/* File operations. */ 548c2ecf20Sopenharmony_ciextern LONG ArcRead(ULONG fd, PVOID buf, ULONG num, PULONG cnt); 558c2ecf20Sopenharmony_ciextern LONG ArcWrite(ULONG fd, PVOID buf, ULONG num, PULONG cnt); 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci/* Misc. routines. */ 588c2ecf20Sopenharmony_ciextern VOID ArcEnterInteractiveMode(VOID) __noreturn; 598c2ecf20Sopenharmony_ciextern DISPLAY_STATUS *ArcGetDisplayStatus(ULONG FileID); 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci#endif /* _ASM_SGIALIB_H */ 62