aboutsummaryrefslogtreecommitdiffstats
path: root/examples/gowin
diff options
context:
space:
mode:
authorwhitequark <whitequark@whitequark.org>2020-05-03 16:19:42 +0000
committerGitHub <noreply@github.com>2020-05-03 16:19:42 +0000
commitd1c8837572fb343baccff4d766a8aa0bca26aab7 (patch)
treebbea96345b8ae0f6a383664b30acd241e4d98776 /examples/gowin
parent5c82c19b4b58dfa6a1e03195a81d4e9a23cd7848 (diff)
parente9f2d3f009d0c9da59758a6e14cddf1cebae1f59 (diff)
downloadyosys-d1c8837572fb343baccff4d766a8aa0bca26aab7.tar.gz
yosys-d1c8837572fb343baccff4d766a8aa0bca26aab7.tar.bz2
yosys-d1c8837572fb343baccff4d766a8aa0bca26aab7.zip
Merge pull request #2000 from whitequark/log_error-trap
kernel: Trap in `log_error()` when a debugger is attached
Diffstat (limited to 'examples/gowin')
0 files changed, 0 insertions, 0 deletions
a> 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
/*
 * Smp timebase synchronization for ppc.
 *
 * Copyright (C) 2003 Samuel Rydh (samuel@ibrium.se)
 *
 */
/* XXX Xen hacks ... */
#define get_tb() get_timebase()
#define set_tb(u,l) set_timebase(u,l)
#define kmalloc(s,f) xmalloc_bytes(s);
#define kfree(p) xfree(p)
#define abs(x) ({				\
		int __x = (x);			\
		(__x < 0) ? -__x : __x;		\
	})

#include <xen/kernel.h>
#include <xen/sched.h>
#include <xen/smp.h>
#ifndef __XEN__ 
#include <linux/unistd.h>
#endif
#include <xen/init.h>
#include <asm/atomic.h>
#include <asm/smp.h>
#include <asm/time.h>


/* don't mess with IRQs */
#define local_irq_enable()
#define local_irq_disable()

#define NUM_ITER		300

enum {
	kExit=0, kSetAndTest, kTest
};

static struct {
	volatile u64		tb;
	volatile u64		mark;
	volatile int		cmd;
	volatile int		handshake;
	int			filler[2];

	volatile int		ack;
	int			filler2[7];