Date: Tue, 18 Dec 2001 14:54:13 -0500 From: Jake Burkholder <jake@locore.ca> To: Andrew Gallatin <gallatin@cs.duke.edu> Cc: John Baldwin <jhb@FreeBSD.ORG>, alpha@FreeBSD.ORG Subject: Re: mdproc flags in KSE Message-ID: <20011218145413.L39205@locore.ca> In-Reply-To: <15391.37056.22312.225550@grasshopper.cs.duke.edu>; from gallatin@cs.duke.edu on Tue, Dec 18, 2001 at 01:53:52PM -0500 References: <XFMail.011218100048.jhb@FreeBSD.org> <15391.37056.22312.225550@grasshopper.cs.duke.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Apparently, On Tue, Dec 18, 2001 at 01:53:52PM -0500, Andrew Gallatin said words to the effect of; > > John Baldwin writes: > > 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? > > Its used by programs, like the X server, which grovel around in PCI > memory space... Hmm.. In a quick browse through the code, I don't see > where its actually used anymore.. > > > 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 > > Single-stepping -- no clue. My take on this is that alpha doesn't have a hardware single stepping flag like i386 (correct me if I'm wrong). So the only way to implement single stepping is to replace the next instruction to be executed with a breakpoint each time. You need 2 because of branches, both paths need to have a breakpoint poked in. This is inherently evil. Sparc64 needs the same kind of support. Where this goes depends a lot on how debugging works in multithreaded processes. ie, do we allow single stepping 2 threads from the same process simultaneously. Jake > > > the entire process, or does it have to be regenerated on the fly all the time? > > Its used only by OSFF/ECOFF binaries. It is setup each time osf1_sigaction() > is called & used at sigreturn time to point to that process's > sigtramp code. Tru64 does'nt just keep it in a standard place like we > do. > > Drew > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-alpha" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011218145413.L39205>