From fb87e6668f7f7560a21d935966228d7bfdb6be58 Mon Sep 17 00:00:00 2001 From: rhythm <31589689+rhythm16@users.noreply.github.com> Date: Sat, 28 Oct 2023 15:43:41 +0800 Subject: [PATCH] Improve comments (#32) --- src/arch/arm64/vm-arch.h | 2 +- src/arch/arm64/vm.c | 6 ++---- src/main.c | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/arch/arm64/vm-arch.h b/src/arch/arm64/vm-arch.h index 0d02dc0..812aadb 100644 --- a/src/arch/arm64/vm-arch.h +++ b/src/arch/arm64/vm-arch.h @@ -38,7 +38,7 @@ #define ARM_PCI_MMIO_BASE (ARM_PCI_CFG_BASE + ARM_PCI_CFG_SIZE) #define ARM_PCI_MMIO_SIZE (RAM_BASE - ARM_PCI_MMIO_BASE) -/* 128 MB for iernel */ +/* 128 MB for kernel */ #define ARM_KERNEL_BASE RAM_BASE #define ARM_KERNEL_SIZE 0x8000000UL diff --git a/src/arch/arm64/vm.c b/src/arch/arm64/vm.c index 39dc4da..4701af0 100644 --- a/src/arch/arm64/vm.c +++ b/src/arch/arm64/vm.c @@ -130,8 +130,6 @@ int vm_arch_init_platform_device(vm_t *v) vm_arch_priv_t *priv = (vm_arch_priv_t *) v->priv; /* Initial system bus */ - bus_init(&v->io_bus); - bus_init(&v->mmio_bus); dev_init(&priv->iodev, ARM_IOPORT_BASE, ARM_IOPORT_SIZE, v, pio_handler); bus_register_dev(&v->mmio_bus, &priv->iodev); @@ -151,7 +149,7 @@ int vm_arch_init_platform_device(vm_t *v) } /* The arm64 kernel header - * Reference https://docs.kernel.org/arm64/booting.html + * Reference https://docs.kernel.org/arch/arm64/booting.html */ typedef struct { uint32_t code0; /* Executable code */ @@ -358,7 +356,7 @@ static int generate_fdt(vm_t *v) __FDT(property, "dma-coherent", NULL, 0); uint32_t pci_bus_range[] = {cpu_to_fdt32(0), cpu_to_fdt32(0)}; __FDT(property, "bus-range", &pci_bus_range, sizeof(pci_bus_range)); - /* reg should contains the address of configuration space */ + /* reg should contain the address of configuration space */ uint64_t pci_reg[] = {cpu_to_fdt64(ARM_PCI_CFG_BASE), cpu_to_fdt64(ARM_PCI_CFG_SIZE)}; __FDT(property, "reg", &pci_reg, sizeof(pci_reg)); diff --git a/src/main.c b/src/main.c index fe5bc74..d26d9a3 100644 --- a/src/main.c +++ b/src/main.c @@ -100,7 +100,5 @@ int main(int argc, char *argv[]) vm_run(&vm); vm_exit(&vm); - reset_input_mode(); - return 0; }