Commit Graph

197997 Commits

Author SHA1 Message Date
matt d6c7c66ed9 If generating a gdb kernel and using dbsym, insert the symbols into it.
(This is useful when using the .gdb with an emulator so that ddb in the
emulator will have symbols).
2011-02-17 18:47:13 +00:00
matt 69e6dfca57 Add a bool to pcu_state_save which indicates whether the PCU is going to be
released after the save is done.
2011-02-17 18:44:54 +00:00
joerg daf6c4152f Update LLVM/clang snapshot. This brings in support for
.pushsection/.popsection and fixes clang -B to be incremental.
2011-02-17 18:35:35 +00:00
rmind bc16d8a440 Add PCU (Per-CPU Unit) - an interface to manage synchronization of any
per CPU context tied with an LWP.  Main use - lazy FPU handling on SMP.

Requested by matt@, will be used on mips64.  Note: implementation will
be improved to use IPIs before adopting on x86.  OK ad@.
2011-02-17 18:32:29 +00:00
jruoho b7ca446498 Fix iasl(8). 2011-02-17 18:26:20 +00:00
drochner fbd59be9fa make stack size limit (both initial and maximum) for native code
the double of that in 32-but emul mode, so that code which works
in emulation (or on the i386 port) will likely not overflow the
stack if built as native 64-bit program
This is still very conservative.
(before, the max stack size was natively even less than for 32bit emul)
2011-02-17 18:07:50 +00:00
pooka aedd7db813 Support rest of file types in vtype -> s_ifmt 2011-02-17 17:55:36 +00:00
pooka 7379975cf9 Support mount/unmount too. So, things are now generally at a stage
where you can mount a file system with a userspace server *without*
it having to go through puffs.

Say, you first start a server with ffs capability and map a host
ffs image into it:

	rump_server -lrumpvfs -lrumpfs_ffs \
	    -d key=/ffsimg,hostpath=ffs2.img,size=e unix:///tmp/ffsserv

Then, configure your shell to talk to the rump server:

	setenv RUMP_SERVER unix:///tmp/ffsserv
	setenv LD_PRELOAD /usr/lib/librumphijack.so

Create a mountpoint and mount the file system:

	pain-rustique:60:~> sh
	$ cd /rump
	$ ls
	dev
	$ ls -l
	total 1
	drwxr-xr-x  2 root  wheel  512 Feb 17 18:00 dev
	$ mkdir mnt
	$ mount_ffs /ffsimg /rump/mnt
	mount_ffs: Warning: realpath /ffsimg: No such file or directory
	$ df -h mnt
	Filesystem        Size       Used      Avail %Cap Mounted on
	/ffsimg           496M       380M        91M  80% /mnt
	$ du -sckh *
	192K    dev
	380M    mnt
	381M    total
	$ umount -R mnt
	$ df -h mnt
	Filesystem        Size       Used      Avail %Cap Mounted on
	rumpfs            1.0K       1.0K         0B 100% /
	$

