Commit Graph

289069 Commits

Author SHA1 Message Date
jmcneill dd061977e6 amd64: liveimage: use RC_CONF_EXTRA instead of rc.conf.d 2021-07-24 16:13:44 +00:00
gson f898ef8945 Create temporary files in . rather than /tmp so that they get cleaned up
automatically by atf.
2021-07-24 15:56:05 +00:00
thorpej 0165ccc0be Don't blindly establish our interrupt handler as IST_LEVEL. If the INTDEF
register has the INTHIGH bit set, the controller is going to keep the
line low when *not* asserting an interrupt, and since EISA level-tiggered
interrupts are active-low, this would result in a forever-interrupt-storm.

So, if INTHIGH is set in INTDEF, establish our interrupt handler as
IST_EDGE, which will program the EISA PIC to detect the interrupt on
the rising edge of the IRQ line.
2021-07-24 15:52:16 +00:00
thorpej e4fef4bc0d Correct the comment about the INTHIGH bit in the INTDEF register. It
does indeed mean "IRQ signal is active-high", but "else edge" is not
correct; level-triggered EISA interrupt are active-low, and edge-triggered
EISA interrupts are rising-edge, so INTHIGH would in fact mean "edge".
2021-07-24 15:44:16 +00:00
jmcneill 9764bcee56 evbarm: liveimage: use RC_CONF_EXTRA instead of rc.conf.d 2021-07-24 14:00:08 +00:00
jmcneill e5de8b183d bootimage: allow appending additional rc.conf options
If RC_CONF_EXTRA is defined, append the contents of this file to the
target file-system's rc.conf
2021-07-24 13:59:28 +00:00
simonb 12d3157b50 Instead of getting an estimate of the number of kernel buffers,
allocating memory for them, requesting all the metadata contents of
these buffers (and repeating in the unlikely case of the number of
buffers increasing too much since the estimate) and then straight away
throwing all the contents out just to count how many buffers there were,
just get the initial estimate from the kernel and subtract the slop.

Reduces system CPU usage of "systat vm" by approx 80% for any system
with a reasonable number of buffers.
2021-07-24 13:42:05 +00:00
simonb 44f4ec8e31 Expose KERN_BUFSLOP in <sys/sysctl.h>. 2021-07-24 13:28:14 +00:00
simonb 89c455884f Pad out the slop for kern.buf based on the passed in element size,
rather than a size of an unrelated struct.
2021-07-24 13:27:39 +00:00
jmcneill 065fe7e8c6 smbios: Add character device for accessing SMBIOS tables
The /dev/smbios character device gives an aperture into physical memory
that allows read-only access to the SMBIOS header and tables.
2021-07-24 11:39:18 +00:00
jmcneill 3e525fe626 acpi: /dev/acpi: fix bounds check when reading tables 2021-07-24 11:36:41 +00:00
jmcneill 00ae5d3064 efiboot: Allow "fs" as alias for "initrd", for compat with x86 2021-07-24 10:22:28 +00:00
rin 78cc51210e For sh3, increment PC when PT_CONTINUE from trigger_trap(), as already
done for aarch64, arm, and powerpc. Otherwise, child is trapped to the
PTRACE_BREAKPOINT_ASM (== trapa) instruction indefinitely.

Fix tests/lib/libc/sys/t_ptrace_wait*:core_dump_procinfo.
2021-07-24 08:39:54 +00:00
skrll 588e6c03b1 #include <sys/param.h> for COHERENCY_UNIT 2021-07-24 07:59:10 +00:00
skrll dd63cab7a7 #include <sys/param.h> for COHERENCY_UNIT and some KNF while I'm here. 2021-07-24 07:48:38 +00:00
rin 735b96eca6 For evbppc, use C version of memcpy(3), memcmp(3), and memmove(3)
consistently for *.{po,pico,go} (for RUMP), in order to avoid
alignment faults for 403.
2021-07-24 05:29:26 +00:00
rin 043dd10516 For evbppc, use C version of bcopy(3), memcpy(3), memcmp(3), and
memmove(3) consistently for debug library (*.go) in order to avoid
alignment faults for 403.
2021-07-24 05:27:25 +00:00
oster 6adae0fd8b The number of components used must be at least 2. An odd number of components
is not allowed.

PR bin/45162
2021-07-23 22:34:12 +00:00
jmcneill bbc876812d evbarm: Add build.sh live-image support for armv7/aarch64 2021-07-23 21:53:33 +00:00
jmcneill 100cc283a8 smbios: Support SMBIOS 2.x tables. 2021-07-23 21:33:35 +00:00
jmcneill a3c7cf62e3 efiboot: Add support for SMBIOS 2.x tables. 2021-07-23 21:33:00 +00:00
oster 33d61e1478 Various disk queue "peek" routines were only ever used in the simulator
version of RAIDFrame.  Remove them from here.
2021-07-23 20:18:24 +00:00
rillig 022a019485 lint: rename cstk_t to control_statement
Rename the variables as well.  Their previous name 'ci' was not easy to
understand, the 'i' may have meant 'stack item'.  The new name 'cs'
simply means 'control statement'.

No functional change.
2021-07-23 17:06:37 +00:00
rillig 1c7a292214 lint: remove a few unnecessary abbreviations
No functional change.
2021-07-23 16:48:48 +00:00
rillig f86314b83c lint: make offset and alignment positive numbers
There's no use case for negative alignment or offsets in structures.

No functional change.
2021-07-23 16:43:11 +00:00
rillig 203492dc2b lint: write canonical form of keywords
For keywords that have a single spelling variant (such as __packed),
write this form in the source, to make it searchable.  This also avoids
a few calls to malloc.

Previously, some keywords had leading underscores and some hadn't, this
was inconsistent.

No functional change.
2021-07-23 15:36:56 +00:00
rillig c14f5cda7c tests/lint: test lexer for the GCC extension __thread 2021-07-23 15:21:47 +00:00
rillig 80e8c3dbea lint: move single semicolon to external_declaration
This aligns more closely with the grammar from GCC's parser.  The global
cleanup from the grammar rule 'external_declaration:
top_level_declaration' is not performed anymore, which doesn't matter
since there is nothing to clean up after a single semicolon.

No functional change.
2021-07-23 15:14:49 +00:00
thorpej e4f69ce269 Use wildcard matches more consistently, and attach pci, eisa, isa, and
usb to their interface attributes, which makes for easier trimming-down
with "no" directives.
2021-07-23 14:38:58 +00:00
martin b065142c9d gcc hates strncpy() 2021-07-23 04:20:05 +00:00
thorpej 57de3fa9ef Emulate the IEEE flavors of the FIX extension instructions:
- FTOIS, FTOIT
- ITOFS, ITOFT
- SRQTS, SQRTT

Left out for now are the VAX FP flavors:
- ITOFF
- SQRTF, SQRTG
2021-07-23 04:19:50 +00:00
thorpej 0e3f84576a IEEE SQRTS / SQRTT is fix_float opclass 11, not fix_float opclass 10
(which is VAX SQRTF / SQRTG).
2021-07-23 03:57:06 +00:00
thorpej 2af2e5a858 - Expose alpha_fp_complete_at() to callers outside fp_complete.c.
- Use ufetch_32() instead of copyin() to fetch the instruction.
2021-07-23 03:50:32 +00:00
oster c2b5269275 All IO is async in the RAIDframe kernel driver, so desc->async_flag
isn't needed.  Cleanup the flag from rf_DoAccess() and its caller as
well.
2021-07-23 02:35:14 +00:00
oster f2ae9da8fa The 'pss_issued' pool is unused, so remove it. 2021-07-23 02:18:26 +00:00
oster 2cf3739a9f Extensive mechanical changes to the pools used in RAIDframe.
Alloclist remains not per-RAID, so initialize that pool
separately/differently than the rest.

