Hi Philip,

> From: U-Boot <u-boot-boun...@lists.denx.de> On Behalf Of Bernard, Philip
> Sent: Thursday, February 23, 2023 9:21 AM
> To: u-boot@lists.denx.de
> Subject: Boot from 64-bit memory address?
>
> Hi,
>
> Is it possible to boot from a DRAM memory address beyond the 32-bit boundary? 
> I'm trying to configure a new RISC-V board which has 2GB of DRAM starting at 
> offset 0x40_0000_0000. I started from the settings for an existing RISC-V 
> board and made

I think it is possible to boot from a DRAM memory beyond the 32-bit
boundary. But maybe you need to modify some code to achieve that.
I have tried to boot an internal AE350-like platform whose DRAM base
is at 0x400000000.

adjustments for my HW, but when I try to boot, I run into an "out of
memory" error.
>
> From 
> https://u-boot.readthedocs.io/en/latest/develop/uefi/u-boot_on_efi.html#tables
>  I noticed that U-Boot will only use "conventional" memory which is 4GB and 
> below, so it seems like this may not be possible? Looking through the repo, I 
> also noticed that nearly every device is configuring settings like 
> CONFIG_SYS_LOAD_ADDR with a 32-bit value, so I haven't found any examples to 
> emulate for my use case.

CONFIG_SYS_LOAD_ADDR is not important. Maybe you shall notice
CONFIG_SYS_TEXT_BASE and CONFIG_SPL_OPENSBI_LOAD_ADDR which will be
parsed from binman.dtsi
You can change them like this:
load = /bits/64 <CONFIG_SYS_TEXT_BASE>;
load = /bits/64 <CONFIG_SPL_OPENSBI_LOAD_ADDR>;

>
> I'm hoping someone knows the mistake I'm making or can confirm that this 
> isn't possible. Appreciate the help.
>
> Best,
> Phil
>
>
> Below is the output from U-Boot:
>
> U-Boot SPL 2022.07 (Feb 23 2023 - 00:50:44 +0000) Trying to boot from RAM
>
> OpenSBI v1.1
>    ____                    _____ ____ _____
>   / __ \                  / ____|  _ \_   _|
> | |  | |_ __   ___ _ __ | (___ | |_) || |
> | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | | __| | |_) |  __/ | | |____) |
> | ||_) || |_
>   \____/| .__/ \___|_| |_|_____/|____/_____|
>         | |
>         |_|
>
> Platform Name             : test,test
> Platform Features         : medeleg
> Platform HART Count       : 1
> Platform IPI Device       : aclint-mswi
> Platform Timer Device     : aclint-mtimer @ 1000000Hz
> Platform Console Device   : uart8250
> Platform HSM Device       : ---
> Platform Reboot Device    : ---
> Platform Shutdown Device  : ---
> Firmware Base             : 0x80000000
> Firmware Size             : 276 KB
> Runtime SBI Version       : 1.0
>
> Domain0 Name              : root
> Domain0 Boot HART         : 0
> Domain0 HARTs             : 0*
> Domain0 Region00          : 0x0000000002000000-0x000000000200ffff (I)
> Domain0 Region01          : 0x0000000080000000-0x000000008007ffff ()
> Domain0 Region02          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
> Domain0 Next Address      : 0x0000004001200000
> Domain0 Next Arg1         : 0x0000004001267830
> Domain0 Next Mode         : S-mode
> Domain0 SysReset          : yes
>
> Boot HART ID              : 0
> Boot HART Domain          : root
> Boot HART Priv Version    : v1.10
> Boot HART Base ISA        : rv64imafdcb
> Boot HART ISA Extensions  : time
> Boot HART PMP Count       : 8
> Boot HART PMP Granularity : 4
> Boot HART PMP Address Bits: 54
> Boot HART MHPM Count      : 0
> Boot HART MIDELEG         : 0x0000000000000222
> Boot HART MEDELEG         : 0x000000000000b109
>
>
> U-Boot 2022.07 (Feb 23 2023 - 00:50:44 +0000)
>
> CPU:   rv64imafdc
> Model: test,test
> DRAM:  2 GiB
> Core:  11 devices, 8 uclasses, devicetree: separate
> ERROR: Out of memory
> Loading Environment from nowhere... OK
> In:    serial@131400000
> Out:   serial@131400000
> Err:   serial@131400000
> Model: test,test
> Net:   No ethernet found.
> Hit any key to stop autoboot:  0
> Moving Image from 0x4006000000 to 0x4000200000, end=4000b01c8c ## Flattened 
> Device Tree blob at ff76a1d0
>    Booting using the fdt blob at 0xff76a1d0
> ERROR: Failed to allocate 0x1000000 bytes below 0x100000000.

Can you dig in where to print this ERROR ?

Thanks,
Rick

> ramdisk - allocation error

Reply via email to