Commit Graph

111840 Commits

Author SHA1 Message Date
reinoud 98f35557ac Braindead implementation of pmap_zero_page() 2011-08-23 13:35:57 +00:00
christos 28ab15e044 don't use lwp_setprivate in fork, but copy the private lwp member directly
because userland might have messed with the TLS register without letting
the kernel know. This fixes fork() on amd64. Thanks chuq!
2011-08-23 13:01:25 +00:00
pgoyette 81d8330c12 Remove left-over debug line 2011-08-23 12:55:50 +00:00
pgoyette 99deda018d Module build glue for if_rum and if_axe 2011-08-23 12:54:05 +00:00
pgoyette 75c5b19872 Update for modular build 2011-08-23 12:53:29 +00:00
reinoud f19d57b776 The pv_tables and the kernel pmap structure are not managed by UVM and thus
shouldn't be returned in pmap_virtual_space() for UVM.
2011-08-23 12:46:58 +00:00
jmcneill e5faa0dc10 get rid of uvmhist stuff 2011-08-23 12:36:20 +00:00
pgoyette 3016e04310 In preparation for building this as a module, clean-up some gcc
-Wsign-compare issues so it will build with WARNS=4
2011-08-23 12:33:50 +00:00
jmcneill 616594aca0 pull in GENERIC.local if it exists 2011-08-23 12:27:01 +00:00
reinoud 1fba2c8574 Initial implementation of pmap_remove()
Also cleaned up some debug output to be aprint_debug()'d.
2011-08-23 12:06:14 +00:00
reinoud 9ae5eb8d83 Implement pv_alloc() and pv_free() and add various printf's to see what
functions are called that might have side effects due to not being
implemented!
2011-08-23 11:36:11 +00:00
reinoud 9b209ce7da Cleanup pv_get() before enabling multiple-mappings 2011-08-23 10:41:47 +00:00
oki a69c375f9d make compile with options RT3050. 2011-08-23 08:10:08 +00:00
hannken fc2e6c60c4 When consuming only part of a path in rump_vop_lookup():
- Make sure to consume complete path components.
- Consume trailing slashes too.
- Do not clear REQUIREDIR.

Test rump/modautoload/t_modautoload now passes.
2011-08-23 07:40:32 +00:00
hannken f937bd97b7 Stop abusing relookup() to prepare the creation of new nodes
in the upper layer.
Replace union_relookup() with union_do_lookup() that prepares
a component, calls VOP_LOOKUP() and does the EEXIST test.
2011-08-23 07:39:37 +00:00
oki 32a22fa000 make compile without VMSWAP. no functional change. 2011-08-23 03:00:35 +00:00
jmcneill dc155b3bd5 pmap_enter: fix pmap_do_enter parameters 2011-08-23 00:52:33 +00:00
enami 39dd5517da Remove return statement which can't be reached. 2011-08-22 22:12:34 +00:00
enami 9d6dd8515a When both nanoseconds fields of futimens/utimensat call are set
to UTIMES_NOW, act as if NULL is passed to second argument, i.e.,
do same permission check and set exactly same value to both access
and modification time.
2011-08-22 22:09:07 +00:00
reinoud 9e34284f74 Dirty patch fixing the assert triggered on i386. On this arch the sbrk(0) HAS
been moved upward and will trigger the assert. When this situation is
encountered the kmem_data_end will be moved upward equaly.
2011-08-22 21:59:09 +00:00
jmcneill 19f8eb48c8 build fixes for netbsd-5 and i386 2011-08-22 21:45:38 +00:00
reinoud 778142a2ba Implement pmap_extract() and print pmap_zero_page() pa address. 2011-08-22 16:22:16 +00:00
reinoud 3b8975f0ed Start NetBSD/usermode's pmap. Its using a temp file as a physical memory
backup and that should be documented in the code. A physical address is thus a
file offset(!) and a virtual address is a `normal' accesible address.

Still to do: various misc functions and pmap_extract() in special.

Credits also go to Ben Harris for his work on the Acorn26 pmap that followed
the Daemon Book recommendation for systems without real page tables on wich
this implementation is modelled after.
2011-08-22 15:36:23 +00:00
reinoud a436c9264e Add thunk_munmap() to NetBSD/usermode's thunk 2011-08-22 15:30:16 +00:00
reinoud fca46a08f4 Change standard settings in sys/arch/usermode/conf/GENERIC so to get a better
debugging environment.
2011-08-22 15:28:34 +00:00
reinoud e778fd293b Don't override -O options... we might want to build with another -O setting in
the config file.
2011-08-22 15:27:32 +00:00
reinoud 0fe675bc9f Bump NKMEMPAGES from 512 to 2048 for NetBSD/usermode. This will be sufficient
for a 128 MB amd64 machine. Might better be parameterized one day.
2011-08-22 15:26:55 +00:00
mrg f63becec07 disable mmx/sse here too. hopefully fixes amd64 /boot issues.
certainly changes the output in ways that gcc 4.1 doesn't.
2011-08-22 09:43:08 +00:00
dholland ef311a878c Requires stdint.h. 2011-08-22 00:33:16 +00:00
reinoud b557c38359 Fix thunk_mkstemp() prototype and add thunk_mprotect() 2011-08-21 17:11:59 +00:00
reinoud 35cec24640 Add mmap() reachover call in thunk for NetBSD/usermode 2011-08-21 15:10:57 +00:00
reinoud 65cb12b136 Move NKMEMPAGES from GENERIC to std.usermode and clarify the meaning of
MEMSIZE in the GENERIC kernel.
2011-08-21 15:08:43 +00:00
reinoud 3ae0c11417 Link the usermode kernel staticly to avoid libc littering the virtual space. 2011-08-21 15:06:27 +00:00
plunky adb6560b11 fix comment typo 2011-08-21 14:20:34 +00:00
phx bdcee66bdc Fixed booting from disks without a valid disklabel (e.g. CDROM). This
became broken with my last changes in rev.1.18..
2011-08-21 13:12:48 +00:00
phx 6c0f30bcde When there is no NetBSD MBR partition with a valid disklabel, look for
the first FAT partition and construct a disklabel with an MSDOS filesystem
in partition 'a'.
2011-08-21 13:08:57 +00:00
jym e298d4d6a8 Merge err printf with the panic(9) message.
Also fix the if () {...} statement with braces, to avoid calling panic()
every time. Hi cherry!
2011-08-21 10:00:13 +00:00
reinoud 43567e93f5 Create mkstemp() and sbrk() prototypes to NetBSD/usermode's thunk 2011-08-20 20:14:04 +00:00
jakllsch 08fb9c512d Add rescan support for 'amdtempbus' to x86 pchb(4).
Maybe finally fixes PR#45268.
2011-08-20 20:01:08 +00:00
jakllsch a99113c4a1 pchb_get_bus_number() is actually public 2011-08-20 19:56:31 +00:00
jakllsch d3b38f366f Apparently we need to use the attribute and not the device name as the pseudo-root. 2011-08-20 19:53:45 +00:00
jakllsch 08c7a716a6 staticification 2011-08-20 19:49:55 +00:00
jakllsch 90aab468c3 We no longer need to #include "rnd.h". 2011-08-20 19:43:47 +00:00
jakllsch 5cf40ee467 We need to initialize the PCI chipset and device tags in the softc for
the suspend and resume handlers.
2011-08-20 19:06:57 +00:00
jakllsch 2d6c0de58c Add new CAP2 and BOHC registers. 2011-08-20 16:10:02 +00:00
jakllsch 27e7b644fb Adjust and add AHCI_CAP_IS values. 2011-08-20 16:08:07 +00:00
jakllsch cf1e0aa0e0 Rework version printout to be more future proof.
Rework features printout using snprintb.
2011-08-20 16:03:48 +00:00
mbalmer 4b13dfd0c4 Remove a commented out include and clarify a comment why the timeout
period is ignored.
2011-08-20 07:32:34 +00:00
he 23a3249b3c Put back bus_space_handle_is_equal() and bus_space_is_equal() in
the non-__HAVE_NEW_STYLE_BUS_H case, since bus_proto.h isn't and
can't be included in that case.  Restores buildable state for
ports which don't (yet) define __HAVE_NEW_STYLE_BUS_H.  Also add
comments to preprocessing directives spaced far apart.

OK'ed by dyoung@
2011-08-20 06:00:14 +00:00
wiz 5f2ccc052b Remove semicolon at end of #define line to fix build. 2011-08-19 09:46:10 +00:00
christos 8a88450abf remove unneeded non-literal format string 2011-08-19 08:26:20 +00:00
christos 27ad4d2bf8 fix non-literal format strings (Paul Goyette) 2011-08-19 08:25:07 +00:00
matt 5f7da46ddf Need pci_machdep_common.c now 2011-08-19 02:18:26 +00:00
riastradh b4d52ac6e6 Fix tmpfs_rename locking.
Fixes PR kern/36681.  tmpfs now survives dirconc, all our vfs/tmpfs
tests and rename races in atf, and a bunch of hand-written tests
that I'd commit if atf didn't find them highly indigestible.

ok dholland
2011-08-18 21:42:18 +00:00
matt 42dd23afed Change bcond/BCOND to regimm/REGIMM to better match the MIPS nomenclature. 2011-08-18 21:04:23 +00:00
jakllsch 271ee63da4 Catch up to current reality. 2011-08-18 20:57:11 +00:00
jakllsch 844442797e Attach amdtemp(4) at pchb(4) instead of in place of pchb(4).
Should fix PR#45268.
2011-08-18 20:55:20 +00:00
manu bf2e0cc4e9 Fix utimes/futimes after utimensat/futimens addition 2011-08-18 19:34:47 +00:00
christos 4d92fa6ddb document non-literal string format 2011-08-18 17:02:49 +00:00
yamt a7b89fad2a uvm_aio_aiodone_pages: check disposed anon correctly. 2011-08-18 14:17:08 +00:00
yamt 2b339dd699 uvm_anon_release:
- don't forget to call uvm_anon_dispose.
- simplify code a little.
2011-08-18 14:13:59 +00:00
yamt 535ffbdf82 uvm_anon_freelst:
- clear an_link/an_ref when deferring anon disposal.  otherwise others can
  see bogus an_ref.
- fix the code to remove anon from the list.
2011-08-18 14:13:02 +00:00
reinoud 7dbd3c57fe Fix compilation after bus space changes. They are weak linked to the defaults. 2011-08-18 13:47:22 +00:00
christos 9bc1ed7123 PR/43563: Wolfgang Solfrank: boot.cfg doesn't support comments
Fix makes it support # comments and treat spaces and tabs the same way.
2011-08-18 13:20:04 +00:00
macallan eb42293275 shut up some debug output accidentially left in 2011-08-18 12:53:25 +00:00
phx e7925f6977 Finding the disklabel on MBR partitioned disks did no longer work since RDB
support was added. Fixed that and bumped the version to 1.12.
2011-08-18 09:03:28 +00:00
phx 07744f6ee9 First check whether an MBR is present. Then use it for locating the disklabel.
Otherwise try to construct a disklabel from RDB partitions, and when
everything fails, look for a raw NetBSD disklabel in LABELSECTOR.
This is the same sequence as in ofwboot now.
Also fixed some typos in the comments.
2011-08-18 08:55:43 +00:00
macallan f0b7a070f3 device_t-ify 2011-08-18 02:56:21 +00:00
christos c439220508 Better debugging. 2011-08-18 02:26:38 +00:00
christos c2480dc377 sizeof type -> sizeof *var 2011-08-18 02:21:02 +00:00
christos 26b068fc42 Remove gcc-4.5 hacks 2011-08-18 02:19:20 +00:00
christos 756a508c2d Fix gcc-4.5 warnings. If you still see them, e-mail them to me. 2011-08-18 02:18:40 +00:00
christos 32ba7fa0b5 fix gcc-4.5 warnings 2011-08-18 02:08:06 +00:00
joerg 0a50150ffc .code16 user, so disable integrated assembler with clang for now. 2011-08-17 22:26:40 +00:00
joerg a99d375170 Works with clang's integrated assembler now. 2011-08-17 21:42:16 +00:00
rmind e52f8e8779 amap_cow_now: just free the fresh anon on error, no need to dispose it. 2011-08-17 20:46:27 +00:00
matt 1f2907ad40 First pass of the new PCI MSI/MSI ABI definitions. (return EOPNOTSUPP for
now).
2011-08-17 18:52:00 +00:00
dyoung 8062831546 In pci_msi_establish(), replace several anonymous constants with IOAPIC_
symbols.  No change in the generated assembly.
2011-08-17 14:56:55 +00:00
dyoung 6b47091b3b Add definitions from [1] for the I/O APIC's MSI Message Address & Data
registers.

[1] Intel Corporation, Intel 64 and IA-32 Architectures Software
    Developer's Manual, Volume 3A: System Programming Guide, Part 1,
    http://www.intel.com/Assets/PDF/manual/253668.pdf, Chapter 10,
    January, 2011.
2011-08-17 14:55:11 +00:00
dyoung d49f0c1dc4 Remove bus_space_handle_is_equal() and bus_space_is_equal() since
they're declared in bus_proto.h.
2011-08-17 14:52:09 +00:00
matt f82a28e694 Redo mips_fixup so that it can handle indirect loads and deal with loongson2
extra instructions.
2011-08-17 14:39:59 +00:00
martin 319994c88f Add missing prototypes for bus_*_is_equal functions. 2011-08-17 10:46:38 +00:00
manu 91009c117a Missing bit in previous commit: do_sys_utimens prototype in the right
place.
2011-08-17 09:29:59 +00:00
martin e9d191bffa add missing prototype 2011-08-17 08:31:27 +00:00
manu 86bd0b1953 regen 2011-08-17 07:26:16 +00:00
manu c15f33c0db Add futimens(2) and part utimensat(2)
(missing bit from previous commit)
2011-08-17 07:25:30 +00:00
manu 5b61306f9b Add futimens(2) and part of utimnsat(2) 2011-08-17 07:22:33 +00:00
matt 47d9241c1a emulate the special3 opcode LX (lwx, ldx, lhx, lbux) instructions. 2011-08-17 06:59:28 +00:00
dyoung 70183e515a Redefine PCI_MSI_* and PCI_PCIE_* constants in terms of bits(3).
Use named constants and more conventional variable names in
pci_msi_establish() and pci_msi_disestablish().  Fix a couple of bugs:
pci_msi_establish() returned a pointer to the struct intrhand instead of
to the struct msi_hdl as it was intended to, and pci_msi_disestablish()
did not free(9) the msi_hdl.
2011-08-17 00:59:47 +00:00
jakllsch d8f59264ae Add gptmbr from syslinux 4.04, with some local modifications to fit our mbr
build system and to be self contanined.

Also, unlink the old mbr_gpt from the build.
2011-08-17 00:25:05 +00:00
jakllsch 52082ed8b6 Remove home grown GPT MBR handoff support in favor of T13 EDD-4 annex A,
which does the same thing in a more interoperable way.
2011-08-17 00:07:38 +00:00
dyoung 2147a7ca64 To fix i386/ALL kernel, #include <dev/dtv/dtvif.h> for struct
dtv_payload.
2011-08-16 23:35:55 +00:00
dyoung a32744d895 Protect against bugs by using __strict_weak_alias() for
bus_space_is_equal() and bus_space_handle_is_equal().
2011-08-16 23:32:15 +00:00
dyoung 84360ec112 Add __strict_weak_alias(), the type-safe alternative to __weak_alias(). 2011-08-16 23:30:24 +00:00
yamt 64916d590e vn_close: add an assertion 2011-08-16 22:33:38 +00:00
mbalmer 0813ba11d0 Fix some typos. 2011-08-16 14:29:16 +00:00
jakllsch 1dd5ef2454 #define is followed by tab, not space.
(Not my idea of sanity, but it's convention.)
2011-08-16 14:04:26 +00:00
jakllsch 2d53454cfe Add partition entry attributes listed in UEFI 2.3.1 spec. 2011-08-16 14:03:16 +00:00
macallan 3bdd0f0323 use appropriate WID and FBC for high resolution mode
Tested with a 1680x1050 TFT on an ffb2+
2011-08-16 12:59:01 +00:00
matt 82d845b50d Deal the brokenness of some u-boot (bsentry [byte swapped entry]) and add
some support for varying compressions schemes.
2011-08-16 07:01:37 +00:00
matt 7cc51d2c6a Use cpu_startup_command (and now HWRENA gets properly initialized). 2011-08-16 06:59:19 +00:00
matt f35867174b Add support for the MIPS DSP ASE (as a second PCU). 2011-08-16 06:58:15 +00:00
matt 6c946bd00a Only jump through t9/ra (or k0) to help avoid hitting
the Loongson2 jump problem.
2011-08-16 06:55:11 +00:00
dholland 595e2ecd73 Fix broken build. 2011-08-16 02:59:16 +00:00
cherry ce14cd73f0 invert buggy ci_flag test 2011-08-15 20:17:12 +00:00
cherry c04a001592 Do not panic() on xen_send_ipi() sent to a cpu not yet running.
x86 MP boot depends on this strange behaviour.
2011-08-15 20:14:52 +00:00
dyoung 16bf4208fb Use a recursive lock to ensure that only on thread is in wi_ioctl() at
one time.  It's a recursive lock because sometimes wi_ioctl() recurses
through the network stack (ick).
2011-08-15 18:24:34 +00:00
dyoung 2e0e1dafd6 Don't test truth of a pointer or assign 0 to it but compare / assign
NULL.
2011-08-15 18:04:59 +00:00
dyoung 6ec33ad4b1 Remove superfluous parentheses in return statements. No change in the
generated assembly.
2011-08-15 17:08:00 +00:00
dyoung 66f8d0c4ef Only try to disestablish the interrupt handler if the handler was
previously established.
2011-08-15 17:01:28 +00:00
msaitoh 5688e1797f regen. 2011-08-15 06:13:40 +00:00
msaitoh 2dd01e41ad Sort lines. 2011-08-15 06:13:07 +00:00
mrg a086f3a52c re-introduce the NULL savefpstate IPI checks and evcnts. something
is Wrong with GCC 4.5.3 and these trigger.  i haven't seen anything
else particularly wrong so for now this will allow sparc to switch
to GCC 4.5, which otherwise seems to be working very well for me.

sigh.  i'm going to file a PR to research what is really wrong here.
2011-08-15 02:19:44 +00:00
jakllsch 17b414a01a Even if the hardware can handle concurrent transfers, ata(4) can't.
Also, completely rework mvsata_bio_ready().

Seems to make mvsata(4) usable on 5182.
2011-08-15 01:04:04 +00:00
mbalmer c97eb22ebc fix indents 2011-08-14 18:49:17 +00:00
jakllsch ab2f05745e Spell enqueue correctly. 2011-08-14 16:50:49 +00:00
msaitoh abdd14be5f Add some LPC entries for Intel 6 series and C20x. 2011-08-14 12:42:19 +00:00
christos b866ba6e1a fix sign-compare warnings 2011-08-14 12:37:09 +00:00
apb 464d645aeb Rename all static functions to have "v7fs_" prefix. Fixes a problem
in the tools build, where the static link() and unlink() functions
conflicted with those declared in <unistd.h>.
2011-08-14 09:02:07 +00:00
mrg ab82fc7e5a initialise ih_ivec. 2011-08-14 08:14:00 +00:00
rmind 8ff531f87f Convert few panic() uses to asserts, reduce the scope of variable use.
No functional changes.
2011-08-14 02:31:08 +00:00
rmind eeaaf989e3 uvm_anon_freelst: do not free PG_RELEASED pages (change uvm_anon_dispose()
to indicate them with a return value).
2011-08-14 01:20:33 +00:00
christos ec97828f5a Always provide a meaningful short name for the kobj in the error message,
as well as the function name and the linenumber, without extra line feeds.
2011-08-13 21:04:05 +00:00
cherry a6365cd724 Call the right function
(fix for an egregious error)
2011-08-13 20:24:19 +00:00
riastradh f9b524691c Handle absolute symlinks to the root.
Fixes panic on `ln -s / foo && cd foo' found by ober by trying to run
wine.

