History log of /src/sys/arch/sparc64/dev/lom.c |
Revision | | Date | Author | Comments |
1.16 |
| 03-Sep-2018 |
riastradh | Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
|
1.15 |
| 27-Apr-2015 |
martin | branches: 1.15.16; 1.15.18; Print error codes from sysmon
|
1.14 |
| 21-Feb-2015 |
nakayama | Fix queue handling to make the watchdog timer actually works on netbsd-7 if it is configured by wdogctl=YES in rc.conf, and also avoid a hangup duaring shutdown.
- don't put an entry which is already in the queue. - read a first entry properly to handle the queue. - check the lom status if input buffer is empty before writing.
|
1.13 |
| 25-Feb-2014 |
pooka | branches: 1.13.4; 1.13.6; Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before the sysctl link sets are processed, and remove redundancy.
Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate lines of code.
|
1.12 |
| 20-Feb-2014 |
joerg | Don't use conditional format strings, if they aren't equivalent in the arguments they use.
|
1.11 |
| 24-Jan-2013 |
nakayama | branches: 1.11.2; Fix typo in KASSERT, pointed out by riastradh@ and martin@.
|
1.10 |
| 02-Jun-2012 |
dsl | branches: 1.10.2; Add some pre-processor magic to verify that the type of the data item passed to sysctl_createv() actually matches the declared type for the item itself. In the places where the caller specifies a function and a structure address (typically the 'softc') an explicit (void *) cast is now needed. Fixes bugs in sys/dev/acpi/asus_acpi.c sys/dev/bluetooth/bcsp.c sys/kern/vfs_bio.c sys/miscfs/syncfs/sync_subr.c and setting AcpiGbl_EnableAmlDebugObject. (mostly passing the address of a uint64_t when typed as CTLTYPE_INT). I've test built quite a few kernels, but there may be some unfixed MD fallout. Most likely passing &char[] to char *. Also add CTLFLAG_UNSIGNED for unsiged decimals - not set yet.
|
1.9 |
| 20-Jun-2011 |
pgoyette | branches: 1.9.2; Initialize sensor states before registering.
|
1.8 |
| 19-Jun-2011 |
nakayama | Limit reading from registers at most once every second with using ratecheck(9).
|
1.7 |
| 28-Feb-2011 |
nakayama | branches: 1.7.2; lom_refresh(): Update only the sensor status specified by the edata as noted in sysmon_envsys(9).
lom_sysctl_alarm(): Update alarm status before reading via sysctl to make it usable at a boot time.
|
1.6 |
| 22-Mar-2010 |
nakayama | branches: 1.6.2; 1.6.4; 1.6.6; Fix off-by-one in LOMlite hostname code. From rev 1.21 of OpenBSD.
|
1.5 |
| 28-Dec-2009 |
nakayama | branches: 1.5.2; 1.5.4; 1.5.6; Make fault LED and alarms status changeable via sysctl(8). The sysctl entries are created under the hw.lomN MIB.
|
1.4 |
| 13-Dec-2009 |
nakayama | Merge change of OpenBSD rev 1.20:
Remove debug printf and properly dequeue command instead when a read times out on LOMLite2.
|
1.3 |
| 28-Nov-2009 |
nakayama | Add support for monitoring Fault LED and Alarms status.
|
1.2 |
| 16-Nov-2009 |
nakayama | Merge changes between revision 1.16 and 1.19 of OpenBSD with shutdownhook_establish(9) to pmf(9) conversion:
- LOMlite seems to get wedged from time to time; add some code to unwedge it.
- Make sure we don't insert and entry into the list of pending commends twice.
- Establish a shutdown hook to disable the watchdog timer to prevent watchdog triggers after the kernel has been halted.
- Handle LOMlite2 in an interrupt-driven way; avoids using delay(9) once the machine is up and running.
|
1.1 |
| 02-Oct-2009 |
nakayama | branches: 1.1.2; Port lom(4) driver for LOMlite lights out management hardware monitor and watchdog timer from OpenBSD.
It supports the LOMlite found on Sun Netra t1 and the LOMlite2 found on Sun Netra T1/X1 and Sun Fire V100/V120.
|
1.1.2.8 |
| 16-Jul-2011 |
riz | Pull up following revision(s) (requested by nakayama in ticket #1641): sys/arch/sparc64/dev/lom.c: revision 1.8 Limit reading from registers at most once every second with using ratecheck(9).
|
1.1.2.7 |
| 20-Mar-2011 |
bouyer | Pull up following revision(s) (requested by nakayama in ticket #1570): sys/arch/sparc64/dev/lom.c: revision 1.7 lom_refresh(): Update only the sensor status specified by the edata as noted in sysmon_envsys(9). lom_sysctl_alarm(): Update alarm status before reading via sysctl to make it usable at a boot time.
|
1.1.2.6 |
| 28-Mar-2010 |
snj | Pull up following revision(s) (requested by nakayama in ticket #1349): sys/arch/sparc64/dev/lom.c: revision 1.6 Fix off-by-one in LOMlite hostname code. From rev 1.21 of OpenBSD.
|
1.1.2.5 |
| 09-Jan-2010 |
snj | Pull up following revision(s) (requested by nakayama in ticket #1216): share/man/man4/man4.sparc64/lom.4: revision 1.4 sys/arch/sparc64/dev/lom.c: revision 1.5 Make fault LED and alarms status changeable via sysctl(8). The sysctl entries are created under the hw.lomN MIB.
|
1.1.2.4 |
| 18-Dec-2009 |
snj | Pull up following revision(s) (requested by nakayama in ticket #1193): sys/arch/sparc64/dev/lom.c: revision 1.4 Merge change of OpenBSD rev 1.20: Remove debug printf and properly dequeue command instead when a read times out on LOMLite2.
|
1.1.2.3 |
| 28-Nov-2009 |
bouyer | Pull up following revision(s) (requested by nakayama in ticket #1151): share/man/man4/man4.sparc64/lom.4: revision 1.3 sys/arch/sparc64/dev/lom.c: revision 1.2, 1.3 Merge changes between revision 1.16 and 1.19 of OpenBSD with shutdownhook_establish(9) to pmf(9) conversion: - LOMlite seems to get wedged from time to time; add some code to unwedge it. - Make sure we don't insert and entry into the list of pending commends twice. - Establish a shutdown hook to disable the watchdog timer to prevent watchdog triggers after the kernel has been halted. - Handle LOMlite2 in an interrupt-driven way; avoids using delay(9) once the machine is up and running. Add support for monitoring Fault LED and Alarms status.
|
1.1.2.2 |
| 16-Oct-2009 |
sborrill | Pull up the following revisions(s) (requested by nakayama in ticket #1064): distrib/sets/lists/man/mi: revision 1.1161 share/man/man4/man4.sparc64/Makefile: revision 1.5 share/man/man4/man4.sparc64/lom.4: revision 1.1-1.2 sys/arch/sparc64/conf/GENERIC: revision 1.111 sys/arch/sparc64/conf/files.sparc64: revision 1.121 sys/arch/sparc64/dev/lom.c: revision 1.1 sys/dev/DEVNAMES: revision 1.252
Add a driver for LOMlite lights out management hardware monitor and watchdog timer.
|
1.1.2.1 |
| 02-Oct-2009 |
sborrill | file lom.c was added on branch netbsd-5 on 2009-10-16 11:56:11 +0000
|
1.5.6.2 |
| 05-Mar-2011 |
rmind | sync with head
|
1.5.6.1 |
| 30-May-2010 |
rmind | sync with head
|
1.5.4.3 |
| 11-Aug-2010 |
yamt | sync with head.
|
1.5.4.2 |
| 11-Mar-2010 |
yamt | sync with head
|
1.5.4.1 |
| 28-Dec-2009 |
yamt | file lom.c was added on branch yamt-nfs-mp on 2010-03-11 15:03:00 +0000
|
1.5.2.1 |
| 30-Apr-2010 |
uebayasi | Sync with HEAD.
|
1.6.6.1 |
| 05-Mar-2011 |
bouyer | Sync with HEAD
|
1.6.4.1 |
| 06-Jun-2011 |
jruoho | Sync with HEAD.
|
1.6.2.2 |
| 21-Apr-2010 |
matt | sync to netbsd-5
|
1.6.2.1 |
| 22-Mar-2010 |
matt | file lom.c was added on branch matt-nb5-mips64 on 2010-04-21 00:33:49 +0000
|
1.7.2.1 |
| 23-Jun-2011 |
cherry | Catchup with rmind-uvmplock merge.
|
1.9.2.2 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.9.2.1 |
| 30-Oct-2012 |
yamt | sync with head
|
1.10.2.3 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.10.2.2 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.10.2.1 |
| 25-Feb-2013 |
tls | resync with head
|
1.11.2.1 |
| 18-May-2014 |
rmind | sync with head
|
1.13.6.2 |
| 06-Jun-2015 |
skrll | Sync with HEAD
|
1.13.6.1 |
| 06-Apr-2015 |
skrll | Sync with HEAD
|
1.13.4.1 |
| 21-Feb-2015 |
martin | Pull up following revision(s) (requested by nakayama in ticket #539): sys/arch/sparc64/dev/lom.c: revision 1.14 Fix queue handling to make the watchdog timer actually works on netbsd-7 if it is configured by wdogctl=YES in rc.conf, and also avoid a hangup duaring shutdown. - don't put an entry which is already in the queue. - read a first entry properly to handle the queue. - check the lom status if input buffer is empty before writing.
|
1.15.18.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.15.16.1 |
| 06-Sep-2018 |
pgoyette | Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
|