Generating elf kernel ?
Hello all,
In the past I've been using the PPC architecture to generate elf kernels (I wrote my own bootloader):
$ file zImage.elf zImage.elf: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), statically linked, not stripped
I'm now trying to change to the PowerPC architecture, but the generated kernel is different and won't load:
$ file zImage zImage: u-boot/PPCBoot image
How do I generate an elf file ?
For what it's worth, I use the Xilinx-patched kernel and I load it to a flash mem using impact.
Signature · 2 lines
Guillaume Dargaud http://www.gdargaud.net/
Quoted 7 lines · Guillaume Dargaud
Hello all,
In the past I've been using the PPC architecture to generate elf kernels (I wrote my own bootloader):$ file zImage.elf zImage.elf: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), statically linked, not stripped
Quoted 6 lines
I'm now trying to change to the PowerPC architecture, but the generated kernel is different and won't load:
$ file zImage zImage: u-boot/PPCBoot imageHow do I generate an elf file ?
Try simpleImage/dtbImage. But you have to check if there is a file, arch/powerpc/boot/<platform>.c.
For more detail on this please refer to Documentation/powerpc/bootwrapper.txt.
Quoted 2 lines
For what it's worth, I use the Xilinx-patched kernel and I load it to a flash mem using impact.
Which bootloader? Looks you want to run it as XIP.
Tiejun
Quoted 1 line
Which bootloader? Looks you want to run it as XIP.
I have my own downloader which does a few things and then transfers the kernel from a flash to the memory and then simply jumps to the 1st address with a 0x40000() C function call.
But I need to first use Xilinx tools to transfer the kernel from the development PC to the memory of my device (and then my own 'one-time-only' tool to transfer from mem to flash). And the xilinx program refuses that kernel, complaining that it's not an elf file.
Signature · 2 lines
Guillaume Dargaud http://www.gdargaud.net/
Quoted 1 line · Guillaume Dargaud
How do I generate an elf file ?
vmlinux?
With kind regards,
Signature · 2 lines
Baurzhan Ismagulov http://www.kz-easy.com/
Quoted 2 lines
Quoted 1 line
How do I generate an elf file ?
vmlinux?
Thanks.
The entry point address has change and I can't upload it:
New (bad) one:
$ readelf -h vmlinux ... Entry point address: 0xc0000000
Old (good) one:
$ readelf -h zImage.elf ... Entry point address: 0x400000
How can I change the entry point address ?
Signature · 2 lines
Guillaume Dargaud http://www.gdargaud.net/
Quoted 11 lines · Guillaume Dargaud
Quoted 2 lines
Quoted 1 line
How do I generate an elf file ?
vmlinux?
Thanks.
The entry point address has change and I can't upload it:
New (bad) one:$ readelf -h vmlinux ... Entry point address: 0xc0000000
Quoted 6 lines
Old (good) one:
$ readelf -h zImage.elf ... Entry point address: 0x400000How can I change the entry point address ?
It's impossible to boot PPC vmlinux format directly if you only change the original entry point address, 0xc0000000.
For kernel the following is as default:
v:0xc0000000 --> p:0x0
Please use simpleImage.<your target dts name>.elf.
Cheers
Tiejun
Quoted 1 line
Please use simpleImage.<your target dts name>.elf.
Great, that seems to be it...
Except that nothing happens when I jump to 0x40000, no message from the kernel, nothing.
I'm a bit stumped here as my old kernel worked fine.
Signature · 2 lines
Guillaume Dargaud http://www.gdargaud.net/
Quoted 2 lines · On Wed, 15 Sep 2010 16:27:10 +0800 "tiejun.chen" <[email protected]>…
It's impossible to boot PPC vmlinux format directly if you only change the original entry point address,
0xc0000000.
Why? That's pretty much what the bootwrapper does. Our hypervisor has directly booted vmlinux this way.
Note that in recent kernels physaddr is even set to zero, allowing the ELF loader to just use that instead of magically knowing the kernel wants to go at address zero.
Quoted 2 lines
For kernel the following is as default:
v:0xc0000000 --> p:0x0
That mapping is set up by code at the entry point of vmlinux, not by the bootwrapper.
-Scott
Quoted 8 lines · Scott Wood
Quoted 2 lines · On Wed, 15 Sep 2010 16:27:10 +0800 "tiejun.chen" <[email protected]>…
It's impossible to boot PPC vmlinux format directly if you only change the original entry point address,
0xc0000000.Why? That's pretty much what the bootwrapper does. Our hypervisor has directly booted vmlinux this way.
Maybe you misunderstand what I mean.
Although you can change entry point of vmlinux
1> can you load the Linux vmlinux directly to the physical address '0' on current bootloader?
2> additionally you have to find a way to pass dtb to the native vmlinux.
I believe the hypervisor can boot vmlinux directly. But your so-called vmlinux should be guest OS. And the hypervisor will handle/assit TLB exception for the guest OS on MMU. Right? So you can use the hypervisor to load vmlinux to any physical address as you expect. But the guest OS should not be same as the native Linux.
Quoted 4 lines
Note that in recent kernels physaddr is even set to zero, allowing the ELF loader to just use that instead of magically knowing the kernel wants to go at address zero.
Sure.
Quoted 6 lines
Quoted 3 lines
For kernel the following is as default:
v:0xc0000000 --> p:0x0That mapping is set up by code at the entry point of vmlinux, not by the bootwrapper.
Absolutely.
Tiejun
Quoted 4 lines
-Scott
Quoted 4 lines · Guillaume Dargaud
Quoted 1 line
Please use simpleImage.<your target dts name>.elf.
Great, that seems to be it...
Except that nothing happens when I jump to0x40000, no message from the
0x40000? I recalled the entry point should be 0x400000 for simepleImage.*.elf. So you have to change this on the file, arch/powerpc/boot/wrapper.
And also you should confirm if the upstream kernel support your board.
Additionally let's assume your bootloader create the map between the virtual address and the physical address as 1:1. If so you want to execute from 0x40000.
But the actual PC address should be the loader address + offset. You can get
this by readelf. Here if your loader address is zero, the offset will be pc address, not 0x40000. You can dump your memory to check this.
Cheers
Tiejun
Quoted 2 lines
kernel, nothing.
I'm a bit stumped here as my old kernel worked fine.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Please use simpleImage.<your target dts name>.elf.
Great, that seems to be it...
Except that nothing happens when I jump to0x40000, no message from the
0x40000? I recalled the entry point should be0x400000for simepleImage.*.elf. So you have to change this on the file,arch/powerpc/boot/wrapper.
Correct, I skipped a zero, the address is indeed 0x400000
Quoted 1 line
And also you should confirm if the upstream kernel support your board.
Our board is a custom derivative from a ML405.
My previous project uses ARCH=PPC and has been working fine for 2 years. I'm currently trying to go to ARCH=PowerPC and understand dts files in order to boot my first kernel.
I assume I shouldn't have to change anything in my bootloader. After I jump to the kernel address, I don't even get the usual:
loaded at: 00400000 004F559C board data at: 004F3520 004F359C relocated to: 0040505C 004050D8 zimage at: 00405E48 004F211C avail ram: 004F6000 08000000 Linux/PPC load: console=ttyUL0,115200 rw root=/dev/nfs ip=bootp
Uncompressing Linux...done.
Now booting the kernel
Something wrong with my serial console ?
Quoted 6 lines
Additionally let's assume your bootloader create the map between the virtual address and the physical address as 1:1. If so you want to execute from
0x40000. But the actual PC address should be the loader address + offset. You can get this by readelf. Here if your loader address is zero, the offset will be pc address, not0x40000. You can dump your memory to check this.
The bootloader has no concept of virtual address, right ?
Signature · 2 lines
Guillaume Dargaud http://www.gdargaud.net/
Quoted 7 lines · Guillaume Dargaud
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Please use simpleImage.<your target dts name>.elf.
Great, that seems to be it...
Except that nothing happens when I jump to0x40000, no message from the
0x40000? I recalled the entry point should be0x400000for simepleImage.*.elf. So you have to change this on the file,arch/powerpc/boot/wrapper.
Quoted 5 lines
Correct, I skipped a zero, the address is indeed
0x400000Quoted 1 line
And also you should confirm if the upstream kernel support your board.
Our board is a custom derivative from a ML405.
Understood.
So I recommend you use the kernel tree from xilinx. You can refer to the following website:
http://xilinx.wikidot.com/powerpc-linux
I hope you can skip many issues to accelerate your progress based on the xilinx kernel.
Quoted 11 lines
My previous project uses ARCH=PPC and has been working fine for 2 years. I'm currently trying to go to ARCH=PowerPC and understand dts files in order to boot my first kernel.
I assume I shouldn't have to change anything in my bootloader. After I jump to the kernel address, I don't even get the usual:loaded at: 00400000 004F559C board data at: 004F3520 004F359C relocated to: 0040505C 004050D8 zimage at: 00405E48 004F211C avail ram: 004F6000 08000000 Linux/PPC load: console=ttyUL0,115200 rw root=/dev/nfs ip=bootp
Quoted 4 lines
Uncompressing Linux...done.
Now booting the kernelSomething wrong with my serial console ?
You have to check if you go the correct PC address. Note please check the real pc address according to the previous comments.
If yes you can check where your kernel stop. Certainly if you have some tools, such as JTAG debug tools it's convenient to track this. But if no it will be difficult to go no next.
But you still have ways to do, such as display LED, early printk, and dump __log_buf.
Quoted 9 lines
Quoted 7 lines
Additionally let's assume your bootloader create the map between the virtual address and the physical address as 1:1. If so you want to execute from
0x40000. But the actual PC address should be the loader address + offset. You can get this by readelf. Here if your loader address is zero, the offset will be pc address, not0x40000. You can dump your memory to check this.The bootloader has no concept of virtual address, right ?
This should be depend on the given PPC core. For example, we cannot disable MMU on e500. Bur for ML405 we can disable MMU to run real mode on 405.
Cheers
Tiejun
Quoted 1 line
Quoted 2 lines · On Thu, 16 Sep 2010 10:37:32 +0800 "tiejun.chen" <[email protected]>…
1> can you load the Linux vmlinux directly to the physical address '0' on current bootloader?
That depends on what bootloader we're talking about -- I don't know what the original poster's custom loader can do. Obviously the bootloader itself would have to be executing from some other address (e.g. U-Boot runs from the top of RAM).
Quoted 1 line
2> additionally you have to find a way to pass dtb to the native vmlinux.
Yes, of course. But that's a different issue. :-)
Quoted 4 lines
I believe the hypervisor can boot vmlinux directly. But your so-called vmlinux should be guest OS. And the hypervisor will handle/assit TLB exception for the guest OS on MMU. Right? So you can use the hypervisor to load vmlinux to any physical address as you expect.
I was just using our hypervisor as an example, since it has an ELF loader that can pass a device tree.
Quoted 1 line
But the guest OS should not be same as the native Linux.
The guest OS *is* the same as native Linux, as far as TLB handling is concerned.
-Scott
Quoted 20 lines · Scott Wood
Quoted 2 lines · On Thu, 16 Sep 2010 10:37:32 +0800 "tiejun.chen" <[email protected]>…
1> can you load the Linux vmlinux directly to the physical address '0' on current bootloader?
That depends on what bootloader we're talking about -- I don't know what the original poster's custom loader can do. Obviously the bootloader itself would have to be executing from some other address (e.g. U-Boot runs from the top of RAM).
Quoted 1 line
2> additionally you have to find a way to pass dtb to the native vmlinux.
Yes, of course. But that's a different issue. :-)
Quoted 4 lines
I believe the hypervisor can boot vmlinux directly. But your so-called vmlinux should be guest OS. And the hypervisor will handle/assit TLB exception for the guest OS on MMU. Right? So you can use the hypervisor to load vmlinux to any physical address as you expect.
Quoted 7 lines
I was just using our hypervisor as an example, since it has an ELF loader that can pass a device tree.
Quoted 1 line
But the guest OS should not be same as the native Linux.
The guest OS *is* the same as native Linux, as far as TLB handling is concerned.
Looks you means the TLB exception handler should be same between the native and the guest OS. Right?
Here I assume we're talking about e500mc since as far as I know for Freescale only e500mc is designed to support virtual machine based on ISA 2.0.6.
I also know all TLB exceptions can direct to the guest OS when we enable EPCR[DTLBGS|ITLBGS|DSIGS|ISIGS]. But some TLB instructions (i.e. tlbwe )are the privileged instructions. So the guest OS always trap into the hypervisor and then the hypervisor should complete the real action with appropriate physical address. And also the hypervisor can supervisor if the guest OS want to access the invalid physical space.
So I don't think the guest OS is same as native Linux :)
Cheers
Tiejun
Quoted 4 lines
-Scott
Initial kernel command string (Was: Generating elf kernel ?)
In reply to tiejun.chenThanks for helping about the elf issue, I got it running. The problem was that I wasn't using the proper file produced by make !
Now I have a strange and probably simple problem that the Initial kernel command string is incorrect. I want, and I have set in the .config:CONFIG_CMDLINE="console=ttyUL0,115200 rw root=/dev/nfs ip=bootp"
But when my kernel boots it uses:
console=ttyUL0 root=/dev/ram
I can check:
strings arch/powerpc/boot/simpleImage.virtex405-ml405.elf | grep console Vconsole=ttyUL0 root=/dev/ram
Also my previous kernel would wait for 2 seconds at the beginning to allow me to change the initial command string via the serial port, but now it just runs right through. How can I enable this option ?
On the plus side it boots in .5 seconds !
Here's my .config:
CONFIG_40x=y
CONFIG_4xx=yCONFIG_PPC_MMU_NOHASH=yCONFIG_PPC_MMU_NOHASH_32=yCONFIG_NOT_COHERENT_CACHE=yCONFIG_PPC32=yCONFIG_WORD_SIZE=32CONFIG_MMU=yCONFIG_GENERIC_CMOS_UPDATE=yCONFIG_GENERIC_TIME=yCONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GENERIC_CLOCKEVENTS=yCONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y CONFIG_IRQ_PER_CPU=yCONFIG_NR_IRQS=512CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_ARCH_HAS_ILOG2_U32=yCONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_FIND_NEXT_BIT=yCONFIG_GENERIC_GPIO=yCONFIG_PPC=yCONFIG_EARLY_PRINTK=yCONFIG_GENERIC_NVRAM=y CONFIG_SCHED_OMIT_FRAME_POINTER=y CONFIG_ARCH_MAY_HAVE_PC_FDC=yCONFIG_PPC_OF=yCONFIG_OF=yCONFIG_PPC_UDBG_16550=yCONFIG_AUDIT_ARCH=yCONFIG_GENERIC_BUG=yCONFIG_DTC=yCONFIG_DEFAULT_UIMAGE=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_PPC_DCR_NATIVE=yCONFIG_PPC_DCR_MMIO=yCONFIG_PPC_DCR=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_PPC_ADV_DEBUG_REGS=y CONFIG_PPC_ADV_DEBUG_IACS=2 CONFIG_PPC_ADV_DEBUG_DACS=2 CONFIG_PPC_ADV_DEBUG_DVCS=0 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_CONSTRUCTORS=yCONFIG_EXPERIMENTAL=yCONFIG_BROKEN_ON_SMP=yCONFIG_INIT_ENV_ARG_LIMIT=32CONFIG_LOCALVERSION=""CONFIG_TREE_RCU=yCONFIG_RCU_FANOUT=32CONFIG_IKCONFIG=yCONFIG_IKCONFIG_PROC=yCONFIG_LOG_BUF_SHIFT=14CONFIG_NAMESPACES=yCONFIG_CC_OPTIMIZE_FOR_SIZE=yCONFIG_SYSCTL=yCONFIG_ANON_INODES=yCONFIG_SYSCTL_SYSCALL=yCONFIG_KALLSYMS=yCONFIG_HOTPLUG=yCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_ELF_CORE=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_EPOLL=yCONFIG_SIGNALFD=yCONFIG_TIMERFD=yCONFIG_EVENTFD=yCONFIG_SHMEM=yCONFIG_AIO=yCONFIG_HAVE_PERF_EVENTS=yCONFIG_PERF_EVENTS=yCONFIG_VM_EVENT_COUNTERS=yCONFIG_COMPAT_BRK=yCONFIG_SLAB=yCONFIG_HAVE_OPROFILE=y CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y CONFIG_HAVE_IOREMAP_PROT=yCONFIG_HAVE_KPROBES=yCONFIG_HAVE_KRETPROBES=yCONFIG_HAVE_ARCH_TRACEHOOK=yCONFIG_HAVE_DMA_ATTRS=yCONFIG_HAVE_DMA_API_DEBUG=yCONFIG_SLABINFO=yCONFIG_RT_MUTEXES=yCONFIG_BASE_SMALL=0CONFIG_MODULES=yCONFIG_MODULE_UNLOAD=yCONFIG_MODULE_FORCE_UNLOAD=yCONFIG_BLOCK=yCONFIG_IOSCHED_NOOP=yCONFIG_IOSCHED_DEADLINE=yCONFIG_IOSCHED_CFQ=yCONFIG_DEFAULT_CFQ=yCONFIG_DEFAULT_IOSCHED="cfq" CONFIG_INLINE_SPIN_UNLOCK=y CONFIG_INLINE_SPIN_UNLOCK_IRQ=y CONFIG_INLINE_READ_UNLOCK=y CONFIG_INLINE_READ_UNLOCK_IRQ=y CONFIG_INLINE_WRITE_UNLOCK=y CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
CONFIG_PPC4xx_GPIO=yCONFIG_XILINX_VIRTEX=y CONFIG_XILINX_VIRTEX_GENERIC_BOARD=y CONFIG_PPC40x_SIMPLE=yCONFIG_XILINX_VIRTEX_II_PRO=y CONFIG_XILINX_VIRTEX_4_FX=yCONFIG_IBM405_ERR77=yCONFIG_IBM405_ERR51=yCONFIG_SIMPLE_GPIO=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=yCONFIG_HZ_250=yCONFIG_HZ=250CONFIG_PREEMPT_VOLUNTARY=yCONFIG_BINFMT_ELF=y CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y CONFIG_ARCH_HAS_WALK_MEMORY=y CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y CONFIG_SPARSE_IRQ=yCONFIG_MAX_ACTIVE_REGIONS=32 CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_SELECT_MEMORY_MODEL=yCONFIG_FLATMEM_MANUAL=yCONFIG_FLATMEM=yCONFIG_FLAT_NODE_MEM_MAP=yCONFIG_PAGEFLAGS_EXTENDED=yCONFIG_SPLIT_PTLOCK_CPUS=4CONFIG_ZONE_DMA_FLAG=1CONFIG_BOUNCE=yCONFIG_VIRT_TO_BUS=yCONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_PPC_4K_PAGES=yCONFIG_FORCE_MAX_ZONEORDER=11CONFIG_PROC_DEVICETREE=yCONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="console=ttyUL0,115200 rw root=/dev/nfs ip=bootp" CONFIG_EXTRA_TARGETS=""CONFIG_ISA_DMA_API=yCONFIG_ZONE_DMA=yCONFIG_NEED_DMA_MAP_STATE=y
CONFIG_4xx_SOC=yCONFIG_PPC_PCI_CHOICE=yCONFIG_ADVANCED_OPTIONS=y CONFIG_LOWMEM_SIZE=0x30000000 CONFIG_PAGE_OFFSET=0xc0000000 CONFIG_KERNEL_START=0xc0000000 CONFIG_PHYSICAL_START=0x00000000 CONFIG_TASK_SIZE=0xc0000000 CONFIG_CONSISTENT_SIZE=0x00200000CONFIG_NET=yCONFIG_PACKET=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_FIB_HASH=yCONFIG_IP_PNP=yCONFIG_IP_PNP_DHCP=yCONFIG_IP_PNP_BOOTP=yCONFIG_INET_DIAG=yCONFIG_INET_TCP_DIAG=yCONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_STANDALONE=yCONFIG_PREVENT_FIRMWARE_BUILD=yCONFIG_FW_LOADER=yCONFIG_FIRMWARE_IN_KERNEL=yCONFIG_EXTRA_FIRMWARE=""CONFIG_OF_FLATTREE=yCONFIG_OF_DYNAMIC=yCONFIG_OF_DEVICE=yCONFIG_OF_GPIO=yCONFIG_XILINX_DRIVERS=yCONFIG_NEED_XILINX_LLDMA=yCONFIG_HAVE_IDE=yCONFIG_SCSI_MOD=yCONFIG_NETDEVICES=yCONFIG_NETDEV_1000=yCONFIG_XILINX_LLTEMAC=y CONFIG_XILINX_LLTEMAC_MARVELL_88E1111_GMII=y CONFIG_INPUT=yCONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768CONFIG_SERIO=yCONFIG_SERIO_SERPORT=yCONFIG_VT=yCONFIG_CONSOLE_TRANSLATIONS=yCONFIG_VT_CONSOLE=yCONFIG_HW_CONSOLE=yCONFIG_DEVKMEM=yCONFIG_SERIAL_UARTLITE=y CONFIG_SERIAL_UARTLITE_CONSOLE=yCONFIG_SERIAL_CORE=yCONFIG_SERIAL_CORE_CONSOLE=yCONFIG_UNIX98_PTYS=y CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y CONFIG_ARCH_REQUIRE_GPIOLIB=yCONFIG_GPIOLIB=yCONFIG_GPIO_SYSFS=yCONFIG_GPIO_XILINX=yCONFIG_SSB_POSSIBLE=yCONFIG_DUMMY_CONSOLE=yCONFIG_XILINX_EDK=yCONFIG_UIO=yCONFIG_UIO_PDRV=yCONFIG_UIO_PDRV_GENIRQ=yCONFIG_FILE_LOCKING=yCONFIG_PROC_FS=yCONFIG_PROC_SYSCTL=yCONFIG_PROC_PAGE_MONITOR=yCONFIG_SYSFS=yCONFIG_CONFIGFS_FS=yCONFIG_NETWORK_FILESYSTEMS=yCONFIG_NFS_FS=yCONFIG_NFS_V3=yCONFIG_ROOT_NFS=yCONFIG_LOCKD=yCONFIG_LOCKD_V4=yCONFIG_NFS_COMMON=yCONFIG_SUNRPC=yCONFIG_MSDOS_PARTITION=yCONFIG_BITREVERSE=yCONFIG_GENERIC_FIND_LAST_BIT=yCONFIG_CRC_CCITT=yCONFIG_CRC32=yCONFIG_HAS_IOMEM=yCONFIG_HAS_IOPORT=yCONFIG_HAS_DMA=yCONFIG_HAVE_LMB=yCONFIG_NLATTR=yCONFIG_GENERIC_ATOMIC64=yCONFIG_PRINTK_TIME=yCONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=yCONFIG_FRAME_WARN=1024CONFIG_DEBUG_BUGVERBOSE=yCONFIG_DEBUG_MEMORY_INIT=y CONFIG_RCU_CPU_STALL_DETECTOR=y CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_TRACING_SUPPORT=yCONFIG_HAVE_ARCH_KGDB=yCONFIG_PPC_WERROR=yCONFIG_PRINT_STACK_DEPTH=64 CONFIG_DEFAULT_SECURITY_DAC=y CONFIG_DEFAULT_SECURITY=""CONFIG_CRYPTO=yCONFIG_CRYPTO_ALGAPI=yCONFIG_CRYPTO_ALGAPI2=yCONFIG_CRYPTO_RNG=yCONFIG_CRYPTO_RNG2=yCONFIG_CRYPTO_AES=yCONFIG_CRYPTO_ANSI_CPRNG=y
Signature · 2 lines
Guillaume Dargaud http://www.gdargaud.net/
Re: Initial kernel command string (Was: Generating elf kernel ?)
Quoted 7 lines · Guillaume Dargaud
Thanks for helping about the elf issue, I got it running. The problem was that I wasn't using the proper file produced by make !
Now I have a strange and probably simple problem that the Initial kernel command string is incorrect. I want, and I have set in the .config:
CONFIG_CMDLINE="console=ttyUL0,115200rw root=/dev/nfs ip=bootp"
I think you should modify the bootargs on your dts.
------
chosen {
bootargs = "console=ttyS0 root=/dev/ram";
linux,stdout-path = "/plb@0/serial@83e00000";
} ;Quoted 4 lines
But when my kernel boots it uses:
console=ttyUL0 root=/dev/ram
Quoted 8 lines
I can check:
stringsarch/powerpc/boot/simpleImage.virtex405-ml405.elf| grep console Vconsole=ttyUL0 root=/dev/ramAlso my previous kernel would wait for 2 seconds at the beginning to allow me to change the initial command string via the serial port, but now it just runs right through. How can I enable this option ?
It's possible on PowerPC kernel :)
You can take a look at the file, arch/powerpc/boot/main.c.
------
static void prep_cmdline(void *chosen)
{
if (cmdline[0] == '\0')
getprop(chosen, "bootargs", cmdline, COMMAND_LINE_SIZE-1);
printf("\n\rLinux/PowerPC load: %s", cmdline);
/* If possible, edit the command line */
if (console_ops.edit_cmdline)
console_ops.edit_cmdline(cmdline, COMMAND_LINE_SIZE);
printf("\n\r");.......
So you have to define one function, console_ops.edit_cmdline --> serial_edit_cmdline. Or you can try bind this to your boot console ops directly. Please refer to the file, arch/powerpc/boot/serial.c.
Cheers!
Tiejun
Quoted 267 lines
On the plus side it boots in .5 seconds !
Here's my .config:
CONFIG_40x=y
CONFIG_4xx=yCONFIG_PPC_MMU_NOHASH=yCONFIG_PPC_MMU_NOHASH_32=yCONFIG_NOT_COHERENT_CACHE=yCONFIG_PPC32=yCONFIG_WORD_SIZE=32CONFIG_MMU=yCONFIG_GENERIC_CMOS_UPDATE=yCONFIG_GENERIC_TIME=yCONFIG_GENERIC_TIME_VSYSCALL=yCONFIG_GENERIC_CLOCKEVENTS=yCONFIG_GENERIC_HARDIRQS=yCONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=yCONFIG_IRQ_PER_CPU=yCONFIG_NR_IRQS=512CONFIG_STACKTRACE_SUPPORT=yCONFIG_HAVE_LATENCYTOP_SUPPORT=yCONFIG_TRACE_IRQFLAGS_SUPPORT=yCONFIG_LOCKDEP_SUPPORT=yCONFIG_RWSEM_XCHGADD_ALGORITHM=yCONFIG_ARCH_HAS_ILOG2_U32=yCONFIG_GENERIC_HWEIGHT=yCONFIG_GENERIC_FIND_NEXT_BIT=yCONFIG_GENERIC_GPIO=yCONFIG_PPC=yCONFIG_EARLY_PRINTK=yCONFIG_GENERIC_NVRAM=yCONFIG_SCHED_OMIT_FRAME_POINTER=yCONFIG_ARCH_MAY_HAVE_PC_FDC=yCONFIG_PPC_OF=yCONFIG_OF=yCONFIG_PPC_UDBG_16550=yCONFIG_AUDIT_ARCH=yCONFIG_GENERIC_BUG=yCONFIG_DTC=yCONFIG_DEFAULT_UIMAGE=yCONFIG_ARCH_HIBERNATION_POSSIBLE=yCONFIG_PPC_DCR_NATIVE=yCONFIG_PPC_DCR_MMIO=yCONFIG_PPC_DCR=yCONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=yCONFIG_PPC_ADV_DEBUG_REGS=yCONFIG_PPC_ADV_DEBUG_IACS=2CONFIG_PPC_ADV_DEBUG_DACS=2CONFIG_PPC_ADV_DEBUG_DVCS=0CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"CONFIG_CONSTRUCTORS=yCONFIG_EXPERIMENTAL=yCONFIG_BROKEN_ON_SMP=yCONFIG_INIT_ENV_ARG_LIMIT=32CONFIG_LOCALVERSION=""CONFIG_TREE_RCU=yCONFIG_RCU_FANOUT=32CONFIG_IKCONFIG=yCONFIG_IKCONFIG_PROC=yCONFIG_LOG_BUF_SHIFT=14CONFIG_NAMESPACES=yCONFIG_CC_OPTIMIZE_FOR_SIZE=yCONFIG_SYSCTL=yCONFIG_ANON_INODES=yCONFIG_SYSCTL_SYSCALL=yCONFIG_KALLSYMS=yCONFIG_HOTPLUG=yCONFIG_PRINTK=yCONFIG_BUG=yCONFIG_ELF_CORE=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_EPOLL=yCONFIG_SIGNALFD=yCONFIG_TIMERFD=yCONFIG_EVENTFD=yCONFIG_SHMEM=yCONFIG_AIO=yCONFIG_HAVE_PERF_EVENTS=yCONFIG_PERF_EVENTS=yCONFIG_VM_EVENT_COUNTERS=yCONFIG_COMPAT_BRK=yCONFIG_SLAB=yCONFIG_HAVE_OPROFILE=yCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=yCONFIG_HAVE_IOREMAP_PROT=yCONFIG_HAVE_KPROBES=yCONFIG_HAVE_KRETPROBES=yCONFIG_HAVE_ARCH_TRACEHOOK=yCONFIG_HAVE_DMA_ATTRS=yCONFIG_HAVE_DMA_API_DEBUG=yCONFIG_SLABINFO=yCONFIG_RT_MUTEXES=yCONFIG_BASE_SMALL=0CONFIG_MODULES=yCONFIG_MODULE_UNLOAD=yCONFIG_MODULE_FORCE_UNLOAD=yCONFIG_BLOCK=yCONFIG_IOSCHED_NOOP=yCONFIG_IOSCHED_DEADLINE=yCONFIG_IOSCHED_CFQ=yCONFIG_DEFAULT_CFQ=yCONFIG_DEFAULT_IOSCHED="cfq"CONFIG_INLINE_SPIN_UNLOCK=yCONFIG_INLINE_SPIN_UNLOCK_IRQ=yCONFIG_INLINE_READ_UNLOCK=yCONFIG_INLINE_READ_UNLOCK_IRQ=yCONFIG_INLINE_WRITE_UNLOCK=yCONFIG_INLINE_WRITE_UNLOCK_IRQ=y
CONFIG_PPC4xx_GPIO=yCONFIG_XILINX_VIRTEX=yCONFIG_XILINX_VIRTEX_GENERIC_BOARD=yCONFIG_PPC40x_SIMPLE=yCONFIG_XILINX_VIRTEX_II_PRO=yCONFIG_XILINX_VIRTEX_4_FX=yCONFIG_IBM405_ERR77=yCONFIG_IBM405_ERR51=yCONFIG_SIMPLE_GPIO=yCONFIG_GENERIC_CLOCKEVENTS_BUILD=yCONFIG_HZ_250=yCONFIG_HZ=250CONFIG_PREEMPT_VOLUNTARY=yCONFIG_BINFMT_ELF=yCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=yCONFIG_ARCH_HAS_WALK_MEMORY=yCONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=yCONFIG_SPARSE_IRQ=yCONFIG_MAX_ACTIVE_REGIONS=32CONFIG_ARCH_FLATMEM_ENABLE=yCONFIG_ARCH_POPULATES_NODE_MAP=yCONFIG_SELECT_MEMORY_MODEL=yCONFIG_FLATMEM_MANUAL=yCONFIG_FLATMEM=yCONFIG_FLAT_NODE_MEM_MAP=yCONFIG_PAGEFLAGS_EXTENDED=yCONFIG_SPLIT_PTLOCK_CPUS=4CONFIG_ZONE_DMA_FLAG=1CONFIG_BOUNCE=yCONFIG_VIRT_TO_BUS=yCONFIG_DEFAULT_MMAP_MIN_ADDR=4096CONFIG_PPC_4K_PAGES=yCONFIG_FORCE_MAX_ZONEORDER=11CONFIG_PROC_DEVICETREE=yCONFIG_CMDLINE_BOOL=yCONFIG_CMDLINE="console=ttyUL0,115200rw root=/dev/nfs ip=bootp"CONFIG_EXTRA_TARGETS=""CONFIG_ISA_DMA_API=yCONFIG_ZONE_DMA=yCONFIG_NEED_DMA_MAP_STATE=y
CONFIG_4xx_SOC=yCONFIG_PPC_PCI_CHOICE=yCONFIG_ADVANCED_OPTIONS=yCONFIG_LOWMEM_SIZE=0x30000000CONFIG_PAGE_OFFSET=0xc0000000CONFIG_KERNEL_START=0xc0000000CONFIG_PHYSICAL_START=0x00000000CONFIG_TASK_SIZE=0xc0000000CONFIG_CONSISTENT_SIZE=0x00200000CONFIG_NET=yCONFIG_PACKET=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_FIB_HASH=yCONFIG_IP_PNP=yCONFIG_IP_PNP_DHCP=yCONFIG_IP_PNP_BOOTP=yCONFIG_INET_DIAG=yCONFIG_INET_TCP_DIAG=yCONFIG_TCP_CONG_CUBIC=yCONFIG_DEFAULT_TCP_CONG="cubic"CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"CONFIG_STANDALONE=yCONFIG_PREVENT_FIRMWARE_BUILD=yCONFIG_FW_LOADER=yCONFIG_FIRMWARE_IN_KERNEL=yCONFIG_EXTRA_FIRMWARE=""CONFIG_OF_FLATTREE=yCONFIG_OF_DYNAMIC=yCONFIG_OF_DEVICE=yCONFIG_OF_GPIO=yCONFIG_XILINX_DRIVERS=yCONFIG_NEED_XILINX_LLDMA=yCONFIG_HAVE_IDE=yCONFIG_SCSI_MOD=yCONFIG_NETDEVICES=yCONFIG_NETDEV_1000=yCONFIG_XILINX_LLTEMAC=yCONFIG_XILINX_LLTEMAC_MARVELL_88E1111_GMII=yCONFIG_INPUT=yCONFIG_INPUT_MOUSEDEV=yCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768CONFIG_SERIO=yCONFIG_SERIO_SERPORT=yCONFIG_VT=yCONFIG_CONSOLE_TRANSLATIONS=yCONFIG_VT_CONSOLE=yCONFIG_HW_CONSOLE=yCONFIG_DEVKMEM=yCONFIG_SERIAL_UARTLITE=yCONFIG_SERIAL_UARTLITE_CONSOLE=yCONFIG_SERIAL_CORE=yCONFIG_SERIAL_CORE_CONSOLE=yCONFIG_UNIX98_PTYS=yCONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=yCONFIG_ARCH_REQUIRE_GPIOLIB=yCONFIG_GPIOLIB=yCONFIG_GPIO_SYSFS=yCONFIG_GPIO_XILINX=yCONFIG_SSB_POSSIBLE=yCONFIG_DUMMY_CONSOLE=yCONFIG_XILINX_EDK=yCONFIG_UIO=yCONFIG_UIO_PDRV=yCONFIG_UIO_PDRV_GENIRQ=yCONFIG_FILE_LOCKING=yCONFIG_PROC_FS=yCONFIG_PROC_SYSCTL=yCONFIG_PROC_PAGE_MONITOR=yCONFIG_SYSFS=yCONFIG_CONFIGFS_FS=yCONFIG_NETWORK_FILESYSTEMS=yCONFIG_NFS_FS=yCONFIG_NFS_V3=yCONFIG_ROOT_NFS=yCONFIG_LOCKD=yCONFIG_LOCKD_V4=yCONFIG_NFS_COMMON=yCONFIG_SUNRPC=yCONFIG_MSDOS_PARTITION=yCONFIG_BITREVERSE=yCONFIG_GENERIC_FIND_LAST_BIT=yCONFIG_CRC_CCITT=yCONFIG_CRC32=yCONFIG_HAS_IOMEM=yCONFIG_HAS_IOPORT=yCONFIG_HAS_DMA=yCONFIG_HAVE_LMB=yCONFIG_NLATTR=yCONFIG_GENERIC_ATOMIC64=yCONFIG_PRINTK_TIME=yCONFIG_ENABLE_WARN_DEPRECATED=yCONFIG_ENABLE_MUST_CHECK=yCONFIG_FRAME_WARN=1024CONFIG_DEBUG_BUGVERBOSE=yCONFIG_DEBUG_MEMORY_INIT=yCONFIG_RCU_CPU_STALL_DETECTOR=yCONFIG_SYSCTL_SYSCALL_CHECK=yCONFIG_HAVE_FUNCTION_TRACER=yCONFIG_HAVE_FUNCTION_GRAPH_TRACER=yCONFIG_HAVE_DYNAMIC_FTRACE=yCONFIG_HAVE_FTRACE_MCOUNT_RECORD=yCONFIG_TRACING_SUPPORT=yCONFIG_HAVE_ARCH_KGDB=yCONFIG_PPC_WERROR=yCONFIG_PRINT_STACK_DEPTH=64CONFIG_DEFAULT_SECURITY_DAC=yCONFIG_DEFAULT_SECURITY=""CONFIG_CRYPTO=yCONFIG_CRYPTO_ALGAPI=yCONFIG_CRYPTO_ALGAPI2=yCONFIG_CRYPTO_RNG=yCONFIG_CRYPTO_RNG2=yCONFIG_CRYPTO_AES=yCONFIG_CRYPTO_ANSI_CPRNG=y
Quoted 6 lines · On Fri, 17 Sep 2010 09:58:41 +0800 "tiejun.chen" <[email protected]>…
Quoted 2 lines · Scott Wood
The guest OS *is* the same as native Linux, as far as TLB handling is concerned.
Looks you means the TLB exception handler should be same between the native and the guest OS. Right?
Yes.
Quoted 2 lines
Here I assume we're talking about e500mc since as far as I know for Freescale only e500mc is designed to support virtual machine based on ISA 2.0.6.
Yes, though there's nothing preventing virtualization on cores without category E.HV (KVM supports this) -- it's just slower.
Quoted 5 lines
I also know all TLB exceptions can direct to the guest OS when we enable EPCR[DTLBGS|ITLBGS|DSIGS|ISIGS]. But some TLB instructions (i.e. tlbwe )are the privileged instructions. So the guest OS always trap into the hypervisor and then the hypervisor should complete the real action with appropriate physical address.
Yes, of course. But that's not the point. I was just using it as a convenient example because that's what I've recently done ELF loading with... There's no reason U-Boot couldn't do the same if its ELF loader were updated to support device trees. Currently U-Boot loads bootwrapperless uImages to physical address zero.
And FWIW, we have run setups where our hv loads Linux to true physical zero (with the hv living elsewhere), not just guest physical.
-Scott
Quoted 10 lines · Scott Wood
Quoted 5 lines · On Fri, 17 Sep 2010 09:58:41 +0800 "tiejun.chen" <[email protected]>…
Quoted 2 lines · Scott Wood
The guest OS *is* the same as native Linux, as far as TLB handling is concerned.
Looks you means the TLB exception handler should be same between the native and the guest OS. Right?
Yes.
I don't think so. The HY should assist the guest OS on MMU since I already point the guest OS have no authority to create a real TLB directly as I previously said.
Quoted 6 lines
Quoted 3 lines
Here I assume we're talking about e500mc since as far as I know for Freescale only e500mc is designed to support virtual machine based on ISA 2.0.6.
Yes, though there's nothing preventing virtualization on cores without category E.HV (KVM supports this) -- it's just slower.
Absolutely.
Quoted 7 lines
Quoted 6 lines
I also know all TLB exceptions can direct to the guest OS when we enable EPCR[DTLBGS|ITLBGS|DSIGS|ISIGS]. But some TLB instructions (i.e. tlbwe )are the privileged instructions. So the guest OS always trap into the hypervisor and then the hypervisor should complete the real action with appropriate physical address.
Quoted 5 lines
Yes, of course. But that's not the point. I was just using it as a convenient example because that's what I've recently done ELF loading with... There's no reason U-Boot couldn't do the same if its ELF loader were updated to support device trees. Currently U-Boot loads bootwrapperless uImages to physical address zero.
I never doubt the U-boot can do this for uImage. But I think we're always talking about vmlinux, a bare Image.
Here you already assume so many conditions for vmlinux before we were discussing. Such as bootwrapperlee uImage, its ELF loader can update/support dtb, the HY... I think this is just why I say we cannot boot vmlinux based on common boot loader if only change entry point of vmlinux.
Quoted 3 lines
And FWIW, we have run setups where our hv loads Linux to true physical zero (with the hv living elsewhere), not just guest physical.
That's true. The HY should be allowed to access any address.
Best Regards
Tiejun
Quoted 4 lines
-Scott
Re: Initial kernel command string (Was: Generating elf kernel ?)
In reply to tiejun.chenQuoted 6 lines
I think you should modify the bootargs on your dts.
------chosen { bootargs = "console=ttyS0 root=/dev/ram"; linux,stdout-path = "/plb@0/serial@83e00000"; } ;
Thanks, that worked great, I now have a fully bootable not only kernel, but full OS as well.
Quoted 18 lines
Quoted 3 lines
Also my previous kernel would wait for 2 seconds at the beginning to allow me to change the initial command string via the serial port, but now it just runs right through. How can I enable this option ?
It's possible on PowerPC kernel :)
You can take a look at the file,
arch/powerpc/boot/main.c.
------
static voidprep_cmdline(void *chosen){ if (cmdline[0] == '\0') getprop(chosen, "bootargs", cmdline, COMMAND_LINE_SIZE-1); printf("\n\rLinux/PowerPC load: %s", cmdline); /* If possible, edit the command line */ if (console_ops.edit_cmdline) console_ops.edit_cmdline(cmdline, COMMAND_LINE_SIZE); printf("\n\r");
Quoted 6 lines
.......
So you have to define one function, console_ops.edit_cmdline -->
serial_edit_cmdline. Or you can try bind this to your boot console ops directly. Please refer to the file,arch/powerpc/boot/serial.c.
So I forced
console_ops.edit_cmdline = serial_edit_cmdline;
in serial.c, bu that didn't do the trick...
Signature · 2 lines
Guillaume Dargaud http://www.gdargaud.net/
Re: Initial kernel command string (Was: Generating elf kernel ?)
Quoted 9 lines · Guillaume Dargaud
Quoted 6 lines
I think you should modify the bootargs on your dts.
------chosen { bootargs = "console=ttyS0 root=/dev/ram"; linux,stdout-path = "/plb@0/serial@83e00000"; } ;Thanks, that worked great, I now have a fully bootable not only kernel, but full OS as well.
Sounds good :)
Quoted 21 lines
Quoted 21 lines
Quoted 4 lines
Also my previous kernel would wait for 2 seconds at the beginning to allow me to change the initial command string via the serial port, but now it just runs right through. How can I enable this option ?
It's possible on PowerPC kernel :)
You can take a look at the file,
arch/powerpc/boot/main.c.
------
static voidprep_cmdline(void *chosen){ if (cmdline[0] == '\0') getprop(chosen, "bootargs", cmdline, COMMAND_LINE_SIZE-1); printf("\n\rLinux/PowerPC load: %s", cmdline); /* If possible, edit the command line */ if (console_ops.edit_cmdline) console_ops.edit_cmdline(cmdline, COMMAND_LINE_SIZE); printf("\n\r");.......
Quoted 7 lines
Quoted 3 lines
So you have to define one function, console_ops.edit_cmdline -->
serial_edit_cmdline. Or you can try bind this to your boot console ops directly. Please refer to the file,arch/powerpc/boot/serial.c.So I forced
console_ops.edit_cmdline =serial_edit_cmdline;
inserial.c, bu that didn't do the trick...
Where are/how do your way implement? Can you paste your code sections here?
If I remember ML405 properly the serial port should be compliant to ns16550. So I think the sub-functions, putc()/getc()/tstc(), should be from the file, arch/powerpc/boot/ns16550.c. If so it's fine.
Maybe you can add some extra printf() into the function, serial_edit_cmdline, to track this in detail.
Cheers
Tiejun
Quoted 7 lines · On Sun, 19 Sep 2010 09:40:15 +0800 "tiejun.chen" <[email protected]>…
Quoted 6 lines · Scott Wood
Quoted 3 lines · On Fri, 17 Sep 2010 09:58:41 +0800 "tiejun.chen" <[email protected]>…
Quoted 2 lines · Scott Wood
The guest OS *is* the same as native Linux, as far as TLB handling is concerned.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Looks you means the TLB exception handler should be same between the native and the guest OS. Right?
Yes.
I don't think so. The HY should assist the guest OS on MMU since I already point the guest OS have no authority to create a real TLB directly as I previously said.
Of course the hypervisor assists, when a trap is taken. That doesn't mean the code is any different in the guest.
Quoted 8 lines
Quoted 5 lines
Yes, of course. But that's not the point. I was just using it as a convenient example because that's what I've recently done ELF loading with... There's no reason U-Boot couldn't do the same if its ELF loader were updated to support device trees. Currently U-Boot loads bootwrapperless uImages to physical address zero.
I never doubt the U-boot can do this for uImage. But I think we're always talking about vmlinux, a bare Image.
uImage is pretty much a bare image. It just has a header with a checksum and some info like OS/architecture, kernel version, build date, etc.
There would be *no* problem doing this with vmlinux in U-Boot if someone put in the code to pass a device tree.
-Scott
Quoted 22 lines
-----Original Message-----
From: Scott Wood [mailto:[email protected]]=20
Sent: Monday, September 20, 2010 11:44 PM
To: Chen, Tiejun
Cc: [email protected]; Guillaume Dargaud
Subject: Re: Generating elf kernel ?
=20
On Sun, 19 Sep 2010 09:40:15 +0800 "tiejun.chen" <[email protected]> wrote:
=20Quoted 6 lines
Quoted 5 lines · Scott Wood
On Fri, 17 Sep 2010 09:58:41 +0800
"tiejun.chen" <[email protected]> wrote:
=20Quoted 2 lines
Quoted 1 line · Scott Wood
The guest OS *is* the same as native Linux, as far as=20
TLB handling=20
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
is concerned.
Looks you means the TLB exception handler should be same between=20 the native and the guest OS. Right?
=20
Yes.
Quoted 7 lines
Quoted 3 lines
=20
I don't think so. The HY should assist the guest OS on MMU since I=20 already point the guest OS have no authority to create a=20real TLB directly as I previously said.
=20
Of course the hypervisor assists, when a trap is taken. That=20 doesn't mean the code is any different in the guest.
This should be depend on the hypervisor design implementation. I think your=20
option should be based on the Freescale hypervisor.
Quoted 7 lines
=20
Quoted 1 line
Quoted 1 line
Yes, of course. But that's not the point. I was just=20
using it as a=20
Quoted 4 lines
Quoted 4 lines
convenient example because that's what I've recently done ELF=20 loading with... There's no reason U-Boot couldn't do the same if=20 its ELF loader were updated to support device trees. Currently=20 U-Boot loads bootwrapperless uImages to physical address zero.
Quoted 7 lines
Quoted 3 lines
=20
I never doubt the U-boot can do this for uImage. But I think we're=20 always talking about vmlinux, a bare Image.=20
uImage is pretty much a bare image. It just has a header=20 with a checksum and some info like OS/architecture, kernel=20 version, build date, etc.
Yes. But it also inlcude load address and entry point used to u-boot.
Quoted 3 lines
=20
There would be *no* problem doing this with vmlinux in U-Boot=20 if someone put in the code to pass a device tree.
This is just I always emphasize previously.
Cheers
Tiejun
Quoted 4 lines
=20
-Scott
=20
=20
Quoted 3 lines · Tiejun
This should be depend on the hypervisor design implementation. I think your
option should be based on the Freescale hypervisor.
Again, I was giving an example, about ELF loading. I was not making any claims about what all hypervisors do. :-P
-Scott
Quoted 10 lines
-----Original Message-----
From: Scott Wood [mailto:[email protected]]=20
Sent: Wednesday, September 22, 2010 1:00 AM
To: Chen, Tiejun
Cc: [email protected]; Guillaume Dargaud
Subject: Re: Generating elf kernel ?
=20
On Tue, 21 Sep 2010 03:00:40 +0200
"Chen, Tiejun" <[email protected]> wrote:
=20
Quoted 7 lines
Quoted 1 line
This should be depend on the hypervisor design=20
implementation. I think=20
Quoted 1 line
your option should be based on the Freescale hypervisor.
=20
Again, I was giving an example, about ELF loading. I was not=20 making any claims about what all hypervisors do. :-P =20
When I'm free I'd like to track the Freescale hypervisor codes.=20
Thanks
Tiejun
Quoted 3 lines
-Scott
=20
=20