XenevaOS
Loading...
Searching...
No Matches
Functions | Variables
pcpu.cpp File Reference
#include <Hal/pcpu.h>
#include <Hal/x86_64_cpu.h>
#include <Hal/x86_64_lowlevel.h>
#include <Mm/kmalloc.h>
#include <string.h>
#include <Hal/serial.h>
Include dependency graph for pcpu.cpp:

Functions

void AuCreatePerCPU (void *alloc)
 
CPUStrucAuGetPerCPU (uint8_t id)
 
void AuPerCPUSetCpuID (uint8_t id)
 
uint8_t AuPerCPUGetCpuID ()
 
void AuPerCPUSetCurrentThread (void *thread)
 
AuThreadAuPerCPUGetCurrentThread ()
 
void AuPerCPUSetKernelTSS (TSS *tss)
 
TSSAuPerCPUGetKernelTSS ()
 

Variables

CPUStruccpus [256]
 

Function Documentation

◆ AuCreatePerCPU()

void AuCreatePerCPU ( void *  alloc)

BSD 2-Clause License

Copyright (c) 2022-2023, 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.

◆ AuGetPerCPU()

CPUStruc * AuGetPerCPU ( uint8_t  id)

◆ AuPerCPUGetCpuID()

uint8_t AuPerCPUGetCpuID ( )

◆ AuPerCPUGetCurrentThread()

AuThread * AuPerCPUGetCurrentThread ( )

◆ AuPerCPUGetKernelTSS()

TSS * AuPerCPUGetKernelTSS ( )

AuPerCPUGetKernelTSS – Gets the kernel TSS structure

◆ AuPerCPUSetCpuID()

void AuPerCPUSetCpuID ( uint8_t  id)

◆ AuPerCPUSetCurrentThread()

void AuPerCPUSetCurrentThread ( void *  thread)

◆ AuPerCPUSetKernelTSS()

void AuPerCPUSetKernelTSS ( TSS tss)

AuPerCPUSetKernelTSS – Sets Kernel TSS structure

Parameters
tss– pointer to tss structure

Variable Documentation

◆ cpus

CPUStruc* cpus[256]

BSD 2-Clause License

Copyright (c) 2022-2023, 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.