Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Reduce the diff between amd64 and i386. It also fix...
details: https://anonhg.NetBSD.org/src/rev/034061fdbe6f
branches: trunk
changeset: 355796:034061fdbe6f
user: maxv <maxv%NetBSD.org@localhost>
date: Tue Aug 15 08:35:56 2017 +0000
description:
Reduce the diff between amd64 and i386. It also fixes a bug in amd64, where
large pages were not handled correctly.
diffstat:
sys/arch/amd64/amd64/kgdb_machdep.c | 10 ++++++----
sys/arch/i386/i386/kgdb_machdep.c | 9 +++------
2 files changed, 9 insertions(+), 10 deletions(-)
diffs (76 lines):
diff -r 1eb9ee0ace87 -r 034061fdbe6f sys/arch/amd64/amd64/kgdb_machdep.c
--- a/sys/arch/amd64/amd64/kgdb_machdep.c Tue Aug 15 08:30:21 2017 +0000
+++ b/sys/arch/amd64/amd64/kgdb_machdep.c Tue Aug 15 08:35:56 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kgdb_machdep.c,v 1.10 2015/11/22 13:41:24 maxv Exp $ */
+/* $NetBSD: kgdb_machdep.c,v 1.11 2017/08/15 08:35:56 maxv Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.10 2015/11/22 13:41:24 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.11 2017/08/15 08:35:56 maxv Exp $");
#include "opt_ddb.h"
@@ -93,7 +93,10 @@
pte = kvtopte(va);
if ((*pte & PG_V) == 0)
return (0);
- va += PAGE_SIZE;
+ if (*pte & PG_PS)
+ va = (va & PG_LGFRAME) + NBPD_L2;
+ else
+ va += PAGE_SIZE;
} while (va < last_va);
return (1);
@@ -217,7 +220,6 @@
void
kgdb_connect(int verbose)
{
-
if (kgdb_dev == NODEV)
return;
diff -r 1eb9ee0ace87 -r 034061fdbe6f sys/arch/i386/i386/kgdb_machdep.c
--- a/sys/arch/i386/i386/kgdb_machdep.c Tue Aug 15 08:30:21 2017 +0000
+++ b/sys/arch/i386/i386/kgdb_machdep.c Tue Aug 15 08:35:56 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kgdb_machdep.c,v 1.22 2011/04/03 22:29:26 dyoung Exp $ */
+/* $NetBSD: kgdb_machdep.c,v 1.23 2017/08/15 08:35:56 maxv Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.22 2011/04/03 22:29:26 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.23 2017/08/15 08:35:56 maxv Exp $");
#include "opt_ddb.h"
@@ -70,10 +70,7 @@
#include <sys/kgdb.h>
#include <sys/systm.h>
-#include <uvm/uvm_extern.h>
-
#include <machine/pte.h>
-#include <machine/reg.h>
#include <machine/trap.h>
/*
@@ -116,7 +113,7 @@
* Translate a trap number into a unix compatible signal value.
* (gdb only understands unix signal numbers).
*/
-int
+int
kgdb_signal(int type)
{
switch (type) {
Home |
Main Index |
Thread Index |
Old Index