Changeset 482 for trunk/hal/x86_64/core


Ignore:
Timestamp:
Aug 21, 2018, 9:52:05 PM (6 years ago)
Author:
viala@…
Message:

[hal/x86_64] Add void type to function prototypes with no parameter

Location:
trunk/hal/x86_64/core
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_acpi.c

    r457 r482  
    300300/* -------------------------------------------------------------------------- */
    301301
    302 void hal_acpi_init()
     302void hal_acpi_init( void )
    303303{
    304304        rsdp_t *rsdp;
  • trunk/hal/x86_64/core/hal_acpi.h

    r275 r482  
    5858 */
    5959
    60 void hal_acpi_init();
     60void hal_acpi_init( void );
    6161
    6262#define ACPI_RSDP_ALIGN 16
  • trunk/hal/x86_64/core/hal_apic.c

    r457 r482  
    104104
    105105uint64_t
    106 hal_pit_timer_read()
     106hal_pit_timer_read( void )
    107107{
    108108        uint8_t lo, hi;
     
    197197#define RS232_SCRATCH   0x07
    198198
    199 static bool_t hal_com_received()
     199static bool_t hal_com_received( void )
    200200{
    201201        return (in8(RS232_COM1_BASE + RS232_LSR) & LSR_DR) != 0;
    202202}
    203203
    204 static bool_t hal_com_transmit_empty()
     204static bool_t hal_com_transmit_empty( void )
    205205{
    206206        return (in8(RS232_COM1_BASE + RS232_LSR) & LSR_TBE) != 0;
    207207}
    208208
    209 char hal_com_read()
     209char hal_com_read( void )
    210210{
    211211        while (!hal_com_received());
     
    228228 * Called early to provide x86-specific messages. Interrupts disabled.
    229229 */
    230 void hal_com_init_early()
     230void hal_com_init_early( void )
    231231{
    232232        /* Disable all interrupts */
     
    246246}
    247247
    248 static void hal_com_init()
     248static void hal_com_init( void )
    249249{
    250250        /* Disable all interrupts */
     
    337337}
    338338
    339 static void hal_ioapic_init()
     339static void hal_ioapic_init( void )
    340340{
    341341        uint32_t ver;
     
    374374}
    375375
    376 uint32_t hal_lapic_gid()
     376uint32_t hal_lapic_gid( void )
    377377{
    378378        return hal_lapic_read(LAPIC_ID) >> LAPIC_ID_SHIFT;
    379379}
    380380
    381 static void hal_lapic_icr_wait()
     381static void hal_lapic_icr_wait( void )
    382382{
    383383        while ((hal_lapic_read(LAPIC_ICRLO) & LAPIC_DLSTAT_BUSY) != 0) {
     
    390390 * exact bus frequency.
    391391 */
    392 static void hal_lapic_calibrate()
     392static void hal_lapic_calibrate( void )
    393393{
    394394        uint64_t pittick, lapictick0, lapictick1;
     
    442442 * Only the Spurious and APIC Timer interrupts are enabled.
    443443 */
    444 void cpu_lapic_init()
     444void cpu_lapic_init( void )
    445445{
    446446        if ((rdmsr(MSR_APICBASE) & APICBASE_PHYSADDR) != lapic_pa) {
     
    536536/* -------------------------------------------------------------------------- */
    537537
    538 void hal_apic_init()
     538void hal_apic_init( void )
    539539{
    540540        /* Disable the PIC */
  • trunk/hal/x86_64/core/hal_apic.h

    r237 r482  
    2121
    2222#ifndef x86_ASM
    23 char hal_com_read();
     23char hal_com_read( void );
    2424void hal_com_send(uint8_t chan, char c);
    25 void hal_com_init_early();
     25void hal_com_init_early( void );
    2626
    2727void hal_ioapic_bind_irq(uint8_t irq, uint8_t vec, uint8_t dest);
     
    3232void hal_ioapic_set_entry(uint8_t irq, uint8_t vec, uint8_t dest);
    3333
    34 uint32_t hal_lapic_gid();
    35 void cpu_lapic_init();
    36 void hal_apic_init();
     34uint32_t hal_lapic_gid( void );
     35void cpu_lapic_init( void );
     36void hal_apic_init( void );
    3737
    3838int boot_cpuN(uint32_t gid, paddr_t pa);
  • trunk/hal/x86_64/core/hal_gpt.c

    r457 r482  
    6161 * function, cluster0's heap is empty.
    6262 */
    63 void hal_gpt_bootstrap_reset()
     63void hal_gpt_bootstrap_reset( void )
    6464{
    6565        /*
     
    7878 * only call hal_gpt_bootstrap_valloc, without entering it in a PA.
    7979 */
    80 size_t hal_gpt_bootstrap_uniformize()
     80size_t hal_gpt_bootstrap_uniformize( void )
    8181{
    8282        size_t pa_offset = pa_avail - 0;
  • trunk/hal/x86_64/core/hal_init.c

    r457 r482  
    4747void kernel_init(boot_info_t *info);
    4848
    49 static void gdt_create();
    50 static void idt_create();
     49static void gdt_create( void );
     50static void idt_create( void );
    5151void cpu_tls_init(size_t lid);
    52 void cpu_identify();
     52void cpu_identify( void );
    5353void cpu_attach(size_t lid);
    5454
     
    8585 * Configure the features of the system depending on the multiboot info.
    8686 */
    87 static void multiboot_init()
     87static void multiboot_init( void )
    8888{
    8989        size_t mmap_length = mb_info.mi_mmap_length;
     
    118118/* -------------------------------------------------------------------------- */
    119119
    120 static size_t init_bootinfo_pages_nr()
     120static size_t init_bootinfo_pages_nr( void )
    121121{
    122122        size_t mmap_length = mb_info.mi_mmap_length;
     
    273273static uint32_t cpuN_booted __in_kdata;
    274274
    275 void start_secondary_cpus()
     275void start_secondary_cpus( void )
    276276{
    277277        pt_entry_t flags = PG_V | PG_KW;
     
    311311}
    312312
    313 void init_x86_64_cpuN()
     313void init_x86_64_cpuN( void )
    314314{
    315315        lid_t lid;
     
    346346/* -------------------------------------------------------------------------- */
    347347
    348 static void apic_map()
     348static void apic_map( void )
    349349{
    350350        extern vaddr_t lapic_va, ioapic_va;
     
    489489}
    490490
    491 static void gdt_create()
     491static void gdt_create( void )
    492492{
    493493        memset(&gdtstore, 0, PAGE_SIZE);
     
    506506}
    507507
    508 void cpu_load_gdt()
     508void cpu_load_gdt( void )
    509509{
    510510        struct region_descriptor region;
     
    519519} idt_bitmap __in_kdata;
    520520
    521 int idt_slot_alloc()
     521int idt_slot_alloc( void )
    522522{
    523523        size_t i;
     
    556556}
    557557
    558 static void idt_create()
     558static void idt_create( void )
    559559{
    560560        extern uint64_t x86_traps[], x86_intrs[], x86_rsvd;
     
    594594}
    595595
    596 void cpu_load_idt()
     596void cpu_load_idt( void )
    597597{
    598598        struct region_descriptor region;
     
    671671uint64_t cpu_features[4] __in_kdata;
    672672
    673 void cpu_identify()
     673void cpu_identify( void )
    674674{
    675675        /*
  • trunk/hal/x86_64/core/hal_internal.h

    r368 r482  
    3333/* hal_init.c */
    3434void cpu_activate(uint32_t gid);
    35 int idt_slot_alloc();
     35int idt_slot_alloc( void );
    3636void idt_slot_free(int slot);
    3737
    3838/* hal_cpu.S */
    3939void invlpg(vaddr_t va);
    40 void sti();
    41 void cli();
    42 uint64_t rdtsc();
     40void sti( void );
     41void cli( void );
     42uint64_t rdtsc( void );
    4343uint8_t in8(uint32_t port);
    4444uint16_t in16(uint32_t port);
     
    4747uint64_t rdmsr(uint32_t);
    4848void wrmsr(uint32_t, uint64_t);
    49 void mfence();
     49void mfence( void );
    5050uint64_t rcr0(void);
    5151vaddr_t rcr2(void);
     
    5555void lcr4(uint64_t);
    5656void cpuid(uint32_t eax, uint32_t ecx, uint32_t *desc);
    57 void tlbflushg();
    58 void tlbflush();
    59 void clts();
    60 void stts();
    61 void pause();
    62 void wbinvd();
     57void tlbflushg( void );
     58void tlbflush( void );
     59void clts( void );
     60void stts( void );
     61void pause( void );
     62void wbinvd( void );
    6363
    6464void cpu_context_switch(void *oldctx, void *newctx);
     
    7272paddr_t hal_gpt_bootstrap_palloc(size_t npages);
    7373vaddr_t hal_gpt_bootstrap_valloc(size_t npages);
    74 void hal_gpt_bootstrap_reset();
    75 size_t hal_gpt_bootstrap_uniformize();
     74void hal_gpt_bootstrap_reset( void );
     75size_t hal_gpt_bootstrap_uniformize( void );
    7676
    7777void hal_gpt_enter(vaddr_t va, paddr_t pa, pt_entry_t flags);
     
    8585
    8686/* x86_printf.c */
    87 void x86_lock();
    88 void x86_unlock();
     87void x86_lock( void );
     88void x86_unlock( void );
    8989
    9090void x86_panic(char *msg);
  • trunk/hal/x86_64/core/hal_segmentation.h

    r359 r482  
    163163void lidt(struct region_descriptor *);
    164164void ltr(uint16_t);
    165 tls_t *curtls();
     165tls_t *curtls( void );
    166166
    167167#define INTRS_ENABLED   0xFFEFAAAA
  • trunk/hal/x86_64/core/hal_special.c

    r457 r482  
    3232struct thread_s;
    3333
    34 tls_t *curtls()
     34tls_t *curtls( void )
    3535{
    3636        tls_t *cputls;
     
    4343}
    4444
    45 gid_t hal_get_gid()
     45gid_t hal_get_gid( void )
    4646{
    4747        return curtls()->tls_gid;
    4848}
    4949
    50 cycle_t hal_time_stamp()
     50cycle_t hal_time_stamp( void )
    5151{
    5252        return rdtsc();
    5353}
    5454
    55 inline reg_t hal_get_sr()
     55inline reg_t hal_get_sr( void )
    5656{
    5757        return 0;
    5858}
    5959
    60 uint64_t hal_get_cycles()
     60uint64_t hal_get_cycles( void )
    6161{
    6262        uint64_t cycles;
     
    7373}
    7474
    75 struct thread_s *hal_get_current_thread()
     75struct thread_s *hal_get_current_thread( void )
    7676{
    7777        return curtls()->tls_thr;
     
    8585/* -------------------------------------------------------------------------- */
    8686
    87 void hal_fpu_enable()
     87void hal_fpu_enable( void )
    8888{
    8989        /* FPU not implemented yet */
     
    9292}
    9393
    94 void hal_fpu_disable()
     94void hal_fpu_disable( void )
    9595{
    9696        /* FPU not implemented yet */
     
    9999}
    100100
    101 uint32_t hal_get_stack()
     101uint32_t hal_get_stack( void )
    102102{
    103103        x86_panic((char *)__func__);
     
    111111}
    112112
    113 uint32_t hal_get_bad_vaddr()
     113uint32_t hal_get_bad_vaddr( void )
    114114{
    115115        x86_panic((char *)__func__);
     
    128128}
    129129
    130 void hal_fence()
     130void hal_fence( void )
    131131{
    132132        mfence();
    133133}
    134134
    135 void hal_rdbar()
     135void hal_rdbar( void )
    136136{
    137137        x86_panic((char *)__func__);
    138138}
    139139
    140 void hal_core_sleep()
     140void hal_core_sleep( void )
    141141{
    142142        x86_panic((char *)__func__);
  • trunk/hal/x86_64/core/x86_printf.c

    r457 r482  
    4646static uint32_t x86_lock_val __in_kdata = 0;
    4747
    48 void x86_lock()
     48void x86_lock( void )
    4949{
    5050        while (!hal_atomic_cas(&x86_lock_val, 0, 1)) {
     
    5353}
    5454
    55 void x86_unlock()
     55void x86_unlock( void )
    5656{
    5757        while (!hal_atomic_cas(&x86_lock_val, 1, 0)) {
     
    7272}
    7373
    74 static void check_scroll()
     74static void check_scroll( void )
    7575{
    7676        char *base = (char *)iom_base + (0xB8000 - IOM_BEGIN);
Note: See TracChangeset for help on using the changeset viewer.