Commit Graph

45 Commits

Author SHA1 Message Date
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
martin 8ab4396fef Rearange struct mach64screen to be derived from struct rasops_info,
move a few bits around and make adding screens after attach time
actually work.

When not booting as console, try to properly set up the hardware to
get a display nevertheless (XXX - does not yet work on my U5).

#if 0 some unused functions planned for future extensions (to make clear
they are unused now)
2002-10-31 14:10:07 +00:00
junyoung d285dd8c38 Reduce the number of #ifdef __sparc__ from 5 to 3. 2002-10-29 17:54:40 +00:00
junyoung 93c1a9d0c7 Rename sparc_screen_is_console() to mach64_is_console() and turn it into
a MI interface.
2002-10-29 13:50:11 +00:00
junyoung 9d459e65ae Register aperture is now mapped as a subregion of the framebuffer aperture
using bus_space_subregion(). This makes reg*() look better.
2002-10-25 18:57:06 +00:00
martin 456f63b54e Sprinkle a few bus_space_read*/bus_space_write* calls and simplify register
offset calculation. Mostly from Bang Jun Young.

Don't call wsdisplay_cnattach unconditionally.

On sparc use OF to decide whether we are console output.

This makes it actually work on my U5 - if only we had a keyboard driver
to produce wskbd events (coming soon).
2002-10-25 18:03:03 +00:00
martin 1def10c9a4 A few 64bit nits. 2002-10-24 20:41:59 +00:00
junyoung 2c1cfbd9df Add machfb, ATI Mach64/Rage framebuffer display driver.
XXX this version is not fully functional yet. More to come shortly.
2002-10-24 18:15:57 +00:00