Fix kvm-userspace/user/ for PowerPC
PATCH 1/1 Fix kvm-userspace/user/ for PowerPC
When applied after Jerone's kvm_create_kernel_phys_mem() libkvm patch, these patches get the kvm-userspace/user/ test harness building and somewhat working for PowerPC. For the moment it's just a simply binary loader (hence the need for objcopy), but in the future it should be easy to add an ELF or even uImage loader.
3 files changed, 449 insertions(+), 9 deletions(-) user/config-powerpc.mak | 30 ++- user/configure | 2 user/main-ppc.c | 426 +++++++++++++++++++++++++++++++++++++++++++++++
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
PATCH 1/1 Add OBJCOPY to kvm-userspace/user/configure output
# HG changeset patch
# User Hollis Blanchard <hollisb-r/[email protected]> # Date 1199836243 21600
# Node ID 2b1946f501613724c363f98cbdfd95248b947657
# Parent 332daa1196f0a74d2ad3c34ed2ca41d5d859b0de
---
1 file changed, 2 insertions(+)
user/configure | 2 ++
user/configure +2 -0
@@ -4,6 +4,7 @@ kerneldir=/lib/modules/$(uname -r)/build kerneldir=/lib/modules/$(uname -r)/build cc=gcc ld=ld +objcopy=objcopy arch=`uname -m | sed -e s/i.86/i386/` cross_prefix=
@@ -63,4 +64,5 @@ ARCH=$arch ARCH=$arch CC=$cross_prefix$cc LD=$cross_prefix$ld +OBJCOPY=$cross_prefix$objcopy EOF
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
PATCH 1/1 Add PowerPC kvmctl harness and fix building the testcases
In reply to Hollis Blanchard# HG changeset patch
# User Hollis Blanchard <hollisb-r/[email protected]> # Date 1199836753 21600
# Node ID dd6de019e916f0cc2b4f75afb95a9d28323cb174
# Parent 2b1946f501613724c363f98cbdfd95248b947657
---
2 files changed, 447 insertions(+), 9 deletions(-)
user/config-powerpc.mak | 30 ++-user/main-ppc.c | 426 +++++++++++++++++++++++++++++++++++++++++++++++
user/config-powerpc.mak +21 -9
@@ -1,14 +1,26 @@ TEST_DIR=test/powerpc -TEST_DIR=test/powerpc CFLAGS += -m32 CFLAGS += -D__powerpc__ CFLAGS += -I $(KERNELDIR)/include +# for some reaons binutils hates tlbsx unless we say we're 405 :( +CFLAGS += -Wa,-mregnames,-m405 -tests= $(TEST_DIR)/io.S \ - $(TEST_DIR)/spin.S \ - $(TEST_DIR)/sprg.S \ - $(TEST_DIR)/44x/tlbsx.S \ - $(TEST_DIR)/44x/tlbwe_16KB.S \ - $(TEST_DIR)/44x/tlbwe_hole.S \ - $(TEST_DIR)/44x/tlbwe.S +%.bin: %.o + $(OBJCOPY) -O binary $^ $@ -kvmctl_objs = main.o ../libkvm/libkvm.a +testobjs := \ + io.bin \ + spin.bin \ + sprg.bin \ + 44x/tlbsx.bin \ + 44x/tlbwe_16KB.bin \ + 44x/tlbwe_hole.bin \ + 44x/tlbwe.bin + +tests := $(addprefix test/powerpc/, $(testobjs)) + +all: kvmctl $(tests) + +kvmctl_objs = main-ppc.o ../libkvm/libkvm.a + +arch_clean: + rm -f $(tests)
user/main-ppc.c new file +426 -0
426 lines not on this page · raw message
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Re: [PATCH 2 of 2] Add PowerPC kvmctl harness and fix building the testcases
Quoted 10 lines · Hollis Blanchard
user/main-ppc.c new file +9
-0+ +static int misc_init (void ) +{ +int err; + + err =io_table_register (&pio_table,0xff ,1 , misc_io,NULL ); +if (err <0 ) +return err; +
user/main-ppc.c line 169
Quoted 10 lines
user/main-ppc.c new file +10
-0+ err =io_table_register (&pio_table,0xf1 ,1 , misc_io,NULL ); +if (err <0 ) +return err; + + err =io_table_register (&pio_table,0xf4 ,1 , misc_io,NULL ); +if (err <0 ) +return err; + +return io_table_register (&pio_table,0xd1 ,1 , misc_io,NULL ); +}
I thought ppc doesn't have pio (and certainly doesn't need the random hacks above)?
While it's okay to not share code with x86 for the test harness, at least remove the x86 specific parts.
Signature · 8 lines
error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace