在class7的自旋锁多核启动失败,只能单cpu
解决方法
修改/home/cgz/work/nju-os-workbench/abstract-machine/scripts/platform/qemu.mk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| .PHONY: build-arg
smp ?= 4//改这个 LDFLAGS += -N -Ttext-segment=0x00100000 QEMU_FLAGS += -serial mon:stdio \ -machine accel=tcg \ -smp "$(smp),cores=1,sockets=$(smp)" \//改这里的sockets和cores -drive format=raw,file=$(IMAGE)
build-arg: image @( echo -n $(mainargs); ) | dd if=/dev/stdin of=$(IMAGE) bs=512 count=2 seek=1 conv=notrunc status=none
BOOT_HOME := $(AM_HOME)/am/src/x86/qemu/boot
image: $(IMAGE).elf @$(MAKE) -s -C $(BOOT_HOME) @echo + CREATE "->" $(IMAGE_REL) @( cat $(BOOT_HOME)/bootblock.o; head -c 1024 /dev/zero; cat $(IMAGE).elf ) > $(IMAGE)
|