Skip to content

Commit e2d09e4

Browse files
Geoff Levandpaulusmack
Geoff Levand
authored andcommitted
---
yaml --- r: 67532 b: refs/heads/rpi-3.2.27 c: 01263e8 h: refs/heads/rpi-3.2.27
1 parent d033de1 commit e2d09e4

File tree

4 files changed

+22
-28
lines changed

4 files changed

+22
-28
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/rpi-3.2.27: ca94297f0c169710848a095a2fd986195e546cb3
2+
refs/heads/rpi-3.2.27: 01263e88c3b8c4ec9621062a40b42814e0859e92

trunk/arch/powerpc/platforms/ps3/os-area.c

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -114,27 +114,12 @@ struct os_area_params {
114114
#define SECONDS_FROM_1970_TO_2000 946684800LL
115115

116116
/**
117-
* struct saved_params - Static working copies of data from the 'Other OS' area.
118-
*
119-
* For the convinience of the guest, the HV makes a copy of the 'Other OS' area
120-
* in flash to a high address in the boot memory region and then puts that RAM
121-
* address and the byte count into the repository for retreval by the guest.
122-
* We copy the data we want into a static variable and allow the memory setup
123-
* by the HV to be claimed by the lmb manager.
117+
* struct saved_params - Static working copies of data from the PS3 'os area'.
124118
*/
125119

126120
struct saved_params {
127-
/* param 0 */
128121
s64 rtc_diff;
129122
unsigned int av_multi_out;
130-
unsigned int ctrl_button;
131-
/* param 1 */
132-
u8 static_ip_addr[4];
133-
u8 network_mask[4];
134-
u8 default_gateway[4];
135-
/* param 2 */
136-
u8 dns_primary[4];
137-
u8 dns_secondary[4];
138123
} static saved_params;
139124

140125
#define dump_header(_a) _dump_header(_a, __func__, __LINE__)
@@ -201,20 +186,32 @@ static int __init verify_header(const struct os_area_header *header)
201186
return 0;
202187
}
203188

204-
int __init ps3_os_area_init(void)
189+
/**
190+
* ps3_os_area_save_params - Copy data from os area mirror to @saved_params.
191+
*
192+
* For the convenience of the guest, the HV makes a copy of the os area in
193+
* flash to a high address in the boot memory region and then puts that RAM
194+
* address and the byte count into the repository for retreval by the guest.
195+
* We copy the data we want into a static variable and allow the memory setup
196+
* by the HV to be claimed by the lmb manager.
197+
*/
198+
199+
void __init ps3_os_area_save_params(void)
205200
{
206201
int result;
207202
u64 lpar_addr;
208203
unsigned int size;
209204
struct os_area_header *header;
210205
struct os_area_params *params;
211206

207+
pr_debug(" -> %s:%d\n", __func__, __LINE__);
208+
212209
result = ps3_repository_read_boot_dat_info(&lpar_addr, &size);
213210

214211
if (result) {
215212
pr_debug("%s:%d ps3_repository_read_boot_dat_info failed\n",
216213
__func__, __LINE__);
217-
return result;
214+
return;
218215
}
219216

220217
header = (struct os_area_header *)__va(lpar_addr);
@@ -226,21 +223,18 @@ int __init ps3_os_area_init(void)
226223
if (result) {
227224
pr_debug("%s:%d verify_header failed\n", __func__, __LINE__);
228225
dump_header(header);
229-
return -EIO;
226+
return;
230227
}
231228

232229
dump_header(header);
233230
dump_params(params);
234231

235232
saved_params.rtc_diff = params->rtc_diff;
236233
saved_params.av_multi_out = params->av_multi_out;
237-
saved_params.ctrl_button = params->ctrl_button;
238-
memcpy(saved_params.static_ip_addr, params->static_ip_addr, 4);
239-
memcpy(saved_params.network_mask, params->network_mask, 4);
240-
memcpy(saved_params.default_gateway, params->default_gateway, 4);
241-
memcpy(saved_params.dns_secondary, params->dns_secondary, 4);
242234

243-
return result;
235+
memset(header, 0, sizeof(*header));
236+
237+
pr_debug(" <- %s:%d\n", __func__, __LINE__);
244238
}
245239

246240
/**

trunk/arch/powerpc/platforms/ps3/platform.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ int ps3_set_rtc_time(struct rtc_time *time);
6262

6363
/* os area */
6464

65-
int __init ps3_os_area_init(void);
65+
void __init ps3_os_area_save_params(void);
6666
u64 ps3_os_area_rtc_diff(void);
6767

6868
/* spu */

trunk/arch/powerpc/platforms/ps3/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static int __init ps3_probe(void)
228228

229229
powerpc_firmware_features |= FW_FEATURE_PS3_POSSIBLE;
230230

231-
ps3_os_area_init();
231+
ps3_os_area_save_params();
232232
ps3_mm_init();
233233
ps3_mm_vas_create(&htab_size);
234234
ps3_hpte_init(htab_size);

0 commit comments

Comments
 (0)