On Thu, 1 Jul 2021 at 21:54, Kent Mcleod <kent.mcleo...@gmail.com> wrote:

> On Thu, Jul 1, 2021 at 8:28 PM Robert Reid <rob.r...@ieee.org> wrote:
>
> > I am still using PS_SERIAL_DEFAULT to be the same as stdout, UART0_AO @
> 0xff803000, so safe there.
> > stdout-path was chosen via an alias: stdout-path = "serial0:115200n8";
> > serial0 = "/soc/bus@ff800000/serial@3000"
> >
> > I end up with the following in the build directory:
> > capdl_spec.c:
> > [0] = {
> > #ifdef CONFIG_DEBUG_BUILD
> > .name = "serial.serial_dev_0_data_0_obj",
> > #endif
> > .type = CDL_Frame,
> > .size_bits = 12,
> > .frame_extra = { .paddr = 0x3000,.fill = { }
> > },
> > },
> >
> > serialserver_polling.cdl:
> > serial.serial_dev_0_data_0_obj = frame (4k, paddr: 0x3000, fill: [])
> >
> > I thought there might be some issue with the relative address in the
> dts; compared to sabre.dts where a full physical address is specified.
>
> I think this would be the issue.  Looking at the implementation of
> "dtb-query-common.template.c" that is imported by
> seL4DTBHardware-to.template.c (the instantiation of which causes the
> allocation of caps based on the original dtb() property) it assumes
> that the reg property contains an absolute address. It isn't handling
> the case where the reg value inherits the parent's reg property.
>
>
Thanks Kent - your comment made me look harder at the DTS and found the reg
= < ... > line for that UART, updating 0x3000 to 0xff803000 there as well
and things are starting to look better:

Booting all finished, dropped to user space
pre_init@serial.c:501 About to init port, io_ops=0x487cf0
ps_cdev_init@chardev.c:46 About to init_fn 3
ps_cdev_init@chardev.c:47 dev_defn[3].paddr: 0xff803000, size 1000
uart_init@serial.c:51 about to chardev_map: dev=0x473948, defn->id=3,
defn->paddr=0
xff803000
chardev_map@chardev.h:26 ops->io_mapper=0x487be0 &(ops->io_mapper)=0x442728
dev->pa
ddr=0xff803000 dev->size=0x1000
uart_init@serial.c:56 chardev_map mapped page_vaddr 0x4b1000
pollcli: Hello Serial Server!

It prints fine, but not reading / filling the buffer.  So on to the next
problem, but at least it's got this far.

Thanks for the help, greatly appreciated!

Regards
Rob
_______________________________________________
Devel mailing list -- devel@sel4.systems
To unsubscribe send an email to devel-leave@sel4.systems

Reply via email to