XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
littleboot.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fdt_header_t
 
struct  memory_region_t
 

Macros

#define RASPBERRY_PI   1
 
#define true   1
 
#define false   0
 
#define bool   char
 
#define NULL   0
 
#define MMIO_BASE   0x3F000000
 
#define UART_BASE   (0x3F000000 + 0x201000)
 
#define UART0_DR   ((volatile uint32_t*)(UART_BASE + 0x00))
 
#define UART0_FR   ((volatile uint32_t*)(UART_BASE + 0x18))
 
#define UART0_IBRD   ((volatile uint32_t*)(UART_BASE + 0x24))
 
#define UART0_FBRD   ((volatile uint32_t*)(UART_BASE + 0x28))
 
#define UART0_LCRH   ((volatile uint32_t*)(UART_BASE + 0x2C))
 
#define UART0_CR   ((volatile uint32_t*)(UART_BASE + 0x30))
 
#define UART0_IMSC   ((volatile uint32_t*)(UART_BASE + 0x38))
 
#define UART0_ICR   ((volatile uint32_t*)(UART_BASE + 0x44))
 
#define UARTFR   (UART_BASE + 0x18)
 
#define UARTDR   (UART_BASE + 0x00)
 
#define MAX_MEMORY_REGN   8
 
#define RAW_OFFSET(type, x, offset)   (type)((size_t)x + offset)
 

Typedefs

typedef unsigned long long uint64_t
 
typedef unsigned long long uintptr_t
 
typedef unsigned char uint8_t
 
typedef unsigned short uint16_t
 
typedef unsigned int uint32_t
 
typedef uint64_t size_t
 

Functions

void LBUartPutc (char c)
 
void LBUartPutString (const char *s)
 
void LBUartPrintHex (uint64_t val)
 
void LBUartPrintInt (uint64_t value)
 
void LBExceptionSetup ()
 

Macro Definition Documentation

◆ bool

#define bool   char

◆ false

#define false   0

◆ MAX_MEMORY_REGN

#define MAX_MEMORY_REGN   8

◆ MMIO_BASE

#define MMIO_BASE   0x3F000000

◆ NULL

#define NULL   0

◆ RASPBERRY_PI

#define RASPBERRY_PI   1

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.

◆ RAW_OFFSET

#define RAW_OFFSET (   type,
  x,
  offset 
)    (type)((size_t)x + offset)

◆ true

#define true   1

◆ UART0_CR

#define UART0_CR   ((volatile uint32_t*)(UART_BASE + 0x30))

◆ UART0_DR

#define UART0_DR   ((volatile uint32_t*)(UART_BASE + 0x00))

◆ UART0_FBRD

#define UART0_FBRD   ((volatile uint32_t*)(UART_BASE + 0x28))

◆ UART0_FR

#define UART0_FR   ((volatile uint32_t*)(UART_BASE + 0x18))

◆ UART0_IBRD

#define UART0_IBRD   ((volatile uint32_t*)(UART_BASE + 0x24))

◆ UART0_ICR

#define UART0_ICR   ((volatile uint32_t*)(UART_BASE + 0x44))

◆ UART0_IMSC

#define UART0_IMSC   ((volatile uint32_t*)(UART_BASE + 0x38))

◆ UART0_LCRH

#define UART0_LCRH   ((volatile uint32_t*)(UART_BASE + 0x2C))

◆ UART_BASE

#define UART_BASE   (0x3F000000 + 0x201000)

◆ UARTDR

#define UARTDR   (UART_BASE + 0x00)

◆ UARTFR

#define UARTFR   (UART_BASE + 0x18)

Typedef Documentation

◆ size_t

typedef uint64_t size_t

◆ uint16_t

typedef unsigned short uint16_t

◆ uint32_t

typedef unsigned int uint32_t

◆ uint64_t

typedef unsigned long long uint64_t

◆ uint8_t

typedef unsigned char uint8_t

◆ uintptr_t

typedef unsigned long long uintptr_t

Function Documentation

◆ LBExceptionSetup()

void LBExceptionSetup ( )
extern

◆ LBUartPrintHex()

void LBUartPrintHex ( uint64_t  val)
extern

◆ LBUartPrintInt()

void LBUartPrintInt ( uint64_t  value)
extern

◆ LBUartPutc()

void LBUartPutc ( char  c)
extern

◆ LBUartPutString()

void LBUartPutString ( const char *  s)
extern