Re: [PATCH V10 05/13] MIPS: Loongson: Add UEFI-like firmware interface support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Huacai Chen (chenhc@xxxxxxxxxx) [130415 14:49]:
> The new UEFI-like firmware interface has 3 advantages:
> 
> 1, Firmware export a physical memory map which is similar to X86's
>    E820 map, so prom_init_memory() will be more elegant that #ifdef
>    clauses can be removed.
> 2, Firmware export a pci irq routing table, we no longer need pci
>    irq routing fixup in kernel's code.
> 3, Firmware has a built-in vga bios, and its address is exported,
>    the linux kernel no longer need an embedded blob.
> 
> With the new interface, Loongson-3A/2G and all their successors can use
> a unified kernel. All Loongson-based machines support this new interface
> except 2E/2F series.

Can't we auto-detect whether there is an UEFI-like interface? That
would allow to reduce the number of #ifdefs a bit.


> --- a/arch/mips/loongson/common/env.c
> +++ b/arch/mips/loongson/common/env.c
>  	while (l != 0) {
> -		parse_even_earlier(bus_clock, "busclock", l);
>  		parse_even_earlier(cpu_clock_freq, "cpuclock", l);
>  		parse_even_earlier(memsize, "memsize", l);
>  		parse_even_earlier(highmemsize, "highmemsize", l);
> @@ -57,8 +73,32 @@ void __init prom_init_env(void)
>  	}
>  	if (memsize == 0)
>  		memsize = 256;
> -	if (bus_clock == 0)
> -		bus_clock = 66000000;
> +#else

why are we not interested anymore in busclock in non-UEFI-like
machines (and shouldn't this be documented in the summary)?



Andi
> 


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux