Commit Graph

3461 Commits

Author SHA1 Message Date
martin
c6240a4b43 PR 32999: adjust VM parameters for 64 bit kernel/userlands.
Limit old binaries (i.e. processes not using topdown VA layout) to 2 GB
data size.
Use the same limits as native sparc for netbsd32 emulation - we need to
revisit this, but currently automatic test runs in this environment
fail big time, so there is no easy way to verify any changes.
2015-11-15 20:35:33 +00:00
christos
a31d08b00c Use PRIx64 and %# requested by phone@ 2015-11-09 20:26:15 +00:00
christos
8f3919dfd7 fix printf formats. 2015-11-09 02:13:41 +00:00
martin
607d1d4aed Convert siginfo to 32bit version before copying it out to 32bit userland. 2015-11-07 21:07:18 +00:00
martin
d8e5477643 Fix kmem_free() size mismatch 2015-11-07 11:47:09 +00:00
martin
28e1335091 Basically revert r1.246 of locore.s and r1.73 of vm_machdep.c:
Remove special case handling for userland lwps from cpu_lwp_fork,
	instead do it in lwp_trampoline when we first return to userland.

which was a stupid idea - since we did now set all fork child's %tstate
(and thus %pstate when back in userland) to the current kernel's userland
default. This meant we lost the address mask bit for 32bit processes and
all memory model details for 64bit ones.

Move it back to cpu_lwp_fork and fix the condition to only do it once when
forking init.
2015-11-06 15:30:59 +00:00
martin
79ee181a4a Add a few assertions to verify non-privileged processor state for userland
and 32bit address mapping for 32bit processes.
2015-11-06 15:25:42 +00:00
martin
d8d66c3c56 Most of the time return_from_trap already got called with tf->tf_tstate
loaded in register %g1 - make it so for two more callers and remove
the reload of that value.
2015-11-05 10:11:51 +00:00
nakayama
cfb53b34fc Remove #define SUN4U since machine/frame.h doesn't check SUN4U anymore. 2015-10-31 02:36:17 +00:00
tsutsui
bd619e0c12 Add a missing newline in zs at sbus attach message. 2015-10-30 16:21:46 +00:00
mrg
9884c86a80 make sure MSGBUFSIZE can't expand strangely by using parens. 2015-10-27 22:28:56 +00:00
nakayama
0b3a360931 Move LP64 and ILP32 conversion macros COMBINE, SPLIT from locore.h
to asm.h, and provide SPLIT_RETL for the case SPLIT and then retl
immediately.
2015-10-17 19:29:48 +00:00
nakayama
a78f012a79 LDPTR is defined in machine/asm.h. 2015-10-17 18:51:32 +00:00
martin
7e689e2d4f Split auxio at ebus and auxio at sbus properly, so we can build kernels
without sbus support.
2015-10-06 16:40:36 +00:00
joerg
a6fbbeaa5f Avoid left-shifting negative values. 2015-10-04 08:16:13 +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
macallan
7b2ed46289 - initialize sc_bg_cache and FFB_FBC_BG along with everything else so things
get redrawn properly when exiting X
- fix off by one in ffb_ras_erasecols(), no more artifacts when the screen
  is redrawn
2015-09-11 22:27:17 +00:00
palle
2ae392fea9 Fixed console logging when booting with -q 2015-09-09 03:47:58 +00:00
nakayama
a2f6aae19d Fix build w/o options SUN4V.
mdesc_get_len() and mdesc_init() are used outside of #ifdef SUN4V,
and eliminated by optimization if SUN4V isn't defined.
2015-09-08 13:18:06 +00:00
palle
df6d76d7bd Improve printout duing autoconfiguration 2015-09-08 04:04:33 +00:00
palle
c30a63571e Move function prototypes for cpu_ecache_associativity() and cpu_ecache_size() outside the MULTIPROCESSOR block so a GENERIC.UP kernel will build again 2015-09-07 20:00:49 +00:00
uebayasi
bea6b2338d Fix size_t/psize_t confusion. Fix build. 2015-09-07 17:14:54 +00:00
nakayama
f4df0c2422 Use <machine/*.h> instead of <sparc64/*.h> for consistency. 2015-09-06 23:48:39 +00:00
nakayama
75ea46906f Fix build w/o options SUN4V. 2015-09-06 23:47:09 +00:00
palle
4f2510d832 Update sparc64 TODO list: pmap_calculate_colors() is now working on sun4v planforms (fixed by martin@) 2015-09-06 18:41:34 +00:00
martin
a14c99422b On SUN4V make the mdesc data available early in pmap_bootstrap, so we
can set up the uvm page colors correctly.
Based on code from palle@.
2015-09-06 16:45:09 +00:00
palle
fff54eb030 Note that the FIXMEs in vpci.c/vpcivar.h should be cleaned up 2015-09-05 21:08:40 +00:00
palle
688f2bd11b sun4v: iommu setup seems to work now - device detection is now possible - parts from OpenBSD - ok mrg@, martin@ 2015-09-03 19:43:35 +00:00
martin
cefb36e67b Revert previous, not needed after sys/conf/Makefile.kern.inc rev. 1.215. 2015-08-31 08:00:44 +00:00
martin
ca3e144785 We preprocess .s files, so add ${INCLUDES} to AFLAGS 2015-08-30 18:20:27 +00:00
uebayasi
5a533f959b Don't expand unwanted symbols by cpp(1). 2015-08-25 02:58:59 +00:00
mrg
065f445d42 convert auxio(4) to use a mutex for exclusion (this existing code didn't
really work for MP systems, anyway -- it only went to splhigh.)

various cleanups:
- remove unused AUXIO_SBUS
- make most functions static
- introduce auxio_{read,write}_led() frontends
- avoid a potential NULL deref in auxio_fd_control()

the text is 32 bytes smaller.
2015-08-24 23:32:07 +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
9d0743abbf Remove .proc 1, it has been ignored by gas for ages. 2015-08-23 10:59:15 +00:00
joerg
131d1bf162 .align ensures alignment, so replace .uaword with .word. 2015-08-23 10:53:28 +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
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
nakayama
3a8c4b6cb5 pckbc@ebus: match "kb_ps2" device to make keyboard and mouse work
on qemu-sparc64.

XXX OpenBIOS doesn't provide interrupts for pckbc currently, so use
the interrupt numbers described in QEMU's hw/sparc64/sun4u.c::isa_irq_handler.
2015-08-14 10:59:27 +00:00
nakayama
e863f737b3 Detect a boot device more precisely on QEMU by checking the device
name.
2015-08-14 02:28:18 +00:00
msaitoh
9321d76417 Add ixg(4). 2015-08-11 03:59:37 +00:00
mrg
c37b36dc10 add some tomatillo specific information to schizo_pbm_regs. 2015-08-10 04:52:19 +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
fe2be58712 Make clock_t unsigned 2015-06-17 14:02:47 +00:00