The remainder of pools in RF_Pools_s are now per-RAID pools.  Mostly
mechanical changes to functions to allocate/destroy per-RAID pools.
Needed to make raidPtr available in certain cases to be able to find
the per-RAID pools.

Extend rf_pool_init() to now populate a per-RAID wchan value that is
unique to each pool for a given RAID device.

TODO: Complete the analysis of the minimum number of items that are
required for each pool to allow IO to progress (i.e. so that a request
for pool resources can always be satisfied), and dynamically scale
minimum pool sizes based on RAID configuration.
2021-07-23 00:54:45 +00:00
oster e6cb3148a1 getiobuf() can return NULL if there are no IO buffers available.
RAIDframe can't deal with that, so create a dedicated pool of buffers
to use for IO.  PR_WAITOK is fine here, as we pre-allocate more than
we need to guarantee IO can make progress.  Tuning of pool still to
come.
2021-07-23 00:26:19 +00:00
mrg 5bb478fc82 fix typo in unused obsolete set name. noted by tnn. 2021-07-22 21:49:44 +00:00
christos c686ebaab6 rtld expects an absolute path in execname provided via AUXV in order to
handle $ORIGIN properly and checks for that. Since we are calling its guts
directly, provide one.
2021-07-22 17:39:52 +00:00
christos 83df97c2da revert changes to fflush.c (1.18) and fvwrite.c (1.25) until we investigate
collateral damage. Breaks h_intr.c test. Requested by RVP.
2021-07-22 17:08:15 +00:00
thorpej f35c7dbc58 It's unlikely that a process will be using restartable atomic sequences
on Alpha, and furthermore it's unlikely that any given context switch
will be returning to one even if the process has them.  So, re-arrange
the RAS processing in cpu_switchto() so that the most likely code paths
are predicted by the branch predictor.  On an EV4-class processor, this
will save ~4-6 cycles on just about every context switch.
2021-07-22 15:48:40 +00:00
skrll 6a2d1b5533 #include <sys/param.h> 2021-07-22 13:54:38 +00:00
skrll f2a3f360cf Minor shuffle to bring <machine/param.h> and <machine/limits.h> in before
any <sys/*.h> headers and for the COHERENCY_UNIT and CACHE_LINE_SIZE
defaults to be provided after the <machine/*.h> includes, but before the
<sys/*.h> includes.

COHERENCY_UNIT and CACHE_LINE_SIZE are used by a few <sys/*.h> filss.

I checked a handful of kernel builds produce the same binary before and
after this change.  I'll check more.
2021-07-22 04:46:29 +00:00
thorpej 90a2f3f5ab Various minor cleanups and bug fixes to the FP software completion code:
- Use __CTASSERT() instead of rolling our own compile-time assertion
  using cpp.
- Use __BIT() &c instead of rolling our own.
- Improve some comments.
- Define a default FP_C and FPCR value that is self-consistent, and
  initialize it properly at process creation time.
- Fix signal information when the trap shadow cannot be resolved.
- Use defined constants rather than magic numbers for the exception
  summary bits.
- Add a machdep sysctl to enable FP software-completion debugging.
2021-07-22 01:39:18 +00:00
pgoyette 7e0a9c140e module_hold() returns void, not int
XXX module_hold() and module_rele() should probably not be exposed, since
XXX they really aren't MP-safe.
2021-07-22 01:38:45 +00:00
thorpej 527e819aa9 Use __BITS() to define MDLWP_FP_C. 2021-07-22 01:31:55 +00:00
jmcneill ddb82ceef0 Expose SMBIOS tables using sysctl machdep.dmi.*, same as x86. 2021-07-22 00:47:55 +00:00
jmcneill ee93ad3ba4 x86's platform.c no longer has any x86 specific code in it, so move it to
dev/smbios_platform.c to let other ports use it
2021-07-21 23:26:15 +00:00
jmcneill b2c90ce3cf Separate MI smbios interface from MD specific code. 2021-07-21 23:16:08 +00:00
oster a2b6b0b4f1 Remove commented line that is a duplicate of a real line. 2021-07-21 23:10:12 +00:00