Commit Graph

646 Commits

Author SHA1 Message Date
jdolecek 90e565828d dumpconf(void) long doesn't exist, remove the prototype
PR kern/39714 by Henning Petersen
2017-06-16 18:17:41 +00:00
chs fd34ea77eb remove checks for failure after memory allocation calls that cannot fail:
kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
2017-06-01 02:45:05 +00:00
christos 11ae70bcc0 rename u3ginit driver to umodeswitch 2017-05-24 20:23:04 +00:00
kamil 12cbcbd04f Add new macro PTRACE_BREAKPOINT_ASM in <sys/ptrace.h> MD part
This macro ships with a MD-specific assembly instruction triggering
a software breakpoint.

Missing instruction for powerpc targets.

This code is used in ATF tests (lib/libc/sys/t_ptrace_wait).

Original patch by Nick Hudson, thanks!
2017-04-12 18:17:59 +00:00
christos cb5e99c661 centralize vers.c building for standalone programs. 2017-04-08 19:53:19 +00:00
kamil 05ffc73c35 Add new ptrace(2) API: PT_SETSTEP & PT_CLEARSTEP
These operations allow to mark thread as a single-stepping one.

This allows to i.a.:
 - single step and emit a signal (PT_SETSTEP & PT_CONTINUE)
 - single step and trace syscall entry and exit (PT_SETSTEP & PT_SYSCALL)

The former is useful for debuggers like GDB or LLDB. The latter can be used
to singlestep a usermode kernel. These examples don't limit use-cases of
this interface.

Define PT_*STEP only for platforms defining PT_STEP.

Add new ATF tests setstep[1234].

These ptrace(2) operations first appeared in FreeBSD.

Sponsored by <The NetBSD Foundation>
2017-04-08 00:25:49 +00:00
skrll e4e7090b30 PR/52129: NetBSD/hppa 7.1 fails to boot on 712/60
Add 712/* models to cpu_model_cpuid
2017-04-02 08:31:10 +00:00
christos 74c01bd5e3 undo paren change 2017-01-15 18:03:12 +00:00
christos 58716ac1f5 more types for constants 2017-01-15 15:27:41 +00:00
christos 21ad29ec97 fix constant types 2017-01-14 15:58:11 +00:00
cherry e08917ef90 switch all ports to use uvm_init.c:uvm_md_init()
uvm_setpagesize() is now subsumed within this funciton.
2016-12-22 14:47:53 +00:00
christos ef2deb33e0 wildcard speaker attachments, now that we can handle many of them. 2016-12-13 20:42:15 +00:00
christos 219b8dae14 remove VAUDIOSPEAKER for now, will be done differently. 2016-12-10 23:03:22 +00:00
nat 03783bb56a Add a synthesized pc beeper and keyboard bell for platforms with an audio
device.
2016-12-08 11:31:08 +00:00
christos cb663e7b10 fix register names 2016-11-25 02:27:43 +00:00
jdolecek e1d3e1b041 add isa_intr_establish_xname() to MD isa headers so that it can be used
by MI drivers
2016-10-18 22:04:33 +00:00
skrll f92670f913 Use the MI usb majors 2016-05-09 15:23:23 +00:00
mrg 65f5251eae remove a bunch of "@echo done" from the tail of rules. these messages
were vaguely useful back when we didn't run make -j, but now you end
up with a single line "done" every so often, with no idea what it is
for.  very few other targets claim they're done so just remove these.
2016-03-22 08:25:22 +00:00
gdt af798e7b27 Disable uscanner in all kernel configs
As discussed on current-users@, SANE uses ugen via libusb and not
uscanner, so users are not well served by having uscanner.  Consensus
is that addressing how to adjust permissions for scanners should not
block restoring basic functionionality.

(Compile-tested only, but there are multiple reports of this being the
right approach.)
2016-03-19 23:21:02 +00:00
christos 13e9c85cdc PR/50870: David Binderman: Use logical and instead of arithmetic 2016-02-29 18:22:06 +00:00
christos 4a89ac6a7b PR/50871: David Binderman: use logical and instead of arithmetic 2016-02-29 18:20:31 +00:00
christos be0b117468 move the NODEBUG to the boot blocks only. 2016-02-21 14:50:05 +00:00
christos 47160181d3 No debug, pic, or ctf for standalone code.
- debug makes things not fit
- ctf is useless
- pic does not work with the function call convention standalone uses
2016-02-21 03:33:18 +00:00
christos 31ee5a7a9a use :Q to quote variables properly. 2016-01-25 18:55:25 +00:00
christos c441eba884 Don't expose kernel structs to userland. 2016-01-25 18:14:40 +00:00
christos d84c286204 expose the kernel types for standalone code. 2016-01-23 22:31:19 +00:00
christos 4d497c90e6 Hide {p,v}{addr,size}_t and register_t (and a couple more types that
are machine-specific) from userland unless _KERNEL/_KMEMUSER and a
new _KERNTYPES variables is defined. The _KERNTYPES should be fixed
for many subsystems that should not be using it (rump)...
2016-01-23 21:22:13 +00:00
christos a7dbc6bff9 PR/50684: David Binderman: Fix memory leak 2016-01-21 17:00:23 +00:00
skrll e87edd2456 PR port-hppa/50642: src/sys/arch/hppa/include/db_machdep.h:118: bad if test ?
Correct the test for rfir and add one for rfi while I'm here.
2016-01-11 08:14:08 +00:00
christos 23d819855e PR/50532: David Binderman: Add missing fclose. 2015-12-13 18:38:23 +00:00
mrg 9884c86a80 make sure MSGBUFSIZE can't expand strangely by using parens. 2015-10-27 22:28:56 +00:00
maxv 389924615a Add some {} when the meaning is too ambiguous. From Brainy. 2015-10-18 17:13:32 +00:00
msaitoh 605f564f52 PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
  if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
  Currently the following extended capabilities are decoded:
   - Advanced Error Reporting
   - Virtual Channel
   - Device Serial Number
   - Power Budgeting
   - Root Complex Link Declaration
   - Root Complex Event Collector Association
   - Access Control Services
   - Alternative Routing-ID Interpretation
   - Address Translation Services
   - Single Root IO Virtualization
   - Page Request
   - TPH Requester
   - Latency Tolerance Reporting
   - Secondary PCI Express
   - Process Address Space ID
   - LN Requester
   - L1 PM Substates
  The following extended capabilities are not decoded yet:
   - Root Complex Internal Link Control
   - Multi-Function Virtual Channel
   - RCRB Header
   - Vendor Unique
   - Configuration Access Correction
   - Multiple Root IO Virtualization
   - Multicast
   - Resizable BAR
   - Dynamic Power Allocation
   - Protocol Multiplexing
   - Downstream Port Containment
   - Precision Time Management
   - M-PCIe
   - Function Reading Status Queueing
   - Readiness Time Reporting
   - Designated Vendor-Specific
2015-10-02 05:22:49 +00:00
maxv d42b2b5ae7 Remove KMEMSTATS. Normally it's ok now. 2015-09-26 11:16:12 +00:00
christos b88569ce68 For processors that have memory breakpoints, add macros for them to help
libproc
2015-09-25 16:05:17 +00:00
christos 5020ab68d5 Provide access to pc/sp/syscall-return registers like we have for mcontext 2015-09-15 15:49:02 +00:00
uebayasi ea72de740f Order library object build. 2015-09-07 03:44:19 +00:00
uebayasi 9068ec741b Sprinkle more done messages. 2015-09-07 03:20:18 +00:00
uebayasi dd204a345e In kernel lib build, print message when things not only start bug also end. 2015-09-06 15:34:55 +00:00
uebayasi 9387749a6a spmath.o is an MD library, not an MD object. 2015-09-06 02:22:50 +00:00
uebayasi fff9bf95dd Fix build of hppa's spmath.o, as m68k's fpsp.o was done. 2015-09-05 04:44:29 +00:00
pooka 01d7ebdd80 Fix PTHREAD_FOO_INITIALIZER for C++ by not using volatile in the relevant
pthread types in C++ builds, attempt 2.

The problem with attempt 1 was making assumptions of what the MD
__cpu_simple_lock_t (declared volatile) looks like.  To get a same type
except non-volatile, we change the MD type to __cpu_simple_lock_nv_t
and typedef __cpu_simple_lock_t as a volatile __cpu_simple_lock_nv_t.
IMO, __cpu_simple_lock_t should not be volatile at all, but changing it
now is too risky.

Fixes at least Rumprun w/ gcc 5.1/5.2.  Furthermore, the mpd application
(and possibly others) will no longer require NetBSD-specific patches.

Tested: build.sh for i386, Rumprun for x86_64 w/ gcc 5.2.

Based on the patch from Christos in lib/49989.
2015-08-27 12:30:50 +00:00
uebayasi db0ac56ebf Define ${LINKSCRIPT} in one place. 2015-08-24 14:04:24 +00:00
dholland ff561ccdee Sync lfs changes with the x68k version of this code. 2015-08-23 04:56:20 +00:00
uebayasi c0e6eb15f5 .init/.fini/.ctors/.dtors should be irrelevant to kernels. 2015-08-22 23:47:34 +00:00
christos 396368bec1 minimal changes to get this to compile. 2015-08-20 07:50:08 +00:00
uebayasi 078e9ee66f Use ${KERNLDSCRIPT}. 2015-08-20 06:21:54 +00:00
christos d9b0abf9c6 fix build. 2015-07-28 16:50:12 +00:00
kamil f874bd0561 Improve spelling: regsiter -> register
This change is non-functional.

Approved by <riastradh>, <pgoyette>
2015-07-11 10:32:45 +00:00
martin e7a3928268 Make clock_t unsigned int everywhere.
Ok: matt@, mrg@
2015-06-17 14:32:31 +00:00