Home | History | Annotate | Download | only in include
History log of /src/sys/arch/sparc64/include/param.h
RevisionDateAuthorComments
 1.63  24-Apr-2025  martin Add a STACK_ALIGNBYTES definition
 1.62  31-May-2021  simonb branches: 1.62.18;
Include "opt_param.h" (ifdef _KERNEL_OPT) everywhere that MSGBUFSIZE is
referenced since some sources include <machine/param.h>.
 1.61  28-Sep-2019  christos branches: 1.61.12;
remove local version of mstohz() now that <sys/param.h> provides it.
 1.60  15-May-2019  christos From: Tobias Ulmer. Unbreak zfs module build on sparc{,64} by hiding DELAY.
ZFS has a conflicting definition of delay() and tries to hide it by
defining __HIDE_DELAY.
 1.59  07-Jan-2019  jdolecek move DEV_BSIZE, DEV_BSHIFT out of MD param.h, they are same on all ports

also move BLKDEV_IOSIZE, MAXPHYS, but allow override since some ports
have different value (powerpc uses NBPG for BLKDEV_IOSIZE, sun2/sun3
have lower MAXPHYS)
 1.58  13-Feb-2017  skrll branches: 1.58.12; 1.58.14;
G/C VM_MAX_KERNEL_BUF
 1.57  15-Apr-2016  martin branches: 1.57.2; 1.57.4;
If compiling with SUN4V support, bump MAXCPUS to 256.
 1.56  27-Oct-2015  mrg make sure MSGBUFSIZE can't expand strangely by using parens.
 1.55  08-Oct-2014  macallan branches: 1.55.2;
Ths has been sitting in my tree for years...
Allow the Xserver to map PCI IO space. Not needed for Sun-branded graphics
cards but Xorg can actually cold boot a few others, which will need it.
( if only to access standard VGA registers )
 1.54  10-Jul-2014  jdc Increase maximum MSGBUFSIZE to 248k.
While here, remove 2 sparc(32)-only entries (from mrg@).
 1.53  21-Feb-2014  palle branches: 1.53.2;
sun4v: Rename TLB_ defines to SUN4U_TLB_ so entries created using TSB_DATA() are properly setup for sun4u and sun4v. Relocate the cputyp variable from autoconf.c to locore.s and make it const in param.h so optimized code can be generated. Parts from OpenBSD. Optimization suggested by nakayama@. OK martin@, mrg@, nakayama@
 1.52  16-Dec-2013  palle Updates to pmap_bootstrap() for sun4v - parts from OpenBSD - OK martin@
 1.51  03-Jan-2013  martin branches: 1.51.2;
Rearange VA layout for 64 bit kernels, as suggested by Lars Heidieker:
move the dynamic kernel memory past 4GB (basically unlimiting it) and
use the now freed address range past kernel data upto 2GB for modules.
 1.50  10-Mar-2012  nakayama branches: 1.50.2;
Fix previous, which causes an integer overflow error in uvm_km.c on
32-bit kernels.
 1.49  09-Mar-2012  jdc Restrict NKMEMPAGES to 2.5GB, otherwise we will run out of space in the
kernel_map on machines with 8GB (or more) main memory.

XXX: Moving KERNBASE/KERNEND is a better long term solution, but this allows
those machines to boot now.
 1.48  04-Feb-2012  para branches: 1.48.2;
improve sizing of kmem_arena now that more allocations are made from it
don't enforce limits if not required

ok: riz@
 1.47  24-Jan-2012  christos Use and define ALIGN() ALIGN_POINTER() and STACK_ALIGN() consistently,
and avoid definining them in 10 different places if not needed.
 1.46  20-Jan-2012  joerg Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions
again. This was changed in sys/socket.h r1.51 to work around fallout
from the IPv6 aux data migration. It broke the historic ABI on some
platforms. This commit restores compatibility for netbsd32 code on such
platforms and provides a template for future changes to the CMSG_*
alignment. Revert PCC/Clang workarounds in postfix and tmux.
 1.45  12-May-2011  mrg branches: 1.45.4; 1.45.8;
first steps towards fujitsu SPARC64 support:

- add CPU_SUN4US and CPU_SUN4V defines
- re-introduce "cputyp" and use it for sun4u/sun4us/sun4v
 1.44  08-Feb-2010  joerg branches: 1.44.2; 1.44.4;
Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
 1.43  26-Aug-2008  rjs branches: 1.43.14;
Set MACHINE to sparc for 32bit kernels.

Approved by martin.
 1.42  17-Oct-2007  garbled branches: 1.42.16; 1.42.20; 1.42.22; 1.42.26;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.41  06-Sep-2007  martin Remove the (now unused) second 64k page mapped per CPU.
From matthew green, with small changes by me. All bugs are mine.
 1.40  25-Aug-2007  martin branches: 1.40.2;
Remove INITSTACK completely - at the time we used to switch to it, we
already have access to all of lwp0 and it's uarea - so we can switch
to the correct lwp0 stack easily before calling main.
 1.39  17-May-2007  yamt branches: 1.39.4; 1.39.8;
merge yamt-idlelwp branch. asked by core@. some ports still needs work.

from doc/BRANCHES:

idle lwp, and some changes depending on it.

1. separate context switching and thread scheduling.
(cf. gmcgarry_ctxsw)
2. implement idle lwp.
3. clean up related MD/MI interfaces.
4. make scheduler(s) modular.
 1.38  24-Jan-2007  hubertf branches: 1.38.2; 1.38.6; 1.38.8; 1.38.14;
Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
 1.37  17-Oct-2006  mrg allocate 128KB (as opposed to 64KB) per-cpu, and place the interrupt
stack, cpu_info structure, panicstack, idle uarea and normal kernel
stack in here. the idle uarea and kernel stack are in the 2nd 64KB
page. the interrupt stack and cpu_info structure are as the same
place in the 1st 64KB page, and the panicstack grows down from the
top of this page. update comments in param.h to suit (XXX: a lot
of these constants should move to a header file that will not pollute
the name space so much.) map these pages identically between
cpu_initialise() and cpu_mp_startup(), and deal with the two 64KB
pages in pmap_extract(). keep an unmapped 64KB page between them.

don't initialise the unused "ci_eintstack" member of the cpu_info
structure

use constants to initialise many addresses in the cpu_info structure,
consolidating these assignments from cpu0 and cpu>0

delete u0/estack0/panicstack from locore.s

clean up some wrong comments in locore.s

fix a 32bit-only bug in cpu_mp_startup().

delete 'u0' entirely.


this fixes recent random lossage seen on port-sparc64: processes
stuck in RUN state, data faults, and hangs.
 1.36  28-Aug-2006  yamt branches: 1.36.2; 1.36.4;
- remove unused bdbtofsb.
- move the following macros from MD headers to sys/param.h.
ctod
dtoc
ctob
btoc
dbtob
btodb
 1.35  20-Feb-2006  cdi branches: 1.35.2;
Use ANSI-style function definitions and declarations.
 1.34  11-Dec-2005  christos branches: 1.34.2; 1.34.4; 1.34.6;
merge ktrace-lwp.
 1.33  12-Dec-2004  abs branches: 1.33.10;
Fix comments slighly
 1.32  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.31  17-Jul-2002  thorpej branches: 1.31.6;
Remove CPU_ISSUN4MOR4U, CPU_ISSUN4OR4C, and CPU_ISSUN4COR4M.
 1.30  18-Apr-2002  eeh branches: 1.30.2;
Calculate NBPG from PGSHFT.
 1.29  08-Apr-2002  eeh Add a nice 64-bit mstohz() and clean out some cruft.
 1.28  26-Feb-2002  simonb Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
 1.27  09-Feb-2002  eeh Increase NMBCLUSTERS.
 1.26  04-Dec-2001  darrenr defopt "options SUN4*", put #define for each of SUN4, SUN4C, SUN4M and SUN4U
into opt_arch_sparc.h and include this wherever they are used.
 1.25  30-May-2001  mrg branches: 1.25.2; 1.25.8;
use _KERNEL_OPT
 1.24  11-Feb-2001  eeh branches: 1.24.2;
Increase NKMEMPAGES to a more useful value.
 1.23  28-Sep-2000  eeh Separate user and kernel address spaces and move the kernel down to
0x0000000001000000 -- 0x00000000f0000000, below the PROM where the
PROM thinks we should be.
 1.22  30-Jun-2000  itojun raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory. MHLEN is too small
