2004-01-27 03:29:28

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] kgdb-x86_64-support.patch for 2.6.2-rc1-mm3

Jim Houston <[email protected]> wrote:
>
> The attached patch updates my kgdb-x86_64-support.patch to work
> with linux-2.6.2-rc1-mm3.

Thanks. Why does it relocate the call to trap_init() in start_kernel()?


2004-01-27 14:00:00

by Jim Houston

[permalink] [raw]
Subject: Re: [PATCH] kgdb-x86_64-support.patch for 2.6.2-rc1-mm3

On Mon, 2004-01-26 at 22:28, Andrew Morton wrote:
> Jim Houston <[email protected]> wrote:
> >
> > The attached patch updates my kgdb-x86_64-support.patch to work
> > with linux-2.6.2-rc1-mm3.
>
> Thanks. Why does it relocate the call to trap_init() in start_kernel()?

Hi Andrew,

Moving trap_init() before parse_args() makes the "gdb" command line
option work.

On the i386 George has a few lines of code in breakpoint() which do
enough setup to allow a break point trap to enter kgdb early in the
boot. I played with similar code on x86_64, but it didn't work.
Handling a break point trap requires some of the initialization
done in cpu_init(). I suspect the difference is the per-cpu-data
referenced using %gs.

Jim Houston - Concurrent Computer Corp.