20 #include "pedigree/kernel/Archive.h" 21 #include "pedigree/kernel/Log.h" 22 #include "pedigree/kernel/panic.h" 23 #include "pedigree/kernel/processor/PhysicalMemoryManager.h" 24 #include "pedigree/kernel/processor/VirtualAddressSpace.h" 25 #include "pedigree/kernel/utilities/StaticString.h" 26 #include "pedigree/kernel/utilities/utility.h" 37 if ((reinterpret_cast<physical_uintptr_t>(pPhys) &
39 panic(
"Archive: Alignment issues");
46 reinterpret_cast<physical_uintptr_t>(pPhys)) ==
false)
48 ERROR(
"Archive: allocateRegion failed.");
67 pFile = getNext(pFile);
76 return str.intValue(8);
86 return reinterpret_cast<uintptr_t *
>(
87 reinterpret_cast<uintptr_t
>(
get(n)) + 512);
102 size_t size = str.intValue(8);
103 size_t nBlocks = (size + 511) / 512;
104 pFile = adjust_pointer(pFile, 512 * (nBlocks + 1));
105 if (pFile->name[0] ==
'\0')
113 for (
size_t i = 0; i < n; i++)
114 pFile = getNext(pFile);
uintptr_t * getFile(size_t n)
static size_t getPageSize() PURE
static PhysicalMemoryManager & instance()
static const size_t continuous
char * getFileName(size_t n)
static const size_t KernelMode
Archive(uint8_t *pPhys, size_t sSize)
void * virtualAddress() const
void EXPORTED_PUBLIC panic(const char *msg) NORETURN
size_t getFileSize(size_t n)