Commit Graph

4833 Commits

Author SHA1 Message Date
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
dbccff005f PR/50516: David Binderman: Add missing breaks 2015-12-13 19:49:34 +00:00
macallan
67f9b9131c || -> &&
From PR50534
2015-12-11 19:47:52 +00:00
mlelstv
ad7d3c2070 PR 50516 bad switch case 2015-12-11 08:08:01 +00:00
joerg
079b557452 Don't use dynamically sized unions, they are a horrible GNUism. Just use
the existing upper limit all the time.
2015-11-27 16:52:32 +00:00
joerg
b5e21344a8 Remove shifts of the PSR constants before applying to the trap frame.
Oring 0 doesn't do anything useful.
2015-11-27 13:45:17 +00:00
mrg
559b2abb6d force -mcpu=v9 for ofwboot, which demands v9 cpus. 2015-10-26 07:11:33 +00:00
martin
20dddba056 Add compile time asserts to make sure we have properly picked up types
for a 64bit cpu and 64bit openfirmware.
2015-10-10 06:50:25 +00:00
martin
01cb3be7ca Simplify, get rid of manual _LP64 define.
Do not pass a SUN4U define, as that is no longer used in the relevant headers.
Instead tell the compiler we are compiling for a v9 CPU (so it internally
defines everything we need).
2015-10-10 06:49:40 +00:00
joerg
2ccf9a9aba Don't check if an array is (not) NULL, check if the string is empty. 2015-10-08 20:58:13 +00:00
martin
27d8dabc37 Do not use #ifdef SUN4U when testing for cpu features of post-v8 CPUs,
it is not good for SUN4V-only kernels. Instead use __sparc_v9__ (which
is also defined by the sparc compiler when called with cpu=ultrasparc).
ok: mrg@
2015-10-06 20:03:05 +00:00
joerg
4930719b71 panic takes a format string. 2015-10-04 08:19:40 +00:00
joerg
cae6a72ca2 Unsigned values can not be negative. 2015-10-04 08:19:13 +00:00
joerg
106e3b42b0 Use pointer computation for references outside an object. 2015-10-04 08:18:49 +00:00
joerg
ac18bcbfd7 Don't check unsigned values for negativity. 2015-10-04 08:17:43 +00:00
joerg
e35723c2c4 Arrays are never NULL. 2015-10-04 08:17:03 +00:00
joerg
a6fbbeaa5f Avoid left-shifting negative values. 2015-10-04 08:16:13 +00:00
joerg
bf3eb6d6df Panic takes a format string. 2015-10-04 08:15:46 +00:00
joerg
91018e0967 Support per-target AFLAGS. 2015-10-02 20:36:54 +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
dholland
25d3b9e7cb Final bit of PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers most if not all of the MD headers.

XXX: a lot of the ioctl definitions in some of these files are cutpasted.
2015-09-07 03:49:44 +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
5a533f959b Don't expand unwanted symbols by cpp(1). 2015-08-25 02:58:59 +00:00
uebayasi
db0ac56ebf Define ${LINKSCRIPT} in one place. 2015-08-24 14:04:24 +00:00
uebayasi
ce93b3da57 Don't mention stab and DWARF sections, because these (poorly mtaintained)
lists only help to make them harder to read.

If those sections are found in inputs, they simply appear in outputs as
orphaned sections, sorted by section types and attributes.
2015-08-24 08:13:07 +00:00
joerg
865795c450 Use .word for data that is known to be aligned. 2015-08-23 11:01:24 +00:00
joerg
9d0743abbf Remove .proc 1, it has been ignored by gas for ages. 2015-08-23 10:59:15 +00:00
uebayasi
7633735d00 .interp and friends are unlikely to appear in kernels. 2015-08-22 23:51:48 +00:00
uebayasi
6ecada7d3b .rel/.rela should not be generated in kernels. 2015-08-22 23:49:54 +00:00
uebayasi
c0e6eb15f5 .init/.fini/.ctors/.dtors should be irrelevant to kernels. 2015-08-22 23:47:34 +00:00
uebayasi
220951d1d4 I bet setting search-directory for ld.so is useless in any kernel. 2015-08-21 02:35:52 +00:00
uebayasi
7fe7089a02 Add pseudo-device ksyms' where options DDB' is used, because
config(1)/config(5) can't handle module dependency correctly at this
moment.

(This is another proof that shared file definition (`file xxx.c a|b')
is a bad idea.)
2015-08-21 01:52:07 +00:00
uebayasi
185745d477 Indent with 2 spaces. 2015-08-20 07:00:48 +00:00
dholland
ab3a85b805 adjust comments slightly 2015-08-20 05:40:24 +00:00
dholland
65ff76a38f Use lfs32_dinode_SIZEOF instead of ufs1_dinode_SIZEOF for lfs. These
are the same so it doesn't make any difference, but technically one
should use lfs parts with lfs.
2015-08-20 05:40:08 +00:00
uebayasi
ce546f0df7 Adjust paths to ${KERNLDSCRIPT} files so that dependency is resolved. 2015-08-18 10:00:11 +00:00
uebayasi
b19d5046bd Use ${KERNLDSCRIPT} instead of ${KERN_LDSCRIPT}. The former is added
to ${SYSTEM_DEP} if defined.
2015-08-18 08:39:12 +00:00
jdc
4139ed58a3 Make these compile again after changes to LFS. 2015-08-16 10:58:54 +00:00
martin
e7a3928268 Make clock_t unsigned int everywhere.
Ok: matt@, mrg@
2015-06-17 14:32:31 +00:00
martin
5dd05e8b9a Bump version now that we can load kernels with sizeof(.data)+sizeof(.bss)> 4 MB 2015-06-14 18:40:10 +00:00
martin
158ff069a0 Fix available length calculation in kvamap_extract when reusing existing
mappings.
2015-06-14 16:20:44 +00:00
mlelstv
6f00c789e1 Use C99-style initializers for struct dkdriver. 2015-04-26 15:15:19 +00:00
pgoyette
37202cb966 Update device dependency information - the sysmon major device now depends on the sysmon module itself, not on the individual components. 2015-04-23 23:22:51 +00:00
nakayama
f1e575ac8e Sync sparc64 kernel's OF_seek with ofwboot's one, but sparc version
is not changed.
2015-03-27 06:10:25 +00:00
nakayama
ba1d0502fa Fix kernel loading failures from partitions started from over first
4GB of disks on sparc64.
2015-03-27 06:07:33 +00:00
martin
60e30960bb Handle EINVAL in the fault path, send SIGSEGV on mmap access past EOF. 2015-03-02 13:53:19 +00:00