XenevaOS
Loading...
Searching...
No Matches
Macros | Functions | Variables
aa64cpu.c File Reference
#include <stdint.h>
#include <Hal/AA64/aa64lowlevel.h>
#include <Hal/AA64/aa64cpu.h>
#include <Hal/AA64/vector.h>
#include <Hal/AA64/gic.h>
#include <aucon.h>
#include <Hal/basicacpi.h>
#include <Drivers/uart.h>
#include <Drivers/rtcmmio.h>
#include <kernelAA64.h>
#include <Board/board.h>
Include dependency graph for aa64cpu.c:

Macros

#define CACHE_LINE_SIZE   64
 
#define SUBSECONDS_PER_SECOND   1000000
 

Functions

uint64_t AA64GetPhysicalTimerCount ()
 
void AA64FPUNeonEnable ()
 AA64FPUNeonEnable – initialize FPU and NEON feature.
 
void AA64ClockInitialize ()
 AA64ClockInitialize – initialize the clock.
 
void aa64_data_cache_clean_range (void *addr, size_t size)
 
uint32_t get_cache_line_sz ()
 
void aa64_dc_cvac_range (void *addr, size_t sz)
 
void aa64_dc_ivac_range (void *addr, size_t sz)
 
void AA64CPUImplementer (uint32_t midr)
 
void updateTicks (uint64_t ticks, uint64_t *timerTick, uint64_t *timerSubticks)
 
int aa64_gettimeofday (timeval *t)
 
uint64_t aa64_now ()
 
int aa64_settimeofday (timeval *t)
 
void aa64_calculate_ticks (uint64_t seconds, uint64_t subsec, uint64_t *out_seconds, uint64_t *out_subsec)
 aa64_calculate_ticks – calculate the number of ticks from given milliseconds
 
void AA64SleepUS (uint32_t us)
 AA64SleepUS – sleep for sometimes.
 
void AA64SleepMS (uint32_t ms)
 AA64SleepMS – sleep for sometimes.
 
void enableAlignCheck ()
 
void AA64CpuInitialize ()
 AA64CpuInitialize – initialize aa64 cpu.
 
void AA64TimerSetup ()
 
void AA64CPUPostInitialize (KERNEL_BOOT_INFO *info)
 AA64CPUPostInitialize – initilaize post cpu requirements.
 
uint64_t AA64CPUGetFreqencyHz ()
 

Variables

uint64_t basisTime
 
uint64_t cpuFrequency
 
uint64_t bootTime
 

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.

Macro Definition Documentation

◆ CACHE_LINE_SIZE

#define CACHE_LINE_SIZE   64

◆ SUBSECONDS_PER_SECOND

#define SUBSECONDS_PER_SECOND   1000000

Function Documentation

◆ aa64_calculate_ticks()

void aa64_calculate_ticks ( uint64_t  seconds,
uint64_t  subsec,
uint64_t out_seconds,
uint64_t out_subsec 
)

aa64_calculate_ticks – calculate the number of ticks from given milliseconds

Parameters
seconds– amount of seconds
out_milliseconds– where to store the number of ticks

◆ aa64_data_cache_clean_range()

void aa64_data_cache_clean_range ( void *  addr,
size_t  size 
)

◆ aa64_dc_cvac_range()

void aa64_dc_cvac_range ( void *  addr,
size_t  sz 
)

◆ aa64_dc_ivac_range()

void aa64_dc_ivac_range ( void *  addr,
size_t  sz 
)

◆ aa64_gettimeofday()

int aa64_gettimeofday ( timeval t)

◆ aa64_now()

uint64_t aa64_now ( )

◆ aa64_settimeofday()

int aa64_settimeofday ( timeval t)

◆ AA64ClockInitialize()

void AA64ClockInitialize ( )

AA64ClockInitialize – initialize the clock.

◆ AA64CPUGetFreqencyHz()

uint64_t AA64CPUGetFreqencyHz ( )

◆ AA64CPUImplementer()

void AA64CPUImplementer ( uint32_t  midr)

◆ AA64CpuInitialize()

void AA64CpuInitialize ( )

AA64CpuInitialize – initialize aa64 cpu.

◆ AA64CPUPostInitialize()

void AA64CPUPostInitialize ( KERNEL_BOOT_INFO info)

AA64CPUPostInitialize – initilaize post cpu requirements.

Parameters
info– Pointer to KERNEL BOOT INFORMATIONs

◆ AA64FPUNeonEnable()

void AA64FPUNeonEnable ( )

AA64FPUNeonEnable – initialize FPU and NEON feature.

◆ AA64GetPhysicalTimerCount()

uint64_t AA64GetPhysicalTimerCount ( )

◆ AA64SleepMS()

void AA64SleepMS ( uint32_t  ms)

AA64SleepMS – sleep for sometimes.

Parameters
ms– milliseconds to sleep

◆ AA64SleepUS()

void AA64SleepUS ( uint32_t  us)

AA64SleepUS – sleep for sometimes.

Parameters
us– microseconds to sleep

◆ AA64TimerSetup()

void AA64TimerSetup ( )

◆ enableAlignCheck()

void enableAlignCheck ( )
extern

◆ get_cache_line_sz()

uint32_t get_cache_line_sz ( )

◆ updateTicks()

void updateTicks ( uint64_t  ticks,
uint64_t timerTick,
uint64_t timerSubticks 
)

Variable Documentation

◆ basisTime

uint64_t basisTime

◆ bootTime

uint64_t bootTime

◆ cpuFrequency

uint64_t cpuFrequency