diff options
| author | Michael Brown | 2006-03-17 15:13:09 +0100 |
|---|---|---|
| committer | Michael Brown | 2006-03-17 15:13:09 +0100 |
| commit | b2909e547d78d5441b7e88e862c0e00541d3a5f0 (patch) | |
| tree | 713f2c6be0a71a68b415dfe57493cb6770fac908 /src/arch/e1/include | |
| parent | GPXE code cleanup and purge. (diff) | |
| download | ipxe-b2909e547d78d5441b7e88e862c0e00541d3a5f0.tar.gz ipxe-b2909e547d78d5441b7e88e862c0e00541d3a5f0.tar.xz ipxe-b2909e547d78d5441b7e88e862c0e00541d3a5f0.zip | |
They can come back when they have someone to support them.
Diffstat (limited to 'src/arch/e1/include')
| -rw-r--r-- | src/arch/e1/include/bits/byteswap.h | 39 | ||||
| -rw-r--r-- | src/arch/e1/include/bits/cpu.h | 6 | ||||
| -rw-r--r-- | src/arch/e1/include/bits/elf.h | 6 | ||||
| -rw-r--r-- | src/arch/e1/include/bits/endian.h | 6 | ||||
| -rw-r--r-- | src/arch/e1/include/bits/string.h | 35 | ||||
| -rw-r--r-- | src/arch/e1/include/e132_xs_board.h | 22 | ||||
| -rw-r--r-- | src/arch/e1/include/hooks.h | 9 | ||||
| -rw-r--r-- | src/arch/e1/include/io.h | 210 | ||||
| -rw-r--r-- | src/arch/e1/include/latch.h | 12 | ||||
| -rw-r--r-- | src/arch/e1/include/limits.h | 34 | ||||
| -rw-r--r-- | src/arch/e1/include/setjmp.h | 23 | ||||
| -rw-r--r-- | src/arch/e1/include/stdint.h | 28 |
12 files changed, 0 insertions, 430 deletions
diff --git a/src/arch/e1/include/bits/byteswap.h b/src/arch/e1/include/bits/byteswap.h deleted file mode 100644 index 1d1a7d2f0..000000000 --- a/src/arch/e1/include/bits/byteswap.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef ETHERBOOT_BITS_BYTESWAP_H -#define ETHERBOOT_BITS_BYTESWAP_H - -/* We do not have byte swap functions ... We are - * RISC processor ... - */ - -static inline unsigned short __swap16(volatile unsigned short v) -{ - return ((v << 8) | (v >> 8)); -} - -static inline unsigned int __swap32(volatile unsigned long v) -{ - return ((v << 24) | ((v & 0xff00) << 8) | ((v & 0xff0000) >> 8) | (v >> 24)); -} - -#define __bswap_constant_16(x) \ - ((uint16_t)((((uint16_t)(x) & 0x00ff) << 8) | \ - (((uint16_t)(x) & 0xff00) >> 8))) - -#define __bswap_constant_32(x) \ - ((uint32_t)((((uint32_t)(x) & 0x000000ffU) << 24) | \ - (((uint32_t)(x) & 0x0000ff00U) << 8) | \ - (((uint32_t)(x) & 0x00ff0000U) >> 8) | \ - (((uint32_t)(x) & 0xff000000U) >> 24))) - -#define __bswap_16(x) \ - (__builtin_constant_p(x) ? \ - __bswap_constant_16(x) : \ - __swap16(x)) - - -#define __bswap_32(x) \ - (__builtin_constant_p(x) ? \ - __bswap_constant_32(x) : \ - __swap32(x)) - -#endif /* ETHERBOOT_BITS_BYTESWAP_H */ diff --git a/src/arch/e1/include/bits/cpu.h b/src/arch/e1/include/bits/cpu.h deleted file mode 100644 index f25c009a2..000000000 --- a/src/arch/e1/include/bits/cpu.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef E1_BITS_CPU_H -#define E1_BITS_CPU_H - -#define cpu_setup() do {} while(0) - -#endif /* E1_BITS_CPU_H */ diff --git a/src/arch/e1/include/bits/elf.h b/src/arch/e1/include/bits/elf.h deleted file mode 100644 index aa40e1107..000000000 --- a/src/arch/e1/include/bits/elf.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef E1_BITS_ELF_H -#define E1_BITS_ELF_H - -/* dummy file, needed for the compilation of core/nic.c */ - -#endif /* E1_BITS_ELF_H */ diff --git a/src/arch/e1/include/bits/endian.h b/src/arch/e1/include/bits/endian.h deleted file mode 100644 index 4145518bc..000000000 --- a/src/arch/e1/include/bits/endian.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ETHERBOOT_BITS_ENDIAN_H -#define ETHERBOOT_BITS_ENDIAN_H - -#define __BYTE_ORDER __BIG_ENDIAN - -#endif /* ETHERBOOT_BITS_ENDIAN_H */ diff --git a/src/arch/e1/include/bits/string.h b/src/arch/e1/include/bits/string.h deleted file mode 100644 index b6df2fcbc..000000000 --- a/src/arch/e1/include/bits/string.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef ETHERBOOT_BITS_STRING_H -#define ETHERBOOT_BITS_STRING_H - -/* define inline optimized string functions here */ - -#define __HAVE_ARCH_MEMCPY -//extern void * memcpy(const void *d, const void *s, size_t count); - -#define __HAVE_ARCH_MEMCMP -//extern int memcmp(const void * s ,const void * d ,size_t ); - -#define __HAVE_ARCH_MEMSET -//extern void * memset(const void * s, int c, size_t count); - -#define __HAVE_ARCH_MEMMOVE -static inline void *memmove(void *s1, const void *s2, size_t n) { - - unsigned int i; - char *tmp = s1; - char *cs2 = (char *) s2; - - if (tmp < cs2) { - for(i=0; i<n; ++i, ++tmp, ++cs2) - *tmp = *cs2; - } - else { - tmp += n - 1; - cs2 += n - 1; - for(i=0; i<n; ++i, --tmp, --cs2) - *tmp = *cs2; - } - return(s1); -} - -#endif /* ETHERBOOT_BITS_STRING_H */ diff --git a/src/arch/e1/include/e132_xs_board.h b/src/arch/e1/include/e132_xs_board.h deleted file mode 100644 index 257cfc37d..000000000 --- a/src/arch/e1/include/e132_xs_board.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __E132_XS_BOARD_H -#define __E132_XS_BOARD_H - -#define CONFIG_HYPERSTONE_OSC_FREQ_MHZ 15 - -#define NR_MEMORY_REGNS 3 -#define BASEMEM 0x0 - -/* SDRAM mapping */ -#define SDRAM_SIZE 0x01000000 -#define SDRAM_BASEMEM BASEMEM - -/* SRAM mapping */ -#define SRAM_BASEMEM 0x40000000 -#define SRAM_SIZE 0x0003FFFF - -/* IRAM mapping */ -#define IRAM_BASEMEM 0xC0000000 -#define IRAM_SIZE 0x00003FFF - - -#endif /* __E132_XS_BOARD_H */ diff --git a/src/arch/e1/include/hooks.h b/src/arch/e1/include/hooks.h deleted file mode 100644 index a67aa193f..000000000 --- a/src/arch/e1/include/hooks.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef ETHERBOOT_E1_HOOKS_H -#define ETHERBOOT_E1_HOOKS_H - -#define arch_main(data,params) do {} while(0) -#define arch_on_exit(status) do {} while(0) -#define arch_relocate_to(addr) do {} while(0) -#define arch_relocated_from(old_addr) do {} while(0) - -#endif /* ETHERBOOT_E1_HOOKS_H */ diff --git a/src/arch/e1/include/io.h b/src/arch/e1/include/io.h deleted file mode 100644 index acf940ce5..000000000 --- a/src/arch/e1/include/io.h +++ /dev/null @@ -1,210 +0,0 @@ -#ifndef ETHERBOOT_IO_H -#define ETHERBOOT_IO_H - -/* Don't require identity mapped physical memory, - * osloader.c is the only valid user at the moment. - */ -#if 0 -static inline unsigned long virt_to_phys(volatile const void *virt_addr) -{ - return ((unsigned long)virt_addr); -} -#else -#define virt_to_phys(vaddr) ((unsigned long) (vaddr)) -#endif - -#if 0 -static inline void *phys_to_virt(unsigned long phys_addr) -{ - return (void *)(phys_addr); -} -#else -#define phys_to_virt(vaddr) ((void *) (vaddr)) -#endif - -/* virt_to_bus converts an addresss inside of etherboot [_start, _end] - * into a memory address cards can use. - */ -#define virt_to_bus virt_to_phys - -/* bus_to_virt reverses virt_to_bus, the address must be output - * from virt_to_bus to be valid. This function does not work on - * all bus addresses. - */ -#define bus_to_virt phys_to_virt - -#define iounmap(addr) ((void)0) -#define ioremap(physaddr, size) (physaddr) - -#define IORegAddress 13 -#define IOWait 11 -#define IOSetupTime 8 -#define IOAccessTime 5 -#define IOHoldTime 3 - -#define SLOW_IO_ACCESS ( 0x3 << IOSetupTime | 0x0 << IOWait | 7 << IOAccessTime | 3 << IOHoldTime ) - -/* The development board can generate up to 15 Chip selects */ -#define NR_CS 16 - -extern unsigned int io_periph[NR_CS]; -#define ETHERNET_CS 4 - -static inline unsigned short _swapw(volatile unsigned short v) -{ - return ((v << 8) | (v >> 8)); -} - -static inline unsigned int _swapl(volatile unsigned long v) -{ - return ((v << 24) | ((v & 0xff00) << 8) | ((v & 0xff0000) >> 8) | (v >> 24)); -} - -#define hy_inpw(addr) \ - ({ register unsigned long dummy, dummy1; \ - dummy = addr; \ - asm volatile ("LDW.IOD %1, %0, 0" \ - : "=l" (dummy1) \ - : "l" (dummy)); dummy1; }) - - -#define hy_outpw(x, addr) \ - ({ register unsigned long dummy0,dummy1; \ - dummy0 = addr; \ - dummy1 = x; \ - asm volatile ("STW.IOD %1, %0, 0" \ - : "=l" (dummy1) \ - : "l"(dummy0), "l" (dummy1)); dummy1; }) - -#define readb(addr) ({ unsigned char __v = inregb(addr); __v; }) -#define readw(addr) ({ unsigned short __v = inregw(addr); __v; }) -#define readl(addr) ({ unsigned long __v = inregl(addr); __v; }) - -#define writeb(b,addr) (void)(outreg(b, addr)) -#define writew(b,addr) (void)(outreg(b, addr)) -#define writel(b,addr) (void)(outreg(b, addr)) - -static inline unsigned long common_io_access(unsigned long addr) -{ - return io_periph[(addr & 0x03C00000) >> 22]; -} - -static inline volatile unsigned char inregb(volatile unsigned long reg) -{ - unsigned char val; - - val = hy_inpw(common_io_access(reg) | ((0xf & reg) << IORegAddress)); - return val; -} - -static inline volatile unsigned short inregw(volatile unsigned long reg) -{ - unsigned short val; - - val = hy_inpw(common_io_access(reg) | ((0xf & reg) << IORegAddress)); - return val; -} - -static inline volatile unsigned long inregl(volatile unsigned long reg) -{ - unsigned long val; - - val = hy_inpw(common_io_access(reg) | ((0xf & reg) << IORegAddress)); - return val; -} - -static inline void outreg(volatile unsigned long val, volatile unsigned long reg) -{ - - hy_outpw(val, (common_io_access(reg) | ((0xf & reg) << IORegAddress))); -} - -static inline void io_outsb(unsigned int addr, void *buf, int len) -{ - unsigned long tmp; - unsigned char *bp = (unsigned char *) buf; - - tmp = (common_io_access(addr)) | ((0xf & addr) << IORegAddress); - - while (len--){ - hy_outpw(_swapw(*bp++), tmp); - } -} - -static inline void io_outsw(volatile unsigned int addr, void *buf, int len) -{ - unsigned long tmp; - unsigned short *bp = (unsigned short *) buf; - - tmp = (common_io_access(addr)) | ((0xf & addr) << IORegAddress); - - while (len--){ - hy_outpw(_swapw(*bp++), tmp); - } -} - -static inline void io_outsl(volatile unsigned int addr, void *buf, int len) -{ - unsigned long tmp; - unsigned int *bp = (unsigned int *) buf; - - tmp = (common_io_access(addr)) | ((0xf & addr) << IORegAddress); - - while (len--){ - hy_outpw(_swapl(*bp++), tmp); - } -} - -static inline void io_insb(volatile unsigned int addr, void *buf, int len) -{ - unsigned long tmp; - unsigned char *bp = (unsigned char *) buf; - - tmp = (common_io_access(addr)) | ((0xf & addr) << IORegAddress); - - while (len--) - *bp++ = hy_inpw((unsigned char) tmp); - -} - -static inline void io_insw(unsigned int addr, void *buf, int len) -{ - unsigned long tmp; - unsigned short *bp = (unsigned short *) buf; - - tmp = (common_io_access(addr)) | ((0xf & addr) << IORegAddress); - - while (len--) - *bp++ = _swapw((unsigned short)hy_inpw(tmp)); - -} - -static inline void io_insl(unsigned int addr, void *buf, int len) -{ - unsigned long tmp; - unsigned int *bp = (unsigned int *) buf; - - tmp = (common_io_access(addr)) | ((0xf & addr) << IORegAddress); - - while (len--) - *bp++ = _swapl((unsigned int)hy_inpw(tmp)); -} - -#define inb(addr) readb(addr) -#define inw(addr) readw(addr) -#define inl(addr) readl(addr) -#define outb(x,addr) ((void) writeb(x,addr)) -#define outw(x,addr) ((void) writew(x,addr)) -#define outl(x,addr) ((void) writel(x,addr)) - -#define insb(a,b,l) io_insb(a,b,l) -#define insw(a,b,l) io_insw(a,b,l) -#define insl(a,b,l) io_insl(a,b,l) -#define outsb(a,b,l) io_outsb(a,b,l) -#define outsw(a,b,l) io_outsw(a,b,l) -#define outsl(a,b,l) io_outsl(a,b,l) - -#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) -#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) - -#endif /* ETHERBOOT_IO_H */ diff --git a/src/arch/e1/include/latch.h b/src/arch/e1/include/latch.h deleted file mode 100644 index 0ee6fb2a7..000000000 --- a/src/arch/e1/include/latch.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef LATCH_H -#define LATCH_H - -//#define TICKS_PER_SEC (1000000UL) -#define TICKS_PER_SEC (625000UL) - -/* Fixed timer interval used for calibrating a more precise timer */ -//#define LATCHES_PER_SEC 10 - -void sleep_latch(void); - -#endif /* LATCH_H */ diff --git a/src/arch/e1/include/limits.h b/src/arch/e1/include/limits.h deleted file mode 100644 index e7056ce5c..000000000 --- a/src/arch/e1/include/limits.h +++ /dev/null @@ -1,34 +0,0 @@ -/*--------------------------------------------------------------------------*/ -/* Project: ANSI C Standard Header Files */ -/* File: LIMITS.H */ -/* Edited by: hyperstone electronics GmbH */ -/* Am Seerhein 8 */ -/* D-78467 Konstanz, Germany */ -/* Date: January 30, 1996 */ -/*--------------------------------------------------------------------------*/ -/* Purpose: */ -/* The header file <limits.h> defines limits of ordinal types */ -/* (char, short, int, long) */ -/*--------------------------------------------------------------------------*/ - -#ifndef __LIMITS_H -#define __LIMITS_H 1 - -#define MB_LEN_MAX 1 -#define CHAR_BIT 8 -#define SCHAR_MIN -128L -#define SCHAR_MAX 127L -#define UCHAR_MAX 255 -#define CHAR_MIN 0 -#define CHAR_MAX UCHAR_MAX -#define SHRT_MIN -32768 -#define SHRT_MAX 32767 -#define USHRT_MAX 65535 -#define INT_MIN 0x80000000 -#define INT_MAX 0x7FFFFFFF -#define UINT_MAX 0xFFFFFFFFL -#define LONG_MIN INT_MIN -#define LONG_MAX INT_MAX -#define ULONG_MAX UINT_MAX - -#endif diff --git a/src/arch/e1/include/setjmp.h b/src/arch/e1/include/setjmp.h deleted file mode 100644 index ef401b625..000000000 --- a/src/arch/e1/include/setjmp.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _SETJMP_H -#define _SETJMP_H - - -typedef struct { - unsigned long G3; - unsigned long G4; - unsigned long SavedSP; - unsigned long SavedPC; - unsigned long SavedSR; - unsigned long ReturnValue; -} __jmp_buf[1]; - -typedef struct __jmp_buf_tag /* C++ doesn't like tagless structs. */ - { - __jmp_buf __jmpbuf; /* Calling environment. */ - int __mask_was_saved; /* Saved the signal mask? */ - } jmp_buf[1]; - -void longjmp(jmp_buf state, int value ); -int setjmp( jmp_buf state); - -#endif diff --git a/src/arch/e1/include/stdint.h b/src/arch/e1/include/stdint.h deleted file mode 100644 index 505cc3751..000000000 --- a/src/arch/e1/include/stdint.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef STDINT_H -#define STDINT_H - -typedef unsigned long size_t; - -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned long uint32_t; -typedef unsigned long long uint64_t; - -typedef signed char int8_t; -typedef signed short int16_t; -typedef signed int int32_t; -typedef signed long long int64_t; - -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed long s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - -#endif /* STDINT_H */ |
