Commit Graph

111705 Commits

Author SHA1 Message Date
reinoud
336984324e Move debug -> verbose 2011-08-25 19:54:30 +00:00
reinoud
f6a2add8fe On a verbose kernel boot show why executables are denied due to their start
adresses. This will hardly ever occure in real-life.
2011-08-25 19:14:07 +00:00
reinoud
6d2b20cf95 When this debug printf is enabled, please also tell WHAT address one is using
for read/write.
2011-08-25 19:08:35 +00:00
reinoud
18218b2d70 Cleanup debug messages in copy.c 2011-08-25 19:07:45 +00:00
reinoud
ecc186f568 Implement pmap_deactivate() and most importantly, share changes! i.e. it
should map in the SAME page and not a COW clone of the origional.
2011-08-25 19:06:58 +00:00
reinoud
45a36452c5 A trap is now allways asked for RW access... that needs to be fixed but thats
later care.
2011-08-25 19:06:03 +00:00
christos
8da9796673 fix non-literal format strings 2011-08-25 17:00:55 +00:00
dyoung
6c6cb72d7f Use VMEM_ADDR_MIN and VMEM_ADDR_MAX. 2011-08-25 15:14:19 +00:00
dyoung
f05aa184df Initialize bst_exists in bus_space_tag_create(9). Use it to avoid
walking the chain of ancestor tags to see if a bus_space(9) routine was
overridden.
2011-08-25 15:08:49 +00:00
dyoung
73b6a5effa Add to x86 bus_space_tag_t a member, bst_exists, that tells whether a
routine is overridden by this tag or by any ancestral tag.
2011-08-25 15:06:10 +00:00
reinoud
a5e836ce39 For all virtual to logical page translations we need to substract
VM_MIN_ADDRESS first! I forgot to add this to pmap_remove().

Now we are here, mark the lines with V->L or L->V.l
2011-08-25 15:06:09 +00:00
reinoud
945b6ce138 Check if we pee'd outside the box! 2011-08-25 15:02:54 +00:00
reinoud
6be9d1e864 Update and claim copyright 2011-08-25 14:38:56 +00:00
reinoud
480ec9befc Implement first generation of memory access handler for the kernel. 2011-08-25 14:37:57 +00:00
reinoud
8239013847 Add trapframe and extent pcb for NetBSD/usermode; both mere dummies since
there are no traps delivered nor a process has ever been started...
2011-08-25 14:24:48 +00:00
jmcneill
49dc720500 - build thunk code with warnings
- add option SDL which pulls in thunk_sdl code and links the kernel to libSDL
- add an experimental framebuffer driver based on thunk_sdl, enable with:
    options SDL
    genfb* at mainbus?
    wsdisplay* at genfb?
    options WS_KERNEL_FG=WSCOL_GREEN
    options WSEMUL_VT100
- reserve a major # for wsdisplay
- add thunk_getenv()
2011-08-25 11:45:25 +00:00
jmcneill
e753c7b915 - build thunk code with warnings
- add option SDL which pulls in thunk_sdl code and links the kernel to libSDL
- add an experimental framebuffer driver based on thunk_sdl, enable with:
    options SDL
    genfb* at mainbus?
    wsdisplay* at genfb?
    options WS_KERNEL_FG=WSCOL_GREEN
    options WSEMUL_VT100
- reserve a major # for wsdisplay
- add thunk_getenv()
2011-08-25 11:06:29 +00:00
jmcneill
0a0e59605c add bus_addr_t typedef 2011-08-25 11:02:57 +00:00
reinoud
efcc946705 Indent debug aprint_debug()'s 2011-08-25 10:46:59 +00:00
dyoung
bf9e39452b Use humanize_number() instead of the buggy code that GCC 4.5 caught.
Compiles.  Not tested.
2011-08-25 02:36:03 +00:00
pgoyette
caf255902b Remove some debugging code that was accidentally committed 2011-08-25 02:29:08 +00:00
pgoyette
a4ebf89b5b Update the module command-processing routine to match the ioconf files 2011-08-25 02:27:31 +00:00
pgoyette
a948210b56 Fix the ioconf files. We can't include dev/usb/files.pci and the
attachment should be usbdevif as defined in files.usb
2011-08-25 02:07:38 +00:00
dyoung
7037600e44 Delete an unnecessary #include and an unnecessary comment. 2011-08-25 02:05:27 +00:00
jym
b1c4de01e1 Protect xbdback(4) ring indexes from overflowing; leave the continuation
prematurely in case they do, to avoid looping "endlessly" (or at least
a very long time) at IPL_BIO while trying to handle requests.

This should not happen in a nominal scenario, but the ring can get
corrupted for whatever reason (memory errors, domU failures or
exploitation).
2011-08-24 20:49:34 +00:00
dyoung
a33d02a149 Add to pci_bus_devorder() an argument that tells the number of slots
available in the devs array.  Change the type of the devs array from
char to uint8_t.  Treat the return value of pci_bus_devorder() as the
number of slots that it filled.

