aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sharp-binary-only/sharp-aticore-oss-1.0.1/aticore-2.6.patch
blob: 44b06c32ceb3cc2b4a484b054f592990a111be5f (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
diff -U3 -N AtiCore-1.0.1.orig/Makefile AtiCore-1.0.1/Makefile
--- AtiCore-1.0.1.orig/Makefile	2005-04-05 09:39:23.926196896 +0000
+++ AtiCore-1.0.1/Makefile	2005-04-05 09:58:18.009789984 +0000
@@ -25,11 +25,13 @@
 LD = armv5tel-linux-ld
 endif
 
-ifndef $(ASFLAGS)
+ifeq "$(FPU)" "soft"
+ASFLAGS=-mfpu=softfpa -mcpu=xscale
+else
 ASFLAGS=-mcpu=xscale
 endif
 
-OBJS  = aticore_0.o
+OBJS  = aticore_0.o map.o
 OBJS += aticore_1.o aticore_2.o aticore_3.o aticore_4.o aticore_5.o aticore_6.o aticore_7.o aticore_8.o aticore_9.o
 # aticore_10.o
 OBJS += aticore_11.o aticore_12.o aticore_13.o aticore_14.o aticore_15.o aticore_16.o aticore_17.o aticore_18.o aticore_19.o aticore_20.o
diff -U3 -N AtiCore-1.0.1.orig/aticore_1.s AtiCore-1.0.1/aticore_1.s
--- AtiCore-1.0.1.orig/aticore_1.s	2005-04-05 09:39:23.928196592 +0000
+++ AtiCore-1.0.1/aticore_1.s	2005-04-05 10:05:35.745244080 +0000
@@ -282,21 +282,6 @@
 		LDMDB	R11, {R4,R11,SP,PC}
 
 ;;;;;
-		.GLOBAL MapBar
-		.type	MapBar, %function
-MapBar:
-		MOV	R12, SP
-		STMFD	SP!, {R11,R12,LR,PC}
-		SUB	R11, R12, #4
-		MOV	R0, #0xF1000000
-		LDR	R3, =unk_41948C
-		SUB	SP, SP,	#0x44
-		STR	R0, [R3]
-		B	.loc_34D228
-.loc_34D228:
-		LDMDB	R11, {R11,SP,PC}
-
-;;;;;
 		.GLOBAL UnMapBar
 		.type	UnMapBar, %function
 UnMapBar:
diff -U3 -N AtiCore-1.0.1.orig/map.c AtiCore-1.0.1/map.c
--- AtiCore-1.0.1.orig/map.c	1970-01-01 00:00:00.000000000 +0000
+++ AtiCore-1.0.1/map.c	2005-04-05 09:43:15.469996888 +0000
@@ -0,0 +1,34 @@
+#include <fcntl.h>
+#include <sys/mman.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+extern void *unk_41948C;
+
+void * MapBar(int Dev_Handle, int rp_unk1)
+{
+	int fd;
+	void *ptr;
+
+	fd = open ("/dev/mem", O_RDWR | O_SYNC);
+	if (fd < 0)
+	{
+		perror ("/dev/mem");
+		exit (1);
+	}
+
+	ptr = mmap (NULL, 0x01000000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0x08000000);
+	if (ptr == NULL)
+	{
+		perror ("mmap");
+		exit (1);
+	}
+
+	printf("MapBar: %p\n",ptr);
+
+	unk_41948C = ptr;
+
+	return ptr;
+}
+