ok dholland
2011-08-13 19:40:02 +00:00
jakllsch 4e38538497 Fix TLP_DEBUG after previous 2011-08-13 19:23:34 +00:00
jmcneill e04c7348d5 lg3303 depends on dtv_math, not xc3028 2011-08-13 18:31:38 +00:00
christos 54ac9f2e2d simplifying code, unconfuses gcc index calculation. 2011-08-13 18:13:44 +00:00
cherry ac71905311 Use spin mutices correctly.
- Prune redundant splxx()/splx() pairs.
 - Do not "leak" a mutex_spin_enter() via conditional return.

Thanks rmind@
2011-08-13 17:23:42 +00:00
cherry e37867bdb5 Remove spurious header.
Thanks rmind@
2011-08-13 16:22:15 +00:00
jakllsch 0b2bca138d detach childern too 2011-08-13 16:08:23 +00:00
jakllsch 06e8b1bf70 Make correct spelling in comments a higher priority. 2011-08-13 16:04:09 +00:00
jakllsch c31c99ba01 It's hard to get a backtrace after calling a NULL function pointer,
add KASSERT before calling.
2011-08-13 16:02:48 +00:00
jakllsch 94a0b3359a In *find_pending_irqs() return the value of pic_mark_pending_sources() instead
of 1.  Changed to match other ARM PIC code.
2011-08-13 15:38:47 +00:00
jmcneill 068b98b507 make sure mcontext is large enough to store the host mcontext; fixes
strange crashes seen in pool_init
2011-08-13 14:51:58 +00:00
jmcneill 11b9552b86 lwp0pcb should be struct pcb not ucontext_t, and initialize it in cpu_startup
instead of cpu_attach
2011-08-13 14:06:54 +00:00
cherry 7bd1f7e3fe MP probing and startup code 2011-08-13 12:37:30 +00:00
jmcneill 767acfddc1 no need to print copyright/version/memory info, just call banner() 2011-08-13 12:18:54 +00:00
cherry 92ccc4ea78 Add locking around ops to the hypervisor MMU "queue". 2011-08-13 12:09:38 +00:00
jmcneill 940f2702d2 - replace the gettimeofday timecounter with one based on CLOCK_MONOTONIC
- use gettimeofday for TODR clock
2011-08-13 12:06:22 +00:00
cherry 787e5fb097 remove unnecessary locking overhead for UP 2011-08-13 11:41:57 +00:00
jmcneill 65693788ff call lddone from a softint instead of the signal handler, now reading from
disk works:

