search for: apm_c

Displaying 20 results from an estimated 20 matches for "apm_c".

Did you mean: apm_cs
2007 Apr 18
0
[PATCH 8/12] base-limit-cleanup
...long)0x40 << 4)); - _set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4)); + set_base(&bad_bios_desc, __va((unsigned long)0x40 << 4)); + _set_limit(&bad_bios_desc, 4095 - (0x40 << 4)); apm_bios_entry.offset = apm_info.bios.offset; apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { struct desc_struct *gdt = get_cpu_gdt_table(i); - set_base(gdt[desc_number(APM_CS)], + set_base(&gdt[desc_number(APM_CS)], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(gdt[desc_number(APM_CS_16)], + set_base(&gdt[desc_n...
2007 Apr 18
0
[PATCH 8/12] base-limit-cleanup
...long)0x40 << 4)); - _set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4)); + set_base(&bad_bios_desc, __va((unsigned long)0x40 << 4)); + _set_limit(&bad_bios_desc, 4095 - (0x40 << 4)); apm_bios_entry.offset = apm_info.bios.offset; apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { struct desc_struct *gdt = get_cpu_gdt_table(i); - set_base(gdt[desc_number(APM_CS)], + set_base(&gdt[desc_number(APM_CS)], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(gdt[desc_number(APM_CS_16)], + set_base(&gdt[desc_n...
2007 Apr 18
0
[PATCH 9/14] i386 / Typecheck and optimize base and limit accessors
...long)0x40 << 4)); - _set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4)); + set_base(&bad_bios_desc, __va((unsigned long)0x40 << 4)); + _set_limit(&bad_bios_desc, 4095 - (0x40 << 4)); apm_bios_entry.offset = apm_info.bios.offset; apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { struct desc_struct *gdt = get_cpu_gdt_table(i); - set_base(gdt[segment_index(APM_CS)], + set_base(&gdt[segment_index(APM_CS)], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(gdt[segment_index(APM_CS_16)], + set_base(&gdt[...
2007 Apr 18
0
[PATCH 9/14] i386 / Typecheck and optimize base and limit accessors
...long)0x40 << 4)); - _set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4)); + set_base(&bad_bios_desc, __va((unsigned long)0x40 << 4)); + _set_limit(&bad_bios_desc, 4095 - (0x40 << 4)); apm_bios_entry.offset = apm_info.bios.offset; apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { struct desc_struct *gdt = get_cpu_gdt_table(i); - set_base(gdt[segment_index(APM_CS)], + set_base(&gdt[segment_index(APM_CS)], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(gdt[segment_index(APM_CS_16)], + set_base(&gdt[...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
..._call_simple_asm(func, ebx_in, ecx_in, eax); APM_DO_RESTORE_SEGS; local_irq_restore(flags); - __get_cpu_var(cpu_gdt_table)[0x40 / 8] = save_desc_40; + gdt[desc_number(0x40)] = save_desc_40; put_cpu(); apm_restore_cpus(cpus); return error; @@ -2295,35 +2298,36 @@ apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { - set_base(per_cpu(cpu_gdt_table, i)[APM_CS >> 3], + struct desc_struct *gdt = get_cpu_gdt_table(i); + set_base(gdt[desc_number(APM_CS)], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(per_cpu(cpu_gdt_table, i)[APM_CS_16 >&...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
..._call_simple_asm(func, ebx_in, ecx_in, eax); APM_DO_RESTORE_SEGS; local_irq_restore(flags); - __get_cpu_var(cpu_gdt_table)[0x40 / 8] = save_desc_40; + gdt[desc_number(0x40)] = save_desc_40; put_cpu(); apm_restore_cpus(cpus); return error; @@ -2295,35 +2298,36 @@ apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { - set_base(per_cpu(cpu_gdt_table, i)[APM_CS >> 3], + struct desc_struct *gdt = get_cpu_gdt_table(i); + set_base(gdt[desc_number(APM_CS)], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(per_cpu(cpu_gdt_table, i)[APM_CS_16 >&...
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
...bx_in, ecx_in, eax); APM_DO_RESTORE_SEGS; local_irq_restore(flags); - __get_cpu_var(cpu_gdt_table)[0x40 / 8] = save_desc_40; + gdt[0x40 / 8] = save_desc_40; put_cpu(); apm_restore_cpus(cpus); return error; @@ -2295,35 +2298,36 @@ static int __init apm_init(void) apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { - set_base(per_cpu(cpu_gdt_table, i)[APM_CS >> 3], + struct desc_struct *gdt = get_cpu_gdt_table(i); + set_base(gdt[APM_CS >> 3], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(per_cpu(cpu_gdt_table, i)[APM_CS_16 >&gt...
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
...bx_in, ecx_in, eax); APM_DO_RESTORE_SEGS; local_irq_restore(flags); - __get_cpu_var(cpu_gdt_table)[0x40 / 8] = save_desc_40; + gdt[0x40 / 8] = save_desc_40; put_cpu(); apm_restore_cpus(cpus); return error; @@ -2295,35 +2298,36 @@ static int __init apm_init(void) apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { - set_base(per_cpu(cpu_gdt_table, i)[APM_CS >> 3], + struct desc_struct *gdt = get_cpu_gdt_table(i); + set_base(gdt[APM_CS >> 3], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(per_cpu(cpu_gdt_table, i)[APM_CS_16 >&gt...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
...all_simple_asm(func, ebx_in, ecx_in, eax); APM_DO_RESTORE_SEGS; local_irq_restore(flags); - __get_cpu_var(cpu_gdt_table)[0x40 / 8] = save_desc_40; + gdt[segment_index(0x40)] = save_desc_40; put_cpu(); apm_restore_cpus(cpus); return error; @@ -2295,35 +2298,36 @@ apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { - set_base(per_cpu(cpu_gdt_table, i)[APM_CS >> 3], + struct desc_struct *gdt = get_cpu_gdt_table(i); + set_base(gdt[segment_index(APM_CS)], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(per_cpu(cpu_gdt_table, i)[APM_CS_16 &gt...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
...all_simple_asm(func, ebx_in, ecx_in, eax); APM_DO_RESTORE_SEGS; local_irq_restore(flags); - __get_cpu_var(cpu_gdt_table)[0x40 / 8] = save_desc_40; + gdt[segment_index(0x40)] = save_desc_40; put_cpu(); apm_restore_cpus(cpus); return error; @@ -2295,35 +2298,36 @@ apm_bios_entry.segment = APM_CS; for (i = 0; i < NR_CPUS; i++) { - set_base(per_cpu(cpu_gdt_table, i)[APM_CS >> 3], + struct desc_struct *gdt = get_cpu_gdt_table(i); + set_base(gdt[segment_index(APM_CS)], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(per_cpu(cpu_gdt_table, i)[APM_CS_16 &gt...
2007 Apr 18
0
[PATCH 2/21] i386 Always relax segments
..._desc, __va((unsigned long)0x40 << 4)); _set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4)); + /* + * Set up the long jump entry point to the APM BIOS, which is called + * from inline assembly. + */ apm_bios_entry.offset = apm_info.bios.offset; apm_bios_entry.segment = APM_CS; + /* + * The APM 1.1 BIOS is supposed to provide limit information that it + * recognizes. Many machines do this correctly, but many others do + * not restrict themselves to their claimed limit. When this happens, + * they will cause a segmentation violation in the kernel at boot time. +...
2007 Apr 18
0
[PATCH 2/21] i386 Always relax segments
..._desc, __va((unsigned long)0x40 << 4)); _set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4)); + /* + * Set up the long jump entry point to the APM BIOS, which is called + * from inline assembly. + */ apm_bios_entry.offset = apm_info.bios.offset; apm_bios_entry.segment = APM_CS; + /* + * The APM 1.1 BIOS is supposed to provide limit information that it + * recognizes. Many machines do this correctly, but many others do + * not restrict themselves to their claimed limit. When this happens, + * they will cause a segmentation violation in the kernel at boot time. +...
2007 Apr 18
1
[PATCH 14/21] i386 Apm is on cpu zero only
...#39;s, however, will respect a 64k limit, so we use that. + * + * Note we only set APM segments on CPU zero, since we pin the APM + * code to that CPU. */ - for (i = 0; i < NR_CPUS; i++) { - struct desc_struct *gdt = get_cpu_gdt_table(i); - if (!gdt) - continue; - set_base(&gdt[APM_CS >> 3], - __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(&gdt[APM_CS_16 >> 3], - __va((unsigned long)apm_info.bios.cseg_16 << 4)); - set_base(&gdt[APM_DS >> 3], - __va((unsigned long)apm_info.bios.dseg << 4)); - } + gdt = get_cpu_gdt...
2007 Apr 18
1
[PATCH 14/21] i386 Apm is on cpu zero only
...#39;s, however, will respect a 64k limit, so we use that. + * + * Note we only set APM segments on CPU zero, since we pin the APM + * code to that CPU. */ - for (i = 0; i < NR_CPUS; i++) { - struct desc_struct *gdt = get_cpu_gdt_table(i); - if (!gdt) - continue; - set_base(&gdt[APM_CS >> 3], - __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(&gdt[APM_CS_16 >> 3], - __va((unsigned long)apm_info.bios.cseg_16 << 4)); - set_base(&gdt[APM_DS >> 3], - __va((unsigned long)apm_info.bios.dseg << 4)); - } + gdt = get_cpu_gdt...
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
...rnel/apm.c 2005-11-04 17:45:02.000000000 -0800 +++ linux-2.6.14-zach-work/arch/i386/kernel/apm.c 2005-11-05 00:28:07.000000000 -0800 @@ -2256,11 +2256,11 @@ static int __init apm_init(void) */ for (i = 0; i < NR_CPUS; i++) { struct desc_struct *gdt = get_cpu_gdt_table(i); - set_base(gdt[APM_CS >> 3], + set_base(&gdt[APM_CS >> 3], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(gdt[APM_CS_16 >> 3], + set_base(&gdt[APM_CS_16 >> 3], __va((unsigned long)apm_info.bios.cseg_16 << 4)); - set_base(gdt[APM_DS >> 3], + set...
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
...rnel/apm.c 2005-11-04 17:45:02.000000000 -0800 +++ linux-2.6.14-zach-work/arch/i386/kernel/apm.c 2005-11-05 00:28:07.000000000 -0800 @@ -2256,11 +2256,11 @@ static int __init apm_init(void) */ for (i = 0; i < NR_CPUS; i++) { struct desc_struct *gdt = get_cpu_gdt_table(i); - set_base(gdt[APM_CS >> 3], + set_base(&gdt[APM_CS >> 3], __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(gdt[APM_CS_16 >> 3], + set_base(&gdt[APM_CS_16 >> 3], __va((unsigned long)apm_info.bios.cseg_16 << 4)); - set_base(gdt[APM_DS >> 3], + set...
2007 Apr 18
0
[PATCH 3/21] i386 Apm seg in gdt
...05,12 +2305,6 @@ static int __init apm_init(void) __va((unsigned long)apm_info.bios.cseg_16 << 4)); set_base(gdt[APM_DS >> 3], __va((unsigned long)apm_info.bios.dseg << 4)); - /* For ASUS motherboard, Award BIOS rev 110 (and others?) */ - _set_limit((char *)&gdt[APM_CS >> 3], 64 * 1024 - 1); - /* For some unknown machine. */ - _set_limit((char *)&gdt[APM_CS_16 >> 3], 64 * 1024 - 1); - /* For the DEC Hinote Ultra CT475 (and others?) */ - _set_limit((char *)&gdt[APM_DS >> 3], 64 * 1024 - 1); } apm_proc = create_proc_info_entry(&...
2007 Apr 18
0
[PATCH 3/21] i386 Apm seg in gdt
...05,12 +2305,6 @@ static int __init apm_init(void) __va((unsigned long)apm_info.bios.cseg_16 << 4)); set_base(gdt[APM_DS >> 3], __va((unsigned long)apm_info.bios.dseg << 4)); - /* For ASUS motherboard, Award BIOS rev 110 (and others?) */ - _set_limit((char *)&gdt[APM_CS >> 3], 64 * 1024 - 1); - /* For some unknown machine. */ - _set_limit((char *)&gdt[APM_CS_16 >> 3], 64 * 1024 - 1); - /* For the DEC Hinote Ultra CT475 (and others?) */ - _set_limit((char *)&gdt[APM_DS >> 3], 64 * 1024 - 1); } apm_proc = create_proc_info_entry(&...
2007 Apr 18
0
[PATCH 13/21] i386 Gdt page isolation
...00000000 -0800 +++ linux-2.6.14-zach-work/arch/i386/kernel/apm.c 2005-11-04 17:55:24.000000000 -0800 @@ -2256,6 +2256,8 @@ static int __init apm_init(void) */ for (i = 0; i < NR_CPUS; i++) { struct desc_struct *gdt = get_cpu_gdt_table(i); + if (!gdt) + continue; set_base(&gdt[APM_CS >> 3], __va((unsigned long)apm_info.bios.cseg << 4)); set_base(&gdt[APM_CS_16 >> 3], Index: linux-2.6.14-zach-work/arch/i386/kernel/cpu/common.c =================================================================== --- linux-2.6.14-zach-work.orig/arch/i386/kernel/cpu/co...
2007 Apr 18
0
[PATCH 13/21] i386 Gdt page isolation
...00000000 -0800 +++ linux-2.6.14-zach-work/arch/i386/kernel/apm.c 2005-11-04 17:55:24.000000000 -0800 @@ -2256,6 +2256,8 @@ static int __init apm_init(void) */ for (i = 0; i < NR_CPUS; i++) { struct desc_struct *gdt = get_cpu_gdt_table(i); + if (!gdt) + continue; set_base(&gdt[APM_CS >> 3], __va((unsigned long)apm_info.bios.cseg << 4)); set_base(&gdt[APM_CS_16 >> 3], Index: linux-2.6.14-zach-work/arch/i386/kernel/cpu/common.c =================================================================== --- linux-2.6.14-zach-work.orig/arch/i386/kernel/cpu/co...