Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some experience running xv6 on Marss?? #50

Open
puentev opened this issue Oct 27, 2016 · 6 comments
Open

Some experience running xv6 on Marss?? #50

puentev opened this issue Oct 27, 2016 · 6 comments

Comments

@puentev
Copy link

puentev commented Oct 27, 2016

This might be a winner for teaching. Both Xv6 and PTLsim are nifty but great for class-ro0m. Although gem5/linux might be more advanced but both are way overkill for this purpose. With this mindset I tried to run both with no success. xv6 x86_64 implementation enter in panic with:

qemu/qemu-system-x86_64 -m 256 -nographic -hdb fs.img xv6.img
xv6...
acpi: cpu#0 apicid 0
acpi: cpu#1 apicid 1
acpi: ioapic#0 @fec00000 id=2 base=0

cpu0: starting xv6

ioapicinit: id isn't equal to ioapicid; not a MP
cpu1: starting
cpu0: starting
pid 1 initcode: trap 14 err 4 on cpu 1 eip 0x0 addr 0xe000--kill proc
cpu1: panic: init exiting

There is any experience on this? ioapicinit xv6 error seems a bit scary. Makes sense to keep exploring this path or is better to take some alternate route. I have little experience with MARSS, so any suggestion will be welcomed...

@fitzfitsahero
Copy link
Collaborator

https://github.com/phf/xv6/blob/master/ioapic.c

I'm not sure if this is an issue with xv6 or marss, but the code above is from xv6.

I have no experience with xv6, so I'm not sure where to start. Sorry

@puentev
Copy link
Author

puentev commented Oct 27, 2016

Yep, is xv6 who gives the panic. The problem is if there is some change in the qemu used by Marss that breaks the qemu emulation of the I/O APIC 82093AA (which is assumed to be "there" by xv6).

I'll keep digging a bit more. Thanks anyway.

@fitzfitsahero
Copy link
Collaborator

The qemu version that MARSS uses is 0.14.1 so it's possible that xv6 wasn't implemented.

You could try the qemu branch, which I believe has qemu version 1.0.

We are trying to get an updated qemu pushed, but there are lots of changes that need to be made, and SMT is broken currently, which is a pain to track down.

@puentev
Copy link
Author

puentev commented Oct 27, 2016

Yep... looks like the qemu is too old for xv6. I saw a couple of patches in the qemu/hw/ioapic.c not applied (didn't fix the problem).

Ok... not an easy task. Rebasing over v1.0 gives 100 conflicts that automatic merge can't deal with. Some are easy... some are impossible for me. In these files.:

CONFLICT (content): Merge conflict in vl.c
CONFLICT (content): Merge conflict in ui/vnc.c
CONFLICT (content): Merge conflict in ui/sdl.c
CONFLICT (content): Merge conflict in ui/cocoa.m
CONFLICT (content): Merge conflict in target-sh4/translate.c
CONFLICT (content): Merge conflict in target-i386/translate.c
CONFLICT (content): Merge conflict in target-i386/helper.h
CONFLICT (content): Merge conflict in target-i386/helper.c
CONFLICT (content): Merge conflict in target-i386/cpu.h
CONFLICT (content): Merge conflict in target-cris/translate_v10.c
CONFLICT (content): Merge conflict in target-cris/translate.c
CONFLICT (content): Merge conflict in target-cris/helper.c
CONFLICT (content): Merge conflict in target-arm/translate.c
CONFLICT (content): Merge conflict in target-arm/neon_helper.c
CONFLICT (content): Merge conflict in slirp/mbuf.c
CONFLICT (content): Merge conflict in qemu-timer.c
CONFLICT (content): Merge conflict in qemu-img.c
CONFLICT (content): Merge conflict in qemu-doc.texi
CONFLICT (content): Merge conflict in qemu-char.c
CONFLICT (content): Merge conflict in monitor.c
CONFLICT (content): Merge conflict in linux-user/ioctls.h
CONFLICT (content): Merge conflict in linux-user/elfload.c
CONFLICT (content): Merge conflict in hw/ide/via.c
CONFLICT (content): Merge conflict in hw/ide/piix.c
CONFLICT (add/add): Merge conflict in hw/ide/ich.c
CONFLICT (content): Merge conflict in hw/ide/core.c
CONFLICT (content): Merge conflict in hw/ide/ahci.c
CONFLICT (content): Merge conflict in hmp-commands.hx
CONFLICT (content): Merge conflict in exec.c
CONFLICT (content): Merge conflict in docs/tracing.txt
CONFLICT (content): Merge conflict in cpus.c
CONFLICT (content): Merge conflict in cpu-exec.c
CONFLICT (content): Merge conflict in configure
CONFLICT (content): Merge conflict in blockdev.c
CONFLICT (content): Merge conflict in block/vdi.c
CONFLICT (content): Merge conflict in block/qed.c
CONFLICT (content): Merge conflict in block/qcow2.c
CONFLICT (content): Merge conflict in block/qcow2-snapshot.c
CONFLICT (content): Merge conflict in block/qcow2-cluster.c
CONFLICT (content): Merge conflict in block.c
CONFLICT (content): Merge conflict in VERSION
CONFLICT (content): Merge conflict in Makefile.objs

@fitzfitsahero
Copy link
Collaborator

Sorry, I think you misunderstood me. There is a branch in this repo that has qemu version 1.1, you don't need to try and rebase a new version qemu.

It's tricky to checkout since the branch name is the same as a folder. I forget how to do it, but there is a command to choose the 'qemu' branch.

@puentev
Copy link
Author

puentev commented Oct 27, 2016

Yep I misunderstood you :) In any case that branch is not properly merged and currently is no possible to compile it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants