From e44e3482bdb4d0ebde2d8b41830ac2cdb07948fb Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Fri, 28 Aug 2015 09:58:54 +0800 Subject: Add qemu 2.4.0 Change-Id: Ic99cbad4b61f8b127b7dc74d04576c0bcbaaf4f5 Signed-off-by: Yang Zhang --- qemu/roms/openbios/include/arch/ia64/elf.h | 5 +++ qemu/roms/openbios/include/arch/ia64/io.h | 59 +++++++++++++++++++++++++++ qemu/roms/openbios/include/arch/ia64/types.h | 60 ++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 qemu/roms/openbios/include/arch/ia64/elf.h create mode 100644 qemu/roms/openbios/include/arch/ia64/io.h create mode 100644 qemu/roms/openbios/include/arch/ia64/types.h (limited to 'qemu/roms/openbios/include/arch/ia64') diff --git a/qemu/roms/openbios/include/arch/ia64/elf.h b/qemu/roms/openbios/include/arch/ia64/elf.h new file mode 100644 index 000000000..782ddc727 --- /dev/null +++ b/qemu/roms/openbios/include/arch/ia64/elf.h @@ -0,0 +1,5 @@ +#define ARCH_ELF_CLASS ELFCLASS64 +#define ARCH_ELF_DATA ELFDATA2LSB +#define ARCH_ELF_MACHINE_OK(x) ((x)==EM_IA64) +typedef Elf64_Ehdr Elf_ehdr; +typedef Elf64_Phdr Elf_phdr; diff --git a/qemu/roms/openbios/include/arch/ia64/io.h b/qemu/roms/openbios/include/arch/ia64/io.h new file mode 100644 index 000000000..8f06dcdaf --- /dev/null +++ b/qemu/roms/openbios/include/arch/ia64/io.h @@ -0,0 +1,59 @@ +#ifndef _ASM_IO_H +#define _ASM_IO_H + +extern unsigned long virt_offset; + +#define phys_to_virt(phys) ((void *) ((unsigned long) (phys) - virt_offset)) +#define virt_to_phys(virt) ((unsigned long) (virt) + virt_offset) + +#define __SLOW_DOWN_IO "outb %%al,$0x80;" +static inline void slow_down_io(void) +{ + __asm__ __volatile__( + __SLOW_DOWN_IO +#ifdef REALLY_SLOW_IO + __SLOW_DOWN_IO __SLOW_DOWN_IO __SLOW_DOWN_IO +#endif + : : ); +} + +#define BUILDIO(bwl,bw,type) \ +static inline void out##bwl(unsigned type value, int port) { \ + __asm__ __volatile__("out" #bwl " %" #bw "0, %w1" : : "a"(value), "Nd"(port)); \ +} \ +static inline unsigned type in##bwl(int port) { \ + unsigned type value; \ + __asm__ __volatile__("in" #bwl " %w1, %" #bw "0" : "=a"(value) : "Nd"(port)); \ + return value; \ +} \ +static inline void out##bwl##_p(unsigned type value, int port) { \ + out##bwl(value, port); \ + slow_down_io(); \ +} \ +static inline unsigned type in##bwl##_p(int port) { \ + unsigned type value = in##bwl(port); \ + slow_down_io(); \ + return value; \ +} \ +static inline void outs##bwl(int port, const void *addr, unsigned long count) { \ + __asm__ __volatile__("rep; outs" #bwl : "+S"(addr), "+c"(count) : "d"(port)); \ +} \ +static inline void ins##bwl(int port, void *addr, unsigned long count) { \ + __asm__ __volatile__("rep; ins" #bwl : "+D"(addr), "+c"(count) : "d"(port)); \ +} + +#ifndef BOOTSTRAP +BUILDIO(b,b,char) +BUILDIO(w,w,short) +BUILDIO(l,,int) +#else +extern u8 inb( u32 reg ); +extern u16 inw( u32 reg ); +extern u32 inl( u32 reg ); +extern void insw( u32 reg, void *addr, unsigned long count ); +extern void outb( u32 reg, u8 val ); +extern void outw( u32 reg, u16 val ); +extern void outl( u32 reg, u32 val ); +extern void outsw( u32 reg, const void *addr, unsigned long count); +#endif +#endif diff --git a/qemu/roms/openbios/include/arch/ia64/types.h b/qemu/roms/openbios/include/arch/ia64/types.h new file mode 100644 index 000000000..cb09cda5b --- /dev/null +++ b/qemu/roms/openbios/include/arch/ia64/types.h @@ -0,0 +1,60 @@ +/* tag: data types for forth engine + * + * This file is autogenerated by types.sh. Do not edit! + * + * Copyright (C) 2003 Patrick Mauritz, Stefan Reinauer + * + * See the file "COPYING" for further information about + * the copyright and warranty status of this work. + */ + +#ifndef __TYPES_H +#define __TYPES_H + +#include + +/* endianess */ + +#include + +/* physical address */ + +typedef uint64_t phys_addr_t; + +#define FMT_plx "%016" PRIx64 + +/* cell based types */ + +typedef int64_t cell; +typedef uint64_t ucell; +typedef __int128_t dcell; +typedef __uint128_t ducell; + +typedef int64_t prom_arg_t; +typedef uint64_t prom_uarg_t; + +#define PRIdPROMARG PRId64 +#define PRIuPROMARG PRIu64 +#define PRIxPROMARG PRIx64 +#define FMT_prom_arg "%" PRIdPROMARG +#define FMT_prom_uarg "%" PRIuPROMARG +#define FMT_prom_uargx "%016" PRIxPROMARG + +#define bitspercell (sizeof(cell)<<3) +#define bitsperdcell (sizeof(dcell)<<3) + +#define BITS 64 + +/* size named types */ + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long u64; + +typedef char s8; +typedef short s16; +typedef int s32; +typedef long s64; + +#endif -- cgit 1.2.3-korg