ld0 at mainbus0: /home/jmcneill/test.fs (33554432)
ld0: 32768 KB, 65 cyl, 16 head, 63 sec, 512 bytes/sect x 65536 sectors
boot device: ld0
root on ld0a dumps on ld0b
root file system type: ffs
WARNING: no TOD clock present
WARNING: using filesystem time
WARNING: CHECK AND RESET THE DATE!
2011-08-13 10:58:32 +00:00
hannken 1147247693 Use mutexes to protect the hash lists instead of tsleep/wakeup. 2011-08-13 10:48:14 +00:00
jmcneill 154895972c try to use aio_read/aio_write instead of pread/pwrite 2011-08-13 10:33:52 +00:00
jmcneill df5e258309 - initialize cpu_info_primary early, before cpu0 attaches
- track idepth in cpu_info struct and use it in cpu_intr_p
- for debug and diagnostic kernels, abort when rebooting
- fill in __cpu_simple_lock_* stubs
- splraise(IPL_HIGH) before calling kernmain
- pmap_extract: only return phys addr if pap is not NULL
2011-08-13 10:31:24 +00:00
jakllsch 93a4349576 Restore binary compatibility with NetBSD 5 binaries that utilize video(4). 2011-08-13 02:49:06 +00:00
dyoung bcee2c1973 Straggler from last: add bus_user.h to the repository. 2011-08-12 22:23:12 +00:00
dyoung 65a4b5bf07 Pull the bus_space(9) definitions needed by alpha userland into
bus_user.h and include that from pio.h, sysarch.h, bus_defs.h.  Fixes
the alpha build.
2011-08-12 22:22:49 +00:00
dyoung f2c33a10eb Define if_free() for ixg(4) to use. 2011-08-12 22:09:36 +00:00
dyoung 63cfe0ec97 Declare if_free(). 2011-08-12 22:09:17 +00:00
dyoung ddb7bb5448 Attach ixg(4) to the kernel build (it's not in any kernel
configurations, yet).
2011-08-12 22:02:56 +00:00
dyoung 97579f7a66 Add sources for ixgbe(4), a Intel 82599 10-gigabit ethernet driver
ported from FreeBSD.
2011-08-12 21:55:28 +00:00
hannken 94fc281af2 Change some `#ifdef DIAGNOSTIC' to `KASSERT'.
Instead of a `pid_t' use a `lwp_t *' for locking diagnostics.

