Skip to content

Commit

Permalink
x86/boot: Obsolete the MCA sys_desc_table
Browse files Browse the repository at this point in the history
The kernel does not support the MCA bus anymroe, so mark sys_desc_table
as obsolete: remove any reference from the code together with the remaining
of MCA logic.

bloat-o-meter output:

  add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-55 (-55)
  function                                     old     new   delta
  i386_start_kernel                            128     119      -9
  setup_arch                                  1421    1375     -46

Signed-off-by: Paolo Pisati <p.pisati@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1437409430-8491-1-git-send-email-p.pisati@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
piso77 authored and Ingo Molnar committed Jul 21, 2015
1 parent 79063a7 commit 9491630
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 67 deletions.
3 changes: 2 additions & 1 deletion Documentation/x86/zero-page.txt
Expand Up @@ -17,7 +17,8 @@ Offset Proto Name Meaning
(struct ist_info)
080/010 ALL hd0_info hd0 disk parameter, OBSOLETE!!
090/010 ALL hd1_info hd1 disk parameter, OBSOLETE!!
0A0/010 ALL sys_desc_table System description table (struct sys_desc_table)
0A0/010 ALL sys_desc_table System description table (struct sys_desc_table),
OBSOLETE!!
0B0/010 ALL olpc_ofw_header OLPC's OpenFirmware CIF and friends
0C0/004 ALL ext_ramdisk_image ramdisk_image high 32bits
0C4/004 ALL ext_ramdisk_size ramdisk_size high 32bits
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/boot/Makefile
Expand Up @@ -23,7 +23,7 @@ targets += fdimage fdimage144 fdimage288 image.iso mtools.conf
subdir- := compressed

setup-y += a20.o bioscall.o cmdline.o copy.o cpu.o cpuflags.o cpucheck.o
setup-y += early_serial_console.o edd.o header.o main.o mca.o memory.o
setup-y += early_serial_console.o edd.o header.o main.o memory.o
setup-y += pm.o pmjump.o printf.o regs.o string.o tty.o video.o
setup-y += video-mode.o version.o
setup-$(CONFIG_X86_APM_BOOT) += apm.o
Expand Down
3 changes: 0 additions & 3 deletions arch/x86/boot/boot.h
Expand Up @@ -307,9 +307,6 @@ void query_edd(void);
/* header.S */
void __attribute__((noreturn)) die(void);

/* mca.c */
int query_mca(void);

/* memory.c */
int detect_memory(void);

Expand Down
4 changes: 0 additions & 4 deletions arch/x86/boot/compressed/eboot.c
Expand Up @@ -1041,7 +1041,6 @@ void setup_graphics(struct boot_params *boot_params)
struct boot_params *make_boot_params(struct efi_config *c)
{
struct boot_params *boot_params;
struct sys_desc_table *sdt;
struct apm_bios_info *bi;
struct setup_header *hdr;
struct efi_info *efi;
Expand Down Expand Up @@ -1089,7 +1088,6 @@ struct boot_params *make_boot_params(struct efi_config *c)
hdr = &boot_params->hdr;
efi = &boot_params->efi_info;
bi = &boot_params->apm_bios_info;
sdt = &boot_params->sys_desc_table;

/* Copy the second sector to boot_params */
memcpy(&hdr->jump, image->image_base + 512, 512);
Expand Down Expand Up @@ -1118,8 +1116,6 @@ struct boot_params *make_boot_params(struct efi_config *c)
/* Clear APM BIOS info */
memset(bi, 0, sizeof(*bi));

memset(sdt, 0, sizeof(*sdt));

status = efi_parse_options(cmdline_ptr);
if (status != EFI_SUCCESS)
goto fail2;
Expand Down
3 changes: 0 additions & 3 deletions arch/x86/boot/main.c
Expand Up @@ -161,9 +161,6 @@ void main(void)
/* Set keyboard repeat rate (why?) and query the lock flags */
keyboard_init();

/* Query MCA information */
query_mca();

/* Query Intel SpeedStep (IST) information */
query_ist();

Expand Down
38 changes: 0 additions & 38 deletions arch/x86/boot/mca.c

This file was deleted.

8 changes: 0 additions & 8 deletions arch/x86/include/asm/processor.h
Expand Up @@ -647,14 +647,6 @@ static inline void update_debugctlmsr(unsigned long debugctlmsr)

extern void set_task_blockstep(struct task_struct *task, bool on);

/*
* from system description table in BIOS. Mostly for MCA use, but
* others may find it useful:
*/
extern unsigned int machine_id;
extern unsigned int machine_submodel_id;
extern unsigned int BIOS_revision;

/* Boot loader type from the setup header: */
extern int bootloader_type;
extern int bootloader_version;
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/include/uapi/asm/bootparam.h
Expand Up @@ -120,7 +120,7 @@ struct boot_params {
__u8 _pad3[16]; /* 0x070 */
__u8 hd0_info[16]; /* obsolete! */ /* 0x080 */
__u8 hd1_info[16]; /* obsolete! */ /* 0x090 */
struct sys_desc_table sys_desc_table; /* 0x0a0 */
struct sys_desc_table sys_desc_table; /* obsolete! */ /* 0x0a0 */
struct olpc_ofw_header olpc_ofw_header; /* 0x0b0 */
__u32 ext_ramdisk_image; /* 0x0c0 */
__u32 ext_ramdisk_size; /* 0x0c4 */
Expand Down
3 changes: 0 additions & 3 deletions arch/x86/kernel/kexec-bzimage64.c
Expand Up @@ -223,9 +223,6 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params,
memset(&params->hd0_info, 0, sizeof(params->hd0_info));
memset(&params->hd1_info, 0, sizeof(params->hd1_info));

/* Default sysdesc table */
params->sys_desc_table.length = 0;

if (image->type == KEXEC_TYPE_CRASH) {
ret = crash_setup_memmap_entries(image, params);
if (ret)
Expand Down
5 changes: 0 additions & 5 deletions arch/x86/kernel/setup.c
Expand Up @@ -916,11 +916,6 @@ void __init setup_arch(char **cmdline_p)
#ifdef CONFIG_X86_32
apm_info.bios = boot_params.apm_bios_info;
ist_info = boot_params.ist_info;
if (boot_params.sys_desc_table.length != 0) {
machine_id = boot_params.sys_desc_table.table[0];
machine_submodel_id = boot_params.sys_desc_table.table[1];
BIOS_revision = boot_params.sys_desc_table.table[2];
}
#endif
saved_video_mode = boot_params.hdr.vid_mode;
bootloader_type = boot_params.hdr.type_of_loader;
Expand Down

0 comments on commit 9491630

Please sign in to comment.