(note, you need -R to umount due to various degrees of unsuccesful
magic it attempts to perform without it)
2011-02-17 17:18:08 +00:00
joerg b8e7b32e9a clang is more restrict matching input and output constraints.
Input is long, but used are only the lower 32bit. The cast actually
saves a byte in the output.
2011-02-17 17:14:56 +00:00
drochner 0533bd7178 The decompressor in sys/net/zlib.c has a bug: It returns Z_BUF_ERROR after
a successful decompression in rare cases. A necessary but not sufficient
condition seems to be that the decompressed data end exactly at the end
of an allocated output buffer. (I can reproduce this reliably with
a userland program built against kernel zlib. Userland libz is much
newer and not affected.)
Since kernel zlib is based on an old version and heavily modified, I don't
dare to touch it. So catch this case in the wrapper.
Being here, reorder deflate/inflate error handling and add comments
to make understandable what is tested and why.
2011-02-17 17:10:18 +00:00
wiz 07445f37aa Add .An -nosplit to AUTHORS to avoid a new line for Jukka. 2011-02-17 17:07:55 +00:00
wiz 3d273e44b9 Sort option descriptions. Merge single-letter options in SYNOPSIS. 2011-02-17 17:05:05 +00:00
wiz cd90032d22 Use more appropriate markup. Fix a typo. 2011-02-17 17:03:17 +00:00
pooka f6adb4bdd8 Use "size=e" as a way say "if the underlying file is preexisting
regular file, use whatever size it has".
2011-02-17 16:59:46 +00:00
pooka 0120167d51 "when in doubt, let the kernel decide" 2011-02-17 16:57:46 +00:00
joerg 6f7bc0c1ed Deal with changes in the weak_reference semantic in GCC 4.2 and later. 2011-02-17 16:44:48 +00:00
pooka 5b509bbede Test the -d type parameter of rump_server(1).
XXX: these tests only work with a dynamic userland, dunno how to
specify a "skip" clause for that
2011-02-17 16:08:48 +00:00
pooka aaf2cb63d0 Make it possible to specify the type of file (blk/chr/reg) that a
mapped file (-d) is exposed as within the rump kernel.
2011-02-17 16:03:05 +00:00
pooka 78bedf0f20 st_blocks is in units of DEV_BSIZE, not st_blksize.
from Derrik Pates
2011-02-17 15:41:34 +00:00
pooka b4ff8b5f63 In case dup2(n, n+FDOFF) is done, the caller thinks there are two
distinct file descriptors, but the rump kernel thinks they are both
the same.  Now, if either one is closed by the application, "both"
will be closed in the rump kernel.  To fix this, maintain an
alias-mask.  It's not a perfect solution, though (consider e.g.
F_SETFL).  Maybe we should actually dup the fd and maintain a
mapping table?

Also, prevent the host from opening file descriptors onto the places
in the fd namespace that have been dupped.

These together fix "cat < /rump/foo" in a hijacked /bin/sh.
(the first one makes sure stdin is open in cat and the second one
makes sure it doesn't try to cat something from /usr/share/locale
instead of stdin)
2011-02-17 15:20:10 +00:00
pooka db28d5668c Tell copyfd if the caller wants the exact tofd to just fd >= tofd.
Fixes "echo foo > /rump/bar" in a rump hijacked shell.

reviewed by christos
2011-02-17 15:13:49 +00:00
jruoho e96937f774 Provide a definition for the size of the RSDP in ACPI 1.0.
Appears to be missing in the new ACPICA.
2011-02-17 15:06:34 +00:00
matt ee73b6ae04 Add PCI support for BCM1125/1250. 2011-02-17 14:24:12 +00:00
matt a853fe292d Support a little bus_space for mapping the GUR registers since some
devices use little endian registers.  Add MPC8533 support.
2011-02-17 13:57:12 +00:00
matt 443ca4d0d2 Use _PMAP_PRIVATE to control the inclusion of <powerpc/booke/cpuvar.h>.
This prevents most of the MI files from depending on it.
2011-02-17 13:55:44 +00:00
matt cdbc87fa1b add begging of single step support. Since BookE doesn't support PSL_SE, if
userret find PSL_SE set in SRR1, it will call booke_sstep to setup the
debug registers.
2011-02-17 13:53:32 +00:00
pooka df19bb20b9 fix signature. from pgoyette 2011-02-17 12:52:33 +00:00
pooka 4d5a38cb17 Hijack pathname-based system calls. Now all paths starting with
/rump are hijacked to go to the rump server.  So you can e.g. start
a hijacked shell and cd to /rump:

$ cd /rump
$ pwd
/rump
$ ls -l dev/null
crwxr-xr-x  1 root  wheel  2, 2 Feb 17 12:35 dev/null
$ ls -l /dev/null
crw-rw-rw-  1 root  wheel  2, 2 Dec 22  2009 /dev/null
$ chmod 0 /dev/null
chmod: /dev/null: Operation not permitted
$ chmod 0 dev/null
$ ls -l /rump/dev/null
c---------  1 root  wheel  2, 2 Feb 17 12:35 /rump/dev/null

