Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b38c7c11
Commit
b38c7c11
authored
Mar 10, 2002
by
James Bottomley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add arch split to setup.h
parent
6086ee24
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
24 deletions
+77
-24
arch/i386/generic/setup_arch.h
arch/i386/generic/setup_arch.h
+34
-0
arch/i386/kernel/setup.c
arch/i386/kernel/setup.c
+9
-24
arch/i386/visws/setup_arch.h
arch/i386/visws/setup_arch.h
+34
-0
No files found.
arch/i386/generic/setup_arch.h
0 → 100644
View file @
b38c7c11
#ifdef SETUP_POST
static
inline
char
*
__init
machine_specific_memory_setup
(
void
)
{
char
*
who
;
who
=
"BIOS-e820"
;
/*
* Try to copy the BIOS-supplied E820-map.
*
* Otherwise fake a memory map; one section from 0k->640k,
* the next section from 1mb->appropriate_mem_k
*/
sanitize_e820_map
(
E820_MAP
,
&
E820_MAP_NR
);
if
(
copy_e820_map
(
E820_MAP
,
E820_MAP_NR
)
<
0
)
{
unsigned
long
mem_size
;
/* compare results from other methods and take the greater */
if
(
ALT_MEM_K
<
EXT_MEM_K
)
{
mem_size
=
EXT_MEM_K
;
who
=
"BIOS-88"
;
}
else
{
mem_size
=
ALT_MEM_K
;
who
=
"BIOS-e801"
;
}
e820
.
nr_map
=
0
;
add_memory_region
(
0
,
LOWMEMSIZE
(),
E820_RAM
);
add_memory_region
(
HIGH_MEMORY
,
mem_size
<<
10
,
E820_RAM
);
}
return
who
;
}
#endif
arch/i386/kernel/setup.c
View file @
b38c7c11
...
...
@@ -114,6 +114,9 @@
#include <asm/mpspec.h>
#include <asm/mmu_context.h>
#include <asm/arch_hooks.h>
#include "setup_arch.h"
static
inline
char
*
__init
machine_specific_memory_setup
(
void
);
/*
* Machine setup..
...
...
@@ -558,31 +561,8 @@ static int __init copy_e820_map(struct e820entry * biosmap, int nr_map)
static
void
__init
setup_memory_region
(
void
)
{
char
*
who
=
"BIOS-e820"
;
char
*
who
=
machine_specific_memory_setup
()
;
/*
* Try to copy the BIOS-supplied E820-map.
*
* Otherwise fake a memory map; one section from 0k->640k,
* the next section from 1mb->appropriate_mem_k
*/
sanitize_e820_map
(
E820_MAP
,
&
E820_MAP_NR
);
if
(
copy_e820_map
(
E820_MAP
,
E820_MAP_NR
)
<
0
)
{
unsigned
long
mem_size
;
/* compare results from other methods and take the greater */
if
(
ALT_MEM_K
<
EXT_MEM_K
)
{
mem_size
=
EXT_MEM_K
;
who
=
"BIOS-88"
;
}
else
{
mem_size
=
ALT_MEM_K
;
who
=
"BIOS-e801"
;
}
e820
.
nr_map
=
0
;
add_memory_region
(
0
,
LOWMEMSIZE
(),
E820_RAM
);
add_memory_region
(
HIGH_MEMORY
,
mem_size
<<
10
,
E820_RAM
);
}
printk
(
KERN_INFO
"BIOS-provided physical RAM map:
\n
"
);
print_memory_map
(
who
);
}
/* setup_memory_region */
...
...
@@ -680,7 +660,9 @@ void __init setup_arch(char **cmdline_p)
ROOT_DEV
=
to_kdev_t
(
ORIG_ROOT_DEV
);
drive_info
=
DRIVE_INFO
;
screen_info
=
SCREEN_INFO
;
#ifdef CONFIG_APM
apm_info
.
bios
=
APM_BIOS_INFO
;
#endif
if
(
SYS_DESC_TABLE
.
length
!=
0
)
{
MCA_bus
=
SYS_DESC_TABLE
.
table
[
3
]
&
0x2
;
machine_id
=
SYS_DESC_TABLE
.
table
[
0
];
...
...
@@ -2908,6 +2890,9 @@ int __init ppro_with_ram_bug(void)
printk
(
KERN_INFO
"Your Pentium Pro seems ok.
\n
"
);
return
0
;
}
#define SETUP_POST
#include "setup_arch.h"
/*
* Local Variables:
...
...
arch/i386/visws/setup_arch.h
0 → 100644
View file @
b38c7c11
#ifdef SETUP_POST
static
inline
char
*
__init
machine_specific_memory_setup
(
void
)
{
char
*
who
;
who
=
"BIOS-e820"
;
/*
* Try to copy the BIOS-supplied E820-map.
*
* Otherwise fake a memory map; one section from 0k->640k,
* the next section from 1mb->appropriate_mem_k
*/
sanitize_e820_map
(
E820_MAP
,
&
E820_MAP_NR
);
if
(
copy_e820_map
(
E820_MAP
,
E820_MAP_NR
)
<
0
)
{
unsigned
long
mem_size
;
/* compare results from other methods and take the greater */
if
(
ALT_MEM_K
<
EXT_MEM_K
)
{
mem_size
=
EXT_MEM_K
;
who
=
"BIOS-88"
;
}
else
{
mem_size
=
ALT_MEM_K
;
who
=
"BIOS-e801"
;
}
e820
.
nr_map
=
0
;
add_memory_region
(
0
,
LOWMEMSIZE
(),
E820_RAM
);
add_memory_region
(
HIGH_MEMORY
,
mem_size
<<
10
,
E820_RAM
);
}
return
who
;
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment