akaros.git
5 years agoFixes VFS /dev/null
Barret Rhoden [Fri, 17 Jan 2014 02:03:13 +0000 (18:03 -0800)]
Fixes VFS /dev/null

5 years agoBetter debugging support
Barret Rhoden [Wed, 15 Jan 2014 22:49:15 +0000 (14:49 -0800)]
Better debugging support

Now builds 64b with debugging support, and on x86, it retains the original 64b
object.  Once we objcopy, we lose the ability to use some debugging tools, such
as addr2line.

This retains the 64bit original version of the kernel, which will be large if
you use a big KFS.  But no one should be doing that anymore.  If you do, you
can comment out the cp in k/a/x/Makefile (but don't commit it).

With this change, you can do things such as:

$ x86_64-ros-addr2line -e obj/kern/akaros-kernel-64b
ffffffffc0321cef
/usr/local/google/home/brho/akaros/ros-kernel/kern/src/process.c:551
^C

$ gdb obj/kern/akaros-kernel-64b
Reading symbols
from akaros-kernel-64b...done.
(gdb) list *0xffffffffc200d030
0xffffffffc200d030 is in abort_all_sysc (kern/src/kthread.c:739).
734/* This will abort any abortabls at the time the call was started.  New
735 * abortables could be registered concurrently.  The main caller I see for this
736 * is proc_destroy(), so DYING will be set, and new abortables will quickly
737 * abort and dereg when they see their proc is DYING. */
738void abort_all_sysc(struct proc *p)
739{
740    struct cv_lookup_elm *cle;
741    int8_t irq_state = 0;
742    struct cv_lookup_tailq abortall_list;
743    struct proc *old_proc = switch_to(p);
(gdb)

Note that you need to call this on the akaros-kernel-64b version (for amd64).

5 years agoAbort vminit for now
Barret Rhoden [Tue, 14 Jan 2014 21:28:26 +0000 (13:28 -0800)]
Abort vminit for now

Minor hack, sorry.

5 years agoVMRs that map page_maps are tracked
Barret Rhoden [Tue, 14 Jan 2014 00:52:33 +0000 (16:52 -0800)]
VMRs that map page_maps are tracked

Needed so we can remove pages or otherwise see which processes are using
which parts of a PM.

5 years agoSplits the mm_lock
Barret Rhoden [Mon, 13 Jan 2014 22:29:53 +0000 (14:29 -0800)]
Splits the mm_lock

Split into VMR (protects VMR tree properties) and PTE (protects page
table structures and properties).

Needed so that we can have the PM lock holders change the PTEs.
Ordering is now: vmr -> pte, vmr -> pm -> pte.

5 years agoPage map interface and munmap changes
Barret Rhoden [Mon, 13 Jan 2014 18:24:12 +0000 (10:24 -0800)]
Page map interface and munmap changes

The PM interface was slimmed a bit.  We still will need to change the
usages of pm_put_page for mmap a little.

munmap is a bit more efficient, and the VMRs are explicitly unmapped.
We'll need to do this instead of just blindly decreffing an entire
address space, since we need to handle PM pages differently.

5 years agoFixes waserror() memory leak in devwalk
Barret Rhoden [Sun, 12 Jan 2014 22:55:02 +0000 (14:55 -0800)]
Fixes waserror() memory leak in devwalk

The alloc was being ignored by the compiler.  As far as it was
concerned, at the waserror point (where error jumps back to), there was
no way for alloc to not be 0.  So we never freed the chan wq->clone.

We'll definitely have issues like this in the future.  We need some way
to tell the compiler to forget anything it might have known before a
certain point; otherwise we'll need to drop lots of volatiles around.
Not sure why we need this but plan9 didn't.

5 years agoFixed memory leak in namec()
Barret Rhoden [Sun, 12 Jan 2014 22:51:49 +0000 (14:51 -0800)]
Fixed memory leak in namec()

Calling nexterror() instead of error() popped off the second waserror,
skipping over a bunch of cleanup.  Careful with nexterror()!

5 years agoFixes memory leak in dev stdout
Barret Rhoden [Sun, 12 Jan 2014 22:50:38 +0000 (14:50 -0800)]
Fixes memory leak in dev stdout

Failed to free the strdup buffer.

5 years agoPage flags are now atomic
Barret Rhoden [Fri, 10 Jan 2014 20:58:14 +0000 (12:58 -0800)]
Page flags are now atomic

I don't want to lock pages just to mark it dirty or something.  This
will also help the PM removal.

5 years agox86: Fixes bug in pml callbacks
Barret Rhoden [Fri, 10 Jan 2014 20:12:00 +0000 (12:12 -0800)]
x86: Fixes bug in pml callbacks

Was leaking internal page tables for every process.

5 years agoMemwalks run CBs on all PTEs, not just PTE_Ps
Barret Rhoden [Fri, 10 Jan 2014 20:02:50 +0000 (12:02 -0800)]
Memwalks run CBs on all PTEs, not just PTE_Ps

The PTE states need a lot of work, and something is likely to be screwed
up here.

I needed to make a distinction between !PTE_P and completely empty,
since the upcoming page map removals will have PTEs !P, but still
'readable'.  And I'll need to memwalk those.

5 years agoThis now enables vmx via vmxon and vmclear works too
Ronald G. Minnich [Tue, 14 Jan 2014 17:57:39 +0000 (09:57 -0800)]
This now enables vmx via vmxon and vmclear works too

Wow, that was a pain. The kvm code did not check error returns
from vmxon; we now do that.

Way too much printing in here but we can fix that later.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoAdd run support.
Ronald G. Minnich [Mon, 13 Jan 2014 01:50:05 +0000 (17:50 -0800)]
Add run support.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoCopying out the image sort of works
Ronald G. Minnich [Fri, 10 Jan 2014 23:57:36 +0000 (15:57 -0800)]
Copying out the image sort of works

I know I can copy out one page, anyway.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoPart-way to writing memory
Ronald G. Minnich [Fri, 10 Jan 2014 22:45:38 +0000 (14:45 -0800)]
Part-way to writing memory

We're getting a NULL pointer in vm_set_memory_region,
but part of it is working.

I have moved some of the infrastructure over to error()/waserror(), and
I'm now remembering why I like getting useful error messages
instead of the conventional UNIX bring-me-another-rock
behavior of EINVAL.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoRemove a file committed by mistake apparently.
Ronald G. Minnich [Fri, 10 Jan 2014 21:43:34 +0000 (13:43 -0800)]
Remove a file committed by mistake apparently.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoWe can now set kvm at boot time
Ronald G. Minnich [Fri, 10 Jan 2014 21:41:21 +0000 (13:41 -0800)]
We can now set kvm at boot time

Attach the device, and create vms.

We can not run them yet.

This is an interim commit, but important.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agox86: move the kernel up to 0x2000000
Barret Rhoden [Thu, 9 Jan 2014 23:14:29 +0000 (15:14 -0800)]
x86: move the kernel up to 0x2000000

Needed this for syslinux.  We 'waste' about 32MB or so, but we actually
can reclaim that after booting if we want.  We would need to track the
end of the boot area (which still starts at 0x10000), and then could
just free the pages up to 0x2000000.

5 years agoFixes multiboot parsing bug
Barret Rhoden [Thu, 9 Jan 2014 22:41:35 +0000 (14:41 -0800)]
Fixes multiboot parsing bug

sizeof was the end point, instead of the length.

5 years agoMake the panic just a wee bit more informative.
Ronald G. Minnich [Thu, 9 Jan 2014 20:09:13 +0000 (12:09 -0800)]
Make the panic just a wee bit more informative.

I know I'm a fool, but you need to tell me why :-)

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoMove vm.c and vm_mmu.c to vmx.c and vmx_mmu.c
Ronald G. Minnich [Thu, 9 Jan 2014 20:08:34 +0000 (12:08 -0800)]
Move vm.c and vm_mmu.c to vmx.c and vmx_mmu.c

They are sub-arch specific.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoAlways compile in litevm and make sure it won't crash the kernel
Ronald G. Minnich [Wed, 8 Jan 2014 17:48:17 +0000 (09:48 -0800)]
Always compile in litevm and make sure it won't crash the kernel

litevm is always built in now, it builds and you can boot.

We don't call litevm_init until you attach '#V'. At that point,
if you don't have a working vmxon instruction, you'll get a
panic. This makes #V very useful for crashing all the cores
at once. Unfortunately, once this bug is fixed, you will no longer
have this option for crashing the kernel.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoThings now compile and link.
Ronald G. Minnich [Wed, 8 Jan 2014 01:09:50 +0000 (17:09 -0800)]
Things now compile and link.

Time to start testing. It won't work.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agosnapshot: Things now build, with warnings, but don't link.
Ronald G. Minnich [Tue, 7 Jan 2014 18:28:27 +0000 (10:28 -0800)]
snapshot: Things now build, with warnings, but don't link.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agovm mmu support
Ronald G. Minnich [Mon, 6 Jan 2014 23:52:32 +0000 (15:52 -0800)]
vm mmu support

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoGet the vm support to compile
Ronald G. Minnich [Mon, 6 Jan 2014 21:00:42 +0000 (13:00 -0800)]
Get the vm support to compile

Lots of warnings, and will not link. But it's closer.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoAdd function prototype for NUMA-style allocation
Ronald G. Minnich [Sat, 4 Jan 2014 01:36:12 +0000 (17:36 -0800)]
Add function prototype for NUMA-style allocation

In Linux, there is an allocator for pages which allows one
to specify the node. This is a good idea. We're not ready
to do it, but we should reserve a placeholder for it and,
when we bring code over, make sure that we don't lost track
of code that wants NUMA-specific allocation.

Add get_cont_pages_node, which takes node as the first parameter.
The function is equivalent to get_cont_pages, but that will
change if we ever get real NUMA-style allocation.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoAdd flags that VMs need. But many other things do as well.
Ronald G. Minnich [Sat, 4 Jan 2014 01:34:35 +0000 (17:34 -0800)]
Add flags that VMs need. But many other things do as well.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoSimplify things and put VM info into per-cpu struct
Ronald G. Minnich [Sat, 4 Jan 2014 00:37:18 +0000 (16:37 -0800)]
Simplify things and put VM info into per-cpu struct

Rename litevm.h to vm.h, that's what it is on
Akaros.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoPlaceholder for vm support
Ronald G. Minnich [Sat, 4 Jan 2014 00:07:16 +0000 (16:07 -0800)]
Placeholder for vm support

vm.c gets lots of errors, but I think they're going to prove
to be pretty simple.

One thing we can do cleanly in akaros, since we know we want
a vm and we know we're only going to go with one, is put the
per-cpu stuff in the actual akaros per-cpu structs. That gets
rid of some fiddling around.

We should figure out if msr-index.h just should go in x86.h.
Personally, I vote yes; I don't like lots of little includes and
cpp is fast enough for it not to matter.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoAdd the emulate support code
Ronald G. Minnich [Fri, 3 Jan 2014 22:39:17 +0000 (14:39 -0800)]
Add the emulate support code

This is missing some processor manipulation functions, as the build will show.
We'll add them next week.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoAdd the skeleton for vm support
Ronald G. Minnich [Fri, 3 Jan 2014 22:17:38 +0000 (14:17 -0800)]
Add the skeleton for vm support

This code is from my litevm project, which is a redo of the early
kvm stuff as driver-only. That makes it easy to pull into akaros.
No need to driver-ize all of akaros for VMs. I'm not sure
we'd ever want to go that far anyway, it opens up the door to all
kinds of nasty attacks (as it has in Linux) that we don't want.

kern/drivers/dev/vm.c is an architecture-independent vm driver. Note that the
include files do not have an architecture type in the name (different
from linux) such that they can be included as arch/file and it will
work on any arch (which we need to keep in mind). This is
in the Plan 9 model of making things build in the architecture-independent
code when you build for an arch, by making the include file names
arch-independent.

Next steps are to keep bringing code over, which will live in
arch/x86.

All this is open to change once everyone is back from vacation
of course.

Suggestions on efficiently pulling in the vm image are welcome.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoBasic layout of the driver is sorta done.
Ronald G. Minnich [Fri, 3 Jan 2014 01:02:03 +0000 (17:02 -0800)]
Basic layout of the driver is sorta done.

Top level
clone
stat

VMs at
vm[1,2,...]
in the vm directories
image
ctl

Now to wrap up the writing of the image and to start hooking in
the vm code itself.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoFix krealloc
Ronald G. Minnich [Thu, 2 Jan 2014 17:16:02 +0000 (09:16 -0800)]
Fix krealloc

It was fairly badly broken.

It's legal to call with a NULL pointer.

It's required to save the old contents to new :-), else it's not much of a RE-allocator.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoWire it in.
Ronald G. Minnich [Thu, 2 Jan 2014 16:51:43 +0000 (08:51 -0800)]
Wire it in.

You can
ls '#V'
and see
clone

but you can't cat clone yet. I'm still getting
up to speed on our new driver style :-)

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoAdd in minimal code for freeing a vm
Ronald G. Minnich [Thu, 2 Jan 2014 15:16:08 +0000 (07:16 -0800)]
Add in minimal code for freeing a vm

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoAdd a simple driver for vms.
Ronald G. Minnich [Thu, 2 Jan 2014 04:55:45 +0000 (20:55 -0800)]
Add a simple driver for vms.

Not being called yet, compiles. Waiting for comments from Barret et. al.
Please note I don't use TAILQ because I expect far higher read
than change traffic on the vm array and a simple array is a lot more
cache friendly.

If this is ok, then I'll add in the support code from the litevm project
and, voila, we have VMs maybe.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoThis links.
Ronald G. Minnich [Fri, 17 Jan 2014 22:17:17 +0000 (14:17 -0800)]
This links.

We now have a console dev.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoReplaces snoopers with an atomic
Barret Rhoden [Fri, 17 Jan 2014 22:00:27 +0000 (14:00 -0800)]
Replaces snoopers with an atomic

Instead of a kref.  We shouldn't use a kref, since we don't expect to do
anything when we put the final reference back.  Also, you'll panic when
you kref_get something with a ref == 0.

5 years agoRemoves unused IP header files
Barret Rhoden [Fri, 17 Jan 2014 21:55:57 +0000 (13:55 -0800)]
Removes unused IP header files

We still have a couple other headers in k/s/net, but they are in use.

5 years agoFixes krefs in chan.c
Barret Rhoden [Fri, 17 Jan 2014 21:49:08 +0000 (13:49 -0800)]
Fixes krefs in chan.c

All of these use the release style now.  Cname was grabbing too many
refs.  All of them were using fake_release (which will panic), and the
usage of kref_put == 0 is backwards.

5 years agorandom() and abs()
Ronald G. Minnich [Fri, 17 Jan 2014 21:46:59 +0000 (13:46 -0800)]
random() and abs()

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoMore trimming to get things to build.
Ronald G. Minnich [Fri, 17 Jan 2014 21:39:22 +0000 (13:39 -0800)]
More trimming to get things to build.

errorf() is not needed, our error() always takes a format.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agotokenize
Ronald G. Minnich [Fri, 17 Jan 2014 21:34:11 +0000 (13:34 -0800)]
tokenize

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoudp.c
Ronald G. Minnich [Fri, 17 Jan 2014 21:32:26 +0000 (13:32 -0800)]
udp.c

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agotcp and init
Ronald G. Minnich [Fri, 17 Jan 2014 21:30:00 +0000 (13:30 -0800)]
tcp and init

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agodial.c, which needed netlog.c, so netlog too.
Ronald G. Minnich [Fri, 17 Jan 2014 21:16:56 +0000 (13:16 -0800)]
dial.c, which needed netlog.c, so netlog too.

Netlog may be very handy at some point anyway; A file
interface you can read log info on.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoFixes refcnt in devmnt
Barret Rhoden [Fri, 17 Jan 2014 21:13:03 +0000 (13:13 -0800)]
Fixes refcnt in devmnt

Using krefs directly.

5 years agoRemoves kref_next
Barret Rhoden [Fri, 17 Jan 2014 21:05:52 +0000 (13:05 -0800)]
Removes kref_next

They are using these as a source of integer IDs, not as references.

Plan9 does this all over the place too.  Here, just an increment of an
int is fine.  In places like #s, we'll need an ID service (same idea
behind PIDs).  Solaris had 'vmem' for this, and it was pretty cool.

5 years agogetfields.c
Ronald G. Minnich [Fri, 17 Jan 2014 20:53:27 +0000 (12:53 -0800)]
getfields.c

I did this in a way that we can go back to utf if we wish.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoiprouter.c
Ronald G. Minnich [Fri, 17 Jan 2014 20:49:05 +0000 (12:49 -0800)]
iprouter.c

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoFixes kref in iproute
Barret Rhoden [Fri, 17 Jan 2014 20:45:54 +0000 (12:45 -0800)]
Fixes kref in iproute

The old style was racy and wouldn't decref if you were over 1.  This is
basically the same as the 9ns code now (TODOs and all).

One thing that may make using a release harder is that the route needs
to know f->queue.  Doing the 'release' work in the if (kref_put()) block
will still work (as far as handling refs and races go).

Definitely sketchy though, so we should look at this later in case we
are losing memory in the routes.

5 years agoinferno->plan 9 support we want to remove.
Ronald G. Minnich [Fri, 17 Jan 2014 20:46:23 +0000 (12:46 -0800)]
inferno->plan 9 support we want to remove.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoicmp4
Ronald G. Minnich [Fri, 17 Jan 2014 20:44:02 +0000 (12:44 -0800)]
icmp4

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoicmp6
Ronald G. Minnich [Fri, 17 Jan 2014 20:41:30 +0000 (12:41 -0800)]
icmp6

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agokproc -> ktask
Barret Rhoden [Fri, 17 Jan 2014 20:31:23 +0000 (12:31 -0800)]
kproc -> ktask

With a cocci file added to PATCHPLAN9 for future files.

Note that our ktasks aren't exactly like kprocs (kthreads, no process
context, etc), so we'll need to review the specific functions being run.

5 years agoipv6
Ronald G. Minnich [Fri, 17 Jan 2014 20:08:53 +0000 (12:08 -0800)]
ipv6

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoip.c is in
Ronald G. Minnich [Fri, 17 Jan 2014 19:58:35 +0000 (11:58 -0800)]
ip.c is in

I create a netlog which may be useful. We need an 'Fs' format
for printk

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agocleanname from inferno
Ronald G. Minnich [Fri, 17 Jan 2014 19:44:33 +0000 (11:44 -0800)]
cleanname from inferno

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoadd pgrp/fgrp support
Ronald G. Minnich [Fri, 17 Jan 2014 19:41:52 +0000 (11:41 -0800)]
add pgrp/fgrp support

The fgrp and pgrp do the kref support corectly.
The mh do not.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoRemove usage of index and mallocz.
Ronald G. Minnich [Fri, 17 Jan 2014 19:25:07 +0000 (11:25 -0800)]
Remove usage of index and mallocz.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoFixes devmnt warnings
Barret Rhoden [Fri, 17 Jan 2014 19:06:24 +0000 (11:06 -0800)]
Fixes devmnt warnings

Note that inferno devmnt has no reset, and does nxm's reset code in
inferno's init.

5 years agoAdd the no op cache.c for devmnt.
Ronald G. Minnich [Fri, 17 Jan 2014 19:03:22 +0000 (11:03 -0800)]
Add the no op cache.c for devmnt.

We might want devmnt to cache someday, so just leave it
as is for now.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoNetaux functions and devmnt.
Ronald G. Minnich [Fri, 17 Jan 2014 18:53:09 +0000 (10:53 -0800)]
Netaux functions and devmnt.

I used the inferno devmnt, though the license is ok
on the plan 9 one, as we are mostly using inferno
infrastructure. We'll see.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoUse rendez for sleep/wakeup/etc
Barret Rhoden [Fri, 17 Jan 2014 18:47:18 +0000 (10:47 -0800)]
Use rendez for sleep/wakeup/etc

I put rendez.cocci in the PATCHPLAN9 script.  That old .cocci made this
much easier, especially the second time around.

5 years agoAdded system calls, had to tweak a few things as a result
Ronald G. Minnich [Fri, 17 Jan 2014 18:30:26 +0000 (10:30 -0800)]
Added system calls, had to tweak a few things as a result

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoMinor changes to allocb
Barret Rhoden [Fri, 17 Jan 2014 18:25:30 +0000 (10:25 -0800)]
Minor changes to allocb

Got rid of the spinlock (used an atomic).

Used BLOCKALIGN instead of BY2V, which is in an inferno header
somewhere.

And had some leftovers from a lindent run.

5 years agoAdd a kernel date; remove use of kprint
Ronald G. Minnich [Fri, 17 Jan 2014 18:14:29 +0000 (10:14 -0800)]
Add a kernel date; remove use of kprint

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agocommand parsing.
Ronald G. Minnich [Fri, 17 Jan 2014 18:07:16 +0000 (10:07 -0800)]
command parsing.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoconv* functions
Ronald G. Minnich [Fri, 17 Jan 2014 17:59:09 +0000 (09:59 -0800)]
conv* functions

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoFix allocb's alignment to 32 bytes.
Ronald G. Minnich [Fri, 17 Jan 2014 17:50:57 +0000 (09:50 -0800)]
Fix allocb's alignment to 32 bytes.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoallocb.c compiles
Ronald G. Minnich [Fri, 17 Jan 2014 17:49:23 +0000 (09:49 -0800)]
allocb.c compiles

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoiproute.c compiles
Ronald G. Minnich [Fri, 17 Jan 2014 17:36:01 +0000 (09:36 -0800)]
iproute.c compiles

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoreadmem / readstr / readnum
Barret Rhoden [Fri, 17 Jan 2014 17:33:06 +0000 (09:33 -0800)]
readmem / readstr / readnum

These are the ones we rewrote for 9ns.

Feel free to move them to another file.  Needed a dumping ground for
things needed for inferno but not part of their codebase.

5 years agoAllows for multiple includes of headers
Barret Rhoden [Fri, 17 Jan 2014 17:31:07 +0000 (09:31 -0800)]
Allows for multiple includes of headers

We're going to need to do the #ifndef for every header we might include
multiple times.  (I already ran into this problem).

5 years agoFixes krefs in iproute
Barret Rhoden [Fri, 17 Jan 2014 16:57:07 +0000 (08:57 -0800)]
Fixes krefs in iproute

It compiles, but still missing some printf symbols.

5 years agoiproute.c kind of compiles
Ronald G. Minnich [Fri, 17 Jan 2014 05:21:45 +0000 (21:21 -0800)]
iproute.c kind of compiles

Also, functions we have to have. Maybe barret will finish
up iproute.c. I'm done for today.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoget ipaux.c to build.
Ronald G. Minnich [Fri, 17 Jan 2014 05:07:06 +0000 (21:07 -0800)]
get ipaux.c to build.

We'll hold off on icmp6.c for a bit.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoGetting more of the IP stack to compile
Ronald G. Minnich [Fri, 17 Jan 2014 00:51:14 +0000 (16:51 -0800)]
Getting more of the IP stack to compile