(of course the rump server must have vfs loaded for that to work)
2011-02-17 12:23:58 +00:00
jruoho 41e8c1fe85 Include acdebug.h for the ACPICA debugger. 2011-02-17 12:08:46 +00:00
jruoho fa8715d817 Fix ACPI_DEBUG build. 2011-02-17 12:08:14 +00:00
jruoho 2edec7caea Sigh. Why some people are unable to write proper C? 2011-02-17 11:21:40 +00:00
jruoho f92834d9d6 __UNCONST(3). 2011-02-17 10:59:31 +00:00
jruoho 9a25770d19 ACPICA 20101209:
Completed the major overhaul of the GPE support code that was begun in July
2010. Major features include: removal of _PRW execution in ACPICA (host
executes _PRWs anyway), cleanup of "wake" GPE interfaces and processing,
changes to existing interfaces, simplification of GPE handler operation, and
a handful of new interfaces:

    AcpiUpdateAllGpes
    AcpiFinishGpe
    AcpiSetupGpeForWake
    AcpiSetGpeWakeMask

ACPICA 20100702:

Implemented several updates to the recently added GPE reference count
support. The model for "wake" GPEs is changing to give the host OS complete
control of these GPEs. Eventually, the ACPICA core will not execute any _PRW
methods, since the host already must execute them. Also, additional changes
were made to help ensure that the reference counts are kept in proper
synchronization with reality. Rafael J. Wysocki.

1) Ensure that GPEs are not enabled twice during initialization.
2) Ensure that GPE enable masks stay in sync with the reference count.
3) Do not inadvertently enable GPEs when writing GPE registers.
4) Remove the internal wake reference counter and add new AcpiGpeWakeup
interface. This interface will set or clear individual GPEs for wakeup.
5) Remove GpeType argument from AcpiEnable and AcpiDisable. These interfaces
are now used for "runtime" GPEs only.
2011-02-17 10:49:29 +00:00
jmcneill 2bf4673f17 cast curlwp to uintptr_t before casting to ACPI_THREAD_ID, fixes i386 build 2011-02-17 10:35:50 +00:00
jruoho 99109677b7 ACPICA 20100806:
Fixed a problem with the prototype for AcpiOsReadPciConfiguration.
The prototype in acpiosxf.h had the output value pointer as a (void *).
It should be a (UINT64 *). This may affect some host OSL code.
2011-02-17 10:23:43 +00:00
jruoho 01d77446c4 ACPICA 20100806:
Obsolete Functions: AcpiOsValidateInterface - no longer used.
2011-02-17 10:21:43 +00:00
jmcneill 0a87e1998a document -c and -s flags 2011-02-17 10:21:02 +00:00
jruoho 303587c62f ACPICA 20100915:
Removed the AcpiOsDerivePciId OSL interface. The various host
implementations of this function were not OS-dependent and are now obsolete
and can be removed from all host OSLs.  This function has been replaced by
AcpiHwDerivePciId, which is now part of the ACPICA core code.
AcpiHwDerivePciId has been implemented without recursion.  Adds one new
module, hwpci.c.  ACPICA BZ 857.
2011-02-17 10:20:32 +00:00
jmcneill d34a996f1f - when dumping table bytes, make sure to dump our header and not the next one
- also dump tables with bad checksums, unless the -s flag is specified
2011-02-17 10:18:05 +00:00
jruoho 15a9932e12 Update for ACPICA 20110211. 2011-02-17 10:13:35 +00:00
jruoho 72daaf98ee ACPI_THREAD_ID type was changed to uint64_t, which is good enough for us. 2011-02-17 10:12:50 +00:00
jruoho 159c4e26bd Merge ACPICA 20110211. 2011-02-17 10:09:40 +00:00
jruoho 124f4c82e1 Import 20110211. 2011-02-17 10:00:50 +00:00
uebayasi 8bdc53618f RCSMETALOG: symbolically tag the latest and previous versions. 2011-02-17 08:41:35 +00:00
jruoho aa569730f5 Retire src/sys/external/intel-public. 2011-02-17 08:09:10 +00:00
jruoho 1385e1c0d9 Retire src/external/intel-public. 2011-02-17 07:56:37 +00:00
jruoho 1cfc85c6e4 Switch the build to use the new location of ACPICA. 2011-02-17 07:52:10 +00:00
jruoho ed720dbb6b Add the userspace portion of ACPICA to a new location. 2011-02-17 07:48:16 +00:00
jruoho 3b274ab6bf Switch acpi(4) to use the new location of ACPICA. 2011-02-17 07:34:42 +00:00
jruoho ba4af2fdd7 Add the build glue. 2011-02-17 07:27:17 +00:00