NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-i386/57197: GENERIC kernel crash on pentium-III and earlier CPUs



The following reply was made to PR port-i386/57197; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: matthew green <mrg%eterna.com.au@localhost>
Cc: gnats-bugs%netbsd.org@localhost, port-i386-maintainer%netbsd.org@localhost,
	gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost,
	jdbaker%consolidated.net@localhost, uwe%NetBSD.org@localhost
Subject: Re: port-i386/57197: GENERIC kernel crash on pentium-III and earlier CPUs
Date: Wed, 25 Jan 2023 23:49:56 +0000

 > Date: Wed, 25 Jan 2023 17:01:58 +1100
 > from: matthew green <mrg%eterna.com.au@localhost>
 >=20
 > be nice to put a little more details in what needs fixing:
 >=20
 > arch/i386/i386/vector.S:#define INTRSTUB1(name, num, sub, off, early_ack,=
  late_ack, mask, unmask, level_mask) \
 >=20
 > has this:
 >=20
 > 	/* switch stack if necessary, and push a ptr to our intrframe */ \
 > 	IDEPTH_INCR
 >=20
 > the last part of IDEPTH_INCR being:
 >=20
 > 999:    pushl   %eax; /* eax =3D=3D pointer to intrframe */ \
 >=20
 > so it's _this_ that becomes the 2nd arg for clockintr().
 
 Tempted to say there should be a struct cpu_info::ci_iframe just like
 ci_idepth, and when an interrupt handler is interrupted, it should
 just be saved on the stack (perhaps in the same stack slot!) and
 restored on return.
 
 That way, i8254_clockintr could just do curcpu()->ci_iframe instead of
 these horrible function pointer casts.
 


Home | Main Index | Thread Index | Old Index