From owner-freebsd-arm@freebsd.org Sat Oct 31 16:22:01 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBF97A22E08 for ; Sat, 31 Oct 2015 16:22:00 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com [IPv6:2a00:1450:4010:c04::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6814C1B0E for ; Sat, 31 Oct 2015 16:22:00 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: by lbjm5 with SMTP id m5so65378712lbj.3 for ; Sat, 31 Oct 2015 09:21:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf_com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=YEr74hHBaZdLsaCzqK89MDTkyrlD1X5rB1cAWw5SI+g=; b=en19g6oWri125wdl8+U9hVgWFjnXr1SmmXG/0XslC4nj7hM9mVgtC28rTT7l9wIQV0 xyulfFkFmKeQbhAlTjNqmLg/LswcaAj1LLbS+BiziqUfylnhLD2xnQtSO8br+7O3lcrM 5F3DtsJpSr86t+9I2dJoq3OP0HctZvJs2+aOh72QARXFU/99WpqYWg/ytnw7vRPLHBXM 1XlwkJJ0ndigvMgd76czJgyEpDA0Gn1my4eyJfWefuBPMU8PzOT1LEtPj5FmWTFteaQ/ alxYTsl8gci8tnPZXohk3H3h6UbbwdgV1yp+aAXySK76LitYshrajLysj2XAU/fTE/+w MNfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=YEr74hHBaZdLsaCzqK89MDTkyrlD1X5rB1cAWw5SI+g=; b=a81HRO5H1FqFAZhmLfAUhR/UICMlamdkntD2psHdnA7a8OY/TUySy92eIgmtCqPgia bS7oWYG+zNNzuibTiHDnlAg47DRxD7Xxq0ZUVdbvWtjH1tCeyf2HTiQY3JjXMcUn42FA Item0Zwgi/X5IyNXFcQo4PH/9QIINI2J4Rb3LMBNr47j4MFmZ8ilqxQ2ZieACYSDsbGa stpQEIZNQmGJLXjJ2N4RpD9ehbb5aikvRIrjLNMx6KD8Huhfajukt0Gez5VlCK/zP4q1 CsMd41JKW9g7wndJKBPSg+JdUdysGFnz7Bo/WkTnDMH6nHf+RMVwEoZT/ZIezSGMB6zo c1HA== X-Gm-Message-State: ALoCoQlpf6AyV3uXt9EG/mDhmDk46dS0hWj+XqZkA0SArkixZhHX728GZUM9QdJ3hHTXlfax31jo X-Received: by 10.112.147.232 with SMTP id tn8mr6344682lbb.84.1446308518181; Sat, 31 Oct 2015 09:21:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.91.20 with HTTP; Sat, 31 Oct 2015 09:21:38 -0700 (PDT) In-Reply-To: References: From: Zbigniew Bodek Date: Sat, 31 Oct 2015 17:21:38 +0100 Message-ID: Subject: Re: RFC: HW watchpoints and single stepping for ARMv6/v7 To: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2015 16:22:01 -0000 Hello again, I should have post some more information about testing this patch. Here it goes: ------------------------------------------------------------------ One can enter kernel debugger by one of those: press: ~, ctrl + b or type: sysctl -w debug.kdb.enter=1 You can then set a HW watchpoint on any memory location at
by invoking following command in KDB: db> hwatch
, parameter is optional, the default is 4. To display watchpoints: db> show watch To remove watchpoint: db> dhwatch
Press "c" to continue. ------------------------------------------------------------------ While in KDB you can step through the kernel code using "s" BUT you need to apply a dependent patch: https://reviews.freebsd.org/D4036 otherwise you will cause the kernel panic. Thanks again zbb 2015-10-30 17:25 GMT+01:00 Zbigniew Bodek : > Hello, > > We would like to add HW watchpoints and HW single step support to ARMv6 kernel. > Please check this review: https://reviews.freebsd.org/D4037 > > Since there are differences between debug architectures on ARM (v6, > v6.1, v7, v7.1) I would like to ask for some testing on your machines. > I was able to test this on Pandaboard and Arndale but please check > whether this works on your targets as well. > > Rise a red flag if you see any issues or in worst case scenario - > "undefined instruction" error. > > Best regards > zbb