SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Functions
sys-dram.c File Reference

System DRAM (Dynamic Random Access Memory) driver for Allwinner (sunxi) platforms. More...

#include <io.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <types.h>
#include <log.h>
Include dependency graph for sys-dram.c:

Functions

uint64_t __attribute__ ((weak))
 Get the total DRAM size.
 

Detailed Description

System DRAM (Dynamic Random Access Memory) driver for Allwinner (sunxi) platforms.

This file provides weak implementations for DRAM-related functions that can be overridden by platform-specific implementations. These functions handle DRAM initialization and size detection for Allwinner SoCs.

Function Documentation

◆ __attribute__()

uint64_t __attribute__ ( (weak)  )

Get the total DRAM size.

Initialize DRAM controller and memory.

This weak function returns the total size of the system DRAM in bytes. Platform-specific implementations should override this function to return the actual DRAM size detected for the specific SoC and board configuration.

Returns
Total DRAM size in bytes. Default implementation returns 0.

This weak function initializes the DRAM controller and configures memory settings. Platform-specific implementations should override this function to perform SoC-specific DRAM initialization including timing configuration, voltage setup, and memory training.

Parameters
paraPointer to initialization parameters. The exact structure depends on the platform implementation.
Returns
0 on success, non-zero error code on failure. Default implementation returns 0.