Commit Graph

75187 Commits

Author SHA1 Message Date
macallan 5a795c59e3 For some reason the drawing engine occasionally scribbles past the right
boundary when filling rectangles, especially annoying when we draw whitespaces
As a workaround we draw all rectangles less than 50 pixels wide by drawing
a 50 pixel rectangle into off-screen memory to the right of the visible fb and
then copy the portion we want. Keeps track of the colour and size of the
off-screen rectangle so we can avoid redrawing it whenever possible.
2024-03-28 12:50:31 +00:00
macallan 280fb4a2da fix brainfart - only update fbi_fbsize, not the size of the visible fb... 2024-03-27 09:08:38 +00:00
macallan 5e20e31189 in gftfb_ioctl():
- identify ourselves as WSDISPLAY_TYPE_STI
- return full fb geometry in WSDISPLAYIO_GET_FBINFO
2024-03-27 06:52:03 +00:00
riastradh 3f80beca65 mips/conf/files.octeon: octrnm does not depend on rnd
Whether or not we have /dev/random and /dev/urandom baked into the
kernel, configuring `octrnm* at ...' in the kernel config requires
octeon_rnm.c.

Related to PR kern/46728.
2024-03-26 10:51:16 +00:00
andvar 75dae3c9c9 Revert accidental change for root file system in previous commit. 2024-03-26 10:23:42 +00:00
andvar 4b3c7391f1 Remove netgraph options which are not supported and have no effect in NetBSD.
While here, reposition extio to reduce diff between ADM5120 and ADM5120-NB.
2024-03-26 10:16:47 +00:00
skrll 8a04118d2b Pretty print plic attachment 2024-03-24 08:34:20 +00:00
andvar 7f68f0d5e8 s/ignorning/ignoring/ in comment. 2024-03-23 18:48:31 +00:00
riastradh 40cfbdd6f3 acpihed(4): New driver for PNP0C33 to notify apei(4).
PNP0C33 denotes the ACPI Hardware Error Device, which exists only to
be a vector for event notifications.

PR kern/58046
2024-03-21 02:36:01 +00:00
riastradh 4b159fe528 apei(4): New driver for ACPI Platform Error Interfaces.
For now it is wired up only in x86 ALL kernels, and built as a module
for x86 and Arm.  Once it gets a little more testing on machines with
APEI, I would like to flip it on by default.

PR kern/58046
2024-03-20 17:11:42 +00:00
christos b81d0cd3ca Fix reproducible builds (Jan-Benedict Glaw) 2024-03-20 00:35:21 +00:00
christos 0cec432304 remove extra stat (Jan-Benedict Glaw) 2024-03-20 00:34:32 +00:00
andvar a5c0af2445 Add missing "e" in few words, in comments and one log message. 2024-03-17 21:48:01 +00:00
christos c75928623b make all QUAD constants look the same. 2024-03-16 21:50:47 +00:00
christos 107bc7662e Sync with x86_64 the quad constants. No reason to be different 2024-03-14 15:51:10 +00:00
macallan 30f3457fd0 add gftfb 2024-03-14 13:18:35 +00:00
riastradh c5f73804ac evbmips/interrupt.c: No need for __diagused with KASSERT.
KASSERT already references all the variables even in !DIAGNOSTIC
builds (but evaluates nothing at run-time in that case).

That said: Is the curlwp->l_blcnt assertion correct?  Can't curlwp be
changed in this interrupt handler by preemption?
2024-03-13 12:44:30 +00:00
nat 6bfcb10538 Apple Sound Chip audio support for 68k Macintoshoes.
This provies a sound device and support for wsbell(4).

Manual page to be added in a followup commit.

As posted to port-mac68k.
2024-03-13 07:55:28 +00:00
skrll b2b5b66905 Remove #ifdef DIAGNOSTIC by using __diagused. NFCI. 2024-03-13 06:59:01 +00:00
andvar ca77ae79ec Fix non-DIAGNOSTIC build for evbmips.
mtx_count, biglock_count and blcnt are defined inside DIAGNOSTIC block, thus
KASSERTs using them should be guarded as well.

Seemingly introduced with matt-nb5-mips64 merge in 2011.
2024-03-12 21:27:14 +00:00
gutteridge 868624973a coretemp.c: don't accept impossibly low TjMax values
r. 1.39 introduced a regression where instead of applying a reasonable
default maximum (as was done prior to that change), incorrect values
were accepted and applied, as failures to retrieve an expected MSR
value weren't accounted for.

Apply different logic for unexpectedly low vs. high maximums, with
distinct warnings for each. Also add another warning about a retrieval
failure right at the outset (which also just uses the default, then).

This change fundamentally doesn't address the fact that
__SHIFTOUT(msr, MSR_TEMP_TARGET_READOUT)
doesn't necessarily return a valid value. It just restores prior
behaviour, which is more reasonable than applying a zero value, which
started happening on some older hardware. (I infer this is most likely
an issue with dated generations of Intel hardware with this feature.)
The challenge is that this evidently isn't all documented properly
anywhere. Various "magic values" in this driver need further
investigation.

While here, also fix output so warnings are cleanly formatted, rather
than the slightly scrambled way they were appearing.

Tested on older Intel hardware I had on hand:
E7500 (now falls back to default 100 rather than 0)
E5540 (successfully retrieves 97, as before)
i5-3340M (successfully retrieves 105, as before)
2024-03-12 02:26:16 +00:00
rillig 52e9deb93c sparc: fix snprintb formats for SFSR_BITS 2024-03-10 17:34:46 +00:00
rillig b385f2f99e powerpc/hid: fix snprintb format for HID0_970_BITMASK_U 2024-03-10 17:07:31 +00:00
rillig e158259884 sparc/sbusreg: fix snprintb format for SBUS_AFSR_BITS 2024-03-10 17:02:24 +00:00
rillig f70f425383 sparc/vmereg: fix snprintb format VMEBUS_AFSR_BITS 2024-03-10 16:58:08 +00:00
isaki 445fbf37f2 Fix a null dereference.
free_interrupts may be called even when sc_ih has not been assigned yet.
2024-03-09 11:16:31 +00:00
rillig 88b554245c cpuctl: fix i386 bit descriptions for CPUID_SEF_FLAGS1
warning: non-printing character '\31' in description
    'BUS_LOCK_DETECT""b\31' [363]
2024-03-08 20:29:17 +00:00
andvar 2ddc9e7fa6 s/horizontaol/horizontal/ in comments. 2024-03-06 20:18:42 +00:00
andvar 1c79931e30 Fix few typos in comments. 2024-03-06 20:02:24 +00:00
andvar ee1106db37 s/lader/loader/ in comments. 2024-03-06 19:48:53 +00:00
thorpej b07295a08c Tidy up TLSB autoconfiguration just a bit. 2024-03-06 13:37:35 +00:00
macallan 711ef3cdc9 if the framebuffer is wider than the visible area, use the full width for the
glyphcache
2024-03-06 08:19:44 +00:00
thorpej bec13c02f2 Alpha systems based on the "Laser" and "TurboLaser" system architecture
have an interesting feature: the RTC and console UART are present on each
CPU module, but only those peripherals on the "primary" CPU module matter,
because each CPU's module's periperals are mapped to the same physical
address, but are only accessible by that CPU module.  The firmware selects
a primary CPU to boot the system, and that CPU's RTC and UART are the
system RTC and console, respectively.

To handle this, on systems where it's needed, we wrap the RTC gettime/settime
calls and, if not running on the primary CPU already, cross-call to the primary
to perform the RTC access.
2024-03-06 07:34:11 +00:00
thorpej e5696cfb37 Statically initialize the PRIMARY and RUNNING flags in cpu_info_primary. 2024-03-06 07:22:45 +00:00
thorpej e3581e4323 Wrap the mcclock driver's mc146818_softc inside a new mcclock_softc.
This commit represents no functional change, but forms the basis for
a future functional change.
2024-03-06 06:30:48 +00:00
thorpej 5216fa0690 bus_space-ify. 2024-03-06 05:44:44 +00:00
thorpej 8eb9eddb64 Add a bus space implementation for the Gbus, the general 8-bit bus present
on Laser / TurboLaser CPU modules.
2024-03-06 05:33:09 +00:00
andvar bfb11cbc46 Remove duplicate "when" word in comments. 2024-03-05 20:58:05 +00:00
thorpej f36002f244 Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().
It's a small step, but it's a step.
2024-03-05 14:15:28 +00:00
isaki 4b71250eb0 Fix two problems that the time runs late on virt68k.
- The time between the time the alarm occurred and the time read by
  TIME_* register in the next interrupt handler was not accumulated.
- With the one-shot timer method, once the host time prolongs, the
  guest time will never be able to catch up with the host time again.
New one does:
- The driver maintains its (guest's) time (as sc_alarm_time) and always
  set the next alarm sc_interval_ns after the previous alarm.
- gfrtc_set_alarm() takes an absolute time instead of a relative time
  as the argument.
PR kern/57980.  Confirmed on QEMU.
2024-03-05 11:19:30 +00:00
thorpej 61c92c317d prom_uses_prom_console() needs to consider ST_DEC_7000, as well. 2024-03-03 19:56:29 +00:00
thorpej 1b34e3658a tlsb -> gbus. No functional change. 2024-03-02 22:58:29 +00:00
thorpej 01e56b5ebb Add the basic framework for the DEC KN7AA ("Ruby") systems -- DEC 7000
and DEC 10000.

This is a work-in-progress, but this should be sufficient for the system
to boot, using the PROM console routines (and then proceed to not find any
devices because we don't yet support the "Laser System Bus").
2024-03-02 20:15:33 +00:00
thorpej e6333d4801 Shuffle GBus-related files into their own directory in preparation for
other GBus attachments.  No functional change here; just minimal editing
to reflect path differences after moving the files.
2024-03-02 19:57:57 +00:00
gutteridge 3a6a773486 coretemp.c: fix grammar in a warning message
(I get several of these warnings on boot on a particular machine. Now,
it also seems that the code isn't retrieving the correct value, either;
TBD.)
2024-02-29 01:59:11 +00:00
macallan 278b8452df support WSDISPLAYIO_SVIDEO so X can turn the monitor off
so far I only know how to turn off video output, not sync(s). Better than
nothing though.
2024-02-28 14:12:12 +00:00
thorpej f80a61f577 Revert the CLOCK_FORMAT0 work-around. 2024-02-28 13:07:07 +00:00
thorpej 3ced769fe7 Fix up the mac68k interrupt handlers to work with the new style common
clockframe layout and remove the CLOCK_FORMAT0 work-around.  As a nice
side-effect, this also eliminates the super-sketchy stack unwinding used
by rtclock_intr to get at the interrupt stack frame.
2024-02-28 13:05:39 +00:00
macallan a75f9c4ba3 add hardware cursor support, mostly for X 2024-02-28 10:25:36 +00:00
nat 8e4f69fe14 Use proper clockframe size for those platforms that require it.
XXX This is a tempory measure, better to fix clock interrupts to take the
    common clockframe size.

OK thorpej@.
2024-02-27 16:07:02 +00:00