mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
gpgpu namespace
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
#define GENODE // use genodes stdint header
|
||||
#include "../uos-intel-gpgpu/driver/gpgpu_driver.h"
|
||||
|
||||
namespace gpgpu
|
||||
{
|
||||
|
||||
void gpgpu_genode::handleInterrupt()
|
||||
{
|
||||
// handle the gpu interrupt
|
||||
@@ -190,3 +193,5 @@ void gpgpu_genode::freeRamCap(Genode::Ram_dataspace_capability& ram_cap)
|
||||
{
|
||||
pci.free_dma_buffer(ram_cap);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,9 @@ using namespace Genode;
|
||||
// interrupts
|
||||
#include <irq_session/connection.h>
|
||||
|
||||
namespace gpgpu
|
||||
{
|
||||
|
||||
class gpgpu_genode
|
||||
{
|
||||
private:
|
||||
@@ -149,4 +152,6 @@ public:
|
||||
void freeRamCap(Genode::Ram_dataspace_capability& ram_cap);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // GPGPU_GENODE_H
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "test.h"
|
||||
#endif // TEST
|
||||
|
||||
gpgpu_genode* _global_gpgpu_genode;
|
||||
gpgpu::gpgpu_genode* _global_gpgpu_genode;
|
||||
gpgpu_virt::Scheduler* _global_sched;
|
||||
|
||||
void Component::construct(Genode::Env& e)
|
||||
@@ -23,7 +23,7 @@ void Component::construct(Genode::Env& e)
|
||||
Genode::log("Build: ", __TIMESTAMP__);
|
||||
|
||||
// init globals
|
||||
static gpgpu_genode gg(e);
|
||||
static gpgpu::gpgpu_genode gg(e);
|
||||
_global_gpgpu_genode = ≫
|
||||
static gpgpu_virt::Scheduler sched;
|
||||
_global_sched = &sched;
|
||||
@@ -90,7 +90,7 @@ void Component::construct(Genode::Env& e)
|
||||
|
||||
// run the test and hope the best
|
||||
Genode::log("Run self test...");
|
||||
run_gpgpu_test();
|
||||
gpgpu::run_gpgpu_test();
|
||||
#endif // TEST
|
||||
|
||||
Genode::log("Register RPCs...");
|
||||
|
||||
@@ -9,7 +9,7 @@ using namespace Genode;
|
||||
|
||||
// genode instance
|
||||
#include "gpgpu_genode.h"
|
||||
extern gpgpu_genode* _global_gpgpu_genode;
|
||||
extern gpgpu::gpgpu_genode* _global_gpgpu_genode;
|
||||
|
||||
// printing (optional)
|
||||
extern "C" int printk(const char* str, ...)
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
#define ELEMENTS 4096
|
||||
|
||||
namespace gpgpu
|
||||
{
|
||||
|
||||
uint32_t* in;
|
||||
uint32_t* out;
|
||||
|
||||
@@ -207,3 +210,5 @@ void run_gpgpu_test()
|
||||
// wait for its end
|
||||
while(!kconf.finished);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
#ifndef TEST_H
|
||||
#define TEST_H
|
||||
|
||||
namespace gpgpu
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief run a test kernel
|
||||
*
|
||||
*/
|
||||
void run_gpgpu_test();
|
||||
|
||||
}
|
||||
|
||||
#endif // TEST_H
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
// genode instance
|
||||
#include "../gpgpu/gpgpu_genode.h"
|
||||
extern gpgpu_genode* _global_gpgpu_genode;
|
||||
extern gpgpu::gpgpu_genode* _global_gpgpu_genode;
|
||||
extern gpgpu_virt::Scheduler* _global_sched;
|
||||
|
||||
// driver
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
// genode instance
|
||||
#include "../gpgpu/gpgpu_genode.h"
|
||||
extern gpgpu_genode* _global_gpgpu_genode;
|
||||
extern gpgpu::gpgpu_genode* _global_gpgpu_genode;
|
||||
|
||||
// driver
|
||||
#define GENODE
|
||||
|
||||
Reference in New Issue
Block a user