pc, pc64: disable all pci devices for /dev/reboot
Make sure all pci busmaster activity is disabled, including MSI/MSI-X interrupts, before switching control to the new kernel.
This commit is contained in:
parent
c5d08a602c
commit
e6684dbfda
2 changed files with 8 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
#include "io.h"
|
||||
#include "../port/pci.h"
|
||||
#include "ureg.h"
|
||||
#include "pool.h"
|
||||
#include "rebootcode.i"
|
||||
|
@ -689,5 +690,8 @@ reboot(void *entry, void *code, ulong size)
|
|||
/* shutdown devices */
|
||||
chandevshutdown();
|
||||
|
||||
/* disable pci devices */
|
||||
pcireset();
|
||||
|
||||
rebootjump((ulong)entry & ~0xF0000000UL, PADDR(code), size);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
#include "io.h"
|
||||
#include "../port/pci.h"
|
||||
#include "ureg.h"
|
||||
#include "pool.h"
|
||||
#include "rebootcode.i"
|
||||
|
@ -286,6 +287,9 @@ reboot(void *entry, void *code, ulong size)
|
|||
/* shutdown devices */
|
||||
chandevshutdown();
|
||||
|
||||
/* disable pci devices */
|
||||
pcireset();
|
||||
|
||||
rebootjump((uintptr)entry & (ulong)~0xF0000000UL, PADDR(code), size);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue