Prepare to implement ioapic support

first, remove unused stuff that does not ever seem to have worked.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
More cleanup to prepare for ioapic support

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Not used any more

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
More ioapic support, will it ever end.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Splits x86 arch for circular deps

Apic.h will need to include atomic.h, which needs arch (for irqs), which was also housing the coreid code that needs the LAPIC.  Hence the split.

Signed off and written by Barret  =)
Well, it *almost* builds. What happened to core_id?

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
This builds and boots.

if you ls '#a' you can see it parses ACPI.

Sorry for the huge code base churn. Our include files
really need some work however.

C compilers are fast now. I'd still push for just including
akaros.h and having it just include everything but that's me :-)

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Set up prototype for apicinit.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Restore call to apicinit.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Run the mpacpi code.

This actually seems to print out reasonable configurations
for ACPI init.

We'll need to review what the current code does, by dumping
all the register sets it does, and then compare to what this
would do.

Also, add a file to #a,
acpipretty

which when you cat it prints out the acpi tables in a
pretty form. It's not complete. Note its hokey use of a static;
that was not my doing, and we need to undo it.

One good idea would be to merge apic.h and ioapic.h. All systems
we care about from now on will always have an ioapic.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Add a bit more info to #a/acpipretty

It will let you get pretty prints to user mode at any point.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Add the pci device

This won't compile of course.
We need to work out our pci calls so we can write the spatches.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Set up ACPI interrupt configuration

This builds and boots, and we seem to get console interrupts,
but not ethernet interrupts (under QEMU). Things need to be fixed.
Only works if you enable CONFIG_MPTABLES (which should be renamed
since we don't parse them, hooray!)

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Add some comments/prints

This is so Barret will figure out how to make the
ioapicintrinit
code work from ACPI :-)

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Add a bit more info to the print, we can now see introvr flags and what they mean.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Improve visibility of apics/ioapics

if you cat '#a/ioapic' and '#a/apic', you'll see some useful
info about them. This is much better than the simple kernel dump.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
Bring a bit more apic infrastructure up.

I hope this does not conflict too much with what's there
already, we can hash this out tomorrow.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
First pass at enabling interrupts.

This may not be too wrong.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
More set up for using ioapics

Everything *seems* to be getting done but interrupts still don't happen.
Note we had to change register_dev_interrupt to take a u32; the ioapic
requires it.

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

Also, we needed tbdf in the ether struct as a "hook" for the ioapic.
ioapics really want that devno in the interrupt tables.

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