Commit Graph

57 Commits

Author SHA1 Message Date
elad
105d9a093d Replace curlwp->l_cred with kauth_cred_get().
Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/05/05/msg005038.html
2009-05-06 18:41:54 +00:00
yamt
b1fea83762 remove extra semicolons. 2009-01-03 03:43:21 +00:00
dyoung
9b4187042c Comment out some device IDs that do not actually belong to mach64
devices.  This stops machfb0 from trying and failing to attach as
console on my G4 PowerBook.  Now, genfb0 will attach as console,
instead.

Apparently, Michael Lorenz made a similar change on the netbsd-4
branch, but it was never committed to -current.
2008-07-01 23:25:06 +00:00
dyoung
dcfcd6affa Cosmetic: use device_t, cfdata_t, __arraycount(), device_private(). 2008-07-01 23:19:48 +00:00
cegger
3bde75a1bc use device_lookup_private to get softc 2008-06-12 22:44:47 +00:00
cegger
9d57c80079 use aprint_*_dev and device_xname 2008-04-10 19:13:36 +00:00
elad
b2b4fb68be Introduce two missing KAUTH_GENERIC_ISSUSER check in the voodoo and machfb
mmap() code.

This and similar requests will be replaced Soon, but these two in
particular should be pulled up to netbsd-4, and to allow doing that
smoothly, we're first introducing the "issuser" version.

Discussed with and okay macallan@.
2008-03-24 14:16:04 +00:00
jmcneill
cdd511a2fb For WSDISPLAY_GINFO, depth should be sc->bits_per_pixel, not
sc->color_depth. While we're here, implement WSDISPLAYIO_LINEBYTES.
2008-01-15 02:00:49 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos
489fe1e988 add missing initializers 2006-09-02 06:56:30 +00:00
mrg
084c052803 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
macallan
29f4f9865a fix some ugly mixup of virtual and physical addresses 2006-04-19 17:41:24 +00:00
macallan
8c1e0d461d correct a cast to avoid a warning. Pointed out by he. 2006-04-16 15:41:52 +00:00
jmmv
aec18036fd Remove the getwschar and putwschar accessops from wsdisplay drivers as
requested by uwe@.  These were wrong because they were receiving an
emulcookie yet they were accessops (thus having to receive an accesscookie).
Instead, just handle the WSDISPLAYIO_{GET,PUT}WSCHAR ioctls from the
driver's ioctl accessop.

As this reduces the amount of code needed to handle these operations to
two small functions in each driver, remove the WSDISPLAY_CHARFUNCS kernel
option.

Reviewed by, at least, uwe@ and macallan@.  No objections in tech-kern@.
2006-04-15 17:48:23 +00:00
macallan
176b72244c convert to vcons
while there, attach an fb device when running on sparc
2006-04-12 20:35:42 +00:00
jmmv
7a51d4dddc Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called.  The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place.  There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.
2006-04-12 19:38:22 +00:00
drochner
8390dd2605 update for accessops change (get/serborder removed) 2006-04-05 15:23:06 +00:00
macallan
fa6ce6d775 Add devname: to printf()s
From rivo nurges
2005-12-18 19:21:12 +00:00
christos
5ecdc5e2d0 welcome to the new lwp world. 2005-12-12 02:44:09 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
macallan
91cf1be5bf Build mach64_get_mode only on SPARC and PowerPC to shut up a compiler warning. 2005-10-03 11:22:06 +00:00
macallan
d15fb24907 Cleanup, remove some duplicate code, behave better with more than one instance
present.
2005-10-01 19:01:01 +00:00
macallan
cc58522caf - avoid using global variables unless necessary, this should fix weird
problems when more than one mach64 is present
- check memory BARs in mach64_mmap() and adjust allowed ranges in case
something ( XFree86 for instance ) changed them
- disable 'standard' framebuffer mapping at offset 0 on sparc64 because some
Sun/ATI firmware likes to map PCI resources there. May be necessary on other
64bit architectures as well.
2005-09-21 18:49:16 +00:00
macallan
af63a6798e fix a stupid typo 2005-08-02 01:35:05 +00:00
macallan
ddb036e135 disable mmap()ing the framebuffer at offset 0 on sparc64 because some ATI
firmware likes to put PCI memory resources into this range, notably a Rage
IIc which puts the 2nd register aperture to 0x2000.
This should allow a few graphics chips to work with XFree86 which previously
failed with something like this:
(WW) ATI:  PCI/AGP Mach64 in slot 2:5:0 could not be detected!
No devices to configure.  Configuration failed.

Thanks to Florian Stoehr for doing most of the work tracking this down.
2005-08-02 01:32:13 +00:00
thorpej
0be3d66be4 Apply const and static where appropriate. 2005-07-07 18:43:47 +00:00
christos
aee62d396e Always call mach64_init_screen, otherwise we'll panic later if DIAGNOSTIC
when we call switch screen and the machine has a serial console. Thanks to
martin for the fix.
2005-05-31 21:17:03 +00:00
christos
67f01e2568 minor knf. no functional change. 2005-05-31 21:16:06 +00:00
christos
b85712859a add const. 2005-05-30 22:18:41 +00:00
macallan
d42b58bdf7 more formatting fixes 2005-05-02 16:02:43 +00:00
macallan
45aba3b6e2 fixed formatting 2005-05-02 14:49:08 +00:00
macallan
a4073e00bc - made blitter operationd asynchronous
- removed some debug code
- prevent blitter operations when not in WSDISPLAYIO_MODE_EMUL
(approved by martin)
2005-05-02 11:22:31 +00:00
martin
672539b839 Make it compile for 32bit sparc kernels (bus_addr_t is larger than void*
there)
2005-03-07 21:45:24 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
martin
97a0f9b3ed From Michael Lorenz: more cleanup and various bugfixes, support
for WSDISPLAYIO_GETWSCHAR and WSDISPLAYIO_PUTWSCHAR ioctls.
2005-02-25 16:00:58 +00:00
martin
ab7375f57f More changes from Michael Lorenz:
- fix a panic in mach64_alloc_screen()
 - some cleanup
 - restrict mach64_mmap() to addresses which belong to it
 - mach64_attach now prints bus addresses instead of kernel vm addresses
 - initial support for macppc
2005-01-17 22:52:46 +00:00
martin
5689de1472 Bugfixes and acceleration support.
From Michael Lorenz.
2005-01-09 16:29:20 +00:00
itojun
6123043789 pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
2004-04-23 21:13:05 +00:00
pk
bfe932f43b sparc: OF_instance_to_package => prom_instance_to_package 2004-03-22 10:06:31 +00:00
martin
a4ec3066f6 Adapt to promlib changes on sparc. 2004-03-22 08:36:28 +00:00
lukem
365cbd9428 add missing __KERNEL_RCSID() 2003-07-14 15:47:00 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
martin
1a3bbabc29 Grrr, add another set of casts working around sc_aperbase having the wrong
type. We should fix this!

This makes it compile for 32bit sparc64 kernels.
2003-01-20 11:02:47 +00:00
martin
c7d20c39f9 Fix typo - make it compile with DIAGNOSTIC. 2003-01-15 21:38:22 +00:00
junyoung
65ce86ee32 '.' was missing in license notice. 2002-12-11 05:49:34 +00:00
martin
01740de795 Remove assumptions about endianess of bus_space_vaddr mappings, replace
with an explicit probe.
2002-11-25 21:24:28 +00:00
martin
b78c3d23e1 Need to cast a bus_space_addr_t to (u_long) before gcc allows us to cast
it to a pointer on 32bit spacr64 kernels. Sigh.
2002-11-02 15:54:10 +00:00