summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/sti.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* change wsdisplay attribute type from long to uint32_tjsg2020-05-251-14/+14
| | | | | | | | miod explained it was initially a long as it was thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. suggested and reviewed by miod@
* rename wsdisplay alloc_attr() to pack_attr()jsg2020-05-251-6/+6
| | | | | | | | Suggested by John Carmack. miod agrees a rename would make sense and explained it was initially thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. ok mpi@
* integer overflow for two range checksderaadt2017-06-111-3/+3
| | | | fix from C Turt, ok miod
* sizes for free(); ok sthen semariederaadt2015-09-091-3/+3
|
* Work-in-progress support for non-accelerated X11 on *some* sti(4) frame buffers;miod2015-04-051-59/+355
| | | | | | | | | based upon the old HP ngle X11 driver. Currently limited to CRX (720/735/750), Timber (710, old 715), Artist (712, 715) and EG (B-series), however the colormap isn't set up correctly on Timber and EG yet. Joint work with Artem Falcon, now in good enough shape to be worked further in the tree.
* Fix unsigned vs signed comparison in for() loop condition causing an infinitemiod2015-04-031-2/+2
| | | | | | | loop for WSDISPLAYIO_PUTCMAP ioctl with idx == 0; reported by Artem Falcon. [according to my investigation, none of the other for() loops in the kernel are affected by a similar issue]
* Replace a plethora of historical protection options with justderaadt2014-11-161-2/+2
| | | | | | | PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
* Fix format strings in STIDEBUG code.miod2014-08-301-6/+6
|
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-5/+5
| | | | after discussions with beck deraadt kettenis.
* Reduce uvm include madness. Use <uvm/uvm_extern.h> instead ofmpi2014-03-281-2/+2
| | | | | | <uvm/uvm.h> if possible and remove double inclusions. ok beck@, mlarkin@, deraadt@
* Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingmiod2014-03-181-44/+1
| | | | | | | this hardware alive is becoming increasingly difficult, and I should heed the message sent by the three disks which have died on me over the last few days. Noone sane will mourn these ports anyway. So long, and thanks for the fish.
* revert previous commit; didn't intend to commit those bitskettenis2014-02-201-16/+5
|
* Avoid printing the "nvram corrupt" message for onboard 2200s found on Sunkettenis2014-02-201-5/+16
| | | | | | hardware. ok dlg@, jmatthew@
* Use C99 named initializers for struct wsdisplay_accessops fields.miod2013-10-201-7/+6
| | | | No functional change.
* Make sure that, when a particular mapchar() can't find a proper glyph for themiod2013-10-181-2/+2
| | | | | | | | | requested character in the font it is using, it suggests a question mark character, instead of a space, so that the existence of the non-representable character becomes visible. Note that this is consistent with pcdisplay which suggests a diamond for missing glyphs.
* add support for the reverse video attribute in sti(4)mikeb2012-05-061-11/+18
| | | | | makes programs like less and mg look a wee bit prettier ok miod
* Missing argument in STIDEBUG printfmiod2011-09-191-2/+2
|
* So, it turns out that models 362 and 382 built-in frame buffer only shows upmiod2011-08-181-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | in DIO-II space, as a fat device spanning four select codes (i.e. 16MB of memory). This is way too much for an at-most 2 Mpixel 8bit frame buffer, and it turns out that this is because the device provides both a regular DIO-II frame buffer (spanning two select codes) and a regular STI frame buffer (spanning the other two select codes). This commit introduces a straightforward sti@dio attachment to get a working sti(4) and wsdisplay(4) in a ridiculously small number of lines; however the console code needs some changes to avoid duplicating globals. While there, add sti@dio support for the bootblocks, and I couldn't help myself but clean the most rotten parts of them, and try to have them reuse various files in sys/arch/hp300/dev instead of rolling their outdated ones. Tested on a real 382 with the low-resolution frame buffer: sti0 at dio0 scode 132: rev 8.02;129, ID 0x27134CB440A00499 sti0: 382V, 2048x512 frame buffer, 640x480x8 display sti0: 8x16 font type 1, 16 bpc, charset 0-255 wsdisplay0 at sti0 mux 1: console (std, vt100 emulation) Boot blocks updates tested on DIO-II 425t (serial/glass console), SGC 425e (serial/glass console) and 382 (serial/glass console). And will be tested on SGC 425t soon as well.
* Do not use NULL in integer comparisons. No functional change.miod2011-04-071-2/+2
| | | | ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
* Change the wsdisplay_emulops return types from void to int; emulops will nowmiod2009-09-051-13/+25
| | | | | | return zero on success and nonzero on failure. This commit only performs mechanical changes for the existing emulops to always return zero.
* Split sti structures into rom-related information and screen-relatedmiod2009-02-061-371/+474
| | | | | | | | | | | information. This is preliminary work to help eventually supporting the dual-head ELK model. Also split the initialization code in several routines, this makes the code easier to read, and makes it easier to release resources upon failure. Finally, don't forget to clear the text planes on non-console displays when initializing.
* The new font selection logic would loop and consume all kmem on promsmiod2009-02-061-2/+2
| | | | with only one font (such as many 712 onboard graphics). Oops again (poukram).
* Oops, correct logic when requested font index is out of bounds. Thankfullymiod2009-01-291-2/+2
| | | | it's a can't happen situation.
* If the rom contains a monitor table, look for an entry matching ourmiod2009-01-281-25/+85
| | | | | | | | | | | | | display resolution, and if one is found, pick the built-in font it points to, instead of the first font from the list. If the index is wrong and the font list is shorter, revert to the previous behaviour of using the first ROM font. This fixes the font discrepency on my B132L (INTERNAL_EG_1280) where PDC would use the 10x20 font, which is third in the list, and OpenBSD would use the 8x16 font instead. Tested on byte- and word- roms, gsc and pci cards.
* More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...'.krw2007-10-011-3/+2
|
* We can not consider the first sti region as always mapped, since on pcimiod2007-06-171-16/+15
| | | | | | cards it is no longer the rom image. This lets sti@pci work on non-dino bridges. Found by and ok kettenis@
* Make sure to pass valid extended initialization structure pointers inmiod2007-06-171-3/+7
| | | | | | sti_init(), for recent sti proms require them. Also, return a meaningful error value. ok kettenis@ mickey@
* Keep the wsscreen_descr in the softc, to allow sti of different textmiod2007-01-121-26/+18
| | | | resolutions to attach without disturbing each other.
* Add the ability for a sti backend to specify callbacks to disable and enablemiod2007-01-111-4/+48
| | | | | | | | access to the sti rom, as this seems to be necessary for sti@pci; hide this with macros so that platforms which do not have pci support (i.e. hp300) do not get bloated from this. ok mickey@
* Allow sti_attach_common() to return an error code, and do not fall intomiod2007-01-111-15/+33
| | | | | | sti_end_attach() if an error has occured. ok mickey@
* Read word-mode rom regions with bus_space_read_raw_region instead ofmiod2006-12-181-15/+19
| | | | | | | bus_space_region, for they might lie on a bus with a different endianness than the cpu. ok mickey@
* Change sti attachment to pass an array of base addresses for the sti regions,miod2006-12-181-11/+12
| | | | | | | | instead of using the rom mapping for region #0 and the device mapping for region #1. This will allow sti devices on which regions may be relative to different origins to attach (to be used very soon). ok mickey@
* Better sti_mapchar() implementation, matches Latin char indexes to HP Romanmiod2006-12-161-4/+51
| | | | font indicies whenever possible.
* Add an unpack_attr function to struct wsdisplay_emulops, to match themiod2006-11-291-4/+15
| | | | | existing alloc_attr function. This allows rasops_unpack_attr to be kept private to rasops, yet available to the screen drivers.
* Use uvm_km_alloc() instead of uvm_km_alloc1(), so that the latter canmiod2006-11-291-2/+2
| | | | change within uvm without breaking code. From art@
* Add a new member to struct wsemuldisplaydev_attach_args, for a frame buffermiod2006-11-291-1/+2
| | | | | driver to be able to tell how many wscons screens to attach to it, instead of WSDISPLAY_DEFAULTSCREENS which is a global setting.
* Clear sti display on console attach, now that the bootloader leaves usmiod2006-08-221-1/+8
| | | | with scribbles around; ok mickey@
* Introduce sti_rom_size() which will compute the size of a card's rom, andmiod2006-04-161-14/+23
| | | | | | use it instead of duplicating the same logic in 3 places. ok mickey@
* Split sti softc in two structures, one device-related for regular devicemiod2005-02-271-192/+288
| | | | | | | | | | | attachment and interface, one screen-attached for the real work. The attachment code is now required to decide whether sti_end_attach() is run immediately, or as a startuphook. This allows hp300 to initialize sti early, and use it as a console; hppa is functionally unchanged, as it uses the PROM console until the root device is mounted.
* sti colormap fixes:miod2005-01-241-7/+18
| | | | | | - correct bounds checking in colormap ioctls. - force the scment() pointer to NULL on < 8.04 revisions; 8.02 provide a non-NULL pointer, but it does not point to any meaningful piece of code.
* bus_space_map() sti regions with BUS_SPACE_MAP_CACHEABLE if they have themiod2005-01-231-2/+4
| | | | | | cache bit set in the region descriptor. Halves sti processing time on hp300. ok mickey@
* Two sti(4) changes necessary for hp300:miod2005-01-231-24/+44
| | | | | | | | - specify which microcode bank (pa or m68k) to use at attachment time. - compensate for broken 8.02 m68k code which reports wrong frame buffer offset. ok mickey@
* Let wsdisplay drivers return zero for WSDISPLAYIO_[GS]VIDEO ioctls - mostmiod2005-01-051-1/+3
| | | | | of the work is done in the upper layer, but they get to see the ioctl, so don't always return an error.
* oops missed to set devtype here rather than in sti_sgc.c:1.23mickey2004-11-031-1/+3
|
* allocate ext-cfg memory if was requestd in dd_stimemreqmickey2004-09-141-1/+12
|
* only map the rom and do not touch the hpa space getting rid of memsize define that was not really true; plus tested by otto@ and miod@mickey2003-12-161-4/+9
|
* typos from Tom Cosgrove;jmc2003-10-211-2/+2
| | | | | | | | Tom: I did not commit a couple of your changes. i did not include some punctuation fixes (full stops, etc.) mnemorable -> mnemonic: i decided memorable was probably better instrunctions -> instruction: i kept the plural
* fix the offsets in decoding byte rom dd (verified per manual); miod@ okmickey2003-08-211-15/+17
|
* give better depth and cmsizemickey2003-08-191-3/+4
|
* implement WSDISPLAYIO_{GET,PUT}CMAP; untestedmickey2003-08-191-4/+69
|