x86: Provide more configuration granularity
Planned future ports requires more granularity for some options Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
This commit is contained in:
parent
a206cc2343
commit
a76fc70ee1
@ -25,11 +25,11 @@ include $(TOPDIR)/config.mk
|
|||||||
|
|
||||||
LIB = $(obj)lib$(ARCH).o
|
LIB = $(obj)lib$(ARCH).o
|
||||||
|
|
||||||
SOBJS-y += bios.o
|
SOBJS-$(CONFIG_SYS_PC_BIOS) += bios.o
|
||||||
SOBJS-y += bios_pci.o
|
SOBJS-$(CONFIG_SYS_PCI_BIOS) += bios_pci.o
|
||||||
SOBJS-y += realmode_switch.o
|
SOBJS-$(CONFIG_SYS_X86_REALMODE) += realmode_switch.o
|
||||||
|
|
||||||
COBJS-y += bios_setup.o
|
COBJS-$(CONFIG_SYS_PC_BIOS) += bios_setup.o
|
||||||
COBJS-y += board.o
|
COBJS-y += board.o
|
||||||
COBJS-y += bootm.o
|
COBJS-y += bootm.o
|
||||||
COBJS-y += interrupts.o
|
COBJS-y += interrupts.o
|
||||||
@ -37,11 +37,11 @@ COBJS-$(CONFIG_SYS_PCAT_INTERRUPTS) += pcat_interrupts.o
|
|||||||
COBJS-$(CONFIG_SYS_GENERIC_TIMER) += pcat_timer.o
|
COBJS-$(CONFIG_SYS_GENERIC_TIMER) += pcat_timer.o
|
||||||
COBJS-$(CONFIG_PCI) += pci.o
|
COBJS-$(CONFIG_PCI) += pci.o
|
||||||
COBJS-$(CONFIG_PCI) += pci_type1.o
|
COBJS-$(CONFIG_PCI) += pci_type1.o
|
||||||
COBJS-y += realmode.o
|
COBJS-$(CONFIG_SYS_X86_REALMODE) += realmode.o
|
||||||
COBJS-y += timer.o
|
COBJS-$(CONFIG_SYS_X86_ISR_TIMER) += timer.o
|
||||||
COBJS-y += video_bios.o
|
COBJS-$(CONFIG_VIDEO) += video_bios.o
|
||||||
COBJS-y += video.o
|
COBJS-$(CONFIG_VIDEO) += video.o
|
||||||
COBJS-y += zimage.o
|
COBJS-$(CONFIG_CMD_ZBOOT) += zimage.o
|
||||||
|
|
||||||
SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
|
SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
|
||||||
OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
|
OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
|
||||||
|
@ -91,11 +91,13 @@ static int display_dram_config(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_SYS_NO_FLASH
|
||||||
static void display_flash_config(ulong size)
|
static void display_flash_config(ulong size)
|
||||||
{
|
{
|
||||||
puts("Flash: ");
|
puts("Flash: ");
|
||||||
print_size(size, "\n");
|
print_size(size, "\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Breath some life into the board...
|
* Breath some life into the board...
|
||||||
@ -254,8 +256,12 @@ void board_init_f(ulong boot_flags)
|
|||||||
|
|
||||||
void board_init_r(gd_t *id, ulong dest_addr)
|
void board_init_r(gd_t *id, ulong dest_addr)
|
||||||
{
|
{
|
||||||
|
#if defined(CONFIG_CMD_NET)
|
||||||
char *s;
|
char *s;
|
||||||
|
#endif
|
||||||
|
#ifndef CONFIG_SYS_NO_FLASH
|
||||||
ulong size;
|
ulong size;
|
||||||
|
#endif
|
||||||
static bd_t bd_data;
|
static bd_t bd_data;
|
||||||
static gd_t gd_data;
|
static gd_t gd_data;
|
||||||
init_fnc_t **init_fnc_ptr;
|
init_fnc_t **init_fnc_ptr;
|
||||||
@ -287,10 +293,13 @@ void board_init_r(gd_t *id, ulong dest_addr)
|
|||||||
#ifdef CONFIG_SERIAL_MULTI
|
#ifdef CONFIG_SERIAL_MULTI
|
||||||
serial_initialize();
|
serial_initialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef CONFIG_SYS_NO_FLASH
|
||||||
/* configure available FLASH banks */
|
/* configure available FLASH banks */
|
||||||
size = flash_init();
|
size = flash_init();
|
||||||
display_flash_config(size);
|
display_flash_config(size);
|
||||||
show_boot_progress(0x24);
|
show_boot_progress(0x24);
|
||||||
|
#endif
|
||||||
|
|
||||||
show_boot_progress(0x25);
|
show_boot_progress(0x25);
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
int do_bootm_linux(int flag, int argc, char * const argv[],
|
int do_bootm_linux(int flag, int argc, char * const argv[],
|
||||||
bootm_headers_t *images)
|
bootm_headers_t *images)
|
||||||
{
|
{
|
||||||
void *base_ptr;
|
void *base_ptr = NULL;
|
||||||
ulong os_data, os_len;
|
ulong os_data, os_len;
|
||||||
image_header_t *hdr;
|
image_header_t *hdr;
|
||||||
|
|
||||||
@ -73,8 +73,10 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_CMD_ZBOOT
|
||||||
base_ptr = load_zimage((void *)os_data, os_len,
|
base_ptr = load_zimage((void *)os_data, os_len,
|
||||||
images->rd_start, images->rd_end - images->rd_start, 0);
|
images->rd_start, images->rd_end - images->rd_start, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (NULL == base_ptr) {
|
if (NULL == base_ptr) {
|
||||||
printf("## Kernel loading failed ...\n");
|
printf("## Kernel loading failed ...\n");
|
||||||
|
@ -151,3 +151,38 @@ int pci_shadow_rom(pci_dev_t dev, unsigned char *dest)
|
|||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PCI_BIOS_DEBUG
|
||||||
|
|
||||||
|
void print_bios_bios_stat(void)
|
||||||
|
{
|
||||||
|
printf("16 bit functions:\n");
|
||||||
|
printf("pci_bios_present: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000, num_pci_bios_present));
|
||||||
|
printf("pci_bios_find_device: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000, num_pci_bios_find_device));
|
||||||
|
printf("pci_bios_find_class: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000, num_pci_bios_find_class));
|
||||||
|
printf("pci_bios_generate_special_cycle: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000,
|
||||||
|
num_pci_bios_generate_special_cycle));
|
||||||
|
printf("pci_bios_read_cfg_byte: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000, num_pci_bios_read_cfg_byte));
|
||||||
|
printf("pci_bios_read_cfg_word: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000, num_pci_bios_read_cfg_word));
|
||||||
|
printf("pci_bios_read_cfg_dword: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000, num_pci_bios_read_cfg_dword));
|
||||||
|
printf("pci_bios_write_cfg_byte: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000, num_pci_bios_write_cfg_byte));
|
||||||
|
printf("pci_bios_write_cfg_word: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000, num_pci_bios_write_cfg_word));
|
||||||
|
printf("pci_bios_write_cfg_dword: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000, num_pci_bios_write_cfg_dword));
|
||||||
|
printf("pci_bios_get_irq_routing: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000, num_pci_bios_get_irq_routing));
|
||||||
|
printf("pci_bios_set_irq: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000, num_pci_bios_set_irq));
|
||||||
|
printf("pci_bios_unknown_function: %d\n",
|
||||||
|
RELOC_16_LONG(0xf000, num_pci_bios_unknown_function));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@ -39,45 +39,6 @@
|
|||||||
#define PRINTF(fmt, args...)
|
#define PRINTF(fmt, args...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_PCI
|
|
||||||
|
|
||||||
#ifdef PCI_BIOS_DEBUG
|
|
||||||
void print_bios_bios_stat(void)
|
|
||||||
{
|
|
||||||
printf("16 bit functions:\n");
|
|
||||||
printf("pci_bios_present: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000, num_pci_bios_present));
|
|
||||||
printf("pci_bios_find_device: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000, num_pci_bios_find_device));
|
|
||||||
printf("pci_bios_find_class: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000, num_pci_bios_find_class));
|
|
||||||
printf("pci_bios_generate_special_cycle: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000,
|
|
||||||
num_pci_bios_generate_special_cycle));
|
|
||||||
printf("pci_bios_read_cfg_byte: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000, num_pci_bios_read_cfg_byte));
|
|
||||||
printf("pci_bios_read_cfg_word: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000, num_pci_bios_read_cfg_word));
|
|
||||||
printf("pci_bios_read_cfg_dword: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000, num_pci_bios_read_cfg_dword));
|
|
||||||
printf("pci_bios_write_cfg_byte: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000, num_pci_bios_write_cfg_byte));
|
|
||||||
printf("pci_bios_write_cfg_word: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000, num_pci_bios_write_cfg_word));
|
|
||||||
printf("pci_bios_write_cfg_dword: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000, num_pci_bios_write_cfg_dword));
|
|
||||||
printf("pci_bios_get_irq_routing: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000, num_pci_bios_get_irq_routing));
|
|
||||||
printf("pci_bios_set_irq: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000, num_pci_bios_set_irq));
|
|
||||||
printf("pci_bios_unknown_function: %d\n",
|
|
||||||
RELOC_16_LONG(0xf000, num_pci_bios_unknown_function));
|
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_VIDEO
|
|
||||||
|
|
||||||
#define PCI_CLASS_VIDEO 3
|
#define PCI_CLASS_VIDEO 3
|
||||||
#define PCI_CLASS_VIDEO_STD 0
|
#define PCI_CLASS_VIDEO_STD 0
|
||||||
#define PCI_CLASS_VIDEO_PROG_IF_VGA 0
|
#define PCI_CLASS_VIDEO_PROG_IF_VGA 0
|
||||||
@ -233,5 +194,3 @@ int video_bios_init(void)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
@ -31,7 +31,8 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||||||
|
|
||||||
static void print_num(const char *, ulong);
|
static void print_num(const char *, ulong);
|
||||||
|
|
||||||
#if !(defined(CONFIG_ARM) || defined(CONFIG_M68K) || defined(CONFIG_SANDBOX)) \
|
#if !(defined(CONFIG_ARM) || defined(CONFIG_M68K) || \
|
||||||
|
defined(CONFIG_SANDBOX) || defined(CONFIG_X86)) \
|
||||||
|| defined(CONFIG_CMD_NET)
|
|| defined(CONFIG_CMD_NET)
|
||||||
#define HAVE_PRINT_ETH
|
#define HAVE_PRINT_ETH
|
||||||
static void print_eth(int idx);
|
static void print_eth(int idx);
|
||||||
|
@ -105,6 +105,7 @@
|
|||||||
#define CONFIG_CMD_SETGETDCR
|
#define CONFIG_CMD_SETGETDCR
|
||||||
#define CONFIG_CMD_SOURCE
|
#define CONFIG_CMD_SOURCE
|
||||||
#define CONFIG_CMD_XIMG
|
#define CONFIG_CMD_XIMG
|
||||||
|
#define CONFIG_CMD_ZBOOT
|
||||||
|
|
||||||
#define CONFIG_BOOTDELAY 15
|
#define CONFIG_BOOTDELAY 15
|
||||||
#define CONFIG_BOOTARGS "root=/dev/mtdblock0 console=ttyS0,9600"
|
#define CONFIG_BOOTARGS "root=/dev/mtdblock0 console=ttyS0,9600"
|
||||||
@ -153,6 +154,10 @@
|
|||||||
#undef CONFIG_SYS_GENERIC_TIMER
|
#undef CONFIG_SYS_GENERIC_TIMER
|
||||||
#define CONFIG_SYS_PCAT_INTERRUPTS
|
#define CONFIG_SYS_PCAT_INTERRUPTS
|
||||||
#define CONFIG_SYS_NUM_IRQS 16
|
#define CONFIG_SYS_NUM_IRQS 16
|
||||||
|
#define CONFIG_SYS_PC_BIOS
|
||||||
|
#define CONFIG_SYS_PCI_BIOS
|
||||||
|
#define CONFIG_SYS_X86_REALMODE
|
||||||
|
#define CONFIG_SYS_X86_ISR_TIMER
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
* Memory organization:
|
* Memory organization:
|
||||||
|
Loading…
Reference in New Issue
Block a user