Skip to content

Commit a662fb8

Browse files
author
helgek
committed
Using kernel headers directly is depreceated and also not necessary. Use
only "published" interfaces from linux-libc-dev and import a local copy of the missing asm-alpha/pal.h and asm-alpha/system.h from the kernel sources for use by head.S and aboot.c. This patch is taken from the Debian version, c.f. http://bugs.debian.org/437296 for details.
1 parent 17b2436 commit a662fb8

File tree

14 files changed

+393
-21
lines changed

14 files changed

+393
-21
lines changed

aboot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
#include <linux/version.h>
2525

2626
#include <asm/console.h>
27-
#include <asm/hwrpb.h>
28-
#include <asm/system.h>
27+
#include "hwrpb.h"
28+
#include "system.h"
2929

3030
#include <alloca.h>
3131
#include <errno.h>

cons.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#include <linux/kernel.h>
44

55
#include <asm/console.h>
6-
#include <asm/hwrpb.h>
7-
#include <asm/system.h>
6+
#include "hwrpb.h"
7+
#include "system.h"
88

99
#include "aboot.h"
1010
#include "cons.h"
@@ -20,7 +20,6 @@
2020
#endif
2121

2222
long cons_dev; /* console device */
23-
extern long int dispatch(); /* Need the full 64 bit return here...*/
2423

2524
long
2625
cons_puts(const char *str, long len)

disk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
#include <linux/elf.h>
3737
#include <asm/console.h>
38-
#include <asm/system.h>
38+
#include "system.h"
3939
#include <asm/elf.h>
4040

4141
extern struct bootfs ext2fs;

fs/dummy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Michael Schwingen ([email protected]).
66
*/
7-
#include <asm/system.h>
7+
#include "system.h"
88

99
#include <config.h>
1010
#include <aboot.h>

head.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* initial bootloader stuff..
55
*/
66

7-
#include <asm/system.h>
7+
#include "pal.h"
88

99
#include <config.h>
1010

@@ -170,4 +170,4 @@ run_kernel:
170170
mov $16,$27
171171
mov $17,$30
172172
jmp $31,($27)
173-
.end run_kernel
173+
.end run_kernel

include/aboot.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <stdarg.h>
55

6-
#include <asm/hwrpb.h>
6+
#include "hwrpb.h"
77

88
#include <setjmp.h>
99

include/pal.h

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#ifndef __ALPHA_PAL_H
2+
#define __ALPHA_PAL_H
3+
4+
/*
5+
* Common PAL-code
6+
*/
7+
#define PAL_halt 0
8+
#define PAL_cflush 1
9+
#define PAL_draina 2
10+
#define PAL_bpt 128
11+
#define PAL_bugchk 129
12+
#define PAL_chmk 131
13+
#define PAL_callsys 131
14+
#define PAL_imb 134
15+
#define PAL_rduniq 158
16+
#define PAL_wruniq 159
17+
#define PAL_gentrap 170
18+
#define PAL_nphalt 190
19+
20+
/*
21+
* VMS specific PAL-code
22+
*/
23+
#define PAL_swppal 10
24+
#define PAL_mfpr_vptb 41
25+
26+
/*
27+
* OSF specific PAL-code
28+
*/
29+
#define PAL_cserve 9
30+
#define PAL_wripir 13
31+
#define PAL_rdmces 16
32+
#define PAL_wrmces 17
33+
#define PAL_wrfen 43
34+
#define PAL_wrvptptr 45
35+
#define PAL_jtopal 46
36+
#define PAL_swpctx 48
37+
#define PAL_wrval 49
38+
#define PAL_rdval 50
39+
#define PAL_tbi 51
40+
#define PAL_wrent 52
41+
#define PAL_swpipl 53
42+
#define PAL_rdps 54
43+
#define PAL_wrkgp 55
44+
#define PAL_wrusp 56
45+
#define PAL_wrperfmon 57
46+
#define PAL_rdusp 58
47+
#define PAL_whami 60
48+
#define PAL_retsys 61
49+
#define PAL_rti 63
50+
51+
#endif /* __ALPHA_PAL_H */

0 commit comments

Comments
 (0)