X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fsvm%2Fsvm_common.h;h=58cd0e94f5c2ac433497d3335cb7d7f78fad7e06;hb=73e7f427e8865b0af71740c5ecfa55c7ee78dbd1;hp=ea3ec87a2126f4ad7855653bee284526c8f6e187;hpb=19296116be4754e43751399e25f5206cafc70c1f;p=vpp.git diff --git a/src/svm/svm_common.h b/src/svm/svm_common.h index ea3ec87a212..58cd0e94f5c 100644 --- a/src/svm/svm_common.h +++ b/src/svm/svm_common.h @@ -83,9 +83,15 @@ typedef struct svm_map_region_args_ * Base should be "out of the way," and size should be big enough to * cover everything we plan to put here. */ -#define SVM_GLOBAL_REGION_BASEVA 0x30000000 #define SVM_GLOBAL_REGION_SIZE (64<<20) #define SVM_GLOBAL_REGION_NAME "/global_vm" +#if defined (__aarch64__) +#define VA_BITS 48 +#define BASEVA ((1ul << VA_BITS) / 4) +#define SVM_GLOBAL_REGION_BASEVA (BASEVA - (2 * SVM_GLOBAL_REGION_SIZE)) +#else +#define SVM_GLOBAL_REGION_BASEVA 0x30000000 +#endif /* * Memory shared across individual router instances. @@ -112,6 +118,8 @@ typedef struct void *svm_region_find_or_create (svm_map_region_args_t * a); void svm_region_init (void); +void svm_region_init_mapped_region (svm_map_region_args_t * a, + svm_region_t * rp); int svm_region_init_chroot (const char *root_path); void svm_region_init_chroot_uid_gid (const char *root_path, int uid, int gid); void svm_region_init_args (svm_map_region_args_t * a);