mbox series

[edk2,v2,0/5] ArmPkg: use console for minimal 'exception occurred' message

Message ID 20190115082345.3711-1-ard.biesheuvel@linaro.org
Headers show
Series ArmPkg: use console for minimal 'exception occurred' message | expand

Message

Ard Biesheuvel Jan. 15, 2019, 8:23 a.m. UTC
When running with a graphical console, no message whatsoever is printed
when the systems hits an unexpected exception and hangs, because even
the minimal 'exception occurred' message is only sent to the serial port.

So let's fix that, by updating DefaultExceptionHandlerLib to take the
availability of a console into account. (#5)

This requires some preparatory decruftication so that we can safely refer
to the system table and console (#1 .. #4).

Changes since v1:
- split off ArmVirtPkg patch (#3)
- always send minimal error message to the serial port before attempting to
  send it to console->stdout as well (which is more likely to fail) (#5)
- add Leif's R-b to the series

Ard Biesheuvel (5):
  ArmPkg/DebugAgentSymbolsBaseLib: remove exception handling
  ArmPkg/DefaultExceptionHandlerLib: declare the permitted usage context
  ArmVirtPkg: drop reference to ArmPkg/DefaultExceptionHandlerLibBase
  ArmPkg/DefaultExceptionHandlerLib: drop BASE variant
  ArmPkg/DefaultExceptionHandlerLib: use console if available

 ArmPkg/ArmPkg.dsc                             |   1 -
 .../AArch64/DebugAgentException.S             |  96 ------
 .../Arm/DebugAgentException.S                 | 277 ------------------
 .../Arm/DebugAgentException.asm               | 273 -----------------
 .../DebugAgentSymbolsBaseLib.c                |   7 -
 .../DebugAgentSymbolsBaseLib.inf              |   9 -
 .../AArch64/DefaultExceptionHandler.c         |  12 +-
 .../Arm/DefaultExceptionHandler.c             |   7 +-
 .../DefaultExceptionHandlerBase.c             |  35 ---
 .../DefaultExceptionHandlerLib.inf            |   5 +-
 .../DefaultExceptionHandlerLibBase.inf        |  45 ---
 ArmVirtPkg/ArmVirt.dsc.inc                    |   1 -
 12 files changed, 19 insertions(+), 749 deletions(-)
 delete mode 100644 ArmPkg/Library/DebugAgentSymbolsBaseLib/AArch64/DebugAgentException.S
 delete mode 100644 ArmPkg/Library/DebugAgentSymbolsBaseLib/Arm/DebugAgentException.S
 delete mode 100644 ArmPkg/Library/DebugAgentSymbolsBaseLib/Arm/DebugAgentException.asm
 delete mode 100644 ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerBase.c
 delete mode 100644 ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLibBase.inf

-- 
2.17.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Ard Biesheuvel Jan. 16, 2019, 8:36 p.m. UTC | #1
On Tue, 15 Jan 2019 at 09:23, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>

> When running with a graphical console, no message whatsoever is printed

> when the systems hits an unexpected exception and hangs, because even

> the minimal 'exception occurred' message is only sent to the serial port.

>

> So let's fix that, by updating DefaultExceptionHandlerLib to take the

> availability of a console into account. (#5)

>

> This requires some preparatory decruftication so that we can safely refer

> to the system table and console (#1 .. #4).

>

> Changes since v1:

> - split off ArmVirtPkg patch (#3)

> - always send minimal error message to the serial port before attempting to

>   send it to console->stdout as well (which is more likely to fail) (#5)

> - add Leif's R-b to the series

>

> Ard Biesheuvel (5):

>   ArmPkg/DebugAgentSymbolsBaseLib: remove exception handling

>   ArmPkg/DefaultExceptionHandlerLib: declare the permitted usage context

>   ArmVirtPkg: drop reference to ArmPkg/DefaultExceptionHandlerLibBase

>   ArmPkg/DefaultExceptionHandlerLib: drop BASE variant

>   ArmPkg/DefaultExceptionHandlerLib: use console if available

>


Series pushed as

47d977733137 ArmPkg/DebugAgentSymbolsBaseLib: remove exception handling
74a12eae9f2c ArmPkg/DefaultExceptionHandlerLib: declare the permitted
usage context
ef9f0bff477f ArmVirtPkg: drop reference to ArmPkg/DefaultExceptionHandlerLibBase
1e32c49718c6 ArmPkg/DefaultExceptionHandlerLib: drop BASE variant
31f5388006fc ArmPkg/DefaultExceptionHandlerLib: use console if available

after applying the changes suggested by Laszlo. I failed to include
Laszlo's R-b in 3/5, apologies for that.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Laszlo Ersek Jan. 17, 2019, 11:07 a.m. UTC | #2
On 01/16/19 21:36, Ard Biesheuvel wrote:
> On Tue, 15 Jan 2019 at 09:23, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:

>>

>> When running with a graphical console, no message whatsoever is printed

>> when the systems hits an unexpected exception and hangs, because even

>> the minimal 'exception occurred' message is only sent to the serial port.

>>

>> So let's fix that, by updating DefaultExceptionHandlerLib to take the

>> availability of a console into account. (#5)

>>

>> This requires some preparatory decruftication so that we can safely refer

>> to the system table and console (#1 .. #4).

>>

>> Changes since v1:

>> - split off ArmVirtPkg patch (#3)

>> - always send minimal error message to the serial port before attempting to

>>   send it to console->stdout as well (which is more likely to fail) (#5)

>> - add Leif's R-b to the series

>>

>> Ard Biesheuvel (5):

>>   ArmPkg/DebugAgentSymbolsBaseLib: remove exception handling

>>   ArmPkg/DefaultExceptionHandlerLib: declare the permitted usage context

>>   ArmVirtPkg: drop reference to ArmPkg/DefaultExceptionHandlerLibBase

>>   ArmPkg/DefaultExceptionHandlerLib: drop BASE variant

>>   ArmPkg/DefaultExceptionHandlerLib: use console if available

>>

> 

> Series pushed as

> 

> 47d977733137 ArmPkg/DebugAgentSymbolsBaseLib: remove exception handling

> 74a12eae9f2c ArmPkg/DefaultExceptionHandlerLib: declare the permitted

> usage context

> ef9f0bff477f ArmVirtPkg: drop reference to ArmPkg/DefaultExceptionHandlerLibBase

> 1e32c49718c6 ArmPkg/DefaultExceptionHandlerLib: drop BASE variant

> 31f5388006fc ArmPkg/DefaultExceptionHandlerLib: use console if available

> 

> after applying the changes suggested by Laszlo. I failed to include

> Laszlo's R-b in 3/5, apologies for that.

> 


That's not a problem,
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel