From owner-freebsd-alpha Tue Dec 18 10: 1: 6 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from mail11.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by hub.freebsd.org (Postfix) with ESMTP id B03DE37B416 for ; Tue, 18 Dec 2001 10:01:03 -0800 (PST) Received: (qmail 22406 invoked from network); 18 Dec 2001 18:01:02 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 18 Dec 2001 18:01:02 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Tue, 18 Dec 2001 10:00:48 -0800 (PST) From: John Baldwin To: alpha@FreeBSD.org Subject: mdproc flags in KSE Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The alpha had several fields in its mdproc struct prior to KSE, and KSE stuck them all in mdthread, which isn't quite correct. Specifically, we have the following for mdthread now: struct mdthread { u_long md_flags; struct pcb *md_pcbpaddr; /* phys addr of the pcb */ struct mdbpt md_sstep[2]; /* two single step breakpoints */ u_int64_t md_hae; /* user HAE register value */ void *osf_sigtramp; /* user-level signal trampoline */ u_int md_kernnest; /* nesting level in the kernel */ }; #define MDP_FPUSED 0x0001 /* Process used the FPU */ #define MDP_STEP1 0x0002 /* Single step normal instruction */ #define MDP_STEP2 0x0004 /* Single step branch instruction */ #define MDP_HAEUSED 0x0008 /* Process used the HAE */ #define MDP_UAC_NOPRINT 0x0010 /* Don't print unaligned traps */ #define MDP_UAC_NOFIX 0x0020 /* Don't fixup unaligned traps */ #define MDP_UAC_SIGBUS 0x0040 /* Deliver SIGBUS upon unaligned access */ #define MDP_UAC_MASK (MDP_UAC_NOPRINT | MDP_UAC_NOFIX | MDP_UAC_SIGBUS) Out of that structure, it seems obvious that md_pcbpaddr and md_kernnest need to be per-thread. It also seems that the UAC flags need to be per-process and need to move back into a md_flags in mdproc. However, I'm not sure about the other ones. What is the HAE and in what contexts is it used? Also, what are the single stepping fields used for exactly (details, not just "to implement single stepping :)"). Is the osf_sigtramp just setup once for the entire process, or does it have to be regenerated on the fly all the time? I think the FPUSED flag will need to be per-process (or perhaps go away) since a thread can't store persistent state. (Threads can come and go rather easily.) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message