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

📄 core_apecs.h

📁 嵌入式系统设计与实验教材二源码linux内核移植与编译
💻 H
📖 第 1 页 / 共 2 页
字号:
	unsigned long pci_ir;	unsigned long pci_imr;	unsigned long svr_mgr;};/* This for the normal APECS machines.  */struct el_apecs_sysdata_mcheck{	unsigned long coma_gcr;	unsigned long coma_edsr;	unsigned long coma_ter;	unsigned long coma_elar;	unsigned long coma_ehar;	unsigned long coma_ldlr;	unsigned long coma_ldhr;	unsigned long coma_base0;	unsigned long coma_base1;	unsigned long coma_base2;	unsigned long coma_cnfg0;	unsigned long coma_cnfg1;	unsigned long coma_cnfg2;	unsigned long epic_dcsr;	unsigned long epic_pear;	unsigned long epic_sear;	unsigned long epic_tbr1;	unsigned long epic_tbr2;	unsigned long epic_pbr1;	unsigned long epic_pbr2;	unsigned long epic_pmr1;	unsigned long epic_pmr2;	unsigned long epic_harx1;	unsigned long epic_harx2;	unsigned long epic_pmlt;	unsigned long epic_tag0;	unsigned long epic_tag1;	unsigned long epic_tag2;	unsigned long epic_tag3;	unsigned long epic_tag4;	unsigned long epic_tag5;	unsigned long epic_tag6;	unsigned long epic_tag7;	unsigned long epic_data0;	unsigned long epic_data1;	unsigned long epic_data2;	unsigned long epic_data3;	unsigned long epic_data4;	unsigned long epic_data5;	unsigned long epic_data6;	unsigned long epic_data7;};struct el_apecs_procdata{	unsigned long paltemp[32];  /* PAL TEMP REGS. */	/* EV4-specific fields */	unsigned long exc_addr;     /* Address of excepting instruction. */	unsigned long exc_sum;      /* Summary of arithmetic traps. */	unsigned long exc_mask;     /* Exception mask (from exc_sum). */	unsigned long iccsr;        /* IBox hardware enables. */	unsigned long pal_base;     /* Base address for PALcode. */	unsigned long hier;         /* Hardware Interrupt Enable. */	unsigned long hirr;         /* Hardware Interrupt Request. */	unsigned long csr;          /* D-stream fault info. */	unsigned long dc_stat;      /* D-cache status (ECC/Parity Err). */	unsigned long dc_addr;      /* EV3 Phys Addr for ECC/DPERR. */	unsigned long abox_ctl;     /* ABox Control Register. */	unsigned long biu_stat;     /* BIU Status. */	unsigned long biu_addr;     /* BUI Address. */	unsigned long biu_ctl;      /* BIU Control. */	unsigned long fill_syndrome;/* For correcting ECC errors. */	unsigned long fill_addr;    /* Cache block which was being read */	unsigned long va;           /* Effective VA of fault or miss. */	unsigned long bc_tag;       /* Backup Cache Tag Probe Results.*/};#ifdef __KERNEL__#ifndef __EXTERN_INLINE#define __EXTERN_INLINE extern inline#define __IO_EXTERN_INLINE#endif/* * I/O functions: * * Unlike Jensen, the APECS machines have no concept of local * I/O---everything goes over the PCI bus. * * There is plenty room for optimization here.  In particular, * the Alpha's insb/insw/extb/extw should be useful in moving * data to/from the right byte-lanes. */#define vip	volatile int *#define vuip	volatile unsigned int *#define vulp	volatile unsigned long *__EXTERN_INLINE u8 apecs_inb(unsigned long addr){	long result = *(vip) ((addr << 5) + APECS_IO + 0x00);	return __kernel_extbl(result, addr & 3);}__EXTERN_INLINE void apecs_outb(u8 b, unsigned long addr){	unsigned long w;	w = __kernel_insbl(b, addr & 3);	*(vuip) ((addr << 5) + APECS_IO + 0x00) = w;	mb();}__EXTERN_INLINE u16 apecs_inw(unsigned long addr){	long result = *(vip) ((addr << 5) + APECS_IO + 0x08);	return __kernel_extwl(result, addr & 3);}__EXTERN_INLINE void apecs_outw(u16 b, unsigned long addr){	unsigned long w;	w = __kernel_inswl(b, addr & 3);	*(vuip) ((addr << 5) + APECS_IO + 0x08) = w;	mb();}__EXTERN_INLINE u32 apecs_inl(unsigned long addr){	return *(vuip) ((addr << 5) + APECS_IO + 0x18);}__EXTERN_INLINE void apecs_outl(u32 b, unsigned long addr){	*(vuip) ((addr << 5) + APECS_IO + 0x18) = b;	mb();}/* * Memory functions.  64-bit and 32-bit accesses are done through * dense memory space, everything else through sparse space. */__EXTERN_INLINE u8 apecs_readb(unsigned long addr){	unsigned long result, msb;	addr -= APECS_DENSE_MEM;	if (addr >= (1UL << 24)) {		msb = addr & 0xf8000000;		addr -= msb;		set_hae(msb);	}	result = *(vip) ((addr << 5) + APECS_SPARSE_MEM + 0x00);	return __kernel_extbl(result, addr & 3);}__EXTERN_INLINE u16 apecs_readw(unsigned long addr){	unsigned long result, msb;	addr -= APECS_DENSE_MEM;	if (addr >= (1UL << 24)) {		msb = addr & 0xf8000000;		addr -= msb;		set_hae(msb);	}	result = *(vip) ((addr << 5) + APECS_SPARSE_MEM + 0x08);	return __kernel_extwl(result, addr & 3);}__EXTERN_INLINE u32 apecs_readl(unsigned long addr){	return (*(vuip)addr) & 0xffffffff;}__EXTERN_INLINE u64 apecs_readq(unsigned long addr){	return *(vulp)addr;}__EXTERN_INLINE void apecs_writeb(u8 b, unsigned long addr){	unsigned long msb;	addr -= APECS_DENSE_MEM;	if (addr >= (1UL << 24)) {		msb = addr & 0xf8000000;		addr -= msb;		set_hae(msb);	}	*(vuip) ((addr << 5) + APECS_SPARSE_MEM + 0x00) = b * 0x01010101;}__EXTERN_INLINE void apecs_writew(u16 b, unsigned long addr){	unsigned long msb;	addr -= APECS_DENSE_MEM;	if (addr >= (1UL << 24)) {		msb = addr & 0xf8000000;		addr -= msb;		set_hae(msb);	}	*(vuip) ((addr << 5) + APECS_SPARSE_MEM + 0x08) = b * 0x00010001;}__EXTERN_INLINE void apecs_writel(u32 b, unsigned long addr){	*(vuip)addr = b;}__EXTERN_INLINE void apecs_writeq(u64 b, unsigned long addr){	*(vulp)addr = b;}__EXTERN_INLINE unsigned long apecs_ioremap(unsigned long addr,					    unsigned long size					    __attribute__((unused))){	return addr + APECS_DENSE_MEM;}__EXTERN_INLINE void apecs_iounmap(unsigned long addr){	return;}__EXTERN_INLINE int apecs_is_ioaddr(unsigned long addr){	return addr >= IDENT_ADDR + 0x180000000UL;}#undef vip#undef vuip#undef vulp#ifdef __WANT_IO_DEF#define __inb(p)		apecs_inb((unsigned long)(p))#define __inw(p)		apecs_inw((unsigned long)(p))#define __inl(p)		apecs_inl((unsigned long)(p))#define __outb(x,p)		apecs_outb((x),(unsigned long)(p))#define __outw(x,p)		apecs_outw((x),(unsigned long)(p))#define __outl(x,p)		apecs_outl((x),(unsigned long)(p))#define __readb(a)		apecs_readb((unsigned long)(a))#define __readw(a)		apecs_readw((unsigned long)(a))#define __readl(a)		apecs_readl((unsigned long)(a))#define __readq(a)		apecs_readq((unsigned long)(a))#define __writeb(x,a)		apecs_writeb((x),(unsigned long)(a))#define __writew(x,a)		apecs_writew((x),(unsigned long)(a))#define __writel(x,a)		apecs_writel((x),(unsigned long)(a))#define __writeq(x,a)		apecs_writeq((x),(unsigned long)(a))#define __ioremap(a,s)		apecs_ioremap((unsigned long)(a),(s))#define __iounmap(a)		apecs_iounmap((unsigned long)(a))#define __is_ioaddr(a)		apecs_is_ioaddr((unsigned long)(a))#define __raw_readl(a)		__readl(a)#define __raw_readq(a)		__readq(a)#define __raw_writel(v,a)	__writel((v),(a))#define __raw_writeq(v,a)	__writeq((v),(a))#endif /* __WANT_IO_DEF */#ifdef __IO_EXTERN_INLINE#undef __EXTERN_INLINE#undef __IO_EXTERN_INLINE#endif#endif /* __KERNEL__ */#endif /* __ALPHA_APECS__H__ */

⌨️ 快捷键说明

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