dcdbas.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. /*
  2. * dcdbas.c: Dell Systems Management Base Driver
  3. *
  4. * The Dell Systems Management Base Driver provides a sysfs interface for
  5. * systems management software to perform System Management Interrupts (SMIs)
  6. * and Host Control Actions (power cycle or power off after OS shutdown) on
  7. * Dell systems.
  8. *
  9. * See Documentation/dcdbas.txt for more information.
  10. *
  11. * Copyright (C) 1995-2006 Dell Inc.
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License v2.0 as published by
  15. * the Free Software Foundation.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. */
  22. #include <linux/platform_device.h>
  23. #include <linux/dma-mapping.h>
  24. #include <linux/errno.h>
  25. #include <linux/init.h>
  26. #include <linux/kernel.h>
  27. #include <linux/mc146818rtc.h>
  28. #include <linux/module.h>
  29. #include <linux/reboot.h>
  30. #include <linux/sched.h>
  31. #include <linux/smp.h>
  32. #include <linux/spinlock.h>
  33. #include <linux/string.h>
  34. #include <linux/types.h>
  35. #include <linux/mutex.h>
  36. #include <asm/io.h>
  37. #include <asm/semaphore.h>
  38. #include "dcdbas.h"
  39. #define DRIVER_NAME "dcdbas"
  40. #define DRIVER_VERSION "5.6.0-3.2"
  41. #define DRIVER_DESCRIPTION "Dell Systems Management Base Driver"
  42. static struct platform_device *dcdbas_pdev;
  43. static u8 *smi_data_buf;
  44. static dma_addr_t smi_data_buf_handle;
  45. static unsigned long smi_data_buf_size;
  46. static u32 smi_data_buf_phys_addr;
  47. static DEFINE_MUTEX(smi_data_lock);
  48. static unsigned int host_control_action;
  49. static unsigned int host_control_smi_type;
  50. static unsigned int host_control_on_shutdown;
  51. /**
  52. * smi_data_buf_free: free SMI data buffer
  53. */
  54. static void smi_data_buf_free(void)
  55. {
  56. if (!smi_data_buf)
  57. return;
  58. dev_dbg(&dcdbas_pdev->dev, "%s: phys: %x size: %lu\n",
  59. __FUNCTION__, smi_data_buf_phys_addr, smi_data_buf_size);
  60. dma_free_coherent(&dcdbas_pdev->dev, smi_data_buf_size, smi_data_buf,
  61. smi_data_buf_handle);
  62. smi_data_buf = NULL;
  63. smi_data_buf_handle = 0;
  64. smi_data_buf_phys_addr = 0;
  65. smi_data_buf_size = 0;
  66. }
  67. /**
  68. * smi_data_buf_realloc: grow SMI data buffer if needed
  69. */
  70. static int smi_data_buf_realloc(unsigned long size)
  71. {
  72. void *buf;
  73. dma_addr_t handle;
  74. if (smi_data_buf_size >= size)
  75. return 0;
  76. if (size > MAX_SMI_DATA_BUF_SIZE)
  77. return -EINVAL;
  78. /* new buffer is needed */
  79. buf = dma_alloc_coherent(&dcdbas_pdev->dev, size, &handle, GFP_KERNEL);
  80. if (!buf) {
  81. dev_dbg(&dcdbas_pdev->dev,
  82. "%s: failed to allocate memory size %lu\n",
  83. __FUNCTION__, size);
  84. return -ENOMEM;
  85. }
  86. /* memory zeroed by dma_alloc_coherent */
  87. if (smi_data_buf)
  88. memcpy(buf, smi_data_buf, smi_data_buf_size);
  89. /* free any existing buffer */
  90. smi_data_buf_free();
  91. /* set up new buffer for use */
  92. smi_data_buf = buf;
  93. smi_data_buf_handle = handle;
  94. smi_data_buf_phys_addr = (u32) virt_to_phys(buf);
  95. smi_data_buf_size = size;
  96. dev_dbg(&dcdbas_pdev->dev, "%s: phys: %x size: %lu\n",
  97. __FUNCTION__, smi_data_buf_phys_addr, smi_data_buf_size);
  98. return 0;
  99. }
  100. static ssize_t smi_data_buf_phys_addr_show(struct device *dev,
  101. struct device_attribute *attr,
  102. char *buf)
  103. {
  104. return sprintf(buf, "%x\n", smi_data_buf_phys_addr);
  105. }
  106. static ssize_t smi_data_buf_size_show(struct device *dev,
  107. struct device_attribute *attr,
  108. char *buf)
  109. {
  110. return sprintf(buf, "%lu\n", smi_data_buf_size);
  111. }
  112. static ssize_t smi_data_buf_size_store(struct device *dev,
  113. struct device_attribute *attr,
  114. const char *buf, size_t count)
  115. {
  116. unsigned long buf_size;
  117. ssize_t ret;
  118. buf_size = simple_strtoul(buf, NULL, 10);
  119. /* make sure SMI data buffer is at least buf_size */
  120. mutex_lock(&smi_data_lock);
  121. ret = smi_data_buf_realloc(buf_size);
  122. mutex_unlock(&smi_data_lock);
  123. if (ret)
  124. return ret;
  125. return count;
  126. }
  127. static ssize_t smi_data_read(struct kobject *kobj,
  128. struct bin_attribute *bin_attr,
  129. char *buf, loff_t pos, size_t count)
  130. {
  131. size_t max_read;
  132. ssize_t ret;
  133. mutex_lock(&smi_data_lock);
  134. if (pos >= smi_data_buf_size) {
  135. ret = 0;
  136. goto out;
  137. }
  138. max_read = smi_data_buf_size - pos;
  139. ret = min(max_read, count);
  140. memcpy(buf, smi_data_buf + pos, ret);
  141. out:
  142. mutex_unlock(&smi_data_lock);
  143. return ret;
  144. }
  145. static ssize_t smi_data_write(struct kobject *kobj,
  146. struct bin_attribute *bin_attr,
  147. char *buf, loff_t pos, size_t count)
  148. {
  149. ssize_t ret;
  150. if ((pos + count) > MAX_SMI_DATA_BUF_SIZE)
  151. return -EINVAL;
  152. mutex_lock(&smi_data_lock);
  153. ret = smi_data_buf_realloc(pos + count);
  154. if (ret)
  155. goto out;
  156. memcpy(smi_data_buf + pos, buf, count);
  157. ret = count;
  158. out:
  159. mutex_unlock(&smi_data_lock);
  160. return ret;
  161. }
  162. static ssize_t host_control_action_show(struct device *dev,
  163. struct device_attribute *attr,
  164. char *buf)
  165. {
  166. return sprintf(buf, "%u\n", host_control_action);
  167. }
  168. static ssize_t host_control_action_store(struct device *dev,
  169. struct device_attribute *attr,
  170. const char *buf, size_t count)
  171. {
  172. ssize_t ret;
  173. /* make sure buffer is available for host control command */
  174. mutex_lock(&smi_data_lock);
  175. ret = smi_data_buf_realloc(sizeof(struct apm_cmd));
  176. mutex_unlock(&smi_data_lock);
  177. if (ret)
  178. return ret;
  179. host_control_action = simple_strtoul(buf, NULL, 10);
  180. return count;
  181. }
  182. static ssize_t host_control_smi_type_show(struct device *dev,
  183. struct device_attribute *attr,
  184. char *buf)
  185. {
  186. return sprintf(buf, "%u\n", host_control_smi_type);
  187. }
  188. static ssize_t host_control_smi_type_store(struct device *dev,
  189. struct device_attribute *attr,
  190. const char *buf, size_t count)
  191. {
  192. host_control_smi_type = simple_strtoul(buf, NULL, 10);
  193. return count;
  194. }
  195. static ssize_t host_control_on_shutdown_show(struct device *dev,
  196. struct device_attribute *attr,
  197. char *buf)
  198. {
  199. return sprintf(buf, "%u\n", host_control_on_shutdown);
  200. }
  201. static ssize_t host_control_on_shutdown_store(struct device *dev,
  202. struct device_attribute *attr,
  203. const char *buf, size_t count)
  204. {
  205. host_control_on_shutdown = simple_strtoul(buf, NULL, 10);
  206. return count;
  207. }
  208. /**
  209. * smi_request: generate SMI request
  210. *
  211. * Called with smi_data_lock.
  212. */
  213. static int smi_request(struct smi_cmd *smi_cmd)
  214. {
  215. cpumask_t old_mask;
  216. int ret = 0;
  217. if (smi_cmd->magic != SMI_CMD_MAGIC) {
  218. dev_info(&dcdbas_pdev->dev, "%s: invalid magic value\n",
  219. __FUNCTION__);
  220. return -EBADR;
  221. }
  222. /* SMI requires CPU 0 */
  223. old_mask = current->cpus_allowed;
  224. set_cpus_allowed(current, cpumask_of_cpu(0));
  225. if (smp_processor_id() != 0) {
  226. dev_dbg(&dcdbas_pdev->dev, "%s: failed to get CPU 0\n",
  227. __FUNCTION__);
  228. ret = -EBUSY;
  229. goto out;
  230. }
  231. /* generate SMI */
  232. asm volatile (
  233. "outb %b0,%w1"
  234. : /* no output args */
  235. : "a" (smi_cmd->command_code),
  236. "d" (smi_cmd->command_address),
  237. "b" (smi_cmd->ebx),
  238. "c" (smi_cmd->ecx)
  239. : "memory"
  240. );
  241. out:
  242. set_cpus_allowed(current, old_mask);
  243. return ret;
  244. }
  245. /**
  246. * smi_request_store:
  247. *
  248. * The valid values are:
  249. * 0: zero SMI data buffer
  250. * 1: generate calling interface SMI
  251. * 2: generate raw SMI
  252. *
  253. * User application writes smi_cmd to smi_data before telling driver
  254. * to generate SMI.
  255. */
  256. static ssize_t smi_request_store(struct device *dev,
  257. struct device_attribute *attr,
  258. const char *buf, size_t count)
  259. {
  260. struct smi_cmd *smi_cmd;
  261. unsigned long val = simple_strtoul(buf, NULL, 10);
  262. ssize_t ret;
  263. mutex_lock(&smi_data_lock);
  264. if (smi_data_buf_size < sizeof(struct smi_cmd)) {
  265. ret = -ENODEV;
  266. goto out;
  267. }
  268. smi_cmd = (struct smi_cmd *)smi_data_buf;
  269. switch (val) {
  270. case 2:
  271. /* Raw SMI */
  272. ret = smi_request(smi_cmd);
  273. if (!ret)
  274. ret = count;
  275. break;
  276. case 1:
  277. /* Calling Interface SMI */
  278. smi_cmd->ebx = (u32) virt_to_phys(smi_cmd->command_buffer);
  279. ret = smi_request(smi_cmd);
  280. if (!ret)
  281. ret = count;
  282. break;
  283. case 0:
  284. memset(smi_data_buf, 0, smi_data_buf_size);
  285. ret = count;
  286. break;
  287. default:
  288. ret = -EINVAL;
  289. break;
  290. }
  291. out:
  292. mutex_unlock(&smi_data_lock);
  293. return ret;
  294. }
  295. /**
  296. * host_control_smi: generate host control SMI
  297. *
  298. * Caller must set up the host control command in smi_data_buf.
  299. */
  300. static int host_control_smi(void)
  301. {
  302. struct apm_cmd *apm_cmd;
  303. u8 *data;
  304. unsigned long flags;
  305. u32 num_ticks;
  306. s8 cmd_status;
  307. u8 index;
  308. apm_cmd = (struct apm_cmd *)smi_data_buf;
  309. apm_cmd->status = ESM_STATUS_CMD_UNSUCCESSFUL;
  310. switch (host_control_smi_type) {
  311. case HC_SMITYPE_TYPE1:
  312. spin_lock_irqsave(&rtc_lock, flags);
  313. /* write SMI data buffer physical address */
  314. data = (u8 *)&smi_data_buf_phys_addr;
  315. for (index = PE1300_CMOS_CMD_STRUCT_PTR;
  316. index < (PE1300_CMOS_CMD_STRUCT_PTR + 4);
  317. index++, data++) {
  318. outb(index,
  319. (CMOS_BASE_PORT + CMOS_PAGE2_INDEX_PORT_PIIX4));
  320. outb(*data,
  321. (CMOS_BASE_PORT + CMOS_PAGE2_DATA_PORT_PIIX4));
  322. }
  323. /* first set status to -1 as called by spec */
  324. cmd_status = ESM_STATUS_CMD_UNSUCCESSFUL;
  325. outb((u8) cmd_status, PCAT_APM_STATUS_PORT);
  326. /* generate SMM call */
  327. outb(ESM_APM_CMD, PCAT_APM_CONTROL_PORT);
  328. spin_unlock_irqrestore(&rtc_lock, flags);
  329. /* wait a few to see if it executed */
  330. num_ticks = TIMEOUT_USEC_SHORT_SEMA_BLOCKING;
  331. while ((cmd_status = inb(PCAT_APM_STATUS_PORT))
  332. == ESM_STATUS_CMD_UNSUCCESSFUL) {
  333. num_ticks--;
  334. if (num_ticks == EXPIRED_TIMER)
  335. return -ETIME;
  336. }
  337. break;
  338. case HC_SMITYPE_TYPE2:
  339. case HC_SMITYPE_TYPE3:
  340. spin_lock_irqsave(&rtc_lock, flags);
  341. /* write SMI data buffer physical address */
  342. data = (u8 *)&smi_data_buf_phys_addr;
  343. for (index = PE1400_CMOS_CMD_STRUCT_PTR;
  344. index < (PE1400_CMOS_CMD_STRUCT_PTR + 4);
  345. index++, data++) {
  346. outb(index, (CMOS_BASE_PORT + CMOS_PAGE1_INDEX_PORT));
  347. outb(*data, (CMOS_BASE_PORT + CMOS_PAGE1_DATA_PORT));
  348. }
  349. /* generate SMM call */
  350. if (host_control_smi_type == HC_SMITYPE_TYPE3)
  351. outb(ESM_APM_CMD, PCAT_APM_CONTROL_PORT);
  352. else
  353. outb(ESM_APM_CMD, PE1400_APM_CONTROL_PORT);
  354. /* restore RTC index pointer since it was written to above */
  355. CMOS_READ(RTC_REG_C);
  356. spin_unlock_irqrestore(&rtc_lock, flags);
  357. /* read control port back to serialize write */
  358. cmd_status = inb(PE1400_APM_CONTROL_PORT);
  359. /* wait a few to see if it executed */
  360. num_ticks = TIMEOUT_USEC_SHORT_SEMA_BLOCKING;
  361. while (apm_cmd->status == ESM_STATUS_CMD_UNSUCCESSFUL) {
  362. num_ticks--;
  363. if (num_ticks == EXPIRED_TIMER)
  364. return -ETIME;
  365. }
  366. break;
  367. default:
  368. dev_dbg(&dcdbas_pdev->dev, "%s: invalid SMI type %u\n",
  369. __FUNCTION__, host_control_smi_type);
  370. return -ENOSYS;
  371. }
  372. return 0;
  373. }
  374. /**
  375. * dcdbas_host_control: initiate host control
  376. *
  377. * This function is called by the driver after the system has
  378. * finished shutting down if the user application specified a
  379. * host control action to perform on shutdown. It is safe to
  380. * use smi_data_buf at this point because the system has finished
  381. * shutting down and no userspace apps are running.
  382. */
  383. static void dcdbas_host_control(void)
  384. {
  385. struct apm_cmd *apm_cmd;
  386. u8 action;
  387. if (host_control_action == HC_ACTION_NONE)
  388. return;
  389. action = host_control_action;
  390. host_control_action = HC_ACTION_NONE;
  391. if (!smi_data_buf) {
  392. dev_dbg(&dcdbas_pdev->dev, "%s: no SMI buffer\n", __FUNCTION__);
  393. return;
  394. }
  395. if (smi_data_buf_size < sizeof(struct apm_cmd)) {
  396. dev_dbg(&dcdbas_pdev->dev, "%s: SMI buffer too small\n",
  397. __FUNCTION__);
  398. return;
  399. }
  400. apm_cmd = (struct apm_cmd *)smi_data_buf;
  401. /* power off takes precedence */
  402. if (action & HC_ACTION_HOST_CONTROL_POWEROFF) {
  403. apm_cmd->command = ESM_APM_POWER_CYCLE;
  404. apm_cmd->reserved = 0;
  405. *((s16 *)&apm_cmd->parameters.shortreq.parm[0]) = (s16) 0;
  406. host_control_smi();
  407. } else if (action & HC_ACTION_HOST_CONTROL_POWERCYCLE) {
  408. apm_cmd->command = ESM_APM_POWER_CYCLE;
  409. apm_cmd->reserved = 0;
  410. *((s16 *)&apm_cmd->parameters.shortreq.parm[0]) = (s16) 20;
  411. host_control_smi();
  412. }
  413. }
  414. /**
  415. * dcdbas_reboot_notify: handle reboot notification for host control
  416. */
  417. static int dcdbas_reboot_notify(struct notifier_block *nb, unsigned long code,
  418. void *unused)
  419. {
  420. switch (code) {
  421. case SYS_DOWN:
  422. case SYS_HALT:
  423. case SYS_POWER_OFF:
  424. if (host_control_on_shutdown) {
  425. /* firmware is going to perform host control action */
  426. printk(KERN_WARNING "Please wait for shutdown "
  427. "action to complete...\n");
  428. dcdbas_host_control();
  429. }
  430. break;
  431. }
  432. return NOTIFY_DONE;
  433. }
  434. static struct notifier_block dcdbas_reboot_nb = {
  435. .notifier_call = dcdbas_reboot_notify,
  436. .next = NULL,
  437. .priority = INT_MIN
  438. };
  439. static DCDBAS_BIN_ATTR_RW(smi_data);
  440. static struct bin_attribute *dcdbas_bin_attrs[] = {
  441. &bin_attr_smi_data,
  442. NULL
  443. };
  444. static DCDBAS_DEV_ATTR_RW(smi_data_buf_size);
  445. static DCDBAS_DEV_ATTR_RO(smi_data_buf_phys_addr);
  446. static DCDBAS_DEV_ATTR_WO(smi_request);
  447. static DCDBAS_DEV_ATTR_RW(host_control_action);
  448. static DCDBAS_DEV_ATTR_RW(host_control_smi_type);
  449. static DCDBAS_DEV_ATTR_RW(host_control_on_shutdown);
  450. static struct attribute *dcdbas_dev_attrs[] = {
  451. &dev_attr_smi_data_buf_size.attr,
  452. &dev_attr_smi_data_buf_phys_addr.attr,
  453. &dev_attr_smi_request.attr,
  454. &dev_attr_host_control_action.attr,
  455. &dev_attr_host_control_smi_type.attr,
  456. &dev_attr_host_control_on_shutdown.attr,
  457. NULL
  458. };
  459. static struct attribute_group dcdbas_attr_group = {
  460. .attrs = dcdbas_dev_attrs,
  461. };
  462. static int __devinit dcdbas_probe(struct platform_device *dev)
  463. {
  464. int i, error;
  465. host_control_action = HC_ACTION_NONE;
  466. host_control_smi_type = HC_SMITYPE_NONE;
  467. /*
  468. * BIOS SMI calls require buffer addresses be in 32-bit address space.
  469. * This is done by setting the DMA mask below.
  470. */
  471. dcdbas_pdev->dev.coherent_dma_mask = DMA_32BIT_MASK;
  472. dcdbas_pdev->dev.dma_mask = &dcdbas_pdev->dev.coherent_dma_mask;
  473. error = sysfs_create_group(&dev->dev.kobj, &dcdbas_attr_group);
  474. if (error)
  475. return error;
  476. for (i = 0; dcdbas_bin_attrs[i]; i++) {
  477. error = sysfs_create_bin_file(&dev->dev.kobj,
  478. dcdbas_bin_attrs[i]);
  479. if (error) {
  480. while (--i >= 0)
  481. sysfs_remove_bin_file(&dev->dev.kobj,
  482. dcdbas_bin_attrs[i]);
  483. sysfs_remove_group(&dev->dev.kobj, &dcdbas_attr_group);
  484. return error;
  485. }
  486. }
  487. register_reboot_notifier(&dcdbas_reboot_nb);
  488. dev_info(&dev->dev, "%s (version %s)\n",
  489. DRIVER_DESCRIPTION, DRIVER_VERSION);
  490. return 0;
  491. }
  492. static int __devexit dcdbas_remove(struct platform_device *dev)
  493. {
  494. int i;
  495. unregister_reboot_notifier(&dcdbas_reboot_nb);
  496. for (i = 0; dcdbas_bin_attrs[i]; i++)
  497. sysfs_remove_bin_file(&dev->dev.kobj, dcdbas_bin_attrs[i]);
  498. sysfs_remove_group(&dev->dev.kobj, &dcdbas_attr_group);
  499. return 0;
  500. }
  501. static struct platform_driver dcdbas_driver = {
  502. .driver = {
  503. .name = DRIVER_NAME,
  504. .owner = THIS_MODULE,
  505. },
  506. .probe = dcdbas_probe,
  507. .remove = __devexit_p(dcdbas_remove),
  508. };
  509. /**
  510. * dcdbas_init: initialize driver
  511. */
  512. static int __init dcdbas_init(void)
  513. {
  514. int error;
  515. error = platform_driver_register(&dcdbas_driver);
  516. if (error)
  517. return error;
  518. dcdbas_pdev = platform_device_alloc(DRIVER_NAME, -1);
  519. if (!dcdbas_pdev) {
  520. error = -ENOMEM;
  521. goto err_unregister_driver;
  522. }
  523. error = platform_device_add(dcdbas_pdev);
  524. if (error)
  525. goto err_free_device;
  526. return 0;
  527. err_free_device:
  528. platform_device_put(dcdbas_pdev);
  529. err_unregister_driver:
  530. platform_driver_unregister(&dcdbas_driver);
  531. return error;
  532. }
  533. /**
  534. * dcdbas_exit: perform driver cleanup
  535. */
  536. static void __exit dcdbas_exit(void)
  537. {
  538. /*
  539. * make sure functions that use dcdbas_pdev are called
  540. * before platform_device_unregister
  541. */
  542. unregister_reboot_notifier(&dcdbas_reboot_nb);
  543. smi_data_buf_free();
  544. platform_device_unregister(dcdbas_pdev);
  545. platform_driver_unregister(&dcdbas_driver);
  546. /*
  547. * We have to free the buffer here instead of dcdbas_remove
  548. * because only in module exit function we can be sure that
  549. * all sysfs attributes belonging to this module have been
  550. * released.
  551. */
  552. smi_data_buf_free();
  553. }
  554. module_init(dcdbas_init);
  555. module_exit(dcdbas_exit);
  556. MODULE_DESCRIPTION(DRIVER_DESCRIPTION " (version " DRIVER_VERSION ")");
  557. MODULE_VERSION(DRIVER_VERSION);
  558. MODULE_AUTHOR("Dell Inc.");
  559. MODULE_LICENSE("GPL");