summaryrefslogtreecommitdiff
path: root/usr.sbin/memconfig
AgeCommit message (Collapse)Author
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2016-08-14Convert remaining calls to strtoq/strtouq in base with strtoll/strtoull.Philip Guenther
Fix a type mismatch in ftp's "page" command and could make transfers restart at the wrong position. ok and a ull->ll tweak from natano@, ok tedu@
2015-12-21remove NULL-check before free()mmcc
2014-04-12fix a bit testJonathan Gray
from FreeBSD rev 241829
2014-01-20Obvious .Xr fixes, found while testing mandocdb(8).Ingo Schwarze
2013-08-14no longer any need to quote macro lines with >9 args;Jason McIntyre
From: Jan Stary
2011-09-20report the "fix-active" flag, and print any other unknown flags in hex.Theo de Raadt
ok oga kettenis
2011-06-06don't open /dev/mem to print the help, allowing mortals to read itTed Unangst
ok deraadt matthew
2010-04-200x0 is a valid base address.Marco Peereboom
ok oga
2008-06-11correctly enumerate MANSUBDIRPeter Hessler
pointed out by deraadt
2008-06-11enable memconfig on amd64Peter Hessler
ok deraadt@
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgTheo de Raadt
2007-05-31convert to new .Dd format;Jason McIntyre
2007-02-18unneeded .Op; from Igor SobradoJason McIntyre
2006-03-14Some more usage of const and correct fmt string for a size_t.Moritz Jodeit
From David Hill. ok ray@ jaredy@ otto@
2003-12-04ansiTheo de Raadt
2003-09-26check strdup failure; ok anil millertTheo de Raadt
2003-06-26strict proto cleanupsTheo de Raadt
2003-06-12- section reorderJason McIntyre
- macro fixes - kill whitespace at EOL - new sentence, new line
2003-03-13lots of sprintf -> snprintf and strcpy -> strlcpy; checked by teduTheo de Raadt
2002-10-14Fix from FreeBSD for atlhon problems with mtrr and XFree86. Ok deraadt@Matthieu Herrb
FreeBSD commit messages say: Some BIOSs are using MTRR values that are only documented under NDA to control the mapping of things like the ACPI and APM into memory. The problem is that starting X changes these values, so if something was using the bits of BIOS mapped into memory (say ACPI or APM), then next time they access this memory the machine would hang. This patch refuse to change MTRR values it doesn't understand, unless a new "force" option is given. This means X doesn't change them by accident but someone can override that if they really want to. PR: 28418 Tested by: Christopher Masto <chris at netmonger dot net>, David Bushong <david at bushong dot net>, Santos <casd at myrealbox dot com> Make the MTRR code a bit more defensive - this should help people trying to run X on some Athlon systems where the BIOS does odd things (mines an ASUS A7A266, but it seems to also help on other systems). Here's a description of the problem and my fix: The problem with the old MTRR code is that it only expects to find documented values in the bytes of MTRR registers. To convert the MTRR byte into a FreeBSD "Memory Range Type" (mrt) it uses the byte value and looks it up in an array. If the value is not in range then the mrt value ends up containing random junk. This isn't an immediate problem. The mrt value is only used later when rewriting the MTRR registers. When we finally go to write a value back again, the function i686_mtrrtype() searches for the junk value and returns -1 when it fails to find it. This is converted to a byte (0xff) and written back to the register, causing a GPF as 0xff is an illegal value for a MTRR byte. To work around this problem I've added a new mrt flag MDF_UNKNOWN. We set this when we read a MTRR byte which we do not understand. If we try to convert a MDF_UNKNOWN back into a MTRR value, then the new function, i686_mrt2mtrr, just returns the old value of the MTRR byte. This leaves the memory range type unchanged. I have seen one side effect of the fix, which is that ACPI calls after X has been run seem to hang my machine. As running X would previously panic the machine, this is still an improvement ;-) PR: 28418, 25958 Tested by: jkh, Christopher Masto <chris at netmonger dot net>
2002-05-30minor KNFTheo de Raadt
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-08-17o) {Open,Net,Free}BSD -> .{O,N,F}x;Mike Pechkin
o) "start sentence on new line" issues; o) minimal -mdoc improvements; millert@ ok
2001-07-27Wall cleanupPeter Valchev
2000-10-14- Correct .Nm usage.Aaron Campbell
- Compatify SYNOPSIS. - Introduce the options. - Add some punctuation.
2000-05-18Prepare to recurse down usr.sbin to grab manpagesMarc Espie
2000-04-12Trailing whitespace begone!Aaron Campbell
2000-04-12Remove all arguments to the .Os macro so that all of 2.7's man pages willAaron Campbell
correctly say "OpenBSD 2.7".
2000-03-19Remove hard sentence breaks. Add $OpenBSD$ tags where appropriate. Some otherAaron Campbell
cleanup along the way.
1999-12-05prettier range checkTheo de Raadt
1999-11-20add memconfig, an utility to manipulate MTRRs, from FreeBSDMatthieu Herrb