From: Oleksij Rempel <linux@rempel-privat.de>
To: "Gaël PORTAY" <gael.portay@savoirfairelinux.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 0/2] readline_simple: return -1 if getc fails
Date: Wed, 9 Aug 2017 21:41:36 +0200 [thread overview]
Message-ID: <f5129a96-709e-da38-0453-78e424a3dc5d@rempel-privat.de> (raw)
In-Reply-To: <20170809185853.lvlar7vyder6supt@gportay>
[-- Attachment #1.1.1: Type: text/plain, Size: 2291 bytes --]
Am 09.08.2017 um 20:58 schrieb Gaël PORTAY:
> Hi,
>
> On Wed, Aug 09, 2017 at 08:05:57AM +0200, Oleksij Rempel wrote:
>> Am 09.08.2017 um 06:13 schrieb Gaël PORTAY:
>>> Dear maintainers,
>>>
>>> I came accross this issue when I was trying to add support for a new MIPS
>>> board.
>>
>> Just out of curiosity, what MIPS board are you working on? If it is not
>> a secret :)
>>
>
> I am working on VoCore2[1]; it is a board based on a mediatek mt7628 CPU.
>
> I am doing this to learn myself how works barebox
>
> Offtopic: For now it is booting on a really really old version of u-boot. I am
> able de boot barebox from u-boot. I had to hack the mips_disable_interrupts to
> remove the reset of flag ERL in CP0; but I don't know why yet. This flag is
> supposed to be set when CPU reboots; but because I am running barebox from a the
> command go of u-boot, this flag is unset.
>
> Are you able to re-run barebox from barebox on your MIPS board?
Yes, usually i prefer to make a binaries wich are able to start from
RAM, Jtag and Flash. Currently we test if it is running from spi flash
adn skip most of the low level init:
https://github.com/olerem/barebox/blob/ar9344-2017.08.01.1/arch/mips/boards/tplink-mr3020/include/board/board_pbl_start.h#L29
On this board i decided to use SRAM for low level init testing:
https://github.com/olerem/barebox/blob/ar9344-2017.08.01.1/arch/mips/boards/tplink-wdr4300/include/board/board_pbl_start.h#L38
> .macro mips_disable_interrupts
> .set push
> .set noreorder
> mfc0 k0, CP0_STATUS
> - li k1, ~(ST0_ERL | ST0_IE)
> + li k1, ~ST0_IE
> and k0, k1
> mtc0 k0, CP0_STATUS
> .set pop
> .endm
>
> For now, I have splitted mips_disable_interrupts into two macros. The second
> macro mips_reset_error_level checks if the ERL flag is armed before resetting it
> to 0.
>
> .macro mips_reset_error_level
> .set push
> .set noreorder
> mfc0 k0, CP0_STATUS
> li k1, ST0_ERL
> and k1, k0
> bne k1, zero, 1f
> li k1, ~(ST0_ERL)
> and k0, k1
> mtc0 k0, CP0_STATUS
> 1: .set pop
> .endm
>
> But I don't know if this is the right thing to do.
>
> [1]: https://www.indiegogo.com/projects/vocore2-4-coin-sized-linux-computer-with-wifi#/
>
--
Regards,
Oleksij
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2017-08-09 19:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 4:13 Gaël PORTAY
2017-08-09 4:13 ` [PATCH v2 1/2] " Gaël PORTAY
2017-08-09 4:13 ` [PATCH v2 2/2] readline_simple: remove obsolete documentation Gaël PORTAY
2017-08-09 6:05 ` [PATCH 0/2] readline_simple: return -1 if getc fails Oleksij Rempel
2017-08-09 18:58 ` Gaël PORTAY
2017-08-09 19:41 ` Oleksij Rempel [this message]
2017-08-10 5:51 ` Antony Pavlov
-- strict thread matches above, loose matches on Subject: below --
2017-08-07 22:10 Gaël PORTAY
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f5129a96-709e-da38-0453-78e424a3dc5d@rempel-privat.de \
--to=linux@rempel-privat.de \
--cc=barebox@lists.infradead.org \
--cc=gael.portay@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox