XenevaOS
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
dtb.h File Reference
#include <stdint.h>
#include <aurora.h>
Include dependency graph for dtb.h:

Go to the source code of this file.

Classes

struct  fdt_header_t
 
struct  _fdt_prop_
 

Typedefs

typedef struct _fdt_prop_ fdt_property_t
 

Functions

AU_EXTERN AU_EXPORT uint32_t AuDTBSwap32 (uint32_t from)
 AuDTBSwap32 – swaps 32 bit value.
 
AU_EXTERN AU_EXPORT uint64_t AuDTBSwap64 (uint64_t from)
 AuDTBSwap64 – swaps 64 bit value.
 
AU_EXTERN AU_EXPORT uint16_t AuDTBSwap16 (uint16_t from)
 AuDTBSwap16 – swaps 16 bit value.
 
AU_EXTERN AU_EXPORT uint32_tAuDeviceTreeFindProperty (uint32_t *node, const char *property)
 AuDeviceTreeFindProperty – searches for a property within a node.
 
AU_EXTERN AU_EXPORT uint32_tAuDeviceTreeGetNode (const char *name)
 AuDeviceTreeGetNode – searches and get the offset of the node.
 
AU_EXTERN AU_EXPORT uint32_t AuDeviceTreeGetAddressCells (uint32_t *node)
 AuDeviceTreeGetAddressCells – get the value from address cells property.
 
AU_EXTERN AU_EXPORT uint32_t AuDeviceTreeGetSizeCells (uint32_t *node)
 AuDeviceTreeGetSizeCells – get the value from size cells property.
 
AU_EXTERN AU_EXPORT uint64_t AuDeviceTreeGetRegAddress (uint32_t *node, uint32_t addressCell)
 AuDeviceTreeGetRegAddress – get the MMIO address from reg property.
 
AU_EXTERN AU_EXPORT uint64_t AuDeviceTreeGetRegSize (uint32_t *node, uint32_t addressCell, uint32_t sizeCell)
 AuDeviceTreeGetRegSize – get the size value from reg property.
 
void AuDeviceTreeInitialize (KERNEL_BOOT_INFO *info)
 AuDeviceTreeInitialize – initialize the device tree.
 
void AuDeviceTreeMapMMIO ()
 AuDeviceTreeMapMMIO – Maps the physical device tree address to MMIO address range.
 

Detailed Description

BSD 2-Clause License

Copyright (c) 2022-2025, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Typedef Documentation

◆ fdt_property_t

typedef struct _fdt_prop_ fdt_property_t

Function Documentation

◆ AuDeviceTreeFindProperty()

AU_EXTERN AU_EXPORT uint32_t * AuDeviceTreeFindProperty ( uint32_t node,
const char *  property 
)

AuDeviceTreeFindProperty – searches for a property within a node.

Parameters
node– Pointer to node offset
property– Property name

◆ AuDeviceTreeGetAddressCells()

AU_EXTERN AU_EXPORT uint32_t AuDeviceTreeGetAddressCells ( uint32_t node)

AuDeviceTreeGetAddressCells – get the value from address cells property.

Parameters
node– Pointer to node

◆ AuDeviceTreeGetNode()

AU_EXTERN AU_EXPORT uint32_t * AuDeviceTreeGetNode ( const char *  name)

AuDeviceTreeGetNode – searches and get the offset of the node.

Parameters
name– Node name

◆ AuDeviceTreeGetRegAddress()

AU_EXTERN AU_EXPORT uint64_t AuDeviceTreeGetRegAddress ( uint32_t node,
uint32_t  addressCell 
)

AuDeviceTreeGetRegAddress – get the MMIO address from reg property.

Parameters
node– Pointer to parent node
addressCell– size of address cell

◆ AuDeviceTreeGetRegSize()

AU_EXTERN AU_EXPORT uint64_t AuDeviceTreeGetRegSize ( uint32_t node,
uint32_t  addressCell,
uint32_t  sizeCell 
)

AuDeviceTreeGetRegSize – get the size value from reg property.

Parameters
node– Pointer to parent node
addressCell– size of address cell
sizeCell– value of size cell

◆ AuDeviceTreeGetSizeCells()

AU_EXTERN AU_EXPORT uint32_t AuDeviceTreeGetSizeCells ( uint32_t node)

AuDeviceTreeGetSizeCells – get the value from size cells property.

Parameters
node– Pointer to node

◆ AuDeviceTreeInitialize()

void AuDeviceTreeInitialize ( KERNEL_BOOT_INFO info)
extern

AuDeviceTreeInitialize – initialize the device tree.

Parameters
fdt_address– device tree address passed by bootloader

◆ AuDeviceTreeMapMMIO()

void AuDeviceTreeMapMMIO ( )
extern

AuDeviceTreeMapMMIO – Maps the physical device tree address to MMIO address range.

◆ AuDTBSwap16()

AU_EXTERN AU_EXPORT uint16_t AuDTBSwap16 ( uint16_t  from)

AuDTBSwap16 – swaps 16 bit value.

Parameters
from– value to swap

◆ AuDTBSwap32()

AU_EXTERN AU_EXPORT uint32_t AuDTBSwap32 ( uint32_t  from)

AuDTBSwap32 – swaps 32 bit value.

Parameters
from– value to swap

◆ AuDTBSwap64()

AU_EXTERN AU_EXPORT uint64_t AuDTBSwap64 ( uint64_t  from)

AuDTBSwap64 – swaps 64 bit value.

Parameters
from– value to swap