l4re-base-25.08.0

This commit is contained in:
2025-09-12 15:55:45 +02:00
commit d959eaab98
37938 changed files with 9382688 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
PKGDIR ?= ..
L4DIR ?= $(PKGDIR)/../..
TARGET := include src
include $(L4DIR)/mk/subdir.mk
src: include

View File

@@ -0,0 +1,4 @@
PKGDIR = ../..
L4DIR ?= $(PKGDIR)/../..
include $(L4DIR)/mk/include.mk

View File

@@ -0,0 +1,22 @@
/*
* (c) 2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>
* economic rights: Technische Universität Dresden (Germany)
* This file is part of TUD:OS and distributed under the terms of the
* GNU Lesser General Public License 2.1.
* Please see the COPYING-LGPL-2.1 file for details.
*/
#ifndef __ARM_DRIVERS__GENERIC__INCLUDE__AMBA_H__
#define __ARM_DRIVERS__GENERIC__INCLUDE__AMBA_H__
#include <sys/cdefs.h>
#include <l4/sys/compiler.h>
#include <l4/sys/types.h>
#include <stdint.h>
L4_BEGIN_DECLS
void amba_read_id(l4_addr_t address, uint32_t *periphid, uint32_t *cellid);
L4_END_DECLS
#endif /* ! __ARM_DRIVERS__LCD__INCLUDE__LCD_H__ */

View File

@@ -0,0 +1,8 @@
PKGDIR ?= ../..
L4DIR ?= $(PKGDIR)/../..
SRC_CC := amba.cc
TARGET = libarm_generic.a
PC_FILENAME := libdrivers-generic
include $(L4DIR)/mk/lib.mk

View File

@@ -0,0 +1,19 @@
#include <l4/drivers/io_regblock.h>
#include <l4/drivers/amba.h>
void amba_read_id(l4_addr_t address, uint32_t *periphid, uint32_t *cellid)
{
L4::Io_register_block_mmio b(address);
*periphid = ((b.read32( 0) & 0xff) << 0)
| ((b.read32( 4) & 0xff) << 8)
| ((b.read32( 8) & 0xff) << 16)
| ((b.read32(12) & 0xff) << 24);
*cellid = ((b.read32(16) & 0xff) << 0)
| ((b.read32(20) & 0xff) << 8)
| ((b.read32(24) & 0xff) << 16)
| ((b.read32(28) & 0xff) << 24);
}