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
37380aa7
Commit
37380aa7
authored
Mar 22, 2003
by
Alan Cox
Committed by
Linus Torvalds
Mar 22, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] abstract out mach_reboot for x86 platforms
parent
05f534c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
16 deletions
+53
-16
arch/i386/kernel/reboot.c
arch/i386/kernel/reboot.c
+2
-16
include/asm-i386/mach-default/mach_reboot.h
include/asm-i386/mach-default/mach_reboot.h
+30
-0
include/asm-i386/mach-pc9800/mach_reboot.h
include/asm-i386/mach-pc9800/mach_reboot.h
+21
-0
No files found.
arch/i386/kernel/reboot.c
View file @
37380aa7
...
...
@@ -8,6 +8,7 @@
#include <linux/interrupt.h>
#include <linux/mc146818rtc.h>
#include <asm/uaccess.h>
#include "mach_reboot.h"
/*
* Power off function, if any
...
...
@@ -125,15 +126,6 @@ static unsigned char jump_to_bios [] =
0xea
,
0x00
,
0x00
,
0xff
,
0xff
/* ljmp $0xffff,$0x0000 */
};
static
inline
void
kb_wait
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
0x10000
;
i
++
)
if
((
inb_p
(
0x64
)
&
0x02
)
==
0
)
break
;
}
/*
* Switch to real mode and then execute the code
* specified by the code and length parameters.
...
...
@@ -264,13 +256,7 @@ void machine_restart(char * __unused)
/* rebooting needs to touch the page at absolute addr 0 */
*
((
unsigned
short
*
)
__va
(
0x472
))
=
reboot_mode
;
for
(;;)
{
int
i
;
for
(
i
=
0
;
i
<
100
;
i
++
)
{
kb_wait
();
udelay
(
50
);
outb
(
0xfe
,
0x64
);
/* pulse reset low */
udelay
(
50
);
}
mach_reboot
();
/* That didn't work - force a triple fault.. */
__asm__
__volatile__
(
"lidt %0"
:
:
"m"
(
no_idt
));
__asm__
__volatile__
(
"int3"
);
...
...
include/asm-i386/mach-default/mach_reboot.h
0 → 100644
View file @
37380aa7
/*
* arch/i386/mach-generic/mach_reboot.h
*
* Machine specific reboot functions for generic.
* Split out from reboot.c by Osamu Tomita <tomita@cinet.co.jp>
*/
#ifndef _MACH_REBOOT_H
#define _MACH_REBOOT_H
static
inline
void
kb_wait
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
0x10000
;
i
++
)
if
((
inb_p
(
0x64
)
&
0x02
)
==
0
)
break
;
}
static
inline
void
mach_reboot
(
void
)
{
int
i
;
for
(
i
=
0
;
i
<
100
;
i
++
)
{
kb_wait
();
udelay
(
50
);
outb
(
0xfe
,
0x64
);
/* pulse reset low */
udelay
(
50
);
}
}
#endif
/* !_MACH_REBOOT_H */
include/asm-i386/mach-pc9800/mach_reboot.h
0 → 100644
View file @
37380aa7
/*
* arch/i386/mach-pc9800/mach_reboot.h
*
* Machine specific reboot functions for PC-9800.
* Written by Osamu Tomita <tomita@cinet.co.jp>
*/
#ifndef _MACH_REBOOT_H
#define _MACH_REBOOT_H
#ifdef CMOS_WRITE
#undef CMOS_WRITE
#define CMOS_WRITE(a,b) do{}while(0)
#endif
static
inline
void
mach_reboot
(
void
)
{
outb
(
0
,
0xf0
);
/* signal CPU reset */
mdelay
(
1
);
}
#endif
/* !_MACH_REBOOT_H */
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