Don't use the __PCI_BUS_DEVORDER #definition to configure the kernel
but let the linker do it.  Make pci_bus_devorder() available on all
architectures by adding a default implementation that will DTRT on
all architectures but hpcmips, the only architecture to #define
__PCI_BUS_DEVORDER.  On hpcmips, adapt the implementation to the new
calling convention.

XXX I can compile an hpcmips GENERIC kernel, but I don't have a
XXX hpcmips box to test it on.
2011-08-24 20:27:35 +00:00
reinoud
83253ad815 cpu_cache_flush doesn't exist yet or isn't included yet so comment it out 2011-08-24 20:13:56 +00:00
reinoud
2b14ae839d Implement pmap_activate() and pmap_deactivate()
Also add some debug messages

Note that the UVM area is still unprotected (for you Jared)
2011-08-24 20:13:07 +00:00
reinoud
24ee089e4e Add debug statements in copyin/copyout 2011-08-24 20:03:19 +00:00
reinoud
cfbbcdc4ec Remove two commented out and unused defines 2011-08-24 19:59:26 +00:00
jmcneill
05f1b5ea9f make room for a small msgbuf 2011-08-24 19:55:35 +00:00
veego
82fe371d7e Add the Huawei 1750 id so it change to the 3G modem mode 2011-08-24 19:42:52 +00:00
veego
bb04ce8c3d Regen for the Huawei 1750 id 2011-08-24 19:40:23 +00:00
veego
4706098c29 Add the u3g id for the Huawei 1750 stick 2011-08-24 19:39:05 +00:00
macallan
95edcce732 fix up the environment pointers to be usable in LP64 2011-08-24 19:03:02 +00:00
matt
38b53e5ae4 Add a 64-bit GDIUM configuration. 2011-08-24 16:02:26 +00:00
matt
b6945981e5 When using 16KB pages in a 64 bit kernel, the amount of address space our page
table can address can be larger than the amount of address space the CPU
implementation supports.  This change limits the amount address space to what
the CPU implementation provides.
2011-08-24 16:01:53 +00:00
matt
e4980d209b On N32 kernels, cast offset to (intptr_t) to shrink it back to 32-bits. 2011-08-24 15:11:52 +00:00
reinoud
3136589636 Swap userland code and kvm spaces so that userland lives from VM_MIN_ADDRESS
to VM_MAXUSER_ADDRESS and KVM is above that.

Note that the userspace is surrounded by a configurable amount of
non-accessible barrier space to prevent accidental out-of-boundaries access
even when reading.
2011-08-24 12:54:46 +00:00
reinoud
6085a17bdc Duh... fix stupid debug print bug. 2011-08-24 11:50:28 +00:00
reinoud
90dde37c2d Cleanup comments and debug stuff 2011-08-24 11:41:00 +00:00
reinoud
7dc730ef51 Use the VM_MIN_ADDRESS `constant' for the offset calculation of virtual
address to a logical page address.
2011-08-24 11:30:59 +00:00
mbalmer
48993feb86 Wrap the include "opt_umass.h" in #ifdef _KERNEL_OPT. 2011-08-24 11:28:50 +00:00
reinoud
e72363fcf4 Fix vmparam's definitions to the new style 2011-08-24 11:26:43 +00:00
reinoud
f89adc7ee2 First pass of NetBSD/usermode's pmap.c cleanup:
* use thunk_malloc() for UVM space allocation releasing sbrk()
	* make pmap.c 64 bit friendly for large page numbers
2011-08-24 11:02:31 +00:00
jmcneill
4286b6d7f6 add procfs support 2011-08-24 10:59:10 +00:00
reinoud
6974a113d3 kmem_data_start is no longer needed 2011-08-24 10:57:48 +00:00
reinoud
5477dab842 Implement thunk_malloc() and think_free() 2011-08-24 10:56:44 +00:00
mrg
012f831146 normalise #if defined(MULTIPROCESSOR) usage. 2011-08-24 02:51:13 +00:00
dyoung
64311e1f9d Introduce a couple of new constants, VMEM_ADDR_MIN (the least possible
address in a vmem(9) arena, 0) and VMEM_ADDR_MAX (the maximum possible
address, currently 0xFFFFFFFF).  Modify several boundary conditions so
that a vmem(9) arena can allocate ranges including VMEM_ADDR_MAX.
Update documentation and tests.

These changes pass the tests in sys/kern/subr_vmem.c.  To compile the
and run the test program, run "cd sys/kern/ && gcc -DVMEM_SANITY -o
subr_vmem ./subr_vmem.c && ./subr_vmem".
2011-08-23 22:00:57 +00:00