summaryrefslogtreecommitdiffstats
path: root/sys
Commit message (Collapse)AuthorAgeFilesLines
* Pass the HCDP table address to the kernel. If no such table exists,marcel2002-12-108-28/+33
| | | | | | | | | | | | | NULL is passed. The address of the HCDP table can be found by iterating over the configuration tables in the EFI system table. To avoid more duplication, a function can be called with the GUID of interest. The function will do the scanning. Use the function in all places where we iterate over the configuration tables in an attempt to find a specific one. Bump the loader version number as the result of this. Approved by: re (blanket)
* Default policies to on: if you load them or compile them into yourrwatson2002-12-107-7/+7
| | | | | | | | | | kernel, you should expect them to do something, so now they do. This doesn't affect users who don't load or explicitly compile in the policies. Approved by: re (jhb) Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Play nice with GEOM and use the appropriate ioctls for getting thescottl2002-12-101-20/+12
| | | | | | | | partition size and sector size. The old way of groveling through the disklabel doesn't work anymore. Noticed by: anholt Approved by: re
* The exit() function has been moved to libefi.c to better deal withmarcel2002-12-101-39/+0
| | | | | | | cleaning up after ourselves. Approved by: re (blankoscheck) German corrections: Alexander (both :-)
* Change the startup code to fix a memory leak and to allow us tomarcel2002-12-105-41/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | accept load options (=command line options). The call graph changes from *entry*->efi_main->efi_init, where efi_main is the EFI equivalent of main to *entry*->efi_main->main, where main is what you'd expect. efi_main now is what efi_init was. The prototype of main follows that of C. The first argument is argc and the second is argv. There is no third argument. Allocation of heap pages is now handled by the EFI library and it now deallocates the pages when main() returns or when exit() is called. This allows us to safely return to the boot manager (or EFI shell) without leaks. EFI applications are responsible to free all memory themselves. Handling of the load options is a bit tricky. There are either no load options, load options in ASCII or load options in Unicode. The EFI library will translate the ASCII options to Unicode options as to simplify user code. Since the load options are passed as a single string (if present) and main() accepts argc and argv, the startup code also has to split the string into words and build the argv vector. Here the trickiness starts. When the loader is started from the EFI shell, argv[0] will automaticly load the program name. In all other cases (ie through the boot manager), this is not the case. Unfortunately, there's no trivial way to check. Hence, a set of conditions is checked to determine if we need to fill in argv[0] ourselves or not. This checking is not perfect. There are known cases where it fails to do the right thing. The logic works for most expected cases, though. This includes the case where no options are given. Approved by: re (blanket)
* o Make all GUID variables global to maximize reuse.marcel2002-12-102-42/+64
| | | | | | | o Recognize the HCDP configuration table. o Dump the GUID of tables we don't recognize. Approved by: re (carte blanche)
* Build EFI with -fshort-wchar so that L"some string" works with themarcel2002-12-101-1/+1
| | | | EFI has defined CHAR16.
* Remove _putchar, _puts and _puthex. These functions are unused.marcel2002-12-102-202/+4
| | | | Approved by: re (blanket)
* Unbreak the KSE code. Keep track of zobie threads using the Per-CPU storagejulian2002-12-1014-280/+198
| | | | | | | | during the context switch. Rearrange thread cleanups to avoid problems with Giant. Clean threads when freed or when recycled. Approved by: re (jhb)
* Fix a panic unloading the bktr driver when devfs is in use.roger2002-12-091-10/+2
| | | | PR: kern/36413
* Remove dm_root entry from struct devfs_mount. It's never set, and isrwatson2002-12-0923-158/+199
| | | | | | | | | | | | unused. Replace it with a dm_mount back-pointer to the struct mount that the devfs_mount is associated with. Export that pointer to MAC Framework entry points, where all current policies don't use the pointer. This permits the SEBSD port of SELinux's FLASK/TE to compile out-of-the-box on 5.0-CURRENT with full file system labeling support. Approved by: re (murray) Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Document that ENABLE_VFS_IOOPT is dangerous. Please don't use it.rwatson2002-12-091-0/+3
| | | | | Suggested by: alc Approved by: re (murray)
* MFNetBSD: (partial 1.133)joe2002-12-091-0/+2
| | | | | | | - In ohci_close_pipe, wait 1ms after removing an ED to avoid possible race condition. Approved by: re (rwatson)
* MFNetBSD:joe2002-12-091-5/+0
| | | | | | | date: 2002/09/29 20:59:30; author: augustss; state: Exp; lines: +2 -7 Remove extra call to ohci_rem_ed(). From kern/18448, Takeshi Nakayama. Approved by: re (rwatson)
* Don't corrupt the ED list whilst removing an entry.joe2002-12-091-1/+1
| | | | | Submitted by: Bernd Walter <ticso@cicely8.cicely.de> Approved by: re (rwatson)
* Add the GUID of the DIG64 HCDP table.marcel2002-12-081-0/+3
|
* Use one of the bi_spare entries for the DIG64 HCDP table address.marcel2002-12-081-1/+2
| | | | | | | | | | | | The HCDP table is one (non-proprietary) way for the platform to inform the OS about headless operation. This field would normally hold the address as can be found by scanning the EFI system table, which we also pass to the kernel. The apparent duplication allows us to synthesize a HCDP table in the loader by whatever means we can think of, including relocating the platform table into pre- mapped address space. In short: it gives us more freedom. Approved by: re (blanket)
* Disable SMP. It reduces the chance that the kernel boots. On topmarcel2002-12-081-1/+1
| | | | | | | | | | of that, there's some nasty process corruption when running with SMP. Note that this was already in effect for the 5.0-RC1 kernels in the form of a local patch. Approved by: re (blanket)
* The boot manager sets the watchdog timer to 5 minutes before invokingmarcel2002-12-082-12/+20
| | | | | | | | | | | | | | | | | | | a boot option. When the timer expires the machine is rebooted. Disable the watchdog timer for 2 reasons: o We're an interactive program. We cannot guarantee that we've booted the kernel in the time available to us. There have been situations where netbooting the right kernel took 2 tries and more time than given. Not to speak of the normal behaviour to have the loader sitting at the prompt while the user is off doing other things (such as figuring out what to type next ;-) o We may not boot a kernel at all. We may exit as the result of the user typing quit (assuming it took less than 5 minutes to type it :-). It is documented that loaders should have disabled the watchdog timer if they return to the boot manager. Not doing so would cause a reboot while in the boot manager. This appears to be harmless, besides of course the actual reboot. Approved by: re (weisse karte)
* In efi_cons_poll we check if a key is present (pending) by checkingmarcel2002-12-081-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | the signaled state of the apropriate event. As a side-effect of checking the event, it's signaled state is cleared if it was set. In efi_cons_getchar we used to wait for the apropriate event to be signaled before reading a character. This however does not work if we poll before reading the characteri, such as during autoboot. On a more compliant EFI implementation this resulted in the behaviour that hitting a key during autoboot would stop the countdown, but would then wait for a new character to arrive instead of reading the already pending key that stopped the countdown. The correct behaviour for efi_cons_getchar is to try to read a key and if none is pending, to wait for the apropriate event to signal the arrival of a new key. Note that with the previous behaviour, the second key would determine how the autoboot was interrupted. This would indicate that the first key got lost. This indicates that EFI does not necessarily maintain a queue of pending keys. FWIW... Approved by: re (carte blanche) French corrected by: various people :-)
* Fix emulation of the fcntl64() syscall. In Linux, this is exactlyiedowse2002-12-081-39/+33
| | | | | | | | | | | | | | | | | | | | the same as fcntl() except that it supports the new 64-bit file locking commands (LINUX_F_GETLK64 etc) that use the `flock64' structure. We had been interpreting all flock structures passed to fcntl64() as `struct flock64' instead of only the ones from F_*64 commands. The glibc in linux_base-7 uses fcntl64() by default, but the bug was often non-fatal since the misinterpretation typically only causes junk to appear in the `l_len' field and most junk values are accepted as valid range lengths. The result is occasional EINVAL errors from F_SETLK and a few bytes after the supplied `struct flock' getting clobbered during F_GETLK. PR: kern/37656 Reviewed by: marcel Approved by: re MFC after: 1 week
* Correct alphabetization of awi entry.rwatson2002-12-081-1/+1
| | | | | Inane act of: re Spotted by: bde
* To avoid lock order reversals in getnewvnode(), the call to uma_zfree()alc2002-12-081-3/+11
| | | | | | | must be delayed until the vnode interlock is released. Reported by: kris@ Approved by: re (jhb)
* Move the awi module build dependency into the MACHINE_ARCH=i386 entry.rwatson2002-12-081-3/+2
|
* MFS: recognize gre packets used in the WCCP protocol.sobomax2002-12-072-1/+9
| | | | Approved by: re
* Hook up the awi module for build on i386 and pc98, which appear to berwatson2002-12-071-1/+3
| | | | | | | | | the supported platforms. We build it into GENERIC, and it is currently listed on the supported module list for drivers.conf on i386, which breaks the release build. This may fix the release build for RC1 on i386. Conspiracy of: re
* Fix a bug which caused signals on YUV images to fail.roger2002-12-071-7/+6
| | | | | PR: i386/45678 (this also allowed kern/21305 and kern/33715 to be closed) Submitted by: Tommy Johnson <tjohnson@bobdbob.com>
* fix connecting to (samba) server when share-level security is in effectfjoe2002-12-071-1/+1
| | | | | | | (do not send second password at all) Approved by: bp, re MFC after: 1 week
* Fix linking problem when atadisk is not use in ata-all.csos2002-12-063-3/+19
| | | | | | Add dummy intr_func and lock_func to ata-card.c Dont call ad_print if the driver decided there is no disk.
* Exclude yet more interrupt mapping registers from the OBIO INO search,tmm2002-12-061-2/+2
| | | | | | | | | | namely the ones for the timers, error handling and power management. The registers for the timers, power management and PCI bus b errors are reserved on Sabres (US-IIi) and can lead to false matches there. Since all of them are never used for devices on the bus, they can be omitted safely. Approved by: re
* Reduce and improve debug messages.simokawa2002-12-065-30/+47
| | | | Approved by: re
* More tightly verify the preference returned for the new inode.mckusick2002-12-061-1/+1
| | | | | | Submitted by: Kris Kennaway <kris@obsecurity.org> Sponsored by: DARPA & NAI Labs. Approved by: re
* Add "disabled" hints to all of the uncommon ISA devices that are injhb2002-12-052-0/+24
| | | | | | | | | GENERIC. Each device can be re-enabled at startup time by unsetting the disabled hint in the loader. Requested by: mdodd Approved by: re Prodded by: rwatson
* Back out rev 1.7 -- I'm not sure we're ready for it and I can't test it.obrien2002-12-051-1/+1
| | | | | Marcel will find out RSN if it is needed and I'll let him fix this up if need be.
* Our binary output format is now "elf64-ia64-little-freebsd".obrien2002-12-051-1/+1
|
* In the NFSv3 `fsinfo' procedure reply, don't claim that we supportiedowse2002-12-051-2/+2
| | | | | | | | | | | | | 32k read and write operations on datagram sockets when in fact we reject requests larger than 16k. It must be the case that virtually all clients use data sizes of 16k or less for UDP transport (FreeBSD's client defaults to 8k and never exceeds 16k), as this bug has been present ever since NFSv3 support was added. Reported by: Senthil <lihtnes78@netscape.net> Reviewed by: dillon Approved by: re MFC-after: 1 week
* Welcome to 5.0-RC.murray2002-12-051-1/+1
| | | | Approved by: re
* The sequencer downloading code assumes that all jumpscottl2002-12-051-3/+5
| | | | | | | | | | labels are acurate in relation to a fully compiled sequencer program (all patches downloaded). Correct a few occurances of a relative jump across a macro that ended up jumping us into the last instruction of the macro. Spproved by: re (bmah)
* Remove an unused variable that snuck in the last commit.anholt2002-12-041-1/+1
| | | | | Submitted by: Christian Brueffer <chris@unixpages.org> Approved by: re (rwatson)
* Last minute fixes to ahc and ahd:scottl2002-12-046-47/+94
| | | | | | | | | | | | | | | | | | | | | | | | | ahd_pci.c: Retrieve the allow_memio hint from the resource manager to determine whether or not to try PCI MEMIO. aic79xx_osm.h: aic7xxx_osm.h: Don't wrongly abuse the callout_reset() interface when trying to abuse timeouts generated from the CAM layer. This fixes the console freeze and lost timeout problem that many have reported, especially on SMP systems. aic79xx_pci.c aic7xxx_pci.c Rewrite the MEMIO test routine to prevent certain broken chipsets from trying to burst multiple DWORDs to the registers. Also make the routine better detect byte merging by the host bridge and deal with it. aic79xx.reg: Correct an incorrect register definition. Approved by: re (rwatson, jhb)
* Remove a const that generates a warning: the const isn't strictlyrwatson2002-12-041-1/+1
| | | | | | | | | wrong, since we don't want the variable changed, but since we assign it to variables that may also refer to other non-const strings, warnings were generated that could break LINT. Approved by: re Spotted by: sam
* Hold the page queues lock around calls to pmap_remove().alc2002-12-042-0/+4
| | | | Approved by: re
* Fix witness warning in DRM memory info sysctl by making a temporary copy of theanholt2002-12-041-62/+17
| | | | | | | data under the lock and outputting it to the sysctl later. Reviewed by: scottl Approved by: re
* MFi386: revision 1.551.nyan2002-12-042-6/+12
| | | | Approved by: re (jhb)
* Use the correct value when writing the Day Of Week byte in the CMOS.phk2002-12-045-5/+5
| | | | | | | | | | | | | | | | | The correct range is [1...7] with Sunday=1, but we have been writing [0...6] with Sunday=0. The Soekris computers flagged the zero, zapped the date, so if you rebooted your soekris on a sunday, it would come up with a wrong date. Bruce has a more extensive rework of this code, but we will stick with the minimalist fix for now. Spotted by: Soren Kristensen <soren@soekris.com> Thanks to: Michael Sierchio <kudzu@tenebras.com>. Confirmed by: bde Approved by: re
* Add support for the PC98 platform to the ATA driver.sos2002-12-0312-44/+614
| | | | | | | | | | | | | | | | This mostly consists of functionality to serialize accesses to the two ATA channels (which can also be used to "fix" certain PCI based controllers). Add support for Acard controllers. Enable the ATA driver in PC98 GENERIC, and add device hints. Update man page with latest support. The PC98 core team has kindly provided me with a PC98 machine that made this all possible, thanks to all that contributed to that effort, without that this would probably newer have been possible.. Approved by: re@
* Have to use bread() rather than UFS_BALLOC() when obtaining amckusick2002-12-031-24/+30
| | | | | | | | | | | previously allocated block as the previous use of the block may have fallen out of the cache. Failure to reread its contents cause zeroed results to be written instead of the proper contents. Conversely, when the block is going to be entirely filled in, it is not necessary reread the old contents. Sponsored by: DARPA & NAI Labs. Approved by: re
* License tweak: remove clause 3 per permission of NAI.rwatson2002-12-032-6/+0
| | | | | | Approved by: re Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Unhook the old LOMAC module, now replaced with mac_lomac.rwatson2002-12-0332-6860/+0
| | | | | | Approved by: re (jhb) Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Properly account for prefetchable memory when a request is being made.imp2002-12-031-47/+112
| | | | | | | | | | | | | | | | We allow the request to go through if it matches either a prefetchable or a non-prefetchable part of the bridge. We do not check to make sure it is the right kind of memory because most drivers to not yet properly set RF_PREFETCHABLE (only cardbus seems to do so, and I'm not entirely sure it does it right). RF_PREFETCHABLE was invented for cardbus, so hasn't been properly documented yet. This is still overridable by hw.pci.allow_unsupported_io_ranges, but the need for that is greatly reduced, especially for the nvida driver. Approved by: re Reviewed by: jhb and many testers Submitted by: Matt Emmerton (although this has been reworked somewhat)
OpenPOWER on IntegriCloud