NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-sh3/51724: landisk fails to reboot



The following reply was made to PR port-sh3/51724; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: port-sh3/51724: landisk fails to reboot
Date: Sun, 1 Jan 2017 00:04:52 +0000

 On Fri, Dec 16, 2016 at 05:10:00AM +0000, rokuyama%rk.phys.keio.ac.jp@localhost wrote:
  >   383          (void)*(volatile uint32_t *)0x80000001; /* CPU shutdown */
  > [...]
  >    252:   05 d2           mov.l   268 <machine_reset+0x24>,r2     ! 80000001
  >    254:   20 61           mov.b   @r2,r1
  >    256:   21 84           mov.b   @(1,r2),r0
  >    258:   22 84           mov.b   @(2,r2),r0
  >    25a:   23 84           mov.b   @(3,r2),r0
 
 I don't understand, but maybe that's because I don't actually speak
 sh3 assembler. It looks like it's doing exactly what the code says,
 modulo reading bytes at a time (I guess because it's unaligned?)
 
 Is the problem that it needs to be mov.l @r2, r1? Or is it supposed to
 be jumping to 80000001, which the code on line 383 doesn't do?
 
 (in which case, wouldn't it be better to do
    ((void (*)(void))0x80000001)();
 rather than use the gcc extension for goto?)
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index