diff --git a/.gitignore b/.gitignore index 7e2a0c885e..9a7baff23c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ rusty-tags.vi /testcases/riscv64-linux-musl-native.tgz /testcases/gcc/riscv64-linux-musl-native /testcases/ZLM/MediaServer +/testcases/ZLM/ffmpeg +/testcases/ZLM/lib testsuits-x86_64-linux-musl.tgz .idea/ arceos-fada.bin.gz diff --git a/build_img.sh b/build_img.sh index 0f00d655a3..2d066f77dd 100755 --- a/build_img.sh +++ b/build_img.sh @@ -96,7 +96,7 @@ if [ "$FILE" = "testsuits-x86_64-linux-musl" ] && [ ! -e testcases/$FILE ]; then fi rm -f disk.img -dd if=/dev/zero of=disk.img bs=4M count=30 +dd if=/dev/zero of=disk.img bs=4M count=90 if [ "$fs" = "ext4" ]; then mkfs.ext4 -t ext4 disk.img @@ -124,4 +124,4 @@ else sudo umount mnt sudo rm -rf mnt sudo chmod 777 disk.img -fi \ No newline at end of file +fi diff --git a/platforms/x86_64-qemu-q35.toml b/platforms/x86_64-qemu-q35.toml index fecf29441b..0348fbf88d 100644 --- a/platforms/x86_64-qemu-q35.toml +++ b/platforms/x86_64-qemu-q35.toml @@ -39,7 +39,7 @@ timer-frequency = "4_000_000_000" # 4.0GHz # Testcase memory start address. testcase-memory-start = "0x1_8000_0000" # Testcase memory size. -testcase-memory-size = "0x800_0000" +testcase-memory-size = "0x1700_0000" # The base address of the user heap. user-heap-base = "0x3FA0_0000" # The base address of the user stack. And the stack bottom is `user-stack-top + max-user-stack-size`. diff --git a/testcases/ZLM/downloads.sh b/testcases/ZLM/downloads.sh new file mode 100755 index 0000000000..7464b51c2f --- /dev/null +++ b/testcases/ZLM/downloads.sh @@ -0,0 +1,6 @@ +rm -rf lib ffmpeg MediaServer +git clone https://gitee.com/baiqiaosen/zlm_ffmpeg.git +mv zlm_ffmpeg/lib ./ +mv zlm_ffmpeg/ffmpeg ./ +mv zlm_ffmpeg/MediaServer ./ +rm -rf zlm_ffmpeg diff --git a/ulib/axstarry/src/syscall_mem/imp.rs b/ulib/axstarry/src/syscall_mem/imp.rs index 069d5011a0..6a38e8bf07 100644 --- a/ulib/axstarry/src/syscall_mem/imp.rs +++ b/ulib/axstarry/src/syscall_mem/imp.rs @@ -376,3 +376,8 @@ pub fn syscall_shmat(args: [usize; 6]) -> SyscallResult { Ok(addr.as_usize() as isize) } + +/// # mlock +pub fn syscall_mlock(args: [usize; 6]) -> SyscallResult { + Ok(0) +} diff --git a/ulib/axstarry/src/syscall_mem/mem_syscall_id.rs b/ulib/axstarry/src/syscall_mem/mem_syscall_id.rs index b880918740..be8c33c8ca 100644 --- a/ulib/axstarry/src/syscall_mem/mem_syscall_id.rs +++ b/ulib/axstarry/src/syscall_mem/mem_syscall_id.rs @@ -44,5 +44,6 @@ numeric_enum_macro::numeric_enum! { MSYNC = 26, MPROTECT = 10, MEMBARRIER = 324, + MLOCK = 149, } } diff --git a/ulib/axstarry/src/syscall_mem/mod.rs b/ulib/axstarry/src/syscall_mem/mod.rs index 05d225c62f..d1889de28e 100644 --- a/ulib/axstarry/src/syscall_mem/mod.rs +++ b/ulib/axstarry/src/syscall_mem/mod.rs @@ -22,6 +22,7 @@ pub fn mem_syscall(syscall_id: mem_syscall_id::MemSyscallId, args: [usize; 6]) - SHMGET => syscall_shmget(args), SHMCTL => Ok(0), SHMAT => syscall_shmat(args), + MLOCK => syscall_mlock(args), #[allow(unused)] _ => { panic!("Invalid Syscall Id: {:?}!", syscall_id);