The NetBSD Project

CVS log for src/sys/arch/x86/x86/db_memrw.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / arch / x86 / x86

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.16 / (download) - annotate - [select for diffs], Sat Aug 27 20:40:03 2022 UTC (19 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

x86/db_memrw.c: Mark db_read_bytes, db_write_bytes __noubsan.

These intentionally do loads and stores that may be misaligned, which
are fine on this x86-specific code.  Should avoid double-panic in
disassembler on panic with UBSan enabled.

Revision 1.15 / (download) - annotate - [select for diffs], Sat Aug 27 20:39:54 2022 UTC (19 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.14: +8 -8 lines
Diff to previous 1.14 (colored)

x86/db_memrw.c: Use uint64_t, not long, for 8-byte r/w.

This is shared with amd64 and i386, and while long works on amd64,
not so much on i386.

While here, use uint32_t intead of int and uint16_t instead of short
for clarity.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Aug 20 23:48:51 2022 UTC (19 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.13: +3 -2 lines
Diff to previous 1.13 (colored)

x86: Split most of pmap.h into pmap_private.h or vmparam.h.

This way pmap.h only contains the MD definition of the MI pmap(9)
API, which loads of things in the kernel rely on, so changing x86
pmap internals no longer requires recompiling the entire kernel every
time.

Callers needing these internals must now use machine/pmap_private.h.
Note: This is not x86/pmap_private.h because it contains three parts:

1. CPU-specific (different for i386/amd64) definitions used by...

2. common definitions, including Xenisms like xpmap_ptetomach,
   further used by...

3. more CPU-specific inlines for pmap_pte_* operations

So {amd64,i386}/pmap_private.h defines 1, includes x86/pmap_private.h
for 2, and then defines 3.  Maybe we should split that out into a new
pmap_pte.h to reduce this trouble.

No functional change intended, other than that some .c files must
include machine/pmap_private.h when previously uvm/uvm_pmap.h
polluted the namespace with pmap internals.

Note: This migrates part of i386/pmap.h into i386/vmparam.h --
specifically the parts that are needed for several constants defined
in vmparam.h:

VM_MAXUSER_ADDRESS
VM_MAX_ADDRESS
VM_MAX_KERNEL_ADDRESS
VM_MIN_KERNEL_ADDRESS

Since i386 needs PDP_SIZE in vmparam.h, I added it there on amd64
too, just to keep things parallel.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Aug 20 23:15:37 2022 UTC (19 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.12: +4 -2 lines
Diff to previous 1.12 (colored)

x86: Split bootspace out of x86/pmap.h into new x86/bootspace.h.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Oct 7 12:52:27 2021 UTC (2 years, 6 months ago) by msaitoh
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

KNF. No functional change.

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:06:53 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.6: +13 -10 lines
Diff to previous 1.6 (colored) next main 1.7 (colored)

Sync with HEAD

Revision 1.11 / (download) - annotate - [select for diffs], Sun Apr 21 06:37:21 2019 UTC (4 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Rename the PTE bits.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Mar 9 08:42:26 2019 UTC (5 years, 1 month ago) by maxv
Branch: MAIN
CVS Tags: isaki-audio2-base, isaki-audio2
Changes since 1.9: +5 -5 lines
Diff to previous 1.9 (colored)

Start replacing the x86 PTE bits.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Mar 7 13:26:24 2019 UTC (5 years, 1 month ago) by maxv
Branch: MAIN
Changes since 1.8: +2 -4 lines
Diff to previous 1.8 (colored)

Drop PG_RO, PG_KR and PG_PROT, they are useless and create confusion.

Revision 1.4.2.4 / (download) - annotate - [select for diffs], Sat Jan 26 22:00:05 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.4.2.3: +8 -2 lines
Diff to previous 1.4.2.3 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Sync with HEAD

Revision 1.8 / (download) - annotate - [select for diffs], Sat Jan 19 13:17:32 2019 UTC (5 years, 2 months ago) by martin
Branch: MAIN
CVS Tags: pgoyette-compat-20190127
Changes since 1.7: +8 -2 lines
Diff to previous 1.7 (colored)

PR kern/53893: add missing #ifdef DDB around db_printf calls.

Revision 1.4.2.3 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:28 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.4.2.2: +3 -4 lines
Diff to previous 1.4.2.2 (colored) to branchpoint 1.4 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.7 / (download) - annotate - [select for diffs], Sun Nov 18 14:16:13 2018 UTC (5 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126
Changes since 1.6: +3 -4 lines
Diff to previous 1.6 (colored)

fix whitespace

Revision 1.2.10.1 / (download) - annotate - [select for diffs], Mon Apr 2 09:07:52 2018 UTC (6 years ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.2: +32 -4 lines
Diff to previous 1.2 (colored) next main 1.3 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #687):
	sys/kern/kern_rwlock_obj.c: revision 1.4
	sys/rump/librump/rumpkern/locks.c: revision 1.80
	sys/kern/kern_rwlock.c: revision 1.50
	sys/arch/x86/x86/db_memrw.c: revision 1.5,1.6
	sys/ddb/db_command.c: revision 1.150-1.153
	share/man/man4/ddb.4: revision 1.175 (via patch),1.176-1.178
	sys/kern/kern_mutex_obj.c: revision 1.6
	sys/kern/subr_lockdebug.c: revision 1.61-1.64
	sys/sys/lockdebug.h: revision 1.17
	sys/kern/kern_mutex.c: revision 1.71
	sys/sys/lockdebug.h: revision 1.18,1.19
	sys/kern/subr_xcall.c: revision 1.26

Obtain proper initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc

Initialized addresses of locks allocated by mutex_obj_alloc or rw_obj_alloc
were not useful because the addresses were mutex_obj_alloc or rw_obj_alloc
itself. What we want to know are callers of them.

Spinkle ASSERT_SLEEPABLE to xcall functions

Use db_printf instead of printf in ddb

Add a new command, show lockstat, which shows statistics of locks
Currently the command shows the number of allocated locks.
The command is useful only if LOCKDEBUG is enabled.

Add a new command, show all locks, which shows information of active locks

The command shows information of all active (i.e., being held) locks that are
tracked through either of LWPs or CPUs by the LOCKDEBUG facility.  The /t
modifier additionally shows a backtrace for each LWP additionally.  This
feature is useful for debugging especially to analyze deadlocks.
The command is useful only if LOCKDEBUG is enabled.

Don't pass a unset address to lockdebug_lock_print

x86: avoid accessing invalid addresses in ddb like arm32
This avoids that a command stops in the middle of an execution if
a fault occurs due to an access to an invalid address.

Get rid of a redundant output

Improve wording. Fix a Cm argument.

ddb: rename "show lockstat" to "show lockstats" to avoid conflicting with lockstat(8)
Requested by mrg@

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Thu Mar 22 01:44:47 2018 UTC (6 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.4.2.1: +30 -3 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored)

Synch with HEAD, resolve conflicts

Revision 1.6 / (download) - annotate - [select for diffs], Fri Mar 16 04:48:19 2018 UTC (6 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322
Branch point for: phil-wifi
Changes since 1.5: +30 -3 lines
Diff to previous 1.5 (colored)

x86: avoid accessing invalid addresses in ddb like arm32

This avoids that a command stops in the middle of an execution if
a fault occurs due to an access to an invalid address.

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Thu Mar 15 09:12:04 2018 UTC (6 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.4: +4 -3 lines
Diff to previous 1.4 (colored)

Synch with HEAD

Revision 1.5 / (download) - annotate - [select for diffs], Thu Mar 15 03:45:05 2018 UTC (6 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-0315
Changes since 1.4: +4 -3 lines
Diff to previous 1.4 (colored)

Use db_printf instead of printf in ddb

Revision 1.1.6.1 / (download) - annotate - [select for diffs], Sun Dec 3 11:36:50 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.1: +13 -5 lines
Diff to previous 1.1 (colored) next main 1.2 (colored)

update from HEAD

Revision 1.4 / (download) - annotate - [select for diffs], Sat Nov 11 12:51:05 2017 UTC (6 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base
Branch point for: pgoyette-compat
Changes since 1.3: +13 -11 lines
Diff to previous 1.3 (colored)

Modify the layout of the bootspace structure, in such a way that it can
contain several kernel segments of the same type (eg several .text
segments). Some parts are still a bit messy but will be cleaned up soon.

I cannot compile-test this change on i386, but it seems fine enough.

NOTE: you need to rebuild and reinstall a new prekern after this change.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Sep 30 12:12:29 2017 UTC (6 years, 6 months ago) by maxv
Branch: MAIN
Changes since 1.2: +10 -6 lines
Diff to previous 1.2 (colored)

use bootspace

Revision 1.1.20.1 / (download) - annotate - [select for diffs], Sun May 29 08:44:19 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.1: +6 -4 lines
Diff to previous 1.1 (colored) next main 1.2 (colored)

Sync with HEAD

Revision 1.2 / (download) - annotate - [select for diffs], Thu May 12 06:45:16 2016 UTC (7 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.1: +6 -4 lines
Diff to previous 1.1 (colored)

Split the {text+rodata} chunk in two separate chunks on x86. The
rodata segment now loses the large page optimization, gets mapped inside
the data segment, and therefore becomes RWX. It may break the build on
Xen.

Revision 1.1.4.2 / (download) - annotate - [select for diffs], Sat Jun 2 11:09:11 2012 UTC (11 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.1.4.1: +207 -0 lines
Diff to previous 1.1.4.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

sync to latest -current.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:07:51 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.1.2.1: +207 -0 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

sync with head.

Revision 1.1.4.1, Mon May 7 17:45:29 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.1: +0 -207 lines
FILE REMOVED

file db_memrw.c was added on branch jmcneill-usbmp on 2012-06-02 11:09:11 +0000

Revision 1.1.2.1, Mon May 7 17:45:29 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.1: +0 -207 lines
FILE REMOVED

file db_memrw.c was added on branch yamt-pagecache on 2012-05-23 10:07:51 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Mon May 7 17:45:29 2012 UTC (11 years, 11 months ago) by jym
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, khorben-n900, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: yamt-pagecache, tls-maxphys, nick-nhusb, jmcneill-usbmp

Merge i386 and amd64 version of db_memrw.c.

Use this opportunity to skip calculating the VA of the page. Let the CPU
deal with the invalidation itself through invlpg + destination address to
avoid converting between canonical/non canonical forms.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>