All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Yinbo Zhu" <zhuyinbo@loongson.cn>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, soc@kernel.org,
	"Ulf Hansson" <ulf.hansson@linaro.org>
Cc: "Jianmin Lv" <lvjianmin@loongson.cn>,
	wanghongliang@loongson.cn, "Liu Peibao" <liupeibao@loongson.cn>,
	loongson-kernel@lists.loongnix.cn, loongarch@lists.linux.dev,
	"Liu Yun" <liuyun@loongson.cn>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>
Subject: Re: [PATCH v6 1/2] soc: dt-bindings: add loongson-2 pm
Date: Mon, 14 Aug 2023 15:41:37 +0200	[thread overview]
Message-ID: <e04cf26e-2e38-4e87-b7b4-23dafadee00d@app.fastmail.com> (raw)
In-Reply-To: <71c53c37-a0a6-6b11-31d5-4455d2309927@loongson.cn>

On Mon, Aug 14, 2023, at 13:57, Yinbo Zhu wrote:
> 在 2023/8/14 下午4:19, Arnd Bergmann 写道:
>> On Mon, Aug 14, 2023, at 09:57, Yinbo Zhu wrote:
>>> 在 2023/8/12 下午8:25, Arnd Bergmann 写道:
>>>> I found https://github.com/loongson-community/pmon source
>>>> code, and a reference to its origin at LSI Logic at
>>>> https://www.linux-mips.org/wiki/PMON but otherwise have
>>>> no idea about what this actually is, or how it relates
>>>> to your UEFI firmware. Did you add UEFI support to PMON,
>>>> or do you use it as a first stage loader that loads
>>>> the actual UEFI implementation (EDK2 or u-boot, I guess)?
>>>
>>>
>>> Pmon and uefi are two different firmware, and there is no connection
>>> between them.
>> 
>> It sounds like we still have problems with terminology. >
>> I don't think categorizing UEFI as a firmware is correct,
>
>
> Sorry to have confused you, uefi firmware is our internal name, which is
> actually what you referred to as EDK2, the EDK2 need use UEFI.

Ok

>> it's the interface used by various firmware implementations
>> to load the operating system. As far as I understand,
>> loongarch currently mandates the use of UEFI in whichever
>> firmware is used, so if you have Pmon installed in ROM > and Pmon does not itself implement UEFI, it would have
>> to load some other firmware such as u-boot in order to
>> load a kernel through the UEFI protocol, right?
>
>
> PMON is an independent firmware and loader that can directly load the
> operating system and it does not require the use of UEFI.
>> 
>> Has the assumption that loongarch requires UEFI changed?
>
>
> LoongArch embedded board was use Pmon firmware, The other one uses UEFI
> firmware (EDK2) on LoongArch platform.

I'm pretty sure we discussed this when the loongarch port
was originally merged, with the decisionto just use UEFI for
booting any kernel, as the legacy entry point for the ACPI
based environment was not really well-defined and the UEFI
stub was an easy alternative to have more commonality
with other architectures.

I see this was already extended for embedded CPUs to use
the uefi stub with DT in commit 88d4d957edc70 ("LoongArch: Add
FDT booting support from efi system table"), which seems like
the right direction.

Can you explain why this board would want yet another method
for entering the kernel? Is there any documentation for the
boot protocol?

>>>> Is this executing directly from ROM then?
>>>
>>> Yes.
>> 
>> Is this the only runtime call into the firmware, 
>
>
> Only when suspend-to-ram occurs, the kernel will call into the firmware.
> No other case.

Ok

>> or are there
>> others that are either already called from mainline kernels
>> or in your downsteam implementation?
>> 
>> How do you ensure that the DTB matches the actual ROM code
>> after rebuilding Pmon? Does Pmon itself fill that field with
>> the correct address, or do you rely on it being a hardcoded
>> constant?
>
>
> Use Pmon, firmware team will always ensure that DTB matches the actual
> ROM code.  The "suspend-address" of dtb and pmon entry address will
> synchronized modification by firmware team.

Ok.  So it's linked against libfdt to fill the dtb information,
or do you have to provide a dtb blob that matches the firmware?

      Arnd

  reply	other threads:[~2023-08-14 13:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03  6:37 [PATCH v6 0/2] soc: loongson2_pm: add power management support Yinbo Zhu
2023-08-03  6:37 ` [PATCH v6 1/2] soc: dt-bindings: add loongson-2 pm Yinbo Zhu
2023-08-03  7:44   ` Arnd Bergmann
2023-08-04  2:54     ` Yinbo Zhu
2023-08-12 12:25       ` Arnd Bergmann
2023-08-14  7:57         ` Yinbo Zhu
2023-08-14  8:19           ` Arnd Bergmann
2023-08-14 11:57             ` Yinbo Zhu
2023-08-14 13:41               ` Arnd Bergmann [this message]
2023-08-15  4:08                 ` Yinbo Zhu
2023-08-03  6:37 ` [PATCH v6 2/2] soc: loongson2_pm: add power management support Yinbo Zhu
2023-08-03  7:02   ` Arnd Bergmann
2023-08-08 14:42     ` Ulf Hansson
2023-08-08 14:55       ` Arnd Bergmann
2023-08-22  1:03 ` [PATCH v6 0/2] " Arnd Bergmann
2023-08-22  2:31 ` patchwork-bot+linux-soc

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=e04cf26e-2e38-4e87-b7b4-23dafadee00d@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=liupeibao@loongson.cn \
    --cc=liuyun@loongson.cn \
    --cc=loongarch@lists.linux.dev \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=lvjianmin@loongson.cn \
    --cc=robh+dt@kernel.org \
    --cc=soc@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wanghongliang@loongson.cn \
    --cc=zhuyinbo@loongson.cn \
    /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.