public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] nds32: fix ptrace and interrupt register overflow
@ 2012-03-11  8:56 Macpaul Lin
  2012-03-11  8:56 ` [U-Boot] [PATCH 2/2] nds32/n1213: correct vector table in start.S Macpaul Lin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Macpaul Lin @ 2012-03-11  8:56 UTC (permalink / raw)
  To: u-boot

Fix ptrace and interrupt register overflow warning.
Add missing P0 and P1 (r26 and r27) into register lists.
These register are usually used in OS.

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
---
 arch/nds32/include/asm/ptrace.h |    2 ++
 arch/nds32/lib/interrupts.c     |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/nds32/include/asm/ptrace.h b/arch/nds32/include/asm/ptrace.h
index 4336083..ee181b2 100644
--- a/arch/nds32/include/asm/ptrace.h
+++ b/arch/nds32/include/asm/ptrace.h
@@ -38,6 +38,8 @@ struct pt_regs {
 	NDS32_REG d1hi;
 	NDS32_REG d1lo;
 	NDS32_REG r[26];	/* r0 - r25 */
+	NDS32_REG p0;		/* r26 - used by OS */
+	NDS32_REG p1;		/* r27 - used by OS */
 	NDS32_REG fp;		/* r28 */
 	NDS32_REG gp;		/* r29 */
 	NDS32_REG lp;		/* r30 */
diff --git a/arch/nds32/lib/interrupts.c b/arch/nds32/lib/interrupts.c
index 974d52a..ca8c227 100644
--- a/arch/nds32/lib/interrupts.c
+++ b/arch/nds32/lib/interrupts.c
@@ -91,7 +91,7 @@ void show_regs(struct pt_regs *regs)
 	printf("D1H: %08lx  D1L: %08lx  D0H: %08lx  D0L: %08lx\n",
 		regs->d1hi, regs->d1lo, regs->d0hi, regs->d0lo);
 	printf("r27: %08lx  r26: %08lx  r25: %08lx  r24: %08lx\n",
-		regs->r[27], regs->r[26], regs->r[25], regs->r[24]);
+		regs->p1, regs->p0, regs->r[25], regs->r[24]);
 	printf("r23: %08lx  r22: %08lx  r21: %08lx  r20: %08lx\n",
 		regs->r[23], regs->r[22], regs->r[21], regs->r[20]);
 	printf("r19: %08lx  r18: %08lx  r17: %08lx  r16: %08lx\n",
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 2/2] nds32/n1213: correct vector table in start.S
  2012-03-11  8:56 [U-Boot] [PATCH 1/2] nds32: fix ptrace and interrupt register overflow Macpaul Lin
@ 2012-03-11  8:56 ` Macpaul Lin
  2012-03-11  9:03 ` [U-Boot] [PATCH v2 1/2] nds32: fix ptrace and interrupt register overflow Macpaul Lin
  2012-03-19  7:54 ` [U-Boot] [PATCH 1/2] nds32: fix ptrace and interrupt register overflow Macpaul Lin
  2 siblings, 0 replies; 6+ messages in thread
From: Macpaul Lin @ 2012-03-11  8:56 UTC (permalink / raw)
  To: u-boot

Correct definition of vector table in start.S

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
---
 arch/nds32/cpu/n1213/start.S |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/arch/nds32/cpu/n1213/start.S b/arch/nds32/cpu/n1213/start.S
index 1d1fcf7..518628a 100644
--- a/arch/nds32/cpu/n1213/start.S
+++ b/arch/nds32/cpu/n1213/start.S
@@ -68,15 +68,17 @@ _start:	j	reset
 	j	tlb_not_present
 	j	tlb_misc
 	j	tlb_vlpt_miss
-	j	cache_parity_error
+	j	machine_error
 	j	debug
 	j	general_exception
+	j	syscall
 	j	internal_interrupt		! H0I
 	j	internal_interrupt		! H1I
 	j	internal_interrupt		! H2I
 	j	internal_interrupt		! H3I
 	j	internal_interrupt		! H4I
 	j	internal_interrupt		! H5I
+	j	software_interrupt		! S0I
 
 	.balign 16
 
@@ -477,7 +479,7 @@ tlb_vlpt_miss:
 	bal	do_interruption
 
 	.align	5
-cache_parity_error:
+machine_error:
 	SAVE_ALL
 	move	$r0, $sp			! To get the kernel stack
 	li	$r1, 5				! Determine interruption type
@@ -498,13 +500,27 @@ general_exception:
 	bal	do_interruption
 
 	.align	5
-internal_interrupt:
+syscall
 	SAVE_ALL
 	move	$r0, $sp			! To get the kernel stack
 	li	$r1, 8				! Determine interruption type
 	bal	do_interruption
 
 	.align	5
+internal_interrupt:
+	SAVE_ALL
+	move	$r0, $sp			! To get the kernel stack
+	li	$r1, 9				! Determine interruption type
+	bal	do_interruption
+
+	.align	5
+software_interrupt:
+	SAVE_ALL
+	move	$r0, $sp			! To get the kernel stack
+	li	$r1, 10				! Determine interruption type
+	bal	do_interruption
+
+	.align	5
 
 /*
  * void reset_cpu(ulong addr);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 1/2] nds32: fix ptrace and interrupt register overflow
  2012-03-11  8:56 [U-Boot] [PATCH 1/2] nds32: fix ptrace and interrupt register overflow Macpaul Lin
  2012-03-11  8:56 ` [U-Boot] [PATCH 2/2] nds32/n1213: correct vector table in start.S Macpaul Lin
@ 2012-03-11  9:03 ` Macpaul Lin
  2012-03-11  9:03   ` [U-Boot] [PATCH v2 2/2] nds32/n1213: correct vector table in start.S Macpaul Lin
  2012-03-19  7:54 ` [U-Boot] [PATCH 1/2] nds32: fix ptrace and interrupt register overflow Macpaul Lin
  2 siblings, 1 reply; 6+ messages in thread
From: Macpaul Lin @ 2012-03-11  9:03 UTC (permalink / raw)
  To: u-boot

Fix ptrace and interrupt register overflow warning.
Add missing P0 and P1 (r26 and r27) into register lists.
These register are usually used in OS.

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
---
Change for V2:
  - no change.

 arch/nds32/include/asm/ptrace.h |    2 ++
 arch/nds32/lib/interrupts.c     |    2 +-
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/nds32/include/asm/ptrace.h b/arch/nds32/include/asm/ptrace.h
index 4336083..ee181b2 100644
--- a/arch/nds32/include/asm/ptrace.h
+++ b/arch/nds32/include/asm/ptrace.h
@@ -38,6 +38,8 @@ struct pt_regs {
 	NDS32_REG d1hi;
 	NDS32_REG d1lo;
 	NDS32_REG r[26];	/* r0 - r25 */
+	NDS32_REG p0;		/* r26 - used by OS */
+	NDS32_REG p1;		/* r27 - used by OS */
 	NDS32_REG fp;		/* r28 */
 	NDS32_REG gp;		/* r29 */
 	NDS32_REG lp;		/* r30 */
diff --git a/arch/nds32/lib/interrupts.c b/arch/nds32/lib/interrupts.c
index 974d52a..ca8c227 100644
--- a/arch/nds32/lib/interrupts.c
+++ b/arch/nds32/lib/interrupts.c
@@ -91,7 +91,7 @@ void show_regs(struct pt_regs *regs)
 	printf("D1H: %08lx  D1L: %08lx  D0H: %08lx  D0L: %08lx\n",
 		regs->d1hi, regs->d1lo, regs->d0hi, regs->d0lo);
 	printf("r27: %08lx  r26: %08lx  r25: %08lx  r24: %08lx\n",
-		regs->r[27], regs->r[26], regs->r[25], regs->r[24]);
+		regs->p1, regs->p0, regs->r[25], regs->r[24]);
 	printf("r23: %08lx  r22: %08lx  r21: %08lx  r20: %08lx\n",
 		regs->r[23], regs->r[22], regs->r[21], regs->r[20]);
 	printf("r19: %08lx  r18: %08lx  r17: %08lx  r16: %08lx\n",
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 2/2] nds32/n1213: correct vector table in start.S
  2012-03-11  9:03 ` [U-Boot] [PATCH v2 1/2] nds32: fix ptrace and interrupt register overflow Macpaul Lin
@ 2012-03-11  9:03   ` Macpaul Lin
  2012-03-19  7:55     ` Macpaul Lin
  0 siblings, 1 reply; 6+ messages in thread
From: Macpaul Lin @ 2012-03-11  9:03 UTC (permalink / raw)
  To: u-boot

Correct definition of vector table in start.S

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
---
Changes for v2:
  - fix symbol declaration error in start.S

 arch/nds32/cpu/n1213/start.S |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/arch/nds32/cpu/n1213/start.S b/arch/nds32/cpu/n1213/start.S
index 1d1fcf7..889bf8b 100644
--- a/arch/nds32/cpu/n1213/start.S
+++ b/arch/nds32/cpu/n1213/start.S
@@ -68,15 +68,17 @@ _start:	j	reset
 	j	tlb_not_present
 	j	tlb_misc
 	j	tlb_vlpt_miss
-	j	cache_parity_error
+	j	machine_error
 	j	debug
 	j	general_exception
+	j	syscall
 	j	internal_interrupt		! H0I
 	j	internal_interrupt		! H1I
 	j	internal_interrupt		! H2I
 	j	internal_interrupt		! H3I
 	j	internal_interrupt		! H4I
 	j	internal_interrupt		! H5I
+	j	software_interrupt		! S0I
 
 	.balign 16
 
@@ -477,7 +479,7 @@ tlb_vlpt_miss:
 	bal	do_interruption
 
 	.align	5
-cache_parity_error:
+machine_error:
 	SAVE_ALL
 	move	$r0, $sp			! To get the kernel stack
 	li	$r1, 5				! Determine interruption type
@@ -498,13 +500,27 @@ general_exception:
 	bal	do_interruption
 
 	.align	5
-internal_interrupt:
+syscall:
 	SAVE_ALL
 	move	$r0, $sp			! To get the kernel stack
 	li	$r1, 8				! Determine interruption type
 	bal	do_interruption
 
 	.align	5
+internal_interrupt:
+	SAVE_ALL
+	move	$r0, $sp			! To get the kernel stack
+	li	$r1, 9				! Determine interruption type
+	bal	do_interruption
+
+	.align	5
+software_interrupt:
+	SAVE_ALL
+	move	$r0, $sp			! To get the kernel stack
+	li	$r1, 10				! Determine interruption type
+	bal	do_interruption
+
+	.align	5
 
 /*
  * void reset_cpu(ulong addr);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH 1/2] nds32: fix ptrace and interrupt register overflow
  2012-03-11  8:56 [U-Boot] [PATCH 1/2] nds32: fix ptrace and interrupt register overflow Macpaul Lin
  2012-03-11  8:56 ` [U-Boot] [PATCH 2/2] nds32/n1213: correct vector table in start.S Macpaul Lin
  2012-03-11  9:03 ` [U-Boot] [PATCH v2 1/2] nds32: fix ptrace and interrupt register overflow Macpaul Lin
@ 2012-03-19  7:54 ` Macpaul Lin
  2 siblings, 0 replies; 6+ messages in thread
From: Macpaul Lin @ 2012-03-19  7:54 UTC (permalink / raw)
  To: u-boot

Hi Macpaul,

2012/3/11 Macpaul Lin <macpaul@gmail.com>

> Fix ptrace and interrupt register overflow warning.
> Add missing P0 and P1 (r26 and r27) into register lists.
> These register are usually used in OS.
>
> Signed-off-by: Macpaul Lin <macpaul@gmail.com>
>

Applied to u-boot-nds32/master
Thanks.

-- 
Best regards,
Macpaul Lin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH v2 2/2] nds32/n1213: correct vector table in start.S
  2012-03-11  9:03   ` [U-Boot] [PATCH v2 2/2] nds32/n1213: correct vector table in start.S Macpaul Lin
@ 2012-03-19  7:55     ` Macpaul Lin
  0 siblings, 0 replies; 6+ messages in thread
From: Macpaul Lin @ 2012-03-19  7:55 UTC (permalink / raw)
  To: u-boot

Hi Macpaul,

2012/3/11 Macpaul Lin <macpaul@gmail.com>

> Correct definition of vector table in start.S
>
> Signed-off-by: Macpaul Lin <macpaul@gmail.com>
> ---
> Changes for v2:
>  - fix symbol declaration error in start.S
>

Applied to u-boot-nds32/master
Thanks.

-- 
Best regards,
Macpaul Lin

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-03-19  7:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-11  8:56 [U-Boot] [PATCH 1/2] nds32: fix ptrace and interrupt register overflow Macpaul Lin
2012-03-11  8:56 ` [U-Boot] [PATCH 2/2] nds32/n1213: correct vector table in start.S Macpaul Lin
2012-03-11  9:03 ` [U-Boot] [PATCH v2 1/2] nds32: fix ptrace and interrupt register overflow Macpaul Lin
2012-03-11  9:03   ` [U-Boot] [PATCH v2 2/2] nds32/n1213: correct vector table in start.S Macpaul Lin
2012-03-19  7:55     ` Macpaul Lin
2012-03-19  7:54 ` [U-Boot] [PATCH 1/2] nds32: fix ptrace and interrupt register overflow Macpaul Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox