Hello Alex

On 2/9/22 13:23, Alexander Boettcher wrote:
I would suggest to add an message about the used i/o ports in the nova kernel at the end of Ec::bootstrap(). A trace message with the i/o values, as used in Console_serial class, will/should show up in the log when using Sculpt (next to the other kernel messages starting with [kernel] ...).

Maybe the wrong I/O ports are used or none, but that will reveal your instrumentation. In UEFI mode the 'bender' tool [0] will by default assume 0x3f8 if no PCI serial card is detected, maybe this is problematic in your case. Or 'bender' finds a PCI serial card (Intel AMT SOL) and the kernel is using that instead.

Hope the hints are useful.

Using the patch below I get the following output:

```
serial mem address    : 0xffffffffdf000000
serial mem+0x400 value: 0x239
serial mem+0x404 value: 0x0
```

In the log I don't see any output from the constructors for `Console_vga` or `Console_serial`. This might be, because these are called before the log buffer is ready.


Disabling AMT SOL did not change the output produced.

I also changed the options set for bender in `boot/grub/grub.cfg` but this also did not help.



Pirmin


```
diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp
index f7b5de7..57850d4 100644
--- a/src/bootstrap.cpp
+++ b/src/bootstrap.cpp
@@ -51,5 +51,12 @@ void bootstrap()
         root_sc->remote_enqueue();
     }

+    char *mem = static_cast<char *>(Hpt::remap (Pd::kern.quota, 0));
+    Console::print(">>>> mem ptr          : %p",mem);
+    unsigned base = *reinterpret_cast<uint16 *>(mem + 0x400);
+    Console::print(">>>> mem ptr mem+0x400: %x",base);
+    base = *reinterpret_cast<uint16 *>(mem + 0x402);
+    Console::print(">>>> mem ptr mem+0x402: %x",base);
+
     Sc::schedule();
 }
diff --git a/src/console_mem.cpp b/src/console_mem.cpp
index a9c1892..07375ca 100644
--- a/src/console_mem.cpp
+++ b/src/console_mem.cpp
@@ -25,6 +25,7 @@ mword PAGE_L = 0;

 void Console_mem::setup()
 {
+    Console::print(">>>> %s() : %d",__func__,__LINE__);
     if (!PAGE_L)
         return;

diff --git a/src/console_serial.cpp b/src/console_serial.cpp
index ea43701..1cde7d6 100644
--- a/src/console_serial.cpp
+++ b/src/console_serial.cpp
@@ -28,6 +28,7 @@ INIT_PRIORITY (PRIO_CONSOLE) Console_serial Console_serial::con;

 Console_serial::Console_serial()
 {
+    Console::print(">>>> %s() : %d",__func__,__LINE__);
     if (!Cmdline::serial)
         return;

diff --git a/src/console_vga.cpp b/src/console_vga.cpp
index 7dc7bc8..a517b16 100644
--- a/src/console_vga.cpp
+++ b/src/console_vga.cpp
@@ -26,6 +26,7 @@ INIT_PRIORITY (PRIO_CONSOLE) Console_vga Console_vga::con;

 Console_vga::Console_vga() : num (25), row (0), col (0)
 {
+    Console::print(">>>> %s() : %d",__func__,__LINE__);
     if (Cmdline::novga)
         return;
```


_______________________________________________
Genode users mailing list
[email protected]
https://lists.genode.org/listinfo/users

Reply via email to