clean:
@$(RM) $(BIN) ../Acess2.$(ARCH).gz $(BIN).dsm ../Map.$(ARCH).txt LineCounts.$(ARCH).txt $(OBJ) $(DEPFILES)
-install: $(BIN)
+install: $(BIN)
gzip -c $(BIN) > ../Acess2.$(ARCH).gz
$(xCP) ../Acess2.$(ARCH).gz $(DISTROOT)
$(DISASM) -S $(BIN) > $(BIN).dsm
@wc -l $(SRCFILES) include/*.h > LineCounts.$(ARCH).txt
@echo BUILD_NUM = $$(( $(BUILD_NUM) + 1 )) > Makefile.BuildNum.$(ARCH)
+ $(POSTBUILD)
@$(STRIP) $(BIN)
%.ao.$(ARCH): %.asm Makefile
A_OBJ = start32.ao start64.ao desctab.ao
A_OBJ += main.o lib.o proc.o mm_virt.o mm_phys.o vm8086.o
A_OBJ += kernelpanic.o errors.o
+
+POSTBUILD = objcopy $(BIN) -F elf32 $(BIN)
typedef Uint64 tVAddr;
typedef Uint64 size_t;
+typedef char BOOL;
#define __ASM__ __asm__ __volatile__
/* -2 GiB */
_kernel_base = 0xFFFFFFFF80000000;
+/*
OUTPUT_FORMAT(elf32-i386)
OUTPUT_ARCH(i386:x86-64)
+*/
+OUTPUT_FORMAT(elf64)
ENTRY(start)
SECTIONS {
nFree ++;
addr ++;
LOG("nFree(%i) == %i (0x%x)", nFree, Pages, addr);
- if(nFree == Num)
+ if(nFree == Pages)
break;
}
LOG("nFree = %i", nFree);
Mutex_Release(&glPhysicalPages);
// TODO: Page out
// ATM. Just Warning
- Warning(" MM_AllocPhysRange: Out of memory (unable to fulfil request for %i pages)", Num);
+ Warning(" MM_AllocPhysRange: Out of memory (unable to fulfil request for %i pages)", Pages);
Log_Warning("Arch",
"Out of memory (unable to fulfil request for %i pages)",
- Num
+ Pages
);
LEAVE('i', 0);
return 0;
{
gaCPUs[0].IdleThread = Proc_GetCurThread();
gaCPUs[0].IdleThread->ThreadName = "Idle Thread";
- gaCPUs[0].IdleThread->NumTickets = 0; // Never called randomly
+ Threads_SetPriority( gaCPUs[0].IdleThread, -1 ); // Never called randomly
gaCPUs[0].IdleThread->Quantum = 1; // 1 slice quantum
for(;;) HALT(); // Just yeilds
}