libvmbase: Separate aarch64 asm files
Separate aarch64 assembly files to architecture specific directory.
This commit add new directory `asm` that should contain only entry assembly code separate per CPU architecture.
Bug: 362733888
Test: m {libvmbase,pvmfw}
Change-Id: Ie7f9d29c2c718eab0040e2ed7b5520c3d6b8cc09
diff --git a/libs/libvmbase/Android.bp b/libs/libvmbase/Android.bp
index c54f859..2d0294e 100644
--- a/libs/libvmbase/Android.bp
+++ b/libs/libvmbase/Android.bp
@@ -113,11 +113,16 @@
cc_library_static {
name: "libvmbase_entry",
defaults: ["vmbase_cc_defaults"],
- srcs: [
- "entry.S",
- "exceptions.S",
- "exceptions_panic.S",
- ],
+ srcs: [],
+ target: {
+ android_arm64: {
+ srcs: [
+ "asm/aarch64/entry.S",
+ "asm/aarch64/exceptions.S",
+ "asm/aarch64/exceptions_panic.S",
+ ],
+ },
+ },
}
filegroup {
diff --git a/libs/libvmbase/common.h b/libs/libvmbase/asm/aarch64/common.h
similarity index 100%
rename from libs/libvmbase/common.h
rename to libs/libvmbase/asm/aarch64/common.h
diff --git a/libs/libvmbase/entry.S b/libs/libvmbase/asm/aarch64/entry.S
similarity index 99%
rename from libs/libvmbase/entry.S
rename to libs/libvmbase/asm/aarch64/entry.S
index 9177a4a..6dffbab 100644
--- a/libs/libvmbase/entry.S
+++ b/libs/libvmbase/asm/aarch64/entry.S
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <common.h>
+#include "common.h"
.set .L_MAIR_DEV_nGnRE, 0x04
.set .L_MAIR_MEM_WBWA, 0xff
diff --git a/libs/libvmbase/exceptions.S b/libs/libvmbase/asm/aarch64/exceptions.S
similarity index 100%
rename from libs/libvmbase/exceptions.S
rename to libs/libvmbase/asm/aarch64/exceptions.S
diff --git a/libs/libvmbase/exceptions_panic.S b/libs/libvmbase/asm/aarch64/exceptions_panic.S
similarity index 98%
rename from libs/libvmbase/exceptions_panic.S
rename to libs/libvmbase/asm/aarch64/exceptions_panic.S
index 54735b2..d064c8d 100644
--- a/libs/libvmbase/exceptions_panic.S
+++ b/libs/libvmbase/asm/aarch64/exceptions_panic.S
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <common.h>
+#include "common.h"
/**
* The following table is intended to trap any fault resulting from the very