From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC0qQ-0002nh-PX for qemu-devel@nongnu.org; Wed, 30 Nov 2016 04:06:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC0qM-0005r2-RL for qemu-devel@nongnu.org; Wed, 30 Nov 2016 04:06:26 -0500 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:50693) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cC0qM-0005mA-L7 for qemu-devel@nongnu.org; Wed, 30 Nov 2016 04:06:22 -0500 Date: Wed, 30 Nov 2016 09:02:32 +0100 From: Aurelien Jarno Message-ID: <20161130080232.whbjegirbddf5ned@aurel32.net> References: <20161130010151.GL2546@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="53n75mw7eo4qaeaf" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] qemu-system-sh4 vs qemu-system-arm/i386 default behavior List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: Tom Rini , qemu-devel@nongnu.org, Magnus Damm --53n75mw7eo4qaeaf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2016-11-30 08:33, Thomas Huth wrote: > On 30.11.2016 02:01, Tom Rini wrote: > > Hey all, > >=20 > > I'm trying to make use of the r2d platform for U-Boot testing via QEMU. > > After applying a series[1] I can use the kernel.org sh4 toolchain to get > > a u-boot.bin that runs, mostly. I say mostly as first of all I have to > > pass "-monitor null -serial null -serial stdio -nographic" to > > qemu-system-sh4 and in that order for me to get output from U-Boot on > > the prompt. On other platforms such as arm and vexpress or i386 and the > > 'pc' machine I do not need to do this. Does anyone have any idea why > > this might be and where to start poking in the code to fix this? The reason is that u-boot and the linux kernel do not have the same way to number the serial port than the physical hardware. Therefore u-boot and the Linux kernel use the second physical serial port .The question is whether we should number our ports from the software (or part of the sofrware) or hardware point of view. > The "-serial" parameter is related to the serial_hds[] array in the > code, so you could search for that one. >=20 > The following line in hw/sh4/r2d.c looks somewhat suspicious: >=20 > sm501_init(address_space_mem, 0x10000000, SM501_VRAM_SIZE, > irq[SM501], serial_hds[2]); >=20 > Why is this machine always using serial_hds[2] and not a lower index? > ... Maybe the maintainer of the board (Magnus) knows the answer here... The third serial port is provided by the graphic chipset. The first two serial ports are provided by the SH7750 CPU, see in hw/sh4/sh7750.c. Aurelien --=20 Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net --53n75mw7eo4qaeaf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEd0YmQqnvlP0Pdxltupx4Bh3djJsFAlg+h5gACgkQupx4Bh3d jJtmQA/9ES+fGMgQ+n1qsVWNvDvat1zPW8hUDt79J3eZwyADNP5xN0JJXm+Wf4O2 yyx61OWHD2GcWTjx6K+W4Xyeii2SabDpaxK2IxDyyS/+iPj2QTbpUCyTOZcPQp0e 5MMBiVczRGXmDkyX+x3GbFj/F8zV2Blb9IRtOxLCFZ6vI3bw5mX7Z2kD6g8OOeWN Si3iHODKViNzN7eXd+YvfWxUJkCYatU+VhnheyQNV4CLiZcRhiNLA91OI5PzZ58i BMwBuiypOmdhWwHGwLHcvTCZcFkZOy/IvcM0+cLEQD27Ne/1E+iHbaNTqh8XQuIh tcVkfu1tejlEMgR1V7U4Wq7GRNzksf8DaGfzMyyJnNADK8OaQRTcZAIHdob12gcq PTdR5NAVaLUTMTTIOMb/TS3ZWKC94Vy3mB1gdbPhQHFCB8HX754gT/MTAgVh5BGQ a6KVumUtVoi40qk4pUl8llaiM8qxjRp1mJogBD8AaDs9cOo8Hqo8tSoPeS3k1kO/ 7LNFCCuMc3HkYBjLbjM3c0QRvCDDF9RMpUzW2e0cpChl/X11tGWC9B8in26OTJQj AY1Pf0z5VofI9fsN7ymKhTA1tOoX0xuFbSvc8VD6EhRNk9V7O226pLquGT6LBVM2 Cnsdlzqfb5M7y9o7Qa8ZhJKM/qzTWfd3+XMK5GV3DUuCrc3Dhe4= =0WPd -----END PGP SIGNATURE----- --53n75mw7eo4qaeaf--