From 1ca05b0f393c0201c0e8efe87831edddb6a53532 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 3 Jan 2010 17:43:37 -0500 Subject: [PATCH] Be sure to add "void" to all function prototypes that take no args. Omitting "void" leads to a K&R style declaration which was not intended. --- Makefile | 12 ++++---- src/acpi.c | 2 +- src/acpi.h | 2 +- src/apm.c | 4 +-- src/ata.c | 4 +-- src/ata.h | 2 +- src/biosvar.h | 6 ++-- src/block.c | 4 +-- src/boot.c | 10 +++---- src/boot.h | 4 +-- src/cdrom.c | 2 +- src/clock.c | 20 ++++++------- src/coreboot.c | 8 +++--- src/disk.c | 2 +- src/disk.h | 12 ++++---- src/farptr.h | 2 +- src/floppy.c | 10 +++---- src/kbd.c | 4 +-- src/memmap.c | 6 ++-- src/memmap.h | 4 +-- src/misc.c | 6 ++-- src/mouse.c | 2 +- src/optionroms.c | 8 +++--- src/output.c | 4 +-- src/pci.c | 2 +- src/pci.h | 4 +-- src/pcibios.c | 4 +-- src/pic.c | 2 +- src/pic.h | 10 +++---- src/pirtable.c | 2 +- src/pmm.c | 12 ++++---- src/pnpbios.c | 8 +++--- src/post.c | 8 +++--- src/ps2port.c | 10 +++---- src/ps2port.h | 2 +- src/ramdisk.c | 2 +- src/resume.c | 4 +-- src/serial.c | 4 +-- src/shadow.c | 4 +-- src/smm.c | 2 +- src/smp.c | 2 +- src/stacks.c | 20 ++++++------- src/types.h | 6 ++-- src/usb-hid.c | 4 +-- src/usb-hid.h | 4 +-- src/usb.c | 2 +- src/usb.h | 2 +- src/util.c | 6 ++-- src/util.h | 70 +++++++++++++++++++++++----------------------- src/vgahooks.c | 2 +- vgasrc/clext.c | 6 ++-- vgasrc/vga.c | 2 +- vgasrc/vgaio.c | 18 ++++++------ vgasrc/vgatables.h | 22 +++++++-------- 54 files changed, 193 insertions(+), 193 deletions(-) diff --git a/Makefile b/Makefile index a4463bd..1021e66 100644 --- a/Makefile +++ b/Makefile @@ -25,12 +25,12 @@ cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \ /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;) # Default compiler flags -COMMONCFLAGS = -Wall -Os -MD -m32 -march=i386 -mregparm=3 \ - -mpreferred-stack-boundary=2 -mrtd -freg-struct-return \ - -ffreestanding -fomit-frame-pointer \ - -fno-delete-null-pointer-checks -Wno-strict-aliasing \ - -ffunction-sections -fdata-sections -fno-common \ - -minline-all-stringops +COMMONCFLAGS = -Os -MD -Wall -Wold-style-definition -Wno-strict-aliasing \ + -m32 -march=i386 -mregparm=3 -mpreferred-stack-boundary=2 \ + -mrtd -minline-all-stringops \ + -freg-struct-return -ffreestanding -fomit-frame-pointer \ + -fno-delete-null-pointer-checks \ + -ffunction-sections -fdata-sections -fno-common COMMONCFLAGS += $(call cc-option,$(CC),-nopie,) COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,) COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,) diff --git a/src/acpi.c b/src/acpi.c index 9e5a4fc..f613b03 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -677,7 +677,7 @@ acpi_bios_init(void) } u32 -find_resume_vector() +find_resume_vector(void) { dprintf(4, "rsdp=%p\n", RsdpAddr); if (!RsdpAddr || RsdpAddr->signature != RSDP_SIGNATURE) diff --git a/src/acpi.h b/src/acpi.h index 63d3024..c3ae84c 100644 --- a/src/acpi.h +++ b/src/acpi.h @@ -4,7 +4,7 @@ #include "types.h" // u32 void acpi_bios_init(void); -u32 find_resume_vector(); +u32 find_resume_vector(void); #define RSDP_SIGNATURE 0x2052545020445352LL // "RSD PTR " diff --git a/src/apm.c b/src/apm.c index f30c22c..479d47c 100644 --- a/src/apm.c +++ b/src/apm.c @@ -53,8 +53,8 @@ handle_155301(struct bregs *regs) } // Assembler entry points defined in romlayout.S -extern void apm16protected_entry(); -extern void apm32protected_entry(); +extern void apm16protected_entry(void); +extern void apm32protected_entry(void); // APM 16 bit protected mode interface connect static void diff --git a/src/ata.c b/src/ata.c index 90e0392..add1d67 100644 --- a/src/ata.c +++ b/src/ata.c @@ -990,7 +990,7 @@ init_controller(struct ata_channel_s *atachannel // Locate and init ata controllers. static void -ata_init() +ata_init(void) { // Scan PCI bus for ATA adapters int count=0, pcicount=0; @@ -1052,7 +1052,7 @@ ata_init() } void -ata_setup() +ata_setup(void) { if (!CONFIG_ATA) return; diff --git a/src/ata.h b/src/ata.h index 149bacf..df53a01 100644 --- a/src/ata.h +++ b/src/ata.h @@ -17,7 +17,7 @@ extern struct ata_channel_s ATA_channels[CONFIG_MAX_ATA_INTERFACES]; int cdrom_read(struct disk_op_s *op); int ata_cmd_packet(struct drive_s *drive_g, u8 *cmdbuf, u8 cmdlen , u32 length, void *buf_fl); -void ata_setup(); +void ata_setup(void); int process_ata_op(struct disk_op_s *op); int process_atapi_op(struct disk_op_s *op); void describe_ata(struct drive_s *drive_g); diff --git a/src/biosvar.h b/src/biosvar.h index db6783e..b6e061b 100644 --- a/src/biosvar.h +++ b/src/biosvar.h @@ -232,11 +232,11 @@ struct extended_bios_data_area_s { FLATPTR_TO_SEG(BUILD_LOWRAM_END - EBDA_SIZE_START*1024) // Accessor functions -static inline u16 get_ebda_seg() { +static inline u16 get_ebda_seg(void) { return GET_BDA(ebda_seg); } static inline struct extended_bios_data_area_s * -get_ebda_ptr() +get_ebda_ptr(void) { ASSERT32FLAT(); return MAKE_FLATPTR(get_ebda_seg(), 0); @@ -279,7 +279,7 @@ static inline u32 __attribute_const get_global_offset(void) { return 0; } #endif -static inline u16 get_global_seg() { +static inline u16 get_global_seg(void) { return GET_SEG(GLOBAL_SEGREG); } #define GET_GLOBAL(var) \ diff --git a/src/block.c b/src/block.c index 3fb5e91..c6787e2 100644 --- a/src/block.c +++ b/src/block.c @@ -31,7 +31,7 @@ getDrive(u8 exttype, u8 extdriveoffset) } struct drive_s * -allocDrive() +allocDrive(void) { int driveid = Drives.drivecount; if (driveid >= ARRAY_SIZE(Drives.drives)) @@ -369,7 +369,7 @@ send_disk_op(struct disk_op_s *op) ****************************************************************/ void -drive_setup() +drive_setup(void) { memset(&Drives, 0, sizeof(Drives)); memset(&Drives.idmap, 0xff, sizeof(Drives.idmap)); diff --git a/src/boot.c b/src/boot.c index c427c00..151b0d3 100644 --- a/src/boot.c +++ b/src/boot.c @@ -22,7 +22,7 @@ struct ipl_s IPL; ****************************************************************/ void -boot_setup() +boot_setup(void) { if (! CONFIG_BOOT) return; @@ -222,7 +222,7 @@ menu_show_cbfs(struct ipl_entry_s *ie, int menupos) // Show IPL option menu. static void -interactive_bootmenu() +interactive_bootmenu(void) { if (! CONFIG_BOOTMENU || ! qemu_cfg_show_boot_menu()) return; @@ -309,7 +309,7 @@ run_bcv(struct ipl_entry_s *ie) // Prepare for boot - show menu and run bcvs. void -boot_prep() +boot_prep(void) { if (! CONFIG_BOOT) return; @@ -487,7 +487,7 @@ do_boot(u16 seq_nr) // Boot Failure recovery: try the next device. void VISIBLE32FLAT -handle_18() +handle_18(void) { debug_serial_setup(); debug_enter(NULL, DEBUG_HDL_18); @@ -499,7 +499,7 @@ handle_18() // INT 19h Boot Load Service Entry Point void VISIBLE32FLAT -handle_19() +handle_19(void) { debug_serial_setup(); debug_enter(NULL, DEBUG_HDL_19); diff --git a/src/boot.h b/src/boot.h index 1aa1bdc..db046e3 100644 --- a/src/boot.h +++ b/src/boot.h @@ -38,11 +38,11 @@ struct ipl_s { // boot.c extern struct ipl_s IPL; -void boot_setup(); +void boot_setup(void); void add_bev(u16 seg, u16 bev, u16 desc); void add_bcv(u16 seg, u16 ip, u16 desc); struct drive_s; void add_bcv_internal(struct drive_s *drive_g); -void boot_prep(); +void boot_prep(void); #endif // __BOOT_H diff --git a/src/cdrom.c b/src/cdrom.c index 8d1ec9a..883bffa 100644 --- a/src/cdrom.c +++ b/src/cdrom.c @@ -107,7 +107,7 @@ process_cdemu_op(struct disk_op_s *op) struct drive_s *cdemu_drive VAR16VISIBLE; void -cdemu_setup() +cdemu_setup(void) { if (!CONFIG_CDROM_EMU) return; diff --git a/src/clock.c b/src/clock.c index 6b4acb9..e32bf1b 100644 --- a/src/clock.c +++ b/src/clock.c @@ -62,7 +62,7 @@ u32 cpu_khz VAR16VISIBLE; static void -calibrate_tsc() +calibrate_tsc(void) { // Setup "timer2" u8 orig = inb(PORT_PS2_CTRLB); @@ -150,7 +150,7 @@ calc_future_tsc_usec(u32 usecs) ****************************************************************/ static int -rtc_updating() +rtc_updating(void) { // This function checks to see if the update-in-progress bit // is set in CMOS Status Register A. If not, it returns 0. @@ -173,7 +173,7 @@ rtc_updating() } static void -pit_setup() +pit_setup(void) { // timer0: binary count, 16bit count, mode 2 outb(PM_SEL_TIMER0|PM_ACCESS_WORD|PM_MODE2|PM_CNT_BINARY, PORT_PIT_MODE); @@ -183,7 +183,7 @@ pit_setup() } static void -init_rtc() +init_rtc(void) { outb_cmos(0x26, CMOS_STATUS_A); // 32,768Khz src, 976.5625us updates u8 regB = inb_cmos(CMOS_STATUS_B); @@ -199,7 +199,7 @@ bcd2bin(u8 val) } void -timer_setup() +timer_setup(void) { dprintf(3, "init timer\n"); calibrate_tsc(); @@ -435,7 +435,7 @@ handle_1a(struct bregs *regs) // INT 08h System Timer ISR Entry Point void VISIBLE16 -handle_08() +handle_08(void) { debug_isr(DEBUG_ISR_08); @@ -467,7 +467,7 @@ handle_08() ****************************************************************/ void -useRTC() +useRTC(void) { u16 ebda_seg = get_ebda_seg(); int count = GET_EBDA2(ebda_seg, RTCusers); @@ -480,7 +480,7 @@ useRTC() } void -releaseRTC() +releaseRTC(void) { u16 ebda_seg = get_ebda_seg(); int count = GET_EBDA2(ebda_seg, RTCusers); @@ -507,7 +507,7 @@ set_usertimer(u32 usecs, u16 seg, u16 offset) } static void -clear_usertimer() +clear_usertimer(void) { if (!(GET_BDA(rtc_wait_flag) & RWS_WAIT_PENDING)) return; @@ -576,7 +576,7 @@ handle_1583(struct bregs *regs) // int70h: IRQ8 - CMOS RTC void VISIBLE16 -handle_70() +handle_70(void) { debug_isr(DEBUG_ISR_70); diff --git a/src/coreboot.c b/src/coreboot.c index 3dc6a7f..7ad46ce 100644 --- a/src/coreboot.c +++ b/src/coreboot.c @@ -122,7 +122,7 @@ static struct cb_memory *CBMemTable; // Populate max ram and e820 map info by scanning for a coreboot table. static void -coreboot_fill_map() +coreboot_fill_map(void) { dprintf(3, "Attempting to find coreboot table\n"); @@ -282,7 +282,7 @@ scan_tables(u32 start, u32 size) } void -coreboot_copy_biostable() +coreboot_copy_biostable(void) { struct cb_memory *cbm = CBMemTable; if (! CONFIG_COREBOOT || !cbm) @@ -368,7 +368,7 @@ struct cbfs_header { static struct cbfs_header *CBHDR; static void -cbfs_setup() +cbfs_setup(void) { if (! CONFIG_COREBOOT_FLASH) return; @@ -411,7 +411,7 @@ cbfs_verify(struct cbfs_file *file) // Return the first file in the CBFS archive static struct cbfs_file * -cbfs_getfirst() +cbfs_getfirst(void) { if (! CBHDR) return NULL; diff --git a/src/disk.c b/src/disk.c index 70f237f..4457ea9 100644 --- a/src/disk.c +++ b/src/disk.c @@ -852,7 +852,7 @@ handle_13(struct bregs *regs) // record completion in BIOS task complete flag void VISIBLE16 -handle_76() +handle_76(void) { debug_isr(DEBUG_ISR_76); SET_BDA(disk_interrupt_flag, 0xff); diff --git a/src/disk.h b/src/disk.h index 7feb9af..ac5748e 100644 --- a/src/disk.h +++ b/src/disk.h @@ -230,7 +230,7 @@ struct drives_s { // block.c extern struct drives_s Drives; struct drive_s *getDrive(u8 exttype, u8 extdriveoffset); -struct drive_s *allocDrive(); +struct drive_s *allocDrive(void); void setup_translation(struct drive_s *drive_g); void map_floppy_drive(struct drive_s *drive_g); void map_hd_drive(struct drive_s *drive_g); @@ -238,27 +238,27 @@ void map_cd_drive(struct drive_s *drive_g); void describe_drive(struct drive_s *drive_g); int process_op(struct disk_op_s *op); int send_disk_op(struct disk_op_s *op); -void drive_setup(); +void drive_setup(void); // floppy.c extern struct floppy_ext_dbt_s diskette_param_table2; -void floppy_setup(); +void floppy_setup(void); struct drive_s *addFloppy(int floppyid, int ftype, int driver); void describe_floppy(struct drive_s *drive_g); int find_floppy_type(u32 size); int process_floppy_op(struct disk_op_s *op); -void floppy_tick(); +void floppy_tick(void); // cdrom.c extern struct drive_s *cdemu_drive; int process_cdemu_op(struct disk_op_s *op); -void cdemu_setup(); +void cdemu_setup(void); void cdemu_134b(struct bregs *regs); int cdrom_boot(int cdid); // ramdisk.c void describe_ramdisk(struct drive_s *drive_g); -void ramdisk_setup(); +void ramdisk_setup(void); int process_ramdisk_op(struct disk_op_s *op); #endif // disk.h diff --git a/src/farptr.h b/src/farptr.h index 0bd9248..3dbf545 100644 --- a/src/farptr.h +++ b/src/farptr.h @@ -50,7 +50,7 @@ extern u16 __segment_FS, __segment_GS; // Macros for automatically choosing the appropriate memory size // access method. -extern void __force_link_error__unknown_type(); +extern void __force_link_error__unknown_type(void); #define __GET_VAR(prefix, seg, var) ({ \ typeof(var) __val; \ diff --git a/src/floppy.c b/src/floppy.c index a8e2ac9..a7bd0dd 100644 --- a/src/floppy.c +++ b/src/floppy.c @@ -119,7 +119,7 @@ describe_floppy(struct drive_s *drive_g) } void -floppy_setup() +floppy_setup(void) { if (! CONFIG_FLOPPY) return; @@ -159,7 +159,7 @@ find_floppy_type(u32 size) ****************************************************************/ static void -floppy_reset_controller() +floppy_reset_controller(void) { // Reset controller u8 val8 = inb(PORT_FD_DOR); @@ -172,7 +172,7 @@ floppy_reset_controller() } static int -wait_floppy_irq() +wait_floppy_irq(void) { ASSERT16(); u8 v; @@ -570,7 +570,7 @@ process_floppy_op(struct disk_op_s *op) // INT 0Eh Diskette Hardware ISR Entry Point void VISIBLE16 -handle_0e() +handle_0e(void) { debug_isr(DEBUG_ISR_0e); if (! CONFIG_FLOPPY) @@ -593,7 +593,7 @@ done: // Called from int08 handler. void -floppy_tick() +floppy_tick(void) { if (! CONFIG_FLOPPY) return; diff --git a/src/kbd.c b/src/kbd.c index 39294a7..6f3ae15 100644 --- a/src/kbd.c +++ b/src/kbd.c @@ -34,7 +34,7 @@ #define KF2_101KBD (1<<4) void -kbd_setup() +kbd_setup(void) { dprintf(3, "init keyboard\n"); u16 x = offsetof(struct bios_data_area_s, kbd_buf); @@ -220,7 +220,7 @@ handle_16XX(struct bregs *regs) } static void -set_leds() +set_leds(void) { u8 shift_flags = (GET_BDA(kbd_flag0) >> 4) & 0x07; u8 kbd_led = GET_BDA(kbd_led); diff --git a/src/memmap.c b/src/memmap.c index 45f5012..aa69503 100644 --- a/src/memmap.c +++ b/src/memmap.c @@ -42,7 +42,7 @@ insert_e820(int i, u64 start, u64 size, u32 type) // Show the current e820_list. static void -dump_map() +dump_map(void) { dprintf(1, "e820 map has %d items:\n", e820_count); int i; @@ -138,14 +138,14 @@ find_high_area(u32 size) // Prep for memmap stuff - init bios table locations. void -memmap_setup() +memmap_setup(void) { e820_count = 0; } // Report on final memory locations. void -memmap_finalize() +memmap_finalize(void) { dump_map(); } diff --git a/src/memmap.h b/src/memmap.h index 616ae35..68eb6ac 100644 --- a/src/memmap.h +++ b/src/memmap.h @@ -17,8 +17,8 @@ struct e820entry { }; void add_e820(u64 start, u64 size, u32 type); -void memmap_setup(); -void memmap_finalize(); +void memmap_setup(void); +void memmap_finalize(void); struct e820entry *find_high_area(u32 size); // A typical OS page size diff --git a/src/misc.c b/src/misc.c index 7d6e954..b33ef64 100644 --- a/src/misc.c +++ b/src/misc.c @@ -55,13 +55,13 @@ handle_10(struct bregs *regs) // NMI handler void VISIBLE16 -handle_02() +handle_02(void) { debug_isr(DEBUG_ISR_02); } void -mathcp_setup() +mathcp_setup(void) { dprintf(3, "math cp init\n"); // 80x87 coprocessor installed @@ -71,7 +71,7 @@ mathcp_setup() // INT 75 - IRQ13 - MATH COPROCESSOR EXCEPTION void VISIBLE16 -handle_75() +handle_75(void) { debug_isr(DEBUG_ISR_75); diff --git a/src/mouse.c b/src/mouse.c index ac37cc0..52e225c 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -12,7 +12,7 @@ #include "ps2port.h" // aux_command void -mouse_setup() +mouse_setup(void) { if (! CONFIG_MOUSE) return; diff --git a/src/optionroms.c b/src/optionroms.c index 31bb98b..ace0c0e 100644 --- a/src/optionroms.c +++ b/src/optionroms.c @@ -170,7 +170,7 @@ get_pci_rom(struct rom_header *rom) // Return the memory position up to which roms may be located. static inline u32 -max_rom() +max_rom(void) { extern u8 code32flat_start[]; if ((u32)code32flat_start > BUILD_BIOS_ADDR) @@ -364,7 +364,7 @@ init_pcirom(u16 bdf, int isvga) ****************************************************************/ void -optionrom_setup() +optionrom_setup(void) { if (! CONFIG_OPTIONROMS) return; @@ -435,7 +435,7 @@ optionrom_setup() // Call into vga code to turn on console. void -vga_setup() +vga_setup(void) { VGAbdf = -1; RomEnd = BUILD_ROM_START; @@ -477,7 +477,7 @@ vga_setup() } void -s3_resume_vga_init() +s3_resume_vga_init(void) { if (!CONFIG_S3_RESUME_VGA_INIT) return; diff --git a/src/output.c b/src/output.c index 2e7175e..3de565a 100644 --- a/src/output.c +++ b/src/output.c @@ -25,7 +25,7 @@ struct putcinfo { #define DEBUG_TIMEOUT 100000 void -debug_serial_setup() +debug_serial_setup(void) { if (!CONFIG_DEBUG_SERIAL) return; @@ -59,7 +59,7 @@ debug_serial(char c) // Make sure all serial port writes have been completely sent. static void -debug_serial_flush() +debug_serial_flush(void) { if (!CONFIG_DEBUG_SERIAL) return; diff --git a/src/pci.c b/src/pci.c index 143acf6..1ab3c2c 100644 --- a/src/pci.c +++ b/src/pci.c @@ -104,7 +104,7 @@ pci_next(int bdf, int *pmax) // Find a vga device with legacy address decoding enabled. int -pci_find_vga() +pci_find_vga(void) { int bdf = 0x0000, max = 0x0100; for (;;) { diff --git a/src/pci.h b/src/pci.h index 3c04529..eea5b09 100644 --- a/src/pci.h +++ b/src/pci.h @@ -30,7 +30,7 @@ u16 pci_config_readw(u16 bdf, u32 addr); u8 pci_config_readb(u16 bdf, u32 addr); void pci_config_maskw(u16 bdf, u32 addr, u16 off, u16 on); -int pci_find_vga(); +int pci_find_vga(void); int pci_find_device(u16 vendid, u16 devid); int pci_find_class(u16 classid); @@ -41,7 +41,7 @@ int pci_next(int bdf, int *pmax); ; BDF=pci_next(BDF+1, &MAX)) // pirtable.c -void create_pirtable(); +void create_pirtable(void); /**************************************************************** diff --git a/src/pcibios.c b/src/pcibios.c index 2425a65..2e44c01 100644 --- a/src/pcibios.c +++ b/src/pcibios.c @@ -13,8 +13,8 @@ #include "pci_regs.h" // PCI_VENDOR_ID // romlayout.S -extern void bios32_entry(); -extern void pcibios32_entry(); +extern void bios32_entry(void); +extern void pcibios32_entry(void); #define RET_FUNC_NOT_SUPPORTED 0x81 #define RET_BAD_VENDOR_ID 0x83 diff --git a/src/pic.c b/src/pic.c index 382dcbb..f421bec 100644 --- a/src/pic.c +++ b/src/pic.c @@ -10,7 +10,7 @@ #include "config.h" // CONFIG_* void -pic_setup() +pic_setup(void) { dprintf(3, "init pic\n"); // Send ICW1 (select OCW1 + will send ICW4) diff --git a/src/pic.h b/src/pic.h index 3056676..290fcb0 100644 --- a/src/pic.h +++ b/src/pic.h @@ -22,14 +22,14 @@ #define PIC2_IRQ14 (1<<6) static inline void -eoi_pic1() +eoi_pic1(void) { // Send eoi (select OCW2 + eoi) outb(0x20, PORT_PIC1_CMD); } static inline void -eoi_pic2() +eoi_pic2(void) { // Send eoi (select OCW2 + eoi) outb(0x20, PORT_PIC2_CMD); @@ -61,7 +61,7 @@ mask_pic2(u8 irq) } static inline u8 -get_pic1_isr() +get_pic1_isr(void) { // 0x0b == select OCW1 + read ISR outb(0x0b, PORT_PIC1_CMD); @@ -69,7 +69,7 @@ get_pic1_isr() } static inline u8 -get_pic2_isr() +get_pic2_isr(void) { // 0x0b == select OCW1 + read ISR outb(0x0b, PORT_PIC2_CMD); @@ -98,6 +98,6 @@ __enable_hwirq(int hwirq, void (*func)(void)) __enable_hwirq(irq, func); \ } while (0) -void pic_setup(); +void pic_setup(void); #endif // pic.h diff --git a/src/pirtable.c b/src/pirtable.c index 18d3ff5..4c3f1ff 100644 --- a/src/pirtable.c +++ b/src/pirtable.c @@ -92,7 +92,7 @@ struct pir_table PIR_TABLE __aligned(16) VAR16EXPORT = { #endif // CONFIG_PIRTABLE && !CONFIG_COREBOOT void -create_pirtable() +create_pirtable(void) { if (! CONFIG_PIRTABLE) return; diff --git a/src/pmm.c b/src/pmm.c index dab8fb3..0461e41 100644 --- a/src/pmm.c +++ b/src/pmm.c @@ -150,7 +150,7 @@ zone_free(void *data, u32 olddata) // Report the status of all the zones. static void -dumpZones() +dumpZones(void) { int i; for (i=0; i 0; } -void timer_setup(); +void timer_setup(void); void ndelay(u32 count); void udelay(u32 count); void mdelay(u32 count); @@ -259,8 +259,8 @@ u64 calc_future_tsc(u32 msecs); u64 calc_future_tsc_usec(u32 usecs); void handle_1583(struct bregs *regs); void handle_1586(struct bregs *regs); -void useRTC(); -void releaseRTC(); +void useRTC(void); +void releaseRTC(void); // apm.c void handle_1553(struct bregs *regs); @@ -270,14 +270,14 @@ void handle_1ab1(struct bregs *regs); void bios32_setup(void); // shadow.c -void make_bios_writable(); -void make_bios_readonly(); +void make_bios_writable(void); +void make_bios_readonly(void); // pciinit.c void pci_setup(void); // smm.c -void smm_init(); +void smm_init(void); // smp.c extern u32 CountCPUs; @@ -295,37 +295,37 @@ int cbfs_copyfile(struct cbfs_file *file, void *dst, u32 maxlen); int cbfs_copy_optionrom(void *dst, u32 maxlen, u32 vendev); void cbfs_run_payload(struct cbfs_file *file); -void coreboot_copy_biostable(); -void coreboot_setup(); +void coreboot_copy_biostable(void); +void coreboot_setup(void); // vgahooks.c extern int VGAbdf; -void handle_155f(); +void handle_155f(struct bregs *regs); void vgahook_setup(const char *vendor, const char *part); // optionroms.c void call_bcv(u16 seg, u16 ip); -void optionrom_setup(); -void vga_setup(); -void s3_resume_vga_init(); +void optionrom_setup(void); +void vga_setup(void); +void s3_resume_vga_init(void); extern u32 RomEnd; // resume.c -void init_dma(); +void init_dma(void); // pnpbios.c #define PNP_SIGNATURE 0x506e5024 // $PnP -u16 get_pnp_offset(); -void pnp_setup(); +u16 get_pnp_offset(void); +void pnp_setup(void); // pmm.c extern struct zone_s ZoneLow, ZoneHigh, ZoneFSeg, ZoneTmpLow, ZoneTmpHigh; -void malloc_setup(); -void malloc_finalize(); +void malloc_setup(void); +void malloc_finalize(void); void *pmm_malloc(struct zone_s *zone, u32 handle, u32 size, u32 align); int pmm_free(void *data); -void pmm_setup(); -void pmm_finalize(); +void pmm_setup(void); +void pmm_finalize(void); #define PMM_DEFAULT_HANDLE 0xFFFFFFFF // Minimum alignment of malloc'd memory #define MALLOC_MIN_ALIGN 16 @@ -359,7 +359,7 @@ static inline void free(void *data) { void mtrr_setup(void); // romlayout.S -void reset_vector() __noreturn; +void reset_vector(void) __noreturn; // misc.c extern u8 BiosChecksum; diff --git a/src/vgahooks.c b/src/vgahooks.c index ef33be5..26ae156 100644 --- a/src/vgahooks.c +++ b/src/vgahooks.c @@ -69,7 +69,7 @@ getViaRamSpeed(u16 bdf) } static int -getAMDRamSpeed() +getAMDRamSpeed(void) { int bdf = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB_MEMCTL); if (bdf < 0) diff --git a/vgasrc/clext.c b/vgasrc/clext.c index 13e3c2b..36ccad3 100644 --- a/vgasrc/clext.c +++ b/vgasrc/clext.c @@ -315,7 +315,7 @@ cirrus_switch_mode_setregs(u16 *data, u16 port) } static u16 -cirrus_get_crtc() +cirrus_get_crtc(void) { if (inb(VGAREG_READ_MISC_OUTPUT) & 1) return VGAREG_VGA_CRTC_ADDRESS; @@ -364,14 +364,14 @@ cirrus_set_video_mode(u8 mode) } static int -cirrus_check() +cirrus_check(void) { outw(0x9206, VGAREG_SEQU_ADDRESS); return inb(VGAREG_SEQU_DATA) == 0x12; } void -cirrus_init() +cirrus_init(void) { dprintf(1, "cirrus init\n"); if (! cirrus_check()) diff --git a/vgasrc/vga.c b/vgasrc/vga.c index 888c711..e38298e 100644 --- a/vgasrc/vga.c +++ b/vgasrc/vga.c @@ -1330,7 +1330,7 @@ handle_10(struct bregs *regs) ****************************************************************/ static void -init_bios_area() +init_bios_area(void) { // init detected hardware BIOS Area // set 80x25 color (not clear from RBIL but usual) diff --git a/vgasrc/vgaio.c b/vgasrc/vgaio.c index d341b89..ffded34 100644 --- a/vgasrc/vgaio.c +++ b/vgasrc/vgaio.c @@ -19,14 +19,14 @@ ****************************************************************/ void -vgahw_screen_disable() +vgahw_screen_disable(void) { inb(VGAREG_ACTL_RESET); outb(0x00, VGAREG_ACTL_ADDRESS); } void -vgahw_screen_enable() +vgahw_screen_enable(void) { inb(VGAREG_ACTL_RESET); outb(0x20, VGAREG_ACTL_ADDRESS); @@ -65,7 +65,7 @@ vgahw_set_overscan_border_color(u8 color) } u8 -vgahw_get_overscan_border_color() +vgahw_get_overscan_border_color(void) { inb(VGAREG_ACTL_RESET); outb(0x11, VGAREG_ACTL_ADDRESS); @@ -240,7 +240,7 @@ vgahw_set_pel_mask(u8 val) } u8 -vgahw_get_pel_mask() +vgahw_get_pel_mask(void) { return inb(VGAREG_PEL_MASK); } @@ -288,7 +288,7 @@ vgahw_set_text_block_specifier(u8 spec) } void -get_font_access() +get_font_access(void) { outw(0x0100, VGAREG_SEQU_ADDRESS); outw(0x0402, VGAREG_SEQU_ADDRESS); @@ -300,7 +300,7 @@ get_font_access() } void -release_font_access() +release_font_access(void) { outw(0x0100, VGAREG_SEQU_ADDRESS); outw(0x0302, VGAREG_SEQU_ADDRESS); @@ -318,7 +318,7 @@ release_font_access() ****************************************************************/ static u16 -get_crtc() +get_crtc(void) { return GET_BDA(crtc_address); } @@ -365,7 +365,7 @@ vgahw_set_scan_lines(u8 lines) // Get vertical display end u16 -vgahw_get_vde() +vgahw_get_vde(void) { u16 crtc_addr = get_crtc(); outb(0x12, crtc_addr); @@ -545,7 +545,7 @@ vgahw_enable_video_addressing(u8 disable) } void -vgahw_init() +vgahw_init(void) { // switch to color mode and enable CPU access 480 lines outb(0xc3, VGAREG_WRITE_MISC_OUTPUT); diff --git a/vgasrc/vgatables.h b/vgasrc/vgatables.h index e5f3309..1e76b3a 100644 --- a/vgasrc/vgatables.h +++ b/vgasrc/vgatables.h @@ -169,11 +169,11 @@ void vgafb_load_font(u16 seg, void *src_far, u16 count , u16 start, u8 destflags, u8 fontsize); // vgaio.c -void vgahw_screen_disable(); -void vgahw_screen_enable(); +void vgahw_screen_disable(void); +void vgahw_screen_enable(void); void vgahw_set_border_color(u8 color); void vgahw_set_overscan_border_color(u8 color); -u8 vgahw_get_overscan_border_color(); +u8 vgahw_get_overscan_border_color(void); void vgahw_set_palette(u8 palid); void vgahw_set_single_palette_reg(u8 reg, u8 val); u8 vgahw_get_single_palette_reg(u8 reg); @@ -185,33 +185,33 @@ void vgahw_read_video_dac_state(u8 *pmode, u8 *curpage); void vgahw_set_dac_regs(u16 seg, u8 *data_far, u8 start, int count); void vgahw_get_dac_regs(u16 seg, u8 *data_far, u8 start, int count); void vgahw_set_pel_mask(u8 val); -u8 vgahw_get_pel_mask(); +u8 vgahw_get_pel_mask(void); void vgahw_save_dac_state(u16 seg, struct saveDACcolors *info); void vgahw_restore_dac_state(u16 seg, struct saveDACcolors *info); void vgahw_sequ_write(u8 index, u8 value); void vgahw_grdc_write(u8 index, u8 value); void vgahw_set_text_block_specifier(u8 spec); -void get_font_access(); -void release_font_access(); +void get_font_access(void); +void release_font_access(void); void vgahw_set_cursor_shape(u8 start, u8 end); void vgahw_set_active_page(u16 address); void vgahw_set_cursor_pos(u16 address); void vgahw_set_scan_lines(u8 lines); -u16 vgahw_get_vde(); +u16 vgahw_get_vde(void); void vgahw_save_state(u16 seg, struct saveVideoHardware *info); void vgahw_restore_state(u16 seg, struct saveVideoHardware *info); void vgahw_set_mode(struct VideoParam_s *vparam_g); void vgahw_enable_video_addressing(u8 disable); -void vgahw_init(); +void vgahw_init(void); // clext.c void cirrus_set_video_mode(u8 mode); -void cirrus_init(); +void cirrus_init(void); // vbe.c -- not implemented yet. #define VBE_DISPI_DISABLED 0x00 void dispi_set_enable(int enable); -void vbe_init(); -int vbe_has_vbe_display(); +void vbe_init(void); +int vbe_has_vbe_display(void); #endif // vgatables.h -- 2.25.1