Hello,
Ralf Ramsauer <[email protected]> wrote:
> Hi Hans,
> hi all,
>
> is the inmate actually supposed to run on bare-metal w/o jailhouse?
It was never tested before.
>
> Correct UART consoles are set? I'd try to add a very early printk inside
> freertos just to check if that part is 'alive'. As you have already
> remarked, the UART requires clock gating on bare-metal, while we in
> Jailhouse, we may handover a gated uart device.
The UART is initialized completely by FreeRTOS itself. I do not suppose
that the UART is already working.
>
> And then there's paging: AFAIR, u-boot hands over with id-mapped paging
> enabled, didn't it? On jailhouse, we hand over with paging completely
> disabled.
Yes. I think that could be the main reason why it does not start.
FreeRTOS is configuring MMU, Caches by its own. It assumes that all this
is off when it enters the "boot_stub.S" code. It simply starts from a
Reset state. The reset vector is the entry point here. The inmate_main
only runs correctly if the stack for IRQ and privileged mode are setup
already.
>
> On 6/6/19 5:52 PM, Johannes Maisch wrote:
> > Hello,
> > thanks for your assistance. However, we can't boot freertos at the
> > moment. I adapted the linker script like this and rebuilt the
> > freertos-demo:
> >
> > ENTRY(vectors)
> >
> > SECTIONS {
> > /* jailhouse arm inmates have to start at address zero */
>
> That comment is no longer up to date - inmates don't have to start at
> zero, I added the CONFIG_INMATE_BASE option a while ago, for exactly
> this case: it allows to use the same inmates on bare-metal, as well as
> as jailhouse guests.
>
> The motivation of my patches were motivated by your exact use-case:
> Having the same inmate for both, bare-metal and in jailhouse, is ideal
> for benchmarks or comparisons.
>
> Ralf
>
> > . = 0x48000000;
> > .boot : { *(.boot) }
> >
> > . = ALIGN(4096);
> > . = . + 0x1000;
> > stack_top = .;
> > . = . + 0x1000;
> > irq_stack_top = .;
> > bss_start = .;
> > .bss : {
> > *(.bss)
> > *(COMMON)
> > }
> >
> > after that i tried to boot freertos in u-boot with the following commands:
> >
> > => load mmc 0:1 0x48000000 freertos-demo.bin
> > reading freertos-demo.bin
> > 198508 bytes read in 45 ms (4.2 MiB/s)
> > => go 0x48000000
> >
> > But the Freertos-demo still doesn't work. Is there anything else we have
> > to do?
> >
> > Johannes
> >
> >
> > Am 04.06.2019 um 12:27 schrieb Dr. Johann Pfefferl:
> >> Hello,
> >>
> >> the start address can be adapted in the linker script file
> >> "lscript.lds".
> >>
> >> The UART is initialized completely by FreeRTOS itself including the
> >> clock gating (hopefully).
> >>
> >> Hans
> >>
> >> Jan Kiszka <[email protected]> wrote:
> >>> On 04.06.19 11:09, [email protected] wrote:
> >>>> Hello,
> >>>>
> >>>> we want to do a comparison of running FreeRTOS on the Banana Pi with
> >>>> Jailhouse and running FreeRTOS bare-metal on the Banana Pi for a
> >>>> study-project at Hochschule Esslingen. We were successfull in doing
> >>>> this with the Jailhouse hypervisor, but we currently didn't find a
> >>>> way to boot FreeRTOS bare-metal on the banana pi. So our question
> >>>> is, if there's a way to boot the freertos-demo.bin from the
> >>>> freertos-cell bare-metal on the banana pi.
> >>>>
> >>> Conceptually, you need to make the demo executable at a different
> >>> physical
> >>> address (it's configured to run from address 0, but RAM starts at
> >>> 0x40000000
> >>> on the board), and then you could load it there via u-boot and jump
> >>> to it.
> >>> You also have to ensure that the demo configures its uart itself and
> >>> doesn't
> >>> rely on the root cell to do anything. I don't recall if that is
> >>> already the
> >>> case. Hans may tell more about that.
> >>>
> >>> Jan
> >>>
> >>> --
> >>> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> >>> Corporate Competence Center Embedded Linux
> >
> >
--
Siemens AG
Corporate Technology
Research & Technology Center
CT RDA IOT SES-DE
Otto-Hahn-Ring 6
81739 Muenchen, Germany
mailto: [email protected]
phone: +49 1520 3450 138
fax: +49 89 636 33045
_____________________________________________________
SIEMENS AG: Chairman of the Supervisory Board: Jim Hagemann Snabe
Managing Board: Joe Kaeser, Chairman, President and Chief Executive Officer
Roland Busch, Lisa Davis, Klaus Helmrich, Janina Kugel, Cedrik Neike,
Michael Sen, Ralf P. Thomas
Registered offices: Berlin and Munich, Germany
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/20190607073050.z6bwedzkvwvy6u5l%40jpc.jpnet.
For more options, visit https://groups.google.com/d/optout.