From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fr3Rc-00017h-9w for qemu-devel@nongnu.org; Sat, 18 Aug 2018 11:47:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fr3NW-0006qL-FW for qemu-devel@nongnu.org; Sat, 18 Aug 2018 11:43:07 -0400 Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= References: <20180809130115.28951-1-peter.maydell@linaro.org> <20180809130115.28951-9-peter.maydell@linaro.org> <3fbb1f6d-8615-f540-d902-67ea9026777b@amsat.org> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Message-ID: Date: Sat, 18 Aug 2018 12:42:56 -0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH 08/16] hw/misc/iotkit-secctl: Wire up registers for controlling MSCs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-arm , QEMU Developers , "patches@linaro.org" On 08/18/2018 07:05 AM, Peter Maydell wrote: > On 18 August 2018 at 01:37, Philippe Mathieu-Daudé wrote: >> On 08/09/2018 10:01 AM, Peter Maydell wrote: >>> The IoTKit does not have any Master Security Contollers itself, >>> but it does provide registers in the secure privilege control >>> block which allow control of MSCs in the external system. >>> Add support for these registers. >>> >>> Signed-off-by: Peter Maydell >>> --- > >>> case A_SECMSCINTEN: >>> - qemu_log_mask(LOG_UNIMP, >>> - "IoTKit SecCtl S block write: " >>> - "unimplemented offset 0x%x\n", offset); >> >> Maybe: >> >> if (value & ~0xffff) { >> GUEST_ERROR(...) >> } > > We don't generally bother to log writes of raz bits as errors. Yes I know, and this shouldn't make sens for an well publicly documented device/board as this IoT Kit. But you would be surprised by some proprietary firmwares or libraries provided by some companies... I have been surprised modeling the Hercules TMS570 series from TI, they provide a datasheet with the register/bits for the embedded Flash (F021), and a library/API to access this flash, however when I ran firmwares linked with their flash library I noticed they access undocumented bits to restrict^H^H^H^H^configure their flash, and I had to model those undocumented bits to allow the firmware to continue further and boot. So not needed for this model, but it may be sometime useful ;) Regards, Phil.