already (less than 80) and there are chances for unwanted packet loss due
to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
(even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.
 1.21  24-Jun-2000  eeh Get rid of vaddrs.h.
 1.20  19-Jun-2000  eeh branches: 1.20.2;
Have separate data and text segments, make text read-only.
 1.19  13-Jun-2000  eeh Missing paren.
 1.18  12-Jun-2000  eeh Start reorganizing the kernel for MULTIPROCESSOR support.
 1.17  22-May-2000  mrg branches: 1.17.2;
add two new CPU_ISXXX versions: CPU_ISSUN4U, CPU_ISSUN4MOR4U
 1.16  11-Feb-2000  thorpej Update for the NKMEMPAGES changes.
 1.15  04-Dec-1999  ragge CL* discarding.
 1.14  27-Nov-1999  mrg minor cosmetic merges; long way to go here.
 1.13  21-Nov-1999  eeh Move KERNBASE down from 0xf8000000 to 0xf1000000, just beyond the PROM.
 1.12  20-Nov-1999  eeh Limit buffers to 1/4 of the kernel address space.
 1.11  07-Jun-1999  eeh branches: 1.11.2; 1.11.8;
Another general cleanup:

Remove the entire idea of fasttrap interrupts since V9 traps are really cheap,
the CPUs are really fast, and the completely different trap frames would make
these handlers really difficult to implement.

pmap_changeprot() was only used by the clock and one other place; deprecate it.

probeget() and probeset() now take 64-bit addresses even in 32-bit mode so we
can probe IO locations by physical addresses.

Some pmap cleanup.

Some more copyright cleanup.
 1.10  05-Jun-1999  eeh Make pbrobeget() and probeset() work for 64-bit values as well. To do this
the arguments are changed so the address is first and the ASI second so we
can have the address in %o0:%o1 and not worry about unused registers.

Also a bit of copyright cleanup.
 1.9  31-Jan-1999  mrg branches: 1.9.4;
retire _LP64; use compiler provided __arch64__, but still defined _LP64 where we used to anyway.
 1.8  06-Oct-1998  eeh It seems taht 64-bit kernels need bigger stacks.
 1.7  09-Sep-1998  thorpej If _LP64, set MID_MACHINE to MID_SPARC64, else MID_SPARC. This allows us
to uniquely identify ILP32 vs. LP64 core files, and prevents an LP64 kernel
from incorrectly choosing emul_netbsd when it should choose emul_sparc32.
 1.6  09-Sep-1998  eeh Change to MACHINE_ARCH=sparc64 for LP64 machines.
 1.5  06-Sep-1998  eeh 32-bit fixup.
 1.4  02-Sep-1998  eeh Periodic update: now starts probing devices.
 1.3  13-Aug-1998  eeh Merge paddr_t changes into the main branch.
 1.2  20-Jun-1998  mrg branches: 1.2.2;
pull in opt_gateway.h for options GATEWAY
 1.1  20-Jun-1998  eeh branches: 1.1.1;
Initial revision
 1.1.1.1  20-Jun-1998  eeh Import of sparc64.
 1.2.2.1  30-Jul-1998  eeh Split vm_offset_t and vm_size_t into paddr_t, psize_t, vaddr_t, and vsize_t.
 1.9.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.11.8.2  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.11.8.1  21-Dec-1999  wrstuden Initial commit of recent changes to make DEV_BSIZE go away.

Runs on i386, needs work on other arch's. Main kernel routines should be
fine, but a number of the stand programs need help.

cd, fd, ccd, wd, and sd have been updated. sd has been tested with non-512
byte block devices. vnd, raidframe, and lfs need work.

Non 2**n block support is automatic for LKM's and conditional for kernels
on "options NON_PO2_BLOCKS".
 1.11.2.2  11-Feb-2001  bouyer Sync with HEAD.
 1.11.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.17.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.20.2.2  18-Oct-2000  tv Pullup by patch [eeh]:
Move KERNBASE from 0xf1000000 to 0x01000000.
 1.20.2.1  18-Jul-2000  mrg pullup the contents of -current arch/sparc64. this gives us significant
ultrasparc PCI support (ultra5, ultra10, AXi, and E250 tested so far),
plus many other small fixes. netbooting is now supported.
 1.24.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.25.8.6  01-Aug-2002  nathanw Catch up to -current.
 1.25.8.5  20-Jun-2002  nathanw Catch up to -current.
 1.25.8.4  17-Apr-2002  nathanw Catch up to -current.
 1.25.8.3  28-Feb-2002  nathanw Catch up to -current.
 1.25.8.2  08-Jan-2002  nathanw Catch up to -current.
 1.25.8.1  30-May-2001  nathanw file param.h was added on branch nathanw_sa on 2002-01-08 00:28:00 +0000
 1.25.2.4  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.25.2.3  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.25.2.2  16-Mar-2002  jdolecek Catch up with -current.
 1.25.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.30.2.1  21-Jul-2002  gehenna catch up with -current.
 1.31.6.4  18-Dec-2004  skrll Sync with HEAD.
 1.31.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.31.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.31.6.1  03-Aug-2004  skrll Sync with HEAD
 1.33.10.5  27-Oct-2007  yamt sync with head.
 1.33.10.4  03-Sep-2007  yamt sync with head.
 1.33.10.3  26-Feb-2007  yamt sync with head.
 1.33.10.2  30-Dec-2006  yamt sync with head.
 1.33.10.1  21-Jun-2006  yamt sync with head.
 1.34.6.1  22-Apr-2006  simonb Sync with head.
 1.34.4.1  09-Sep-2006  rpaulo sync with head
 1.34.2.1  01-Mar-2006  yamt sync with head.
 1.35.2.1  03-Sep-2006  yamt sync with head.
 1.36.4.1  22-Oct-2006  yamt sync with head
 1.36.2.2  01-Feb-2007  ad Sync with head.
 1.36.2.1  18-Nov-2006  ad Sync with head.
 1.38.14.2  03-Oct-2007  garbled Sync with HEAD
 1.38.14.1  22-May-2007  matt Update to HEAD.
 1.38.8.1  11-Jul-2007  mjf Sync with head.
 1.38.6.2  09-Oct-2007  ad Sync with head.
 1.38.6.1  27-May-2007  ad Sync with head.
 1.38.2.1  28-Apr-2007  mrg port yamt-idlelwp to sparc64. this does not work yet, but others
have asked that i commit this work-in-progress.

currently it gets a double fault during a window save operation
and crashes to the prom. (it seems very much like the problem
that i see on SMP sparc64, but there is no real evidence it is
the same root cause.)
 1.39.8.2  02-Oct-2007  joerg Sync with HEAD.
 1.39.8.1  03-Sep-2007  jmcneill Sync with HEAD.
 1.39.4.2  10-Sep-2007  skrll Sync with HEAD.
 1.39.4.1  03-Sep-2007  skrll Sync with HEAD.
 1.40.2.1  06-Nov-2007  matt sync with HEAD
 1.42.26.1  19-Oct-2008  haad Sync with HEAD.
 1.42.22.1  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.42.20.2  11-Mar-2010  yamt sync with head
 1.42.20.1  04-May-2009  yamt sync with head.
 1.42.16.1  28-Sep-2008  mjf Sync with HEAD.
 1.43.14.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.44.4.1  06-Jun-2011  jruoho Sync with HEAD.
 1.44.2.1  31-May-2011  rmind sync with head
 1.45.8.2  11-Mar-2012  mrg sync to latest -current
 1.45.8.1  18-Feb-2012  mrg merge to -current.
 1.45.4.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.45.4.2  23-Jan-2013  yamt sync with head
 1.45.4.1  17-Apr-2012  yamt sync with head
 1.48.2.1  17-Mar-2012  bouyer Pull up following revision(s) (requested by martin in ticket #123):
sys/arch/sparc64/include/param.h: revision 1.49
sys/arch/sparc64/include/param.h: revision 1.50
Restrict NKMEMPAGES to 2.5GB, otherwise we will run out of space in the
kernel_map on machines with 8GB (or more) main memory.
XXX: Moving KERNBASE/KERNEND is a better long term solution, but this allows
those machines to boot now.
Fix previous, which causes an integer overflow error in uvm_km.c on
32-bit kernels.
 1.50.2.3  03-Dec-2017  jdolecek update from HEAD
 1.50.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.50.2.1  25-Feb-2013  tls resync with head
 1.51.2.1  18-May-2014  rmind sync with head
 1.53.2.1  10-Aug-2014  tls Rebase.
 1.55.2.3  28-Aug-2017  skrll Sync with HEAD
 1.55.2.2  22-Apr-2016  skrll Sync with HEAD
 1.55.2.1  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.57.4.1  21-Apr-2017  bouyer Sync with HEAD
 1.57.2.1  20-Mar-2017  pgoyette Sync with HEAD
 1.58.14.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.58.14.1  10-Jun-2019  christos Sync with HEAD
 1.58.12.1  18-Jan-2019  pgoyette Synch with HEAD
 1.61.12.1  17-Jun-2021  thorpej Sync w/ HEAD.
 1.62.18.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed