diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-07-24 12:14:56 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-07-24 12:14:56 +0200 |
commit | 0f147388c0c23a2f7267ee0bf58333939d7a5d84 (patch) | |
tree | 99c3e4a51bb475b4513f75e1952cad34c31667e9 | |
parent | e7fc653f44247f1008509a68bf9b666e33fea0e5 (diff) | |
download | qboot-0f147388c0c23a2f7267ee0bf58333939d7a5d84.zip qboot-0f147388c0c23a2f7267ee0bf58333939d7a5d84.tar.gz qboot-0f147388c0c23a2f7267ee0bf58333939d7a5d84.tar.bz2 |
do not mix tabs and spaces in a single file
-rw-r--r-- | cstart.S | 26 | ||||
-rw-r--r-- | fw_cfg.c | 30 | ||||
-rw-r--r-- | hwsetup.c | 44 | ||||
-rw-r--r-- | include/linuxboot.h | 2 | ||||
-rw-r--r-- | linuxboot.c | 2 | ||||
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | pci.c | 6 | ||||
-rw-r--r-- | printf.c | 4 |
8 files changed, 58 insertions, 58 deletions
@@ -10,12 +10,12 @@ ENTRY(pm_entry) mov %ax, %ss mov $0x7c00, %sp - mov %cr0, %eax - and $~((1 << 30) | (1 << 29)), %eax # clear CD and NW - or $1, %al - mov %eax, %cr0 - lgdtl %cs:0xff80 + gdt32_descr - pm_entry - ljmpl $8, $0xffffff80 + 2f - pm_entry + mov %cr0, %eax + and $~((1 << 30) | (1 << 29)), %eax # clear CD and NW + or $1, %al + mov %eax, %cr0 + lgdtl %cs:0xff80 + gdt32_descr - pm_entry + ljmpl $8, $0xffffff80 + 2f - pm_entry 2: .code32 mov $16, %ax @@ -27,16 +27,16 @@ ENTRY(pm_entry) ljmp $8, $0xffff0000 gdt32: - .quad 0 - .quad 0x00cf9b000000ffff // flat 32-bit code segment - .quad 0x00cf93000000ffff // flat 32-bit data segment - .quad 0x000f9b0f0000ffff // 64K 16-bit code segment at 0xF0000 - .quad 0x000f93000000ffff // 64K 16-bit data segment at 0x0 + .quad 0 + .quad 0x00cf9b000000ffff // flat 32-bit code segment + .quad 0x00cf93000000ffff // flat 32-bit data segment + .quad 0x000f9b0f0000ffff // 64K 16-bit code segment at 0xF0000 + .quad 0x000f93000000ffff // 64K 16-bit data segment at 0x0 gdt32_end: gdt32_descr: - .word gdt32_end - gdt32 - 1 - .long 0xffffff80 + gdt32 - pm_entry + .word gdt32_end - gdt32 - 1 + .long 0xffffff80 + gdt32 - pm_entry ENTRY_END(pm_entry) .code16gcc @@ -46,18 +46,18 @@ void fw_cfg_setup(void) int filenamecmp(const char *a, const struct fw_cfg_file *f) { - int n = sizeof(f->name); - const char *b = f->name; - while (*a == *b) { - if (*a == '\0') { - break; - } - if (--n == 0) { - return *a; - } - ++a, ++b; - } - return *a - *b; + int n = sizeof(f->name); + const char *b = f->name; + while (*a == *b) { + if (*a == '\0') { + break; + } + if (--n == 0) { + return *a; + } + ++a, ++b; + } + return *a - *b; } int fw_cfg_file_id(char *name) @@ -89,9 +89,9 @@ void fw_cfg_read_file(int id, void *buf, int len) } struct fw_cfg_dma_descriptor { - uint32_t control; - uint32_t length; - uint64_t address; + uint32_t control; + uint32_t length; + uint64_t address; } __attribute__((packed)); void fw_cfg_dma(int control, void *buf, int len) @@ -25,7 +25,7 @@ static void setup_piix_pm(void) { const int bdf = (1 << 3) | 3; - pci_config_writel(bdf, PIIX_PMBASE, 0x601); + pci_config_writel(bdf, PIIX_PMBASE, 0x601); pci_config_writeb(bdf, PIIX_PMREGMISC, 0x01); pci_config_writel(bdf, PIIX_SMBHSTBASE, 0x701); pci_config_writeb(bdf, PIIX_SMBHSTCFG, 0x09); @@ -61,25 +61,25 @@ static void setup_ich9_pm(void) static void setup_pic(void) { - /* Send ICW1 (select OCW1 + will send ICW4) */ - outb(0x20, 0x11); - outb(0xa0, 0x11); - /* Send ICW2 (base irqs: 0x08-0x0f for irq0-7, 0x70-0x77 for irq8-15) */ - outb(0x21, 8); - outb(0xa1, 0x70); - /* Send ICW3 (cascaded pic ids) */ - outb(0x21, 0x04); - outb(0xa1, 0x02); - /* Send ICW4 (enable 8086 mode) */ - outb(0x21, 0x01); - outb(0xa1, 0x01); - /* Mask all irqs (except cascaded PIC2 irq) */ - outb(0x21, ~(1 << 2)); - outb(0xa1, ~0); - - /* Set ELCR to IRQs 10 and 11 */ - outb(0x4d0, 0); - outb(0x4d1, 0x0c); + /* Send ICW1 (select OCW1 + will send ICW4) */ + outb(0x20, 0x11); + outb(0xa0, 0x11); + /* Send ICW2 (base irqs: 0x08-0x0f for irq0-7, 0x70-0x77 for irq8-15) */ + outb(0x21, 8); + outb(0xa1, 0x70); + /* Send ICW3 (cascaded pic ids) */ + outb(0x21, 0x04); + outb(0xa1, 0x02); + /* Send ICW4 (enable 8086 mode) */ + outb(0x21, 0x01); + outb(0xa1, 0x01); + /* Mask all irqs (except cascaded PIC2 irq) */ + outb(0x21, ~(1 << 2)); + outb(0xa1, ~0); + + /* Set ELCR to IRQs 10 and 11 */ + outb(0x4d0, 0); + outb(0x4d1, 0x0c); } void setup_pam(int bdf, int pambase) @@ -103,8 +103,8 @@ void setup_hw(void) int rom_check_value; int pambase; - uint32_t id = pci_config_readl(bdf, 0); - if (id == (PCI_VENDOR_ID_INTEL | (PCI_DEVICE_ID_INTEL_82441 << 16))) { + uint32_t id = pci_config_readl(bdf, 0); + if (id == (PCI_VENDOR_ID_INTEL | (PCI_DEVICE_ID_INTEL_82441 << 16))) { setup_piix(); setup_piix_pm(); pambase = I440FX_PAM0; diff --git a/include/linuxboot.h b/include/linuxboot.h index 76a3354..6e865f0 100644 --- a/include/linuxboot.h +++ b/include/linuxboot.h @@ -9,7 +9,7 @@ struct linuxboot_args { uint32_t setup_size, kernel_size; /* Input */ - uint32_t cmdline_size, vmlinuz_size, initrd_size; + uint32_t cmdline_size, vmlinuz_size, initrd_size; uint8_t header[8192]; }; diff --git a/linuxboot.c b/linuxboot.c index cfcaf2d..251bcb6 100644 --- a/linuxboot.c +++ b/linuxboot.c @@ -104,7 +104,7 @@ void boot_bzimage(struct linuxboot_args *args) : : "b" (((uintptr_t) args->setup_addr) >> 4), "d" (args->cmdline_addr - args->setup_addr - 16)); - panic(); + panic(); } /* BX = address of data block @@ -80,7 +80,7 @@ static void extract_e820(void) int __attribute__ ((section (".text.startup"))) main(void) { #ifdef BENCHMARK_HACK - outb(FW_EXIT_PORT, FW_START); + outb(FW_EXIT_PORT, FW_START); #endif setup_hw(); @@ -70,7 +70,7 @@ static void do_setup_pci(uint32_t bdf, uint32_t id, uint8_t type) uint8_t pin; pin = pci_config_readb(bdf, PCI_INTERRUPT_PIN); - if (pin != 0) + if (pin != 0) do_setup_pci_irq(bdf, pin); if (type & PCI_HEADER_TYPE_BRIDGE) { @@ -164,8 +164,8 @@ void setup_pci(void) { const int bdf = 0; - uint32_t id = pci_config_readl(bdf, 0); - if (id == (PCI_VENDOR_ID_INTEL | (PCI_DEVICE_ID_INTEL_82441 << 16))) + uint32_t id = pci_config_readl(bdf, 0); + if (id == (PCI_VENDOR_ID_INTEL | (PCI_DEVICE_ID_INTEL_82441 << 16))) use_i440fx_routing = true; else if (id == (PCI_VENDOR_ID_INTEL | (PCI_DEVICE_ID_INTEL_Q35_MCH << 16))) use_i440fx_routing = false; @@ -221,8 +221,8 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list va) print_str(&s, va_arg(va, const char *), props); break; } - addchar(&s, f); - break; + addchar(&s, f); + break; } while(0); } *s.buffer = 0; |