|
XenevaOS
|
#include "ramdisk.h"#include "dtb.h"#include "physm.h"#include "ctype.h"#include "vmmngr.h"#include "pe.h"#include "aurora.h"
Macros | |
| #define | SECTOR_SIZE 512 |
| #define | FAT_EOC_MARK 0xFFFFFFF8 |
Typedefs | |
| typedef void(* | entry) () |
Functions | |
| void | LBRamdiskReadSector (uint32_t lba, size_t counts, uint8_t *buffer) |
| struct | __attribute__ ((packed)) |
| uint64_t | FatClusterToSector (uint64_t cluster) |
| void | FatToDOSFilename (const char *filename, char *fname, unsigned int fname_len) |
| uint32_t | ExtractEFICluster () |
| uint32_t | ExtractXeneva (uint32_t parentCluster) |
| uint64_t | align_to_page (uint64_t size) |
| uint32_t | ExtractKernel (uint32_t parentClust) |
| uint32_t | FatReadFAT (uint64_t clusterIndex) |
| void | ReadKernelFile (uint32_t firstCluster) |
| void | LoadKernelFile () |
| void | LBRamdiskInitialize () |
| void | LBRamdiskJumpToKernel (uint64_t stack, size_t stacksz, KERNEL_BOOT_INFO *info) |
| uint64_t | LBRamdiskGetStartAddress () |
| uint64_t | LBRamdiskGetEndAddress () |
Variables | |
| uint64_t | ramdisk_start |
| uint64_t | ramdisk_end |
| uint64_t | sectorPerCluster |
| uint64_t | RootSector |
| uint64_t | ClusterBeginLBA |
| uint64_t | sectPerFAT32 |
| uint64_t | fatBeginLBA |
| uint64_t | kernelSize |
| uint8_t | ScratchPad [4096] |
| uint64_t | kernelAddr = 0xFFFFC00000000000 |
| uint64_t | loadAddr = 0xFFFFD00000000000 |
| uint64_t | loadAddrLast |
| entry | ent |
| #define FAT_EOC_MARK 0xFFFFFFF8 |
| #define SECTOR_SIZE 512 |
| typedef void(* entry) () |
| struct __attribute__ | ( | (packed) | ) |
| uint32_t ExtractEFICluster | ( | ) |
| void FatToDOSFilename | ( | const char * | filename, |
| char * | fname, | ||
| unsigned int | fname_len | ||
| ) |
FatToDOSFilename – converts a given filename to MSDOS file name format
| filename | – filename for conversion |
| fname | – pointer to the buffer to store the conversion |
| fname_length | – manly 11 buffer[0-8] – filename, buffer[9-11] – file extension |
| uint64_t LBRamdiskGetEndAddress | ( | ) |
| uint64_t LBRamdiskGetStartAddress | ( | ) |
| void LBRamdiskInitialize | ( | ) |
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:
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.
| void LBRamdiskJumpToKernel | ( | uint64_t | stack, |
| size_t | stacksz, | ||
| KERNEL_BOOT_INFO * | info | ||
| ) |
| void LoadKernelFile | ( | ) |
| void ReadKernelFile | ( | uint32_t | firstCluster | ) |
| uint64_t ClusterBeginLBA |
| entry ent |
| uint64_t fatBeginLBA |
| uint64_t kernelAddr = 0xFFFFC00000000000 |
| uint64_t kernelSize |
| uint64_t loadAddr = 0xFFFFD00000000000 |
| uint64_t loadAddrLast |
| uint64_t ramdisk_end |
| uint64_t ramdisk_start |
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:
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.
| uint64_t RootSector |
| uint8_t ScratchPad[4096] |
| uint64_t sectorPerCluster |
| uint64_t sectPerFAT32 |