Makes sense. Well, everything except for the memory functions, but I can treat 
that as voodoo. 

--
Edwin (on the move)

> On Jun 8, 2015, at 7:50 AM, Jonathan Gray <j...@jsg.id.au> wrote:
> 
>> On Sat, Jun 06, 2015 at 05:21:40PM -0500, Edwin Amsler wrote:
>> Nice! Any quick tutorials and patches for us to start playing with this 
>> ourselves?
> 
> Something along the lines of:
> 
> cd /sys/arch/armv7/conf/
> config GENERIC
> cd ../compile/GENERIC
> make bsd.VEXPRESSA15.umg
> 
> $ sudo ifconfig tun0 link0
> $ sudo ifconfig bridge0 add tun0 add em0 up
> 
> sudo sh -c "qemu-system-arm -runas $USER \
> -M vexpress-a15 -nographic \
> -netdev tap,id=net0 \
> -kernel bsd.VEXPRESSA15.umg -append "sd0a" \
> -drive file=test.img,if=none,id=drive0,format=raw \
> -device virtio-scsi-device,id=scsi \
> -device scsi-hd,drive=drive0 \
> -device virtio-net-device,netdev=net0 \
> -device virtio-balloon-device \
> -device virtio-rng-device"
> 
> Index: arm/include/atomic.h
> ===================================================================
> RCS file: /cvs/src/sys/arch/arm/include/atomic.h,v
> retrieving revision 1.10
> diff -u -p -r1.10 atomic.h
> --- arm/include/atomic.h    14 Nov 2014 09:56:06 -0000    1.10
> +++ arm/include/atomic.h    8 Jun 2015 12:37:49 -0000
> @@ -193,5 +193,19 @@ atomic_clearbits_int(volatile unsigned i
>    restore_interrupts(cpsr);
> }
> 
> +#if defined(CPU_ARMv7)
> +#define __membar(_f) do { __asm __volatile(_f ::: "memory"); } while (0)
> +
> +#define membar_enter()        __membar("dmb")
> +#define membar_exit()        __membar("dmb")
> +#define membar_producer()    __membar("dmb")
> +#define membar_consumer()    __membar("dmb")
> +#define membar_sync()        __membar("dmb")
> +
> +#define virtio_membar_producer()    __membar("dmb")
> +#define virtio_membar_consumer()    __membar("dmb")
> +#define virtio_membar_sync()        __membar("dmb")
> +#endif /* CPU_ARMv7 */
> +
> #endif /* defined(_KERNEL) */
> #endif /* _ARM_ATOMIC_H_ */
> Index: armv7/conf/GENERIC
> ===================================================================
> RCS file: /cvs/src/sys/arch/armv7/conf/GENERIC,v
> retrieving revision 1.4
> diff -u -p -r1.4 GENERIC
> --- armv7/conf/GENERIC    29 May 2015 02:44:14 -0000    1.4
> +++ armv7/conf/GENERIC    8 Jun 2015 12:37:49 -0000
> @@ -99,6 +99,19 @@ usb*        at ehci?    #flags 0x1
> #ohci*        at sunxi?
> #usb*        at ohci?
> 
> +# ARM Versatile Express
> +vexpress0    at mainbus?
> +sysreg*        at vexpress?
> +pluart*        at vexpress?
> +virtio*        at vexpress?
> +
> +# virtio devices
> +vioblk*        at virtio?
> +vio*        at virtio?
> +viomb*        at virtio?
> +viornd*        at virtio?
> +vioscsi*    at virtio?
> +
> # USB bus support
> usb*        at ehci?    flags 0x1
> 

Reply via email to