History log of /netbsd/sys/arch/prep/pnpbus/nvram_pnpbus.c (Results 1 – 22 of 22)
Revision Date Author Comments
# 70747dc1 10-Nov-2019 chs <chs@NetBSD.org>

in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.


# a8a5c538 03-Sep-2018 riastradh <riastradh@NetBSD.org>

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 n

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!)

show more ...


# 1a918832 25-Jul-2014 dholland <dholland@NetBSD.org>

Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.


# 76258fa0 16-Mar-2014 dholland <dholland@NetBSD.org>

Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found

Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.

show more ...


# 3d6d6356 28-Feb-2014 skrll <skrll@NetBSD.org>

G/C sys/simplelock.h includes


# 5f819ca3 27-Oct-2012 chs <chs@NetBSD.org>

split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.


# 9ab4cc74 18-Feb-2012 rmind <rmind@NetBSD.org>

Replace few simple_lock(9) cases.


# 44a91a83 18-Jun-2011 matt <matt@NetBSD.org>

struct device * -> device_t
struct cfdata * -> cfdata_t
use device accessors, use device_private.
some softc/device_t splits (macppc needs a bunch more)
aprint*_dev used considerably more


# ce099b40 28-Apr-2008 martin <martin@NetBSD.org>

Remove clause 3 and 4 from TNF licenses


# 32d5b0e7 29-Mar-2008 matt <matt@NetBSD.org>

Fix more direct references to cd_devs to device_lookup_private


# 35043162 29-Mar-2008 matt <matt@NetBSD.org>

Don't use device_lookup to get softc, use device_lookup_private.


# 05517e38 10-Jan-2008 tsutsui <tsutsui@NetBSD.org>

- move todr_attach(9) calls from each MD attachment to MI mk48txx_attach()
- don't clear todr_setwen in mk48txx_attach() since it might be set by
MD attachments


# c29520cb 05-Jan-2008 ad <ad@NetBSD.org>

Fix includes.


# d974db0a 17-Oct-2007 garbled <garbled@NetBSD.org>

Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the v

Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.

show more ...


# cfa6e1cb 21-Mar-2007 garbled <garbled@NetBSD.org>

Add a read entry point to this driver. There are two minor devices
associated with this, 0, the nvram device, and now 1, the residual
device. The devices allow the user to directly read the content

Add a read entry point to this driver. There are two minor devices
associated with this, 0, the nvram device, and now 1, the residual
device. The devices allow the user to directly read the contents of the
kernel copy of the nvram, and the residual data respectively. There is
no provision for write.

show more ...


# 53524e44 04-Mar-2007 christos <christos@NetBSD.org>

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


# 7b388aee 26-Feb-2007 garbled <garbled@NetBSD.org>

Finish the code in the prep nvram driver that makes it an actual device
(/dev/nvram) and implement all the associated ioctls fully. Tested with
a hacked up copy of eeprom(8). Right now it can only

Finish the code in the prep nvram driver that makes it an actual device
(/dev/nvram) and implement all the associated ioctls fully. Tested with
a hacked up copy of eeprom(8). Right now it can only be used to see the
nvram GEV contents, not actually edit them. Will do that later some day.

show more ...


# 54ded929 30-Oct-2006 garbled <garbled@NetBSD.org>

Make these files compile with -Wextra -Wno-unused


# 9f65f017 07-Sep-2006 garbled <garbled@NetBSD.org>

Now that the interrupt bug on the 7043-140 is fixed, it also fixes the
long standing issue with interrupts onthe PowerStack E1. Remove the
quirk entry for the PowerStack E1 and revert to using the I

Now that the interrupt bug on the 7043-140 is fixed, it also fixes the
long standing issue with interrupts onthe PowerStack E1. Remove the
quirk entry for the PowerStack E1 and revert to using the IVR.
Also, add a \n to the attachment of the mk clock printf that was missing.

show more ...


# aa0bc147 15-Jun-2006 garbled <garbled@NetBSD.org>

A bit of clock rototill. It's safer to detect things known by the
residual with the pnpbus probes, than it is to do it with raw isa probes,
so I've replaced the isa mkclock and mcclock code with a p

A bit of clock rototill. It's safer to detect things known by the
residual with the pnpbus probes, than it is to do it with raw isa probes,
so I've replaced the isa mkclock and mcclock code with a pnpbus attachment.

While writing the mkclock code, I realized that on motorola prep machines
the mkclock uses the same port range as the nvram part. (it's actually
the same chip/part). This was causing the nvram not to work on those
machines. Now the nvram code will recognize this, and wire up the
mkclock as well. The mkclock probe is just a stub probe used to
pre-detect the fact that this is one of those machines.

show more ...


# 64b69ee8 26-Apr-2006 garbled <garbled@NetBSD.org>

Support fixes for the Motorola Powerstack E1.
1) The E1 seems to have the int. siop wired to irq 14-level and the internal
wdc wired to irq 14-edge. special case and fail the wdc probe on E1's.
2

Support fixes for the Motorola Powerstack E1.
1) The E1 seems to have the int. siop wired to irq 14-level and the internal
wdc wired to irq 14-edge. special case and fail the wdc probe on E1's.
2) If we fail to map the NVRAM registers, return, rather than trying to talk
to them and panic'ing the box.
3) revert my previous "fix" to pnpbus to make irq's default to level. It
was wrong, and didn't even fix the powerstack.

With this, we have limited PowerStack E1 support. The machine cannot
talk to it's IDE controller, and cannot detect it's boot device
automatically, but it does come up and run. Tested with NFS root.

show more ...


# d736b3d5 16-Mar-2006 garbled <garbled@NetBSD.org>

More changes to prep port:
1) Add the NVRAM device. This device allows us to speak with the nvram on
prep-based machines and read/write to it. Also add a simple IOCTL
interface for speaking with th

More changes to prep port:
1) Add the NVRAM device. This device allows us to speak with the nvram on
prep-based machines and read/write to it. Also add a simple IOCTL
interface for speaking with the nvram from userland. This hasn't been
tested yet, but eventually I plan to support it with the sparc eeprom
command.
2) Change the root device detection to use the nvram device to attempt to
guess the boot device. Most machines should now correctly guess thier
boot device, though I expect a few devices to still not work quite right yet.
3) change the default IRQ to level rather than edge in the pnpbus if the
flags are invalid or empty. (based on output from a PowerStack E1)
4) correctly handle older machines in pnpbus that have FixedIOPorts
rather than variable ones.

Still have much to do.

show more ...