public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Pete Batard" <pete@akeo.ie>
To: devel@edk2.groups.io
Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org
Subject: [edk2-platforms: PATCH v2 1/2] Platforms/RPi3: Improve debug output in FdtDxe
Date: Fri, 16 Aug 2019 11:00:08 +0100	[thread overview]
Message-ID: <20190816100009.3360-2-pete@akeo.ie> (raw)
In-Reply-To: <20190816100009.3360-1-pete@akeo.ie>

Harmonize messages, avoid acronyms and provide human readable status codes.

Signed-off-by: Pete Batard <pete@akeo.ie>
---
 Platform/RaspberryPi/RPi3/Drivers/FdtDxe/FdtDxe.c | 24 ++++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/Platform/RaspberryPi/RPi3/Drivers/FdtDxe/FdtDxe.c b/Platform/RaspberryPi/RPi3/Drivers/FdtDxe/FdtDxe.c
index c84e5b2767e2..da99ef9535c8 100644
--- a/Platform/RaspberryPi/RPi3/Drivers/FdtDxe/FdtDxe.c
+++ b/Platform/RaspberryPi/RPi3/Drivers/FdtDxe/FdtDxe.c
@@ -383,12 +383,12 @@ FdtDxeInitialize (
      * Have FDT passed via config.txt.
      */
     FdtSize = fdt_totalsize (FdtImage);
-    DEBUG ((DEBUG_INFO, "DTB passed via config.txt of 0x%lx bytes\n", FdtSize));
+    DEBUG ((DEBUG_INFO, "Device Tree passed via config.txt (0x%lx bytes)\n", FdtSize));
     Status = EFI_SUCCESS;
   } else {
     Internal = TRUE;
-    DEBUG ((DEBUG_INFO, "No/bad FDT at %p (%a), trying internal DTB...\n",
-      FdtImage, fdt_strerror (Retval)));
+    DEBUG ((DEBUG_INFO, "No/Bad Device Tree found at address 0x%p (%a), "
+      "trying internal one...\n", FdtImage, fdt_strerror (Retval)));
     Status = GetSectionFromAnyFv (&gRaspberryPiFdtFileGuid, EFI_SECTION_RAW, 0,
                &FdtImage, &FdtSize);
     if (Status == EFI_SUCCESS) {
@@ -399,7 +399,7 @@ FdtDxeInitialize (
   }
 
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "Failed to locate device tree: %r\n", Status));
+    DEBUG ((DEBUG_ERROR, "Failed to locate Device Tree: %r\n", Status));
     return Status;
   }
 
@@ -410,7 +410,7 @@ FdtDxeInitialize (
   Status = gBS->AllocatePages (AllocateAnyPages, EfiBootServicesData,
                   EFI_SIZE_TO_PAGES (FdtSize), (EFI_PHYSICAL_ADDRESS*)&mFdtImage);
   if (EFI_ERROR (Status)) {
-    DEBUG ((DEBUG_ERROR, "Failed to allocate new device tree: %r\n", Status));
+    DEBUG ((DEBUG_ERROR, "Failed to allocate Device Tree: %r\n", Status));
     return Status;
   }
 
@@ -419,27 +419,27 @@ FdtDxeInitialize (
 
   Status = SanitizePSCI ();
   if (EFI_ERROR (Status)) {
-    Print (L"Failed to sanitize PSCI (error %d)\n", Status);
+    Print (L"Failed to sanitize PSCI: %r\n", Status);
   }
 
   Status = CleanMemoryNodes ();
   if (EFI_ERROR (Status)) {
-    Print (L"Failed to clean memory nodes (error %d)\n", Status);
+    Print (L"Failed to clean memory nodes: %r\n", Status);
   }
 
   Status = CleanSimpleFramebuffer ();
   if (EFI_ERROR (Status)) {
-    Print (L"Failed to clean frame buffer (error %d)\n", Status);
+    Print (L"Failed to clean frame buffer: %r\n", Status);
   }
 
   Status = FixEthernetAliases ();
   if (EFI_ERROR (Status)) {
-    Print (L"Failed to fix ethernet aliases (error %d)\n", Status);
+    Print (L"Failed to fix ethernet aliases: %r\n", Status);
   }
 
   Status = UpdateMacAddress ();
   if (EFI_ERROR (Status)) {
-    Print (L"Failed to update MAC address (error %d)\n", Status);
+    Print (L"Failed to update MAC address: %r\n", Status);
   }
 
   if (Internal) {
@@ -448,11 +448,11 @@ FdtDxeInitialize (
      */
     Status = UpdateBootArgs ();
     if (EFI_ERROR (Status)) {
-      Print (L"Failed to update boot arguments (error %d)\n", Status);
+      Print (L"Failed to update boot arguments: %r\n", Status);
     }
   }
 
-  DEBUG ((DEBUG_INFO, "Installed FDT is at %p\n", mFdtImage));
+  DEBUG ((DEBUG_INFO, "Installed Device Tree at address 0x%p\n", mFdtImage));
   Status = gBS->InstallConfigurationTable (&gFdtTableGuid, mFdtImage);
   ASSERT_EFI_ERROR (Status);
 
-- 
2.21.0.windows.1


  reply	other threads:[~2019-08-16 10:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 10:00 [edk2-platforms: PATCH v2 0/2] Platforms/RPi3: Device Tree driver improvements Pete Batard
2019-08-16 10:00 ` Pete Batard [this message]
2019-08-16 10:00 ` [edk2-platforms: PATCH v2 2/2] Platforms/RPi3: Add multiple embedded Device Tree selection Pete Batard
2019-08-16 16:47 ` [edk2-platforms: PATCH v2 0/2] Platforms/RPi3: Device Tree driver improvements Leif Lindholm

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-list 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=20190816100009.3360-2-pete@akeo.ie \
    --to=devel@edk2.groups.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox