Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93686
b: refs/heads/master
c: e3505dd
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Apr 26, 2008
1 parent 2895bf1 commit 58e58fb
Show file tree
Hide file tree
Showing 113 changed files with 2,546 additions and 2,485 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f5093913c0b5b93e3ccafd39d056e76557169ced
refs/heads/master: e3505dd50caf54e6f81f897cb347441409974a15
26 changes: 26 additions & 0 deletions trunk/Documentation/i386/boot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Protocol 2.05: (Kernel 2.6.20) Make protected mode kernel relocatable.
Protocol 2.06: (Kernel 2.6.22) Added a field that contains the size of
the boot command line

Protocol 2.09: (kernel 2.6.26) Added a field of 64-bit physical
pointer to single linked list of struct setup_data.

**** MEMORY LAYOUT

Expand Down Expand Up @@ -172,6 +174,8 @@ Offset Proto Name Meaning
0240/8 2.07+ hardware_subarch_data Subarchitecture-specific data
0248/4 2.08+ payload_offset Offset of kernel payload
024C/4 2.08+ payload_length Length of kernel payload
0250/8 2.09+ setup_data 64-bit physical pointer to linked list
of struct setup_data

(1) For backwards compatibility, if the setup_sects field contains 0, the
real value is 4.
Expand Down Expand Up @@ -572,6 +576,28 @@ command line is entered using the following protocol:
covered by setup_move_size, so you may need to adjust this
field.

Field name: setup_data
Type: write (obligatory)
Offset/size: 0x250/8
Protocol: 2.09+

The 64-bit physical pointer to NULL terminated single linked list of
struct setup_data. This is used to define a more extensible boot
parameters passing mechanism. The definition of struct setup_data is
as follow:

struct setup_data {
u64 next;
u32 type;
u32 len;
u8 data[0];
};

Where, the next is a 64-bit physical pointer to the next node of
linked list, the next field of the last node is 0; the type is used
to identify the contents of data; the len is the length of data
field; the data holds the real payload.


**** MEMORY LAYOUT OF THE REAL-MODE CODE

Expand Down
46 changes: 0 additions & 46 deletions trunk/Documentation/mips/AU1xxx_IDE.README
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ Two files are introduced:

a) 'include/asm-mips/mach-au1x00/au1xxx_ide.h'
containes : struct _auide_hwif
struct drive_list_entry dma_white_list
struct drive_list_entry dma_black_list
timing parameters for PIO mode 0/1/2/3/4
timing parameters for MWDMA 0/1/2

Expand All @@ -63,12 +61,6 @@ Four configs variables are introduced:
CONFIG_BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ - maximum transfer size
per descriptor

If MWDMA is enabled and the connected hard disc is not on the white list, the
kernel switches to a "safe mwdma mode" at boot time. In this mode the IDE
performance is substantial slower then in full speed mwdma. In this case
please add your hard disc to the white list (follow instruction from 'ADD NEW
HARD DISC TO WHITE OR BLACK LIST' section).


SUPPORTED IDE MODES
-------------------
Expand Down Expand Up @@ -120,44 +112,6 @@ CONFIG_IDEDMA_AUTO=y
Also undefine 'IDE_AU1XXX_BURSTMODE' in 'drivers/ide/mips/au1xxx-ide.c' to
disable the burst support on DBDMA controller.

ADD NEW HARD DISC TO WHITE OR BLACK LIST
----------------------------------------

Step 1 : detect the model name of your hard disc

a) connect your hard disc to the AU1XXX

b) boot your kernel and get the hard disc model.

Example boot log:

--snipped--
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
Au1xxx IDE(builtin) configured for MWDMA2
Probing IDE interface ide0...
hda: Maxtor 6E040L0, ATA DISK drive
ide0 at 0xac800000-0xac800007,0xac8001c0 on irq 64
hda: max request size: 64KiB
hda: 80293248 sectors (41110 MB) w/2048KiB Cache, CHS=65535/16/63, (U)DMA
--snipped--

In this example 'Maxtor 6E040L0'.

Step 2 : edit 'include/asm-mips/mach-au1x00/au1xxx_ide.h'

Add your hard disc to the dma_white_list or dma_black_list structur.

Step 3 : Recompile the kernel

Enable MWDMA support in the kernel configuration. Recompile the kernel and
reboot.

Step 4 : Tests

If you have add a hard disc to the white list, please run some stress tests
for verification.


ACKNOWLEDGMENTS
---------------
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/um/Kconfig.x86_64
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@

menu "Host processor type and features"

source "arch/x86/Kconfig.cpu"

endmenu

config UML_X86
bool
default y
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/um/os-Linux/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "os.h"
#include "um_malloc.h"
#include "user.h"
#include <linux/limits.h>

struct helper_data {
void (*pre_exec)(void*);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/sys-i386/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ obj-y = bug.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \
ptrace_user.o setjmp.o signal.o stub.o stub_segv.o syscalls.o sysrq.o \
sys_call_table.o tls.o

subarch-obj-y = lib/bitops_32.o lib/semaphore_32.o lib/string_32.o
subarch-obj-y = lib/semaphore_32.o lib/string_32.o
subarch-obj-$(CONFIG_HIGHMEM) += mm/highmem_32.o
subarch-obj-$(CONFIG_MODULES) += kernel/module_32.o

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/sys-x86_64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ obj-y = bug.o bugs.o delay.o fault.o ldt.o mem.o ptrace.o ptrace_user.o \

obj-$(CONFIG_MODULES) += um_module.o

subarch-obj-y = lib/bitops_64.o lib/csum-partial_64.o lib/memcpy_64.o lib/thunk_64.o
subarch-obj-y = lib/csum-partial_64.o lib/memcpy_64.o lib/thunk_64.o
subarch-obj-$(CONFIG_MODULES) += kernel/module_64.o

ldt-y = ../sys-i386/ldt.o
Expand Down
7 changes: 6 additions & 1 deletion trunk/arch/x86/Kconfig.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ config GENERIC_CPU

endchoice

config X86_CPU
def_bool y
select GENERIC_FIND_FIRST_BIT
select GENERIC_FIND_NEXT_BIT

config X86_GENERIC
bool "Generic x86 support"
depends on X86_32
Expand Down Expand Up @@ -398,7 +403,7 @@ config X86_TSC
# generates cmov.
config X86_CMOV
def_bool y
depends on (MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7)
depends on (MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || X86_64)

config X86_MINIMUM_CPU_FAMILY
int
Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/x86/boot/header.S
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ _start:
# Part 2 of the header, from the old setup.S

.ascii "HdrS" # header signature
.word 0x0208 # header version number (>= 0x0105)
.word 0x0209 # header version number (>= 0x0105)
# or else old loadlin-1.5 will fail)
.globl realmode_swtch
realmode_swtch: .word 0, 0 # default_switch, SETUPSEG
Expand Down Expand Up @@ -227,6 +227,10 @@ hardware_subarch_data: .quad 0
payload_offset: .long input_data
payload_length: .long input_data_end-input_data

setup_data: .quad 0 # 64-bit physical pointer to
# single linked list of
# struct setup_data

# End of setup header #####################################################

.section ".inittext", "ax"
Expand Down
22 changes: 22 additions & 0 deletions trunk/arch/x86/kernel/e820_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,28 @@ void __init reserve_early(unsigned long start, unsigned long end, char *name)
strncpy(r->name, name, sizeof(r->name) - 1);
}

void __init free_early(unsigned long start, unsigned long end)
{
struct early_res *r;
int i, j;

for (i = 0; i < MAX_EARLY_RES && early_res[i].end; i++) {
r = &early_res[i];
if (start == r->start && end == r->end)
break;
}
if (i >= MAX_EARLY_RES || !early_res[i].end)
panic("free_early on not reserved area: %lx-%lx!", start, end);

for (j = i + 1; j < MAX_EARLY_RES && early_res[j].end; j++)
;

memcpy(&early_res[i], &early_res[i + 1],
(j - 1 - i) * sizeof(struct early_res));

early_res[j - 1].end = 0;
}

void __init early_res_to_bootmem(void)
{
int i;
Expand Down
20 changes: 20 additions & 0 deletions trunk/arch/x86/kernel/head64.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/string.h>
#include <linux/percpu.h>
#include <linux/start_kernel.h>
#include <linux/io.h>

#include <asm/processor.h>
#include <asm/proto.h>
Expand Down Expand Up @@ -100,6 +101,24 @@ static void __init reserve_ebda_region(void)
reserve_early(lowmem, 0x100000, "BIOS reserved");
}

static void __init reserve_setup_data(void)
{
struct setup_data *data;
unsigned long pa_data;
char buf[32];

if (boot_params.hdr.version < 0x0209)
return;
pa_data = boot_params.hdr.setup_data;
while (pa_data) {
data = early_ioremap(pa_data, sizeof(*data));
sprintf(buf, "setup data %x", data->type);
reserve_early(pa_data, pa_data+sizeof(*data)+data->len, buf);
pa_data = data->next;
early_iounmap(data, sizeof(*data));
}
}

void __init x86_64_start_kernel(char * real_mode_data)
{
int i;
Expand Down Expand Up @@ -156,6 +175,7 @@ void __init x86_64_start_kernel(char * real_mode_data)
#endif

reserve_ebda_region();
reserve_setup_data();

/*
* At this point everything still needed from the boot loader
Expand Down
Loading

0 comments on commit 58e58fb

Please sign in to comment.