⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sgiarcs.h

📁 this SRC packet is the headfiles that MIZI vivi bootloader needed when compling
💻 H
📖 第 1 页 / 共 2 页
字号:
	struct param {#ifdef __MIPSEL__		unsigned short size;		unsigned char lsize;		unsigned char bsize;#else /* !(__MIPSEL__) */		unsigned char bsize;		unsigned char lsize;		unsigned short size;#endif	} info;	unsigned long allinfo;};/* Configuration data. */struct linux_cdata {	char *name;	int mlen;	enum linux_devtypes type;};/* Common SGI ARCS firmware file descriptors. */#define SGIPROM_STDIN     0#define SGIPROM_STDOUT    1/* Common SGI ARCS firmware file types. */#define SGIPROM_ROFILE    0x01  /* read-only file */#define SGIPROM_HFILE     0x02  /* hidden file */#define SGIPROM_SFILE     0x04  /* System file */#define SGIPROM_AFILE     0x08  /* Archive file */#define SGIPROM_DFILE     0x10  /* Directory file */#define SGIPROM_DELFILE   0x20  /* Deleted file *//* SGI ARCS boot record information. */struct sgi_partition {	unsigned char flag;#define SGIPART_UNUSED 0x00#define SGIPART_ACTIVE 0x80	unsigned char shead, ssect, scyl; /* unused */	unsigned char systype; /* OS type, Irix or NT */	unsigned char ehead, esect, ecyl; /* unused */	unsigned char rsect0, rsect1, rsect2, rsect3;	unsigned char tsect0, tsect1, tsect2, tsect3;};#define SGIBBLOCK_MAGIC   0xaa55#define SGIBBLOCK_MAXPART 0x0004struct sgi_bootblock {	unsigned char _unused[446];	struct sgi_partition partitions[SGIBBLOCK_MAXPART];	unsigned short magic;};/* BIOS parameter block. */struct sgi_bparm_block {	unsigned short bytes_sect;    /* bytes per sector */	unsigned char  sect_clust;    /* sectors per cluster */	unsigned short sect_resv;     /* reserved sectors */	unsigned char  nfats;         /* # of allocation tables */	unsigned short nroot_dirents; /* # of root directory entries */	unsigned short sect_volume;   /* sectors in volume */	unsigned char  media_type;    /* media descriptor */	unsigned short sect_fat;      /* sectors per allocation table */	unsigned short sect_track;    /* sectors per track */	unsigned short nheads;        /* # of heads */	unsigned short nhsects;       /* # of hidden sectors */};struct sgi_bsector {	unsigned char   jmpinfo[3];	unsigned char   manuf_name[8];	struct sgi_bparm_block info;};/* Debugging block used with SGI symmon symbolic debugger. */#define SMB_DEBUG_MAGIC   0xfeeddeadstruct linux_smonblock {	unsigned long   magic;	void            (*handler)(void);  /* Breakpoint routine. */	unsigned long   dtable_base;       /* Base addr of dbg table. */	int             (*printf)(const char *fmt, ...);	unsigned long   btable_base;       /* Breakpoint table. */	unsigned long   mpflushreqs;       /* SMP cache flush request list. */	unsigned long   ntab;              /* Name table. */	unsigned long   stab;              /* Symbol table. */	int             smax;              /* Max # of symbols. */};/* * Macros for calling a 32-bit ARC implementation from 64-bit code */#ifdef CONFIG_ARC32#define __arc_clobbers							\	"$2","$3","$4","$5","$6","$7","$8","$9","$10","$11",		\	"$12","$13","$14","$15","$16","$24","25","$31"#define ARC_CALL0(dest)							\({	long __res;							\	long __vec = (long) romvec->dest;				\	__asm__ __volatile__(						\	"dsubu\t$29, 32\n\t"						\	"jalr\t%1\n\t"							\	"daddu\t$29, 32\n\t"						\	"move\t%0, $2"							\	: "=r" (__res), "=r" (__vec)					\	: "1" (__vec)							\	: __arc_clobbers);						\	(unsigned long) __res;						\})#define ARC_CALL1(dest,a1)						\({	long __res;							\	register signed int __a1 __asm__("$4") = (int) (long) (a1);	\	long __vec = (long) romvec->dest;				\	__asm__ __volatile__(						\	"dsubu\t$29, 32\n\t"						\	"jalr\t%1\n\t"							\	"daddu\t$29, 32\n\t"						\	"move\t%0, $2"							\	: "=r" (__res), "=r" (__vec)					\	: "1" (__vec), "r" (__a1)					\	: __arc_clobbers);						\	(unsigned long) __res;						\})#define ARC_CALL2(dest,a1,a2)						\({	long __res;							\	register signed int __a1 __asm__("$4") = (int) (long) (a1);	\	register signed int __a2 __asm__("$5") = (int) (long) (a2);	\	long __vec = (long) romvec->dest;				\	__asm__ __volatile__(						\	"dsubu\t$29, 32\n\t"						\	"jalr\t%1\n\t"							\	"daddu\t$29, 32\n\t"						\	"move\t%0, $2"							\	: "=r" (__res), "=r" (__vec)					\	: "1" (__vec), "r" (__a1), "r" (__a2)				\	: __arc_clobbers);						\	__res;								\})#define ARC_CALL3(dest,a1,a2,a3)					\({	long __res;							\	register signed int __a1 __asm__("$4") = (int) (long) (a1);	\	register signed int __a2 __asm__("$5") = (int) (long) (a2);	\	register signed int __a3 __asm__("$6") = (int) (long) (a3);	\	long __vec = (long) romvec->dest;				\	__asm__ __volatile__(						\	"dsubu\t$29, 32\n\t"						\	"jalr\t%1\n\t"							\	"daddu\t$29, 32\n\t"						\	"move\t%0, $2"							\	: "=r" (__res), "=r" (__vec)					\	: "1" (__vec), "r" (__a1), "r" (__a2), "r" (__a3)		\	: __arc_clobbers);						\	__res;								\})#define ARC_CALL4(dest,a1,a2,a3,a4)					\({	long __res;							\	register signed int __a1 __asm__("$4") = (int) (long) (a1);	\	register signed int __a2 __asm__("$5") = (int) (long) (a2);	\	register signed int __a3 __asm__("$6") = (int) (long) (a3);	\	register signed int __a4 __asm__("$7") = (int) (long) (a4);	\	long __vec = (long) romvec->dest;				\	__asm__ __volatile__(						\	"dsubu\t$29, 32\n\t"						\	"jalr\t%1\n\t"							\	"daddu\t$29, 32\n\t"						\	"move\t%0, $2"							\	: "=r" (__res), "=r" (__vec)					\	: "1" (__vec), "r" (__a1), "r" (__a2), "r" (__a3), 		\	  "r" (__a4)							\	: __arc_clobbers);						\	__res;								\})#define ARC_CALL5(dest,a1,a2,a3,a4,a5)					\({	long __res;							\	register signed int __a1 __asm__("$4") = (int) (long) (a1);	\	register signed int __a2 __asm__("$5") = (int) (long) (a2);	\	register signed int __a3 __asm__("$6") = (int) (long) (a3);	\	register signed int __a4 __asm__("$7") = (int) (long) (a4);	\	register signed int __a5 = (a5);				\	long __vec = (long) romvec->dest;				\	__asm__ __volatile__(						\	"dsubu\t$29, 32\n\t"						\	"sw\t%6, 16($29)\n\t"						\	"jalr\t%1\n\t"							\	"daddu\t$29, 32\n\t"						\	"move\t%0, $2"							\	: "=r" (__res), "=r" (__vec)					\	: "1" (__vec),							\	  "r" (__a1), "r" (__a2), "r" (__a3), "r" (__a4),		\	  "r" (__a5)							\	: __arc_clobbers);						\	__res;								\})#endif /* CONFIG_ARC32 */#ifdef CONFIG_ARC64#define ARC_CALL0(dest)							\({	long __res;							\	long (*__vec)(void) = (void *) romvec->dest;			\									\	__res = __vec();						\	__res;								\})#define ARC_CALL1(dest,a1)						\({	long __res;							\	long __a1 = (long) (a1);					\	long (*__vec)(long) = (void *) romvec->dest;			\									\	__res = __vec(__a1);						\	__res;								\})#define ARC_CALL2(dest,a1,a2)						\({	long __res;							\	long __a1 = (long) (a1);					\	long __a2 = (long) (a2);					\	long (*__vec)(long, long) = (void *) romvec->dest;		\									\	__res = __vec(__a1, __a2);					\	__res;								\})#define ARC_CALL3(dest,a1,a2,a3)					\({	long __res;							\	long __a1 = (long) (a1);					\	long __a2 = (long) (a2);					\	long __a3 = (long) (a3);					\	long (*__vec)(long, long, long)	= (void *) romvec->dest;	\									\	__res = __vec(__a1, __a2, __a3);				\	__res;								\})#define ARC_CALL4(dest,a1,a2,a3,a4)					\({	long __res;							\	long __a1 = (long) (a1);					\	long __a2 = (long) (a2);					\	long __a3 = (long) (a3);					\	long __a4 = (long) (a4);					\	long (*__vec)(long, long, long, long) = (void *) romvec->dest;	\									\	__res = __vec(__a1, __a2, __a3, __a4);				\	__res;								\})#define ARC_CALL5(dest,a1,a2,a3,a4,a5)					\({	long __res;							\	long __a1 = (long) (a1);					\	long __a2 = (long) (a2);					\	long __a3 = (long) (a3);					\	long __a4 = (long) (a4);					\	long __a5 = (long) (a5);					\	long (*__vec)(long, long, long, long, long);			\	__vec = (void *) romvec->dest;					\									\	__res = __vec(__a1, __a2, __a3, __a4, __a5);			\	__res;								\})#endif /* CONFIG_ARC64 */#endif /* _ASM_SGIARCS_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -