summaryrefslogtreecommitdiffstats
path: root/src/include/osdep.h
blob: 1b03e5671ea4a7bdff72fc5a3c60547df2d56200 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef	ETHERBOOT_OSDEP_H
#define ETHERBOOT_OSDEP_H

#define __unused __attribute__((unused))
#define __aligned __attribute__((aligned(16)))
#define PACKED __attribute__((packed))

/* Optimization barrier */
/* The "volatile" is due to gcc bugs */
#define barrier() __asm__ __volatile__("": : :"memory")

#include "stdint.h"
#include "limits.h"
#include "string.h"
#include "io.h"
#include "endian.h"
#include "byteswap.h"
#include "setjmp.h"
#include "latch.h"
#include "callbacks.h"
#include "hooks.h"

/* within 1MB of 4GB is too close. 
 * MAX_ADDR is the maximum address we can easily do DMA to.
 */
#define MAX_ADDR (0xfff00000UL)

typedef	unsigned long Address;

/* ANSI prototyping macro */
#ifdef	__STDC__
#define	P(x)	x
#else
#define	P(x)	()
#endif

#endif

/*
 * Local variables:
 *  c-basic-offset: 8
 * End:
 */