There are remaining errors and issues.
How do we sleep and timeout?

We'll skip compress.c for now, it's not likely we want it.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoarp.c
Ronald G. Minnich [Fri, 17 Jan 2014 00:08:23 +0000 (16:08 -0800)]
arp.c

How do we do NOW?

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoptclbsum.c
Ronald G. Minnich [Thu, 16 Jan 2014 23:54:07 +0000 (15:54 -0800)]
ptclbsum.c

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoAdd qio.c
Ronald G. Minnich [Thu, 16 Jan 2014 23:52:37 +0000 (15:52 -0800)]
Add qio.c

And add iunlock to the transformations

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agodev.c, which has stubs we need
Ronald G. Minnich [Thu, 16 Jan 2014 23:43:52 +0000 (15:43 -0800)]
dev.c, which has stubs we need

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoConstants needed for printing.
Ronald G. Minnich [Thu, 16 Jan 2014 23:33:04 +0000 (15:33 -0800)]
Constants needed for printing.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agopktmedium builds.
Ronald G. Minnich [Thu, 16 Jan 2014 23:29:54 +0000 (15:29 -0800)]
pktmedium builds.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoAnd now for some files.
Ronald G. Minnich [Thu, 16 Jan 2014 23:26:07 +0000 (15:26 -0800)]
And now for some files.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoCompile in devtab and alarm device
Ronald G. Minnich [Thu, 16 Jan 2014 23:24:41 +0000 (15:24 -0800)]
Compile in devtab and alarm device

but what is NUMSIZExx?

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoGet it to build, not link yet.
Ronald G. Minnich [Thu, 16 Jan 2014 23:11:39 +0000 (15:11 -0800)]
Get it to build, not link yet.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agonetdevmedium compiles
Ronald G. Minnich [Thu, 16 Jan 2014 22:37:40 +0000 (14:37 -0800)]
netdevmedium compiles

The scripts are getting better.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoadd loopback medium, tweak spatch files.
Ronald G. Minnich [Thu, 16 Jan 2014 22:22:54 +0000 (14:22 -0800)]
add loopback medium, tweak spatch files.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoAdd spin_lock_irqsave transformation for ilock
Ronald G. Minnich [Thu, 16 Jan 2014 22:05:58 +0000 (14:05 -0800)]
Add spin_lock_irqsave transformation for ilock

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agonullmedium compiles, with warnings.
Ronald G. Minnich [Thu, 16 Jan 2014 22:03:40 +0000 (14:03 -0800)]
nullmedium compiles, with warnings.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoadd in the inferno stack.
Ronald G. Minnich [Thu, 16 Jan 2014 19:51:24 +0000 (11:51 -0800)]
add in the inferno stack.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoRemove all the old proto stack.
Ronald G. Minnich [Thu, 16 Jan 2014 19:45:14 +0000 (11:45 -0800)]
Remove all the old proto stack.

5 years agoAdd the inferno networking code, minus il
Ronald G. Minnich [Thu, 16 Jan 2014 19:31:39 +0000 (11:31 -0800)]
Add the inferno networking code, minus il

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoRip out the old network stack. It's in the way.
Ronald G. Minnich [Thu, 16 Jan 2014 19:27:37 +0000 (11:27 -0800)]
Rip out the old network stack. It's in the way.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoerror.c from inferno
Ronald G. Minnich [Thu, 16 Jan 2014 18:29:16 +0000 (10:29 -0800)]
error.c from inferno

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoInterim commit, compiles. We need to bring in support code now.
Ronald G. Minnich [Thu, 16 Jan 2014 16:31:12 +0000 (08:31 -0800)]
Interim commit, compiles. We need to bring in support code now.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
5 years agoFirst Inferno imports
Ronald G. Minnich [Thu, 16 Jan 2014 01:30:23 +0000 (17:30 -0800)]
First Inferno imports

This is first pass and we're including the Inferno files as-is
so we can retain some ideas about what we change.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>