mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 02:01:38 +00:00
wifi: provide platform specific DTB access
The device-tree binary is normally required on ARM-based platforms where as on x86 it is omitted. The platform-specific DTB helper provides a generic interface for accssing the DTB and needs to be implemented on each platform. Issue #4813
This commit is contained in:
parent
eaaedb6ae8
commit
e6ee7d3d4a
@ -12,6 +12,7 @@ SRC_CC += wlan.cc
|
||||
SRC_CC += firmware.cc
|
||||
SRC_CC += socket_call.cc
|
||||
SRC_CC += lx_emul/random.cc
|
||||
SRC_CC += dtb_helper.cc
|
||||
|
||||
SRC_C += dummies.c
|
||||
SRC_C += lx_emul.c
|
||||
|
21
repos/pc/src/lib/wifi/dtb_helper.cc
Normal file
21
repos/pc/src/lib/wifi/dtb_helper.cc
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* \brief DTB access helper
|
||||
* \author Josef Soentgen
|
||||
* \date 2023-04-11
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2023 Genode Labs GmbH
|
||||
*
|
||||
* This file is distributed under the terms of the GNU General Public License
|
||||
* version 2.
|
||||
*/
|
||||
|
||||
|
||||
#include "dtb_helper.h"
|
||||
|
||||
|
||||
Dtb_helper::Dtb_helper(Genode::Env &env) : _env { env } { }
|
||||
|
||||
|
||||
void *Dtb_helper::dtb_ptr() { return nullptr; }
|
30
repos/pc/src/lib/wifi/dtb_helper.h
Normal file
30
repos/pc/src/lib/wifi/dtb_helper.h
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* \brief DTB access helper
|
||||
* \author Josef Soentgen
|
||||
* \date 2023-04-11
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2023 Genode Labs GmbH
|
||||
*
|
||||
* This file is distributed under the terms of the GNU General Public License
|
||||
* version 2.
|
||||
*/
|
||||
|
||||
#ifndef _DTB_HELPER_H_
|
||||
#define _DTB_HELPER_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/env.h>
|
||||
|
||||
|
||||
struct Dtb_helper
|
||||
{
|
||||
Genode::Env &_env;
|
||||
|
||||
Dtb_helper(Genode::Env &env);
|
||||
|
||||
void *dtb_ptr();
|
||||
};
|
||||
|
||||
#endif /* _DTB_HELPER_H_ */
|
@ -29,6 +29,7 @@
|
||||
|
||||
/* local includes */
|
||||
#include "lx_user.h"
|
||||
#include "dtb_helper.h"
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
@ -155,6 +156,8 @@ struct Wlan
|
||||
Io_signal_handler<Wlan> _signal_handler { _env.ep(), *this,
|
||||
&Wlan::_handle_signal };
|
||||
|
||||
Dtb_helper _dtb_helper { _env };
|
||||
|
||||
void _handle_signal()
|
||||
{
|
||||
if (uplink_task_struct_ptr) {
|
||||
@ -175,7 +178,7 @@ struct Wlan
|
||||
genode_allocator_ptr(Lx_kit::env().heap),
|
||||
genode_signal_handler_ptr(_signal_handler));
|
||||
|
||||
lx_emul_start_kernel(nullptr);
|
||||
lx_emul_start_kernel(_dtb_helper.dtb_ptr());
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user