Skip to content

Commit

Permalink
Improve comments (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhythm16 authored Oct 28, 2023
1 parent df3e5fc commit fb87e66
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/arch/arm64/vm-arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 2 additions & 4 deletions src/arch/arm64/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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 */
Expand Down Expand Up @@ -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));
Expand Down
2 changes: 0 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,5 @@ int main(int argc, char *argv[])
vm_run(&vm);
vm_exit(&vm);

reset_input_mode();

return 0;
}

0 comments on commit fb87e66

Please sign in to comment.