Hi,

On 07/23/2012 04:26 PM, Markus Partheymueller wrote:
> Hi,
>
> I'm working on a 64bit machine, but only using 32bit binaries
> (hypervisor and genode).
>
> I instrumented the methods with some PDGB and found out that the first
> attempt to map the table already fails:
>
> [init -> acpi] Genode::uint8_t* Acpi_table::_map_io(Genode::addr_t,
> Genode::size_t, Genode::Io_mem_session_capability&): _map_io: [e0000,
> 100000)
> [init -> acpi] Acpi_table::Acpi_table(): RSDP 2a020
> [init -> acpi] Table_wrapper::Table_wrapper(Genode::addr_t): Table
> wrapper with base bf7fe0ac
> I/O memory [bf7fe000,bf800000) not available
> Local MMIO mapping failed!
> [init -> acpi] C++ runtime: Genode::Parent::Service_denied
> [init -> acpi] void* abort(): abort called
>
> The call that fails is
>
> _io_mem = new (env()->heap()) Io_mem_connection(_base, size + _offset());
>
> With the offset 0x0ac of the base address and the size 0x1000, I think
> it tries to map two pages of I/O memory from 0xbf7fe000 - 0xbf800000,
> but the memory map doesn't allow that, because of the overlap between
> available and not available memory.

Please try to subtract the offset from the initial '_map' call:

diff --git a/os/src/drivers/acpi/acpi.cc b/os/src/drivers/acpi/acpi.cc
index 6f4970e..a8322b2 100644
--- a/os/src/drivers/acpi/acpi.cc
+++ b/os/src/drivers/acpi/acpi.cc
@@ -206,7 +206,7 @@ class Table_wrapper
         Table_wrapper(addr_t base)
         : _base(base), _io_mem(0), _table(0)
         {
-            _map(0x1000);
+            _map(0x1000 - _offset());
 
             /* remap if table size is larger than current size */
             if (_offset() + _table->size > 0x1000) {

If this should work, we have to make sure that 0x1000 - offset is at
least 8 Bytes wide.

Sebastian
diff --git a/os/src/drivers/acpi/acpi.cc b/os/src/drivers/acpi/acpi.cc
index 6f4970e..a8322b2 100644
--- a/os/src/drivers/acpi/acpi.cc
+++ b/os/src/drivers/acpi/acpi.cc
@@ -206,7 +206,7 @@ class Table_wrapper
 		Table_wrapper(addr_t base)
 		: _base(base), _io_mem(0), _table(0)
 		{
-			_map(0x1000);
+			_map(0x1000 - _offset());
 
 			/* remap if table size is larger than current size */
 			if (_offset() + _table->size > 0x1000) {
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Genode-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/genode-main

Reply via email to