No functional changes intended.
2011-08-12 17:41:17 +00:00
dyoung bf2a34aeb3 Make amigappc compile again by adding barebones definitions of some of
the bus_dma(9) types.
2011-08-12 17:40:49 +00:00
matt 0435f73056 Fix bug when only restoring r31 (lr was not being restored properly). 2011-08-12 14:48:00 +00:00
hannken b8e5efdc84 Add missing parts to mount devices from a union file system:
- union_close()    has to lock/unlock the lower vnode.
- union_fsync()    has to call spec_fsync() for the union vnode.
- union_strategy() must allow writes to devices on the lower file system.
- union_bwrite()   was completely missing.
2011-08-12 14:36:29 +00:00
jmcneill ce6e29d2a8 add a simple disk driver, pass the path to the disk image on the kernel command line:
soundwave$ ./netbsd /tmp/test.fs
NetBSD/usermode startup
[...]
ld0 at mainbus0: /tmp/test.fs (33554432)
ld0: 32768 KB, 8322 cyl, 64 head, 63 sec, 1 bytes/sect x 33554432 sectors
boot device: ld0
root on ld0a dumps on ld0b
2011-08-12 12:59:13 +00:00
jmcneill cd366a78be implement reboot using execv 2011-08-12 11:37:04 +00:00
jmcneill b7021257a8 Make GENERIC32 build on amd64 2011-08-12 11:22:11 +00:00
jdc 1a41a28bff Use aprint_normal(). From apb@. 2011-08-12 08:47:05 +00:00
jdc 4e9cb6cc2b Set the destination UPAID when establishing the interrupt mapping.
From eeh@.
2011-08-12 08:24:01 +00:00
jdc e5b24af9a0 Add missing new line to zs_attach_fhc() 2011-08-12 08:22:39 +00:00
mbalmer b50c50a270 gpio(4) and gpiosim(4) can now be built and used as modules. While here,
make some functions static.
2011-08-12 08:00:52 +00:00
mrg d2a9bbef6e add auacer, present on the ultra45. 2011-08-12 06:55:45 +00:00
mrg ed7e2948e6 initailise ih_pending and ih_ivec. 2011-08-12 06:41:50 +00:00
mrg 83575145e3 initialise ih_pending 2011-08-12 06:41:15 +00:00
hannken 7b19d6d068 When creating a union node representing a device initialize
the spec_node to make vrele() happy.
2011-08-12 06:40:10 +00:00
mrg e55924b74e initialise ih_pending. 2011-08-12 06:38:35 +00:00
mrg 10a9f07370 - make a bunch of functions static
- set nmapmask to 1 before prom_getprop(), so we don't trigger an ENOMEM
- initialise ih_pending
2011-08-12 06:38:18 +00:00
mrg ef9525b770 add a DPRINTF() and use it a little.
if DIAGNOSTIC, whine if ih_pending or ih_pil aren't setup.  may as
well try to finish converting all the callers this decade...
2011-08-12 06:34:56 +00:00
mrg 7b201b729f convert some open-coded SPDB_PROBE printf calls to use DPRINTF() macro. 2011-08-12 06:04:41 +00:00
mrg 99172b0754 use device_private() to find the matching pyro leaf, now that pyro
has been device_t-ified.
2011-08-12 05:00:29 +00:00
mrg 63f361426a print the ihandle passed in, not NULL. 2011-08-12 01:22:37 +00:00
jmcneill 26740a1a14 Clean up extern mess by adding an API for kernel components to call libc
functions. thunk.c is built with special cflags that makes it compile
against standard system headers instead of kernel ones.
2011-08-12 00:57:23 +00:00
jmcneill 21f7e025b7 initialize lwp0 l_addr so we can switch back to it 2011-08-11 23:04:43 +00:00
jmcneill a74059550d Instead of trying to override vers.o target, set NVFLAGS=-n 2011-08-11 22:38:25 +00:00
jmcneill 747111eaaf let md makefile add newvers.sh flags by setting NVFLAGS 2011-08-11 22:37:57 +00:00
jmcneill cd4fe87b42 get this linking and running (sorta) again:
soundwave$ ./netbsd
NetBSD/usermode startup
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 5.99.55 (GENERIC) #10: Thu Aug 11 14:24:03 EDT 2011
        jmcneill@soundwave:/home/jmcneill/branches/HEAD/src/sys/arch/usermode/compile/GENERIC
total memory = 128 MB
avail memory = 124 MB
mainbus0 (root)
cpu0 at mainbus0
clock0 at mainbus0
ttycons0 at mainbus0: console
panic: setcontext failed: 14
rebooting...
Abort (core dumped)
2011-08-11 22:30:41 +00:00
jmcneill 3987d9df98 pmap_memory isn't a static array anymore so sizeof doesn't work on it 2011-08-11 22:26:18 +00:00
jmcneill e7968ac3c4 add libcompat.o/.po targets for COMPAT_AS=obj 2011-08-11 21:23:09 +00:00
phx 9117e0918e Add viaide for Iomega Storcenter, although a VT6410 driver still needs to
be written.
2011-08-11 20:56:34 +00:00
cherry 5d5c189898 Unbreak the build. (conflicting types in function declaration and definition)
Thanks riz@
2011-08-11 20:33:20 +00:00
cherry 5e67834ba7 make ddb minimally MP aware 2011-08-11 19:52:52 +00:00
cherry bc1cccc8d3 unbreak the build. #include <sys/cpu.h> 2011-08-11 18:36:13 +00:00
cherry 3c3a6a3a8e Hide the MD details of specific IPIs behind semantically pleasing functions. This cleans up a couple of #ifdef XEN/#endif pairs 2011-08-11 18:11:17 +00:00
cherry fce2071912 More appropriate use of xen_send_ipi(). 2011-08-11 18:05:11 +00:00
cherry 3ccb0add41 Make event/interrupt handling MP aware 2011-08-11 17:58:59 +00:00
bouyer 2145e1ef4d Regen: add SiS 315 Pro VGA 2011-08-11 17:14:42 +00:00
bouyer 7c8596a4c1 Add SiS 315 Pro VGA 2011-08-11 17:14:12 +00:00
mbalmer 1d8ccccd63 pwdog is not for all platforms, build only on i386, x86_64, and sparc64 2011-08-11 12:03:06 +00:00
cherry e94a141bff per-cpu gdt support for xen 2011-08-11 11:01:30 +00:00
he 99a364f4e3 Bump SYMTAB_SPACE so that it fits again. 2011-08-11 08:39:35 +00:00
mbalmer 540a798676 Add entries for pwdog(4). 2011-08-11 07:38:56 +00:00
mbalmer 6b0f67776f Add commented out sample entry for pwdog(4). 2011-08-11 07:36:17 +00:00
mbalmer 352c784990 pwdog(4) is a device driver for QUANCOM Electronic PWDOG1 PCI
attached watchdog timers.
2011-08-11 07:33:24 +00:00
cherry 155048478e refactor the bitstring/mask operations to be behind an API. Make pending interrupt marking cpu aware. 2011-08-10 21:46:02 +00:00
cherry 941e03e900 KNF police (rmind@ :-) 2011-08-10 20:38:45 +00:00
hannken 3ec6312958 Update the (shared) v_interlock if the upper node changes. 2011-08-10 15:56:01 +00:00
cherry d7b11fa417 xen ipi infrastructure 2011-08-10 11:39:44 +00:00
cherry 1f0a8a809d Introduce locking primitives for Xen pte operations, and xen helper calls for MP related MMU ops 2011-08-10 09:50:37 +00:00
cherry e0e9175da4 Add Xen specific members to struct cpu_info, Add proper per-cpu curcpu() functionality 2011-08-10 06:40:35 +00:00
cherry 0fd7a84a73 tweak the xen specific startup path to not use %fs before it is setup. Minor refactoring. Use Xen specific ipi calls. 2011-08-10 06:38:02 +00:00
cherry 7e545f9bbf Correct offset calculation for ci 2011-08-10 06:33:13 +00:00
cherry 12a2f892ca Include Xen specific definitions. 2011-08-10 06:30:59 +00:00
cherry 8d4cb7a73d Add Xen specific ipi bitmasks 2011-08-10 06:29:23 +00:00
hannken b80057eeb2 For devices, sockets and fifos ignore setting the file size to zero to make
open(..., O_TRUNC) happy and allow them to write through the lower layer.

Fixes PR #43560 (writing to null device in unionfs fails)
2011-08-10 06:27:02 +00:00
hannken 9be6a4a9b4 Use LK_SHARED, it is sufficient for VOP_GETATTR() and VOP_READDIR(). 2011-08-10 06:19:54 +00:00
dholland 8225acd644 Revert previous, it breaks nullfs. (And I guess there are no tests for
nullfs?)
2011-08-10 05:42:32 +00:00
jmcneill 6a94506d9a fix build 2011-08-10 01:32:43 +00:00
dholland 9c377dcfe1 Fail namei immediately if searchdir is unlinked / has been rmdir'd.
Do this by checking if v_size == 0. Should fix PR 44658 (and PR 32661).
2011-08-09 23:46:05 +00:00
dholland 8d4d585132 Include missing part of previous commit to this file. (sigh) 2011-08-09 23:16:17 +00:00
dyoung e04563cb82 Correct a comment on config_found_sm_loc(). 2011-08-09 21:07:14 +00:00
dyoung e7e6ed352f Add support for the Oxford Semiconductor OXPCIe952, a 2-port serial chip
with a PCI Express interface, in legacy mode.  Cursorily tested with a
StarTech PEX2S952LP.

See the manual for your adapter to see how to put it into legacy mode.
There is also a "native" mode that uses a different clock multiplier
and (I think) provides a richer feature set, but also requires a bit of
additional initialization (see FreeBSD's puc(4)).

The native-mode PCI functions use different PCI Device IDs than the
legacy-mode functions.
2011-08-09 21:04:05 +00:00
dholland a39473de1c __typeof__, not __typeof, to avoid confusing passersby. 2011-08-09 20:05:04 +00:00
dholland 943b2f8eb3 Simplify handling of slashes. Provides a proper fix for PR 44961. 2011-08-09 18:37:56 +00:00
jakllsch 9a2bdb0d5f While the GENERIC/MONOLITHIC/MODULAR issue remains to be sorted out,
MONOLITHIC is still a part of the release build and needs to remain
config(1)urable.
2011-08-09 14:18:17 +00:00
joerg 53cc155f3b Restrict -Wno-array-bounds to tulip.c with gcc. 2011-08-09 13:02:53 +00:00
jruoho b7ff5db1d4 Build acpiwdrt(4) as a module on x86. 2011-08-09 12:16:03 +00:00
jruoho 20073051ea Two placeholder comments. 2011-08-09 12:09:55 +00:00
jmcneill 46d3857954 add CLK_DELAY 2011-08-09 11:26:40 +00:00
jmcneill fb32363eae include cx24227, lg3303, mt2131, nxt2k, tvpll, xc3028, coram, cxdtv, and emdtv
modules in x86 build
2011-08-09 11:12:02 +00:00
jmcneill 9bd8d0664c lg3303 should depend on dtv_math, not xc3028 2011-08-09 10:54:22 +00:00
jmcneill 707c764851 add dtv_math.h 2011-08-09 10:53:09 +00:00
jruoho 4c658c19b0 As wmieeepc(4) was added to amd64 GENERIC, build it also as a amd64 module. 2011-08-09 08:36:05 +00:00
mbalmer 5ade312f36 re-gen after PWDOG1 addition. 2011-08-09 08:27:12 +00:00
mbalmer 3a793722d2 Add the QUANCOM PWDOG1. 2011-08-09 08:26:18 +00:00
hannken d5d9d4928f No need to lock the selcluster in selscan() if either
NO_DIRECT_SELECT is defined or all polls return an event.
2011-08-09 06:36:51 +00:00
manu 93a915b82c improve comment about AT_* defines: they are not only used by linkat(2) 2011-08-09 04:19:17 +00:00
jmcneill 952250ca3e remove commented out entries for emdtv, auvitek, and dtv 2011-08-09 02:52:29 +00:00
jmcneill fb95eabd74 modify the dtv device api so hardware drivers can be loaded independently
of the dtv module
2011-08-09 01:42:24 +00:00
kiyohara a27a5ab73d Fix build failed. mouse.h and pccons.h already removed. 2011-08-09 00:39:35 +00:00
jakllsch 88e3a4403f COMPAT_16 code only exists on amd64 in the presence of COMPAT_NETBSD32. 2011-08-08 23:44:06 +00:00
dyoung f77a583767 Miscellaneous mbuf changes:
1 Add some protection against double-freeing mbufs in DIAGNOSTIC kernels.

2 Add a m_defrag() that's derived from
  sys/dev/pci/if_vge.c:vge_m_defrag().  This one copies the packet
  header.

3 Constify m_tag_find().
2011-08-08 19:10:33 +00:00
jmcneill 1f2ef40a47 remove dtv (available as a module) 2011-08-08 18:57:58 +00:00
matt 1f8ad1f9be #include <sys/sched.h> since it's a dependency 2011-08-08 17:53:29 +00:00
matt 47fac2314b Global inlines are not allowed. 2011-08-08 17:45:13 +00:00
jakllsch 7fd1d1d1ed We have PUFFS, we need putter. 2011-08-08 17:02:31 +00:00
jmcneill beb12362eb revert previous 2011-08-08 17:00:23 +00:00
jakllsch 217a815cc9 Add P1003_1B_SEMAPHORE to match i386. 2011-08-08 16:27:46 +00:00
jakllsch 83432af331 Finish reverting modularization of i386 GENERIC. 2011-08-08 16:27:07 +00:00
jakllsch 0fb9ea60f8 Finish reverting premature modularization of amd64 kernels. 2011-08-08 16:13:42 +00:00
dholland ce8c87ef91 nfs_namei() should not return a non-null path buffer except on success,
even though the callers are apparently prepared to cope.

Fixes last tidyup part of PR 44625.
2011-08-08 16:04:07 +00:00
jakllsch c5bd226919 inline -> static inline
For successful gcc 4.5 builds.
2011-08-08 14:49:06 +00:00
manu c817bc5d19 regen 2011-08-08 12:17:27 +00:00
manu 9db30be448 First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.

Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.
2011-08-08 12:08:52 +00:00
uch f2404aeb3c Remove suspicious warning message. 2011-08-08 11:42:30 +00:00
jmcneill e08b9dc98f The absence of USE_PLATFORM_CLOCK does not imply that the PM Timer is
unreliable; in fact, the PM Timer has to be reliable by definition! Remove
the incorrect warning message that was added in r1.19
2011-08-08 11:27:44 +00:00
jmcneill 698af758ce If the USE_PLATFORM_CLOCK flag is set in the FADT, it indicates that OSPM
should use a platform provided timer (either HPET or the PM timer). A
platform may set this flag if internal processor clock(s) cannot provide
consistent monotonically non-decreasing counters. Set TSC quality to -100
if this flag is set.
2011-08-08 11:18:34 +00:00
enami a154f93a37 Bounds process's stack size with max_stack_size so that 32bit
binary works regardless of stack size limit setting.
2011-08-08 06:30:43 +00:00
rmind e71c0035e7 - Add an argument to kcpuset_create() for zeroing.
- Add kcpuset_atomic_set(), kcpuset_atomic_clear() and kcpuset_merge().
2011-08-07 21:38:32 +00:00