All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mushahid Hussain <mushi.shar@gmail.com>
To: kernelnewbies@kernelnewbies.org
Subject: Loading a simple "kernel" at the address other than default on Raspberry Pi 4
Date: Tue, 2 Nov 2021 17:13:16 +0500	[thread overview]
Message-ID: <CADaYRJve0AxzvoOQ0pbO_VSwnhsq_zxN+U+JrUd0vG500M1XNQ@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1171 bytes --]

Hi,
I have written a simple kernel which prints Hello World to UART. The simple
kernel works successfully and prints Hello World to UART, if I load it at
0x80000, which is the default load address for the 64-bit kernel.

There's a configuration(config.txt)[1] kernel_address on Raspberry Pi 4 but
whenever I change the load address by even 1 byte, the simple kernel would
not run. It is only able to run at 0x80000.

I tried to find the entry address of the standard kernel for raspberry
pi[2]. I have trusted firmware-A[3] on my Raspberry Pi, which prints the
load address before loading the standard kernel. Entry address for the
standard kernel is always 0x200000! Even if I manually change the load
address in the raspberry pi configuration, the standard kernel is always
loaded at 0x200000!.

How is the standard kernel being loaded at 0x200000, but my simple kernel
cannot be loaded at any address except for the default address(0x80000)?

[1]
https://github.com/raspberrypi/documentation/blob/develop/documentation/asciidoc/computers/config_txt/boot.adoc#kernel_address

[2] https://github.com/raspberrypi/linux

[3] https://www.trustedfirmware.org/projects/tf-a/

[-- Attachment #1.2: Type: text/html, Size: 1649 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

             reply	other threads:[~2021-11-02 12:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 12:13 Mushahid Hussain [this message]
2021-11-02 20:24 ` Loading a simple "kernel" at the address other than default on Raspberry Pi 4 Paulo Miguel Almeida
2021-11-02 21:59 ` Valdis Klētnieks
2021-11-04 15:28   ` Mushahid Hussain

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=CADaYRJve0AxzvoOQ0pbO_VSwnhsq_zxN+U+JrUd0vG500M1XNQ@mail.gmail.com \
    --to=mushi.shar@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.