lkml.org 
[lkml]   [2021]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] MIPS: Loongson64: Move loongson_system_configuration to loongson.h
From
Date


On 03/05/2021 06:01 PM, Philippe Mathieu-Daudé wrote:
> Hi,
>
> On Thu, Mar 4, 2021 at 5:35 PM Qing Zhang <zhangqing@loongson.cn> wrote:
>> The purpose of separating loongson_system_configuration from boot_param.h
>> is to keep the other structure consistent with the firmware.
> This is supposed to be a trivial patch, but the description actually
> confuses me.
>
> Why is the move out of "boot_param.h" keeping it consistent with fw?
Hi, PhilippeMathieu-Daudé

Thank you for your reply.

The boot_param.h file must be consistent in the kernel and the firmware
pmon/cmds/bootparam.h
In env.c, the loongson_system_configuration structure member gets the
value passed to the firmware.
eg:
struct boot_params *boot_p;

loongson_sysconf.restart_addr = boot_p->reset_system.ResetWarm;
loongson_sysconf.poweroff_addr = boot_p->reset_system.Shutdown;
loongson_sysconf.suspend_addr = boot_p->reset_system.DoSuspend;

The boot_params structure is consistent with the firmware,
The loongson_system_configuration is filled in the kernel, and there is
no such structure in pmon-loongson3, it is actually defined in the kernel.

So, remove its definition from boot_param.h.

Thanks,
Qing


\
 
 \ /
  Last update: 2021-03-06 04:15    [W:0.082 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site