aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-06-14 19:24:01 +0200
committerClifford Wolf <clifford@clifford.at>2014-06-14 19:24:01 +0200
commitebe2d733302fea50b75d3dd43d1a115e43dcb523 (patch)
tree943842e0b39912820db348bd72224906a49389e7 /frontends
parent1a487303a081849bd7561772641f90126dcce24e (diff)
downloadyosys-ebe2d733302fea50b75d3dd43d1a115e43dcb523.tar.gz
yosys-ebe2d733302fea50b75d3dd43d1a115e43dcb523.tar.bz2
yosys-ebe2d733302fea50b75d3dd43d1a115e43dcb523.zip
added first draft of real math testcase generator
Diffstat (limited to 'frontends')
0 files changed, 0 insertions, 0 deletions
d='n86' href='#n86'>86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
/*
 * Xen misc
 * 
 * Functions/decls that are/may be needed to link with Xen because
 * of x86 dependencies
 *
 * Copyright (C) 2004 Hewlett-Packard Co.
 *	Dan Magenheimer (dan.magenheimer@hp.com)
 *
 */

#include <linux/config.h>
#include <xen/sched.h>
#include <linux/efi.h>
#include <asm/processor.h>
#include <xen/serial.h>
#include <asm/io.h>
#include <xen/softirq.h>

efi_memory_desc_t ia64_efi_io_md;
EXPORT_SYMBOL(ia64_efi_io_md);
unsigned long wait_init_idle;
int phys_proc_id[NR_CPUS];
unsigned long loops_per_jiffy = (1<<12);	// from linux/init/main.c

unsigned int watchdog_on = 0;	// from arch/x86/nmi.c ?!?

void unw_init(void) { printf("unw_init() skipped (NEED FOR KERNEL UNWIND)\n"); }
void ia64_mca_init(void) { printf("ia64_mca_init() skipped (Machine check abort handling)\n"); }
void hpsim_setup(char **x) { printf("hpsim_setup() skipped (MAY NEED FOR CONSOLE INPUT!!!)\n"); }	

long
is_platform_hp_ski(void)
{
	int i;
	long cpuid[6];

	for (i = 0; i < 5; ++i)
		cpuid[i] = ia64_get_cpuid(i);
	if ((cpuid[0] & 0xff) != 'H') return 0;
	if ((cpuid[3] & 0xff) != 0x4) return 0;
	if (((cpuid[3] >> 8) & 0xff) != 0x0) return 0;
	if (((cpuid[3] >> 16) & 0xff) != 0x0) return 0;
	if (((cpuid[3] >> 24) & 0x7) != 0x7) return 0;
	return 1;
}

long
platform_is_hp_ski(void)
{
	extern long running_on_sim;
	return running_on_sim;
}

/* calls in xen/common code that are unused on ia64 */
void synchronise_pagetables(unsigned long cpu_mask) { return; }

int grant_table_create(struct domain *d) { return 0; }
void grant_table_destroy(struct domain *d)
{
	printf("grant_table_destroy: domain_destruct not tested!!!\n");
	printf("grant_table_destroy: ensure atomic_* calls work in domain_destruct!!\n");
	dummy();
	return;
}

struct pt_regs *get_execution_context(void) { return ia64_task_regs(current); }

void cleanup_writable_pagetable(struct domain *d, int what) { return; }

void raise_actimer_softirq(void)
{
	raise_softirq(AC_TIMER_SOFTIRQ);
}

///////////////////////////////
// from arch/x86/apic.c
///////////////////////////////

int reprogram_ac_timer(s_time_t timeout)
{
	struct exec_domain *ed = current;

	local_cpu_data->itm_next = timeout;
	if (is_idle_task(ed->domain)) vcpu_safe_set_itm(timeout);
	else vcpu_set_next_timer(current);
	return 1;
}

///////////////////////////////
// from arch/x86/dompage.c
///////////////////////////////

struct pfn_info *alloc_domheap_pages(struct domain *d, unsigned int order)
{
	printf("alloc_domheap_pages: called, not implemented\n");
}

void free_domheap_pages(struct pfn_info *pg, unsigned int order)
{
	printf("free_domheap_pages: called, not implemented\n");
}


unsigned long avail_domheap_pages(void)
{
	printf("avail_domheap_pages: called, not implemented\n");
	return 0;
}

///////////////////////////////
// from arch/x86/flushtlb.c
///////////////////////////////

u32 tlbflush_clock;
u32 tlbflush_time[NR_CPUS];

///////////////////////////////
// from arch/x86/memory.c
///////////////////////////////

void init_percpu_info(void)
{
	dummy();
    //memset(percpu_info, 0, sizeof(percpu_info));
}

void free_page_type(struct pfn_info *page, unsigned int type)
{
	dummy();
}

///////////////////////////////
// from arch/x86/pci.c
///////////////////////////////

int
pcibios_prep_mwi (struct pci_dev *dev)
{
	dummy();
}

///////////////////////////////
// from arch/x86/pci-irq.c
///////////////////////////////

void pcibios_enable_irq(struct pci_dev *dev)
{
	dummy();
}

///////////////////////////////
// from arch/ia64/pci-pc.c
///////////////////////////////

#include <xen/pci.h>

int pcibios_enable_device(struct pci_dev *dev, int mask)
{
	dummy();
	return 0;
}

int (*pci_config_read)(int seg, int bus, int dev, int fn, int reg, int len, u32 *value) = NULL;
int (*pci_config_write)(int seg, int bus, int dev, int fn, int reg, int len, u32 value) = NULL;

//struct pci_fixup pcibios_fixups[] = { { 0 } };
struct pci_fixup pcibios_fixups[] = { { 0 } };

void
pcibios_align_resource(void *data, struct resource *res,
		       unsigned long size, unsigned long align)
{
	dummy();
}

void
pcibios_update_resource(struct pci_dev *dev, struct resource *root,
			struct resource *res, int resource)
{
	dummy();
}

void __devinit  pcibios_fixup_bus(struct pci_bus *b)
{
	dummy();
}

void __init pcibios_init(void)
{
	dummy();
}

char * __devinit  pcibios_setup(char *str)
{
	dummy();
	return 0;
}

///////////////////////////////
// from arch/ia64/traps.c
///////////////////////////////

void show_registers(struct pt_regs *regs)
{
	dummy();
}	

///////////////////////////////
// from common/keyhandler.c
///////////////////////////////
void dump_pageframe_info(struct domain *d)
{
	printk("dump_pageframe_info not implemented\n");
}

///////////////////////////////
// from common/physdev.c
///////////////////////////////
void
physdev_init_dom0(struct domain *d)
{
}

int
physdev_pci_access_modify(domid_t id, int bus, int dev, int func, int enable)
{
	return -EINVAL;
}

// accomodate linux extable.c
//const struct exception_table_entry *
void *search_module_extables(unsigned long addr)
{
	return NULL;
}

void *module_text_address(unsigned long addr)
{
	return NULL;
}

// context_switch
void context_switch(struct exec_domain *prev, struct exec_domain *next)
{
	switch_to(prev,next);
	clear_bit(EDF_RUNNING, &prev->ed_flags);
	//if (!is_idle_task(next->domain) )
		//send_guest_virq(next, VIRQ_TIMER);
	schedule_tail(next);
}