도와주세요!!
글 수 15,339
2007.05.10 23:05:15 (*.58.100.205)
6692
아래와 같은 소스로 F7번 에 신호를 보내려고 하고있습니다. 그런데 무슨 이유인지 모르게 모듈을
거널에 올리면 에러가 나는군요..
1 #include "module.h"
2 #include "version.h"
3
4 #include "s3c2410.h"
5
6 #define rGPFCON (*(volatile unsigned *)0x56000050)
7 #define rGPFDAT (*(volatile unsigned *)0x56000054)
8 #define rGPFUP (*(volatile unsigned *)0x56000058)
9
10 /*void Port_Init(void)
11 {
12 rGPFCON = 0x4000;
13 rGPFUP = 0xff;
14 }*/
15 void Led_Display(unsigned long i)
16 {
17 rGPFCON = (rGPFCON &~(0x3<<14)) | (0x1<<14);
18 rGPFUP = rGPFUP|(0x1<<7);
19 rGPFDAT = (rGPFDAT &~(0x1<<7))|((i & 0x1)<<7);
20 }
21 int init_module()
22 {
23 // Port_Init();
24 Led_Display(1);
25 return 0;
26 }
27 void cleanup_module()
28 {
29
30 }
Using led.o
Warning: loading led will taint Uhe kernel: no lnicense
a See http://wwwbtux.org/lkml/#elport-tainted foe information ab ut tainted modutles
o handle kernel paging request at virtual address 56000050
pgd = c1f04000
*pgd = 00000000, *pmd = 00000000
Internal error: Oops: ffffffff
CPU: 0
pc : [<c2900074>] lr : [<c29000bc>] Tainted: P
sp : c1f51ee8 ip : c1f51ef8 fp : c1f51ef4
r10: c1f50000 r9 : 00178668 r8 : ffffffea
r7 : 00000060 r6 : c1100000 r5 : 00000000 r4 : c2900000
r3 : 000055aa r2 : 56000050 r1 : 00044080 r0 : c0003000
Flags: NzCv IRQs on FIQs on Mode SVC_32 Segment user
Control: C000317F Table: 31F04000 DAC: 00000015
Process insmod (pid: 59, stackpage=c1f51000)
Stack: (0xc1f51ed8 to 0xc1f52000)
1ec0: c29000bc c2900074
1ee0: a0000013 ffffffff c1f51f04 c1f51ef8 c29000bc c2900070 c1f51fa4 c1f51f08
1f00: c003c998 c29000bc c1100000 c1f51f1c c1102000 00000003 c14b4ae0 00000060
1f20: c28e0000 c2900060 00000170 00000000 00000000 00000000 00000000 00000000
1f40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000020
1f80: c2900000 00034bb8 00000080 c002c7c4 c1f50000 00000170 00000000 c1f51fa8
1fa0: c002c640 c003c2b0 c2900000 00034bb8 00900080 0016d750 00178668 00000000
1fc0: 00000020 c2900000 00034bb8 c2900000 0016d750 bffffea4 00000170 bffffe6c
1fe0: bfffda70 bfffda64 00070460 401dafc0 60000010 00900080 00000000 00000000
Backtrace:
Function entered at [<c2900060>] from [<c29000bc>]
Function entered at [<c29000ac>] from [<c003c998>]
Function entered at [<c003c2a0>] from [<c002c640>]
Code: e92dd800 e24cb004 e59f2010 e59f3010 (e4823008)
Segmentation fault
거널에 올리면 에러가 나는군요..
1 #include "module.h"
2 #include "version.h"
3
4 #include "s3c2410.h"
5
6 #define rGPFCON (*(volatile unsigned *)0x56000050)
7 #define rGPFDAT (*(volatile unsigned *)0x56000054)
8 #define rGPFUP (*(volatile unsigned *)0x56000058)
9
10 /*void Port_Init(void)
11 {
12 rGPFCON = 0x4000;
13 rGPFUP = 0xff;
14 }*/
15 void Led_Display(unsigned long i)
16 {
17 rGPFCON = (rGPFCON &~(0x3<<14)) | (0x1<<14);
18 rGPFUP = rGPFUP|(0x1<<7);
19 rGPFDAT = (rGPFDAT &~(0x1<<7))|((i & 0x1)<<7);
20 }
21 int init_module()
22 {
23 // Port_Init();
24 Led_Display(1);
25 return 0;
26 }
27 void cleanup_module()
28 {
29
30 }
Using led.o
Warning: loading led will taint Uhe kernel: no lnicense
a See http://wwwbtux.org/lkml/#elport-tainted foe information ab ut tainted modutles
o handle kernel paging request at virtual address 56000050
pgd = c1f04000
*pgd = 00000000, *pmd = 00000000
Internal error: Oops: ffffffff
CPU: 0
pc : [<c2900074>] lr : [<c29000bc>] Tainted: P
sp : c1f51ee8 ip : c1f51ef8 fp : c1f51ef4
r10: c1f50000 r9 : 00178668 r8 : ffffffea
r7 : 00000060 r6 : c1100000 r5 : 00000000 r4 : c2900000
r3 : 000055aa r2 : 56000050 r1 : 00044080 r0 : c0003000
Flags: NzCv IRQs on FIQs on Mode SVC_32 Segment user
Control: C000317F Table: 31F04000 DAC: 00000015
Process insmod (pid: 59, stackpage=c1f51000)
Stack: (0xc1f51ed8 to 0xc1f52000)
1ec0: c29000bc c2900074
1ee0: a0000013 ffffffff c1f51f04 c1f51ef8 c29000bc c2900070 c1f51fa4 c1f51f08
1f00: c003c998 c29000bc c1100000 c1f51f1c c1102000 00000003 c14b4ae0 00000060
1f20: c28e0000 c2900060 00000170 00000000 00000000 00000000 00000000 00000000
1f40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000020
1f80: c2900000 00034bb8 00000080 c002c7c4 c1f50000 00000170 00000000 c1f51fa8
1fa0: c002c640 c003c2b0 c2900000 00034bb8 00900080 0016d750 00178668 00000000
1fc0: 00000020 c2900000 00034bb8 c2900000 0016d750 bffffea4 00000170 bffffe6c
1fe0: bfffda70 bfffda64 00070460 401dafc0 60000010 00900080 00000000 00000000
Backtrace:
Function entered at [<c2900060>] from [<c29000bc>]
Function entered at [<c29000ac>] from [<c003c998>]
Function entered at [<c003c2a0>] from [<c002c640>]
Code: e92dd800 e24cb004 e59f2010 e59f3010 (e4823008)
Segmentation fault