From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NqRpT-0005qw-77 for qemu-devel@nongnu.org; Sat, 13 Mar 2010 08:56:35 -0500 Received: from [199.232.76.173] (port=47145 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NqRpS-0005qY-NA for qemu-devel@nongnu.org; Sat, 13 Mar 2010 08:56:34 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NqRpR-0006PQ-Tj for qemu-devel@nongnu.org; Sat, 13 Mar 2010 08:56:34 -0500 Received: from fg-out-1718.google.com ([72.14.220.152]:46828) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NqRpR-0006Oz-HM for qemu-devel@nongnu.org; Sat, 13 Mar 2010 08:56:33 -0500 Received: by fg-out-1718.google.com with SMTP id e21so606248fga.10 for ; Sat, 13 Mar 2010 05:56:31 -0800 (PST) MIME-Version: 1.0 Date: Sat, 13 Mar 2010 14:56:29 +0100 Message-ID: <4b94fe2a1003130556j3c6ee461l9cad34e218f5d704@mail.gmail.com> From: Benjamin Bagland Content-Type: multipart/mixed; boundary=001485f79284cbe9080481af0395 Subject: [Qemu-devel] Stellaris lm3s811 board init List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --001485f79284cbe9080481af0395 Content-Type: multipart/alternative; boundary=001485f79284cbe8fe0481af0393 --001485f79284cbe8fe0481af0393 Content-Type: text/plain; charset=UTF-8 Hi, I'm having an issue while trying to use the lm3s811 board emulation with qemu 0.12.3 or git. It works fine however with qemu-0.11.1. The problem comes from hw/armv7m.c, around line 231, the initial PC and SP are set by reading from physical memory, however the rom data is not copied in physical memory until the reset later on in the initialisation (comes from commit 45a50b1668822c23afc I think). Since the initial PC is invalid, the cpu goes straight into UsageFault instead of going to the proper reset routine. I've made a small patch to read from rom instead of physical memory, that fixes the issue with my test program but I'm not sure if it's the proper thing to do, or even if it works with other arm boards. Rgds, Benjamin --001485f79284cbe8fe0481af0393 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi,

I'm having an issue while trying to use the lm3s811 board em= ulation with qemu 0.12.3 or git. It works fine however with qemu-0.11.1.
The problem comes from hw/armv7m.c, around line 231, the initial PC an= d SP are set by reading from physical memory, however the rom data is not c= opied in physical memory until the reset later on in the initialisation (co= mes from commit 45a50b1668822c23afc I think). Since the initial PC is inval= id, the cpu goes straight into UsageFault instead of going to the proper re= set routine.

I've made a small patch to read from rom instead of physical memory= , that fixes the issue with my test program but I'm not sure if it'= s the proper thing to do, or even if it works with other arm boards.

Rgds,
Benjamin

--001485f79284cbe8fe0481af0393-- --001485f79284cbe9080481af0395 Content-Type: application/octet-stream; name="init.patch" Content-Disposition: attachment; filename="init.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g6qgtxrn0 ZGlmZiAtLWdpdCBhL2h3L2FybXY3bS5jIGIvaHcvYXJtdjdtLmMKaW5kZXggMDM0MzIzZC4uNjc0 YThiNCAxMDA2NDQKLS0tIGEvaHcvYXJtdjdtLmMKKysrIGIvaHcvYXJtdjdtLmMKQEAgLTIzMSw4 ICsyMzEsMTAgQEAgcWVtdV9pcnEgKmFybXY3bV9pbml0KGludCBmbGFzaF9zaXplLCBpbnQgc3Jh bV9zaXplLAogICAgICAgIHJlZ3VsYXIgUk9NIGltYWdlIGFuZCBwZXJmb3JtIHRoZSBub3JtYWwg Q1BVIHJlc2V0IHNlcXVlbmNlLgogICAgICAgIE90aGVyd2lzZSBqdW1wIGRpcmVjdGx5IHRvIHRo ZSBlbnRyeSBwb2ludC4gICovCiAgICAgaWYgKGxvd2FkZHIgPT0gMCkgewotCWVudi0+cmVnc1sx M10gPSBsZGxfcGh5cygwKTsKLQlwYyA9IGxkbF9waHlzKDQpOworICAgICAgICAvKiByb21zIGFy ZSBub3QgbG9hZGVkIGluIHBoeXNpY2FsIG1lbW9yeSB1bnRpbCByZXNldCAqLworICAgICAgICB1 aW50MzJfdCAqcm9tID0gcm9tX3B0cigwKTsKKyAgICAgICAgZW52LT5yZWdzWzEzXSA9IHJvbVsw XTsKKyAgICAgICAgcGMgPSByb21bMV07CiAgICAgfSBlbHNlIHsKIAlwYyA9IGVudHJ5OwogICAg IH0K --001485f79284cbe9080481af0395--