Re: [PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-28 Thread Rick Chen
x.de; Alexander > >> Graf; Abner Chang; Heinrich Schuchardt > >> Subject: [PATCH v2 1/1] riscv: restore global data pointer in trap handler > >> > >> The gp register is used to store U-Boot's global data pointer. We should > >> not assume that an UEFI app

Re: [PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-28 Thread Heinrich Schuchardt
Heinrich Schuchardt >> Subject: [PATCH v2 1/1] riscv: restore global data pointer in trap handler >> >> The gp register is used to store U-Boot's global data pointer. We should >> not assume that an UEFI application leaves the gp register unchanged as >> the UEFI

Re: [PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-28 Thread Rick Chen
> From: Heinrich Schuchardt [mailto:xypron.g...@gmx.de] > Sent: Sunday, September 27, 2020 4:24 PM > To: Rick Jian-Zhi Chen(陳建志) > Cc: Simon Glass; Sean Anderson; Bin Meng; u-boot@lists.denx.de; Alexander > Graf; Abner Chang; Heinrich Schuchardt > Subject: [PATCH v2 1/1] ris

Re: [PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-27 Thread Heinrich Schuchardt
On 9/27/20 10:51 AM, Bin Meng wrote: > Hi Heinrich, > > On Sun, Sep 27, 2020 at 4:46 PM Heinrich Schuchardt > wrote: >> >> On 9/27/20 10:40 AM, Bin Meng wrote: >>> On Sun, Sep 27, 2020 at 4:24 PM Heinrich Schuchardt >>> wrote: The gp register is used to store U-Boot's global data poin

Re: [PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-27 Thread Bin Meng
Hi Heinrich, On Sun, Sep 27, 2020 at 4:46 PM Heinrich Schuchardt wrote: > > On 9/27/20 10:40 AM, Bin Meng wrote: > > On Sun, Sep 27, 2020 at 4:24 PM Heinrich Schuchardt > > wrote: > >> > >> The gp register is used to store U-Boot's global data pointer. We should > >> not assume that an UEFI app

Re: [PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-27 Thread Heinrich Schuchardt
On 9/27/20 10:40 AM, Bin Meng wrote: > On Sun, Sep 27, 2020 at 4:24 PM Heinrich Schuchardt > wrote: >> >> The gp register is used to store U-Boot's global data pointer. We should >> not assume that an UEFI application leaves the gp register unchanged as >> the UEFI specifications does not define

Re: [PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-27 Thread Bin Meng
On Sun, Sep 27, 2020 at 4:24 PM Heinrich Schuchardt wrote: > > The gp register is used to store U-Boot's global data pointer. We should > not assume that an UEFI application leaves the gp register unchanged as > the UEFI specifications does not define who is the owner of the gp and tp > registers.

[PATCH v2 1/1] riscv: restore global data pointer in trap handler

2020-09-27 Thread Heinrich Schuchardt
The gp register is used to store U-Boot's global data pointer. We should not assume that an UEFI application leaves the gp register unchanged as the UEFI specifications does not define who is the owner of the gp and tp registers. So the following sequence should be followed in the trap handler: *