20 #include <linux/sched.h>
22 #include <linux/pci.h>
23 #include <linux/screen_info.h>
26 #include <linux/if_ether.h>
27 #include <linux/ctype.h>
29 #include <linux/time.h>
31 #include <asm/bootinfo.h>
37 #include <asm/traps.h>
38 #include <asm/asm-offsets.h>
50 #define LONG_L_ VAL(LONG_L) " "
51 #define LONG_S_ VAL(LONG_S) " "
52 #define PTR_LA_ VAL(PTR_LA) " "
55 #warning TODO: 64-bit code needs to be verified
63 static void register_panic_notifier(
void);
65 unsigned long event,
void *cause_string);
75 register_panic_notifier();
86 static void register_panic_notifier()
97 unsigned long event,
void *cause_string)
125 "move $at, %[pt_regs]\n"
193 [
cp0_epc]
"=m" (my_regs.cp0_epc)
202 pr_crit(
"I'm feeling a bit sleepy. hmmmmm... perhaps a nap would... "
210 static bool have_rfmac;
213 static int rfmac_param(
char *
p)
220 if (*p ==
'0' && *(p+1) ==
'x')
224 is_high_nibble =
true;
226 for (c = (
unsigned char) *p++;
228 c = (
unsigned char) *p++) {
231 nibble = (
isdigit(c) ? (c -
'0') :
232 (
isupper(c) ? c -
'A' + 10 : c -
'a' + 10));
239 is_high_nibble = !is_high_nibble;
244 have_rfmac = (c ==
'\0' && q - rfmac ==
ETH_ALEN);
295 const int num_random_bytes = 2;
296 const unsigned char non_sciatl_oui_bits = 0xc0
u;
297 const unsigned char mac_addr_locally_managed = (1 << 1);
300 pr_warning(
"rfmac not available on command line; "
301 "generating random MAC address\n");
302 eth_random_addr(
addr);
311 addr[0] = non_sciatl_oui_bits | mac_addr_locally_managed;
317 for (i = 1 + num_random_bytes; i <
ETH_ALEN; i++)