Cleanup to prepare for ARM64 + Metal
This commit is contained in:
parent
bd44784c5f
commit
14cc577adf
@ -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")
|
||||
|
||||
|
@ -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",
|
||||
|
@ -27,7 +27,9 @@ Critical_Init()
|
||||
void
|
||||
Critical_Enter()
|
||||
{
|
||||
if (lockLevel[CPU()] == 0) {
|
||||
disable_interrupts();
|
||||
}
|
||||
lockLevel[CPU()]++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user