From nobody Wed Aug 31 01:32:16 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MHRVm6jJNz4bq8x; Wed, 31 Aug 2022 01:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MHRVm68pCz3Cr6; Wed, 31 Aug 2022 01:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661909536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mjJEqo2QT7KEqH/Bmb+9ViymgmBC5iP2f6DBD+otjfs=; b=ff5joFTeGLHVl+vZGykIOHtAZTXzT3RpkCJGHNV4+lcahSsE7ZT84baIxZdMEXafx6bp2c 1KvLZTu4hrVvx0ml0dsPwVbtpdjSCpC491YJQkbrVJgMYWzvmwxIKOxGyOwXZmjHLlvFat B5PaV1otRXMRsJyM1mJsfKdErfHUSUS9quLJsAvu1fzHbSpyQ6JWg2NndngfRnXCQVLfgc piK/+IgxAsepqRZqMvcbOZt7p0J3sUdgwLbH4z6EnTtnzqHCmCqZnbhuf83apelEs8WlAU HyJGiSwSn1Vx3M2XRhJz3Ge+g8GRbyHpkvHv8bLSscJoMdCy6iLPPG0UURyXUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MHRVm52Bvzy8G; Wed, 31 Aug 2022 01:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27V1WGUv033231; Wed, 31 Aug 2022 01:32:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27V1WGTr033230; Wed, 31 Aug 2022 01:32:16 GMT (envelope-from git) Date: Wed, 31 Aug 2022 01:32:16 GMT Message-Id: <202208310132.27V1WGTr033230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 49c6968c1217 - stable/13 - i386: print all GPRs, PSL, and CR3 on double fault List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 49c6968c1217dbc6233105a918f07cae8dbdac52 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661909536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mjJEqo2QT7KEqH/Bmb+9ViymgmBC5iP2f6DBD+otjfs=; b=oKOpMMVzxYgCr57ATAaUYE7IXpbPRMLCYrnBZd2/waLxcm8m0jtwu7ptxRDzN39cNVgDyh FrLgYjnytsLfXcfzcmffpCEum/svFP2Nz12AEH5RcNKjwTsitfJ5ZtyiMvS6r9ga0fV/wH tlQjmOTSKFQzXga3CGpCK8Y4D+0UG4L7yQVhLPdGl+fmMfBGQaHyon2mg0k1kR9mR1UiV+ UmthjpjWkeIeREOyl055IU/kuX/8S0n+nx7csc2LgpHA/eIS4FIg/50N0Zr8XviiGVlGm2 VqNOx7VObiakuuzJaMwdOwd4V5vNiHuOeV8JdtObdOmvh3OnfrxfymCev7OqkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661909536; a=rsa-sha256; cv=none; b=ySzNC+AE6ESc4p/5rGApNStUzV/6Oufac0fH6h1MMlnWCplJfjqdf70PfCcheni2qYby5s BvXKxMiDuvT/cAmrfchPpEMEWFv8FnttpMfjf0kvfYNXwR8z/ETC7lXQi290MwJ3kQVfOf uEsgiSPQWKYgc2+JhLKHrBSp8MMMw9xEjTjva76UfT52x1xljdCJ5zjAPCx1PauamLpsJh gu2oHDdHASCYqznG8qDrCqLFyziYMvbMQGWeibXFalE/EIAtF2qdcnSUBr7qPVUVD9Ms3F P0Cp7EMIFyPuBHM7lO+vDwL3SoYal5VJlEGm5JllUZCH2XfgU+YWVJtyvTA9mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=49c6968c1217dbc6233105a918f07cae8dbdac52 commit 49c6968c1217dbc6233105a918f07cae8dbdac52 Author: Konstantin Belousov AuthorDate: 2022-08-18 04:16:09 +0000 Commit: Konstantin Belousov CommitDate: 2022-08-31 01:20:27 +0000 i386: print all GPRs, PSL, and CR3 on double fault (cherry picked from commit 0f906b30e6fa5bed3c8468a6cab3847cf6909936) --- sys/i386/i386/trap.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 7e1c409c806f..c158ed1d0264 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -988,18 +988,26 @@ trap_user_dtrace(struct trapframe *frame, int (**hookp)(struct trapframe *)) void dblfault_handler(void) { + struct i386tss *t; + #ifdef KDTRACE_HOOKS if (dtrace_doubletrap_func != NULL) (*dtrace_doubletrap_func)(); #endif printf("\nFatal double fault:\n"); - printf("eip = 0x%x\n", PCPU_GET(common_tssp)->tss_eip); - printf("esp = 0x%x\n", PCPU_GET(common_tssp)->tss_esp); - printf("ebp = 0x%x\n", PCPU_GET(common_tssp)->tss_ebp); + t = PCPU_GET(common_tssp); + printf( + "eip = %#08x esp = %#08x ebp = %#08x eax = %#08x\n" + "edx = %#08x ecx = %#08x edi = %#08x esi = %#08x\n" + "psl = %#08x cs = %#08x ss = %#08x ds = %#08x\n" + "es = %#08x fs = %#08x gs = %#08x cr3 = %#08x\n", + t->tss_eip, t->tss_esp, t->tss_ebp, t->tss_eax, + t->tss_edx, t->tss_ecx, t->tss_edi, t->tss_esi, + t->tss_eflags, t->tss_cs, t->tss_ss, t->tss_ds, + t->tss_es, t->tss_fs, t->tss_gs, t->tss_cr3); #ifdef SMP - /* two separate prints in case of a trap on an unmapped page */ - printf("cpuid = %d; ", PCPU_GET(cpuid)); - printf("apic id = %02x\n", PCPU_GET(apic_id)); + printf("cpuid = %d; apic id = %02x\n", PCPU_GET(cpuid), + PCPU_GET(apic_id)); #endif panic("double fault"); }