From owner-freebsd-arm@freebsd.org Wed Jan 25 14:53:38 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3BFCCC186B for ; Wed, 25 Jan 2017 14:53:38 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: from mail-qk0-x22a.google.com (mail-qk0-x22a.google.com [IPv6:2607:f8b0:400d:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AB96260; Wed, 25 Jan 2017 14:53:38 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: by mail-qk0-x22a.google.com with SMTP id j126so55088676qkf.1; Wed, 25 Jan 2017 06:53:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xgI8g3SR8EGSoAND2Ogc5w/j+eTp4TjuJeK2S3VY1Z8=; b=E/DCgMXxuJ4zgtxmiXgGnGa1RtF5YR+KIFwhKcVMsA6KK5xlSQPkrRk1NC+1TBlSID 82wXgCdXYxCbGfoBE8oijDlNZWvKU0XysMCleJwGTGzMhSNIO4/jliJGXgDDe73etYb9 71CtgD0M/gk6Na4OeLbq3MdB4/RVI2Rc78UigdCCclXacRyt1CsLa9LSNtbcKK2d8i/r lSfzL1PROTwHrL2xrNSNWKDnl3vQZmyjhMUo58g5p8KKUmr3y6dynkQ/PJpkWYak3lR9 aGs8xjcuSycMf1fxIrlBWER4eLkfByT6isTsKV1gthwrSCSeSDqIsq+BG18zoVKOfnPk 2khQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xgI8g3SR8EGSoAND2Ogc5w/j+eTp4TjuJeK2S3VY1Z8=; b=WGqU25DkPwCc7OVknKzQIr5j/sNAR6p38iC42fgdxYVHhdU48/g8tyBClWabMAGpL0 Z4jhp89MywhW6vq3sYSPl/nr9akt1miwFwyCeKIcVxBcmbaIHrkL3R8S1yF60lqNqH3Y 4Yklk3oCVDL330XnqeuZD0ihkqkXOuOfr3dN8qbSQFAbm8jYv1fld1IsB4Yj0gyPTLSB HiwCGE3Lo9ITS2Zc66T1SOKNJzpKW+GXca3UnVd8aV1o+CKs3PlLf6cOivofIER36S/u xbD87C7C4wzK3Fkuf3TnKUqF9hN+9iL5tfzIRA8lgBPQAzv1gmayeo8CJDtJmHev+IDG sxSg== X-Gm-Message-State: AIkVDXLd1XQYE+hHCzQVghrCtVuq9gwgJgEK8yp+6rGuOTYvWbIeZ57NQVJVOfOa2nXxui4biKTSxnU8ykpjVw== X-Received: by 10.55.121.134 with SMTP id u128mr36093025qkc.12.1485356017659; Wed, 25 Jan 2017 06:53:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.177.18 with HTTP; Wed, 25 Jan 2017 06:53:37 -0800 (PST) In-Reply-To: References: <20161212160553.dee9d435125f9c6b67355d21@bidouilliste.com> <20161215123900.f141d13bd9814d43feb3f736@bidouilliste.com> <20161215133505.a7ffa64924f3be052840b828@bidouilliste.com> <1481817793.1972.2.camel@freebsd.org> From: Mihai Carabas Date: Wed, 25 Jan 2017 16:53:37 +0200 Message-ID: Subject: Re: Cubieboard2 with custom bootloader To: Ian Lepore Cc: Emmanuel Vadot , Nicolae-Alexandru Ivan , freebsd-arm@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2017 14:53:39 -0000 Hello again, We have some trouble with writing in memory in locore-v6.S. We added the following sequence: mov r0, 1 ldr r1, =hypmode_enabled str r0, [r1] mov r0, 123 ldr r0, [r1] cmp r0, #123 beq _C_LABEL(panic) ............ _C_LABEL(hypmode_enabled): .word 0 The problem is that the flow doesn't enter on the last beq. Full code is in https://svn.grid.pub.ro/svn/bhyve-ARM/src/sys/arm/arm/locore-v6.S Does anyone have any insight about this problem? Caches could be a problem? Thank you, Mihai On Mon, Jan 9, 2017 at 4:07 PM, Mihai Carabas wrote: > Hello everyone, > > We managed to boot the Cubie2 with a custom bootloader, but we are still > having trouble in executing "hvc" instruction (it ends up with undefined > instruction in kernel). At this point I think is an SMP related issue. The > bhyvearm code was only tested on an emulated platform with one core. For > SMP there is still work that need to be done. We tried to disable the SMP > for Cubie2 but without luck. > We disabled the following options > options SMP > options PLATFORM_SMP > > But is still compiling with SMP. Do you have any insights for this? > > Thank you, > Mihai > > On Thu, Dec 15, 2016 at 6:03 PM, Ian Lepore wrote: > >> On Thu, 2016-12-15 at 13:35 +0100, Emmanuel Vadot wrote: >> > On Thu, 15 Dec 2016 14:26:48 +0200 >> > Nicolae-Alexandru Ivan wrote: >> > >> > > >> > > > >> > > > For 1 and 2, as Ganbold said ubldr is broken since clang 3.9 >> > > > import >> > > > (well only ubldr.bin for me ...) >> > > > For 3 and 4 I've never tested booting kernel directly, I'll try >> > > > that. >> > > > Does your kernel have a static dtb compiled in ? >> > > Yes, we included the device tree in the kernel binary. >> > > The options below are included in our conf. >> > > >> > > #FDT >> > > options FDT >> > > options FDT_DTB_STATIC >> > > makeoptions FDT_DTS_FILE=cubieboard2.dts >> > Oh I might now, my patches introduce a FreeBSD option for uboot that >> > disable the dcache while it's strictly disable in the ports. >> > Do a gmake menuconfig in uboot before compiling but after gmake >> > cubieboard2_defconfig to enable this. >> > >> >> It shouldn't be necessary to disable dcache, but it does need to be >> flushed before launching ubldr or the kernel; especially, it needs the >> icache sync'd. The stock uboot does the needed cache work only in the >> path that launches linux that has been packaged as an image file (and >> before launching vxworks I think). For freebsd the needed cache ops >> must be patched into two places, the bootelf path and the go path. >> >> -- Ian >> >> _______________________________________________ >> freebsd-arm@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-arm >> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >> > >