Cleanup to prepare for ARM64 + Metal

This commit is contained in:
Ali Mashtizadeh 2023-10-20 16:57:02 -04:00
parent bd44784c5f
commit 14cc577adf
6 changed files with 13 additions and 6 deletions

View File

@ -25,12 +25,17 @@ src_common = [
]
src_amd64 = [
# "amd64/entry.S",
"amd64/syscall.S",
]
src_arm64 = [
"arm64/syscall.S",
]
if (env["ARCH"] == "amd64"):
src.append(src_amd64)
elif (env["ARCH"] == "arm64"):
src.append(src_arm64)
src.append(src_common)
libc_env.Append(CPPFLAGS = ['-nostdinc'])
@ -38,6 +43,6 @@ libc_env.Append(CPPPATH = ['#build/include'])
libc_env.StaticLibrary("libc", src)
libc_env.StaticObject("crt1", "crt1.c")
libc_env.StaticObject("crti", "crti.S")
libc_env.StaticObject("crtn", "crtn.S")
libc_env.StaticObject("crti", "${ARCH}/crti.S")
libc_env.StaticObject("crtn", "${ARCH}/crtn.S")

View File

@ -11,7 +11,6 @@ src_amd64 = [
"amd64/multiboot.S",
"amd64/mbentry.c",
# AMD64
"amd64/critical.c",
"amd64/debug.c",
"amd64/disasm.c",
"amd64/ioapic.c",
@ -28,7 +27,6 @@ src_amd64 = [
"amd64/time.c",
"amd64/trap.c",
"amd64/trapentry.S",
"amd64/xmem.c",
# Devices
"dev/x86/debugcons.c",
"dev/x86/ide.c",
@ -40,6 +38,7 @@ src_amd64 = [
src_common = [
"kern/copy.c",
"kern/critical.c",
"kern/bufcache.c",
"kern/cv.c",
"kern/debug.c",
@ -65,6 +64,7 @@ src_common = [
"kern/vfs.c",
"kern/vfsuio.c",
"kern/waitchannel.c",
"kern/xmem.c",
"dev/ahci.c",
"dev/console.c",
"dev/e1000.c",

View File

@ -27,7 +27,9 @@ Critical_Init()
void
Critical_Enter()
{
disable_interrupts();
if (lockLevel[CPU()] == 0) {
disable_interrupts();
}
lockLevel[CPU()]++;
}