F: doc/kwboot.1
F: tools/kwb*
+LED
+M: Ivan Vozvakhov <i.vozvakhov@vk.team>
+S: Supported
+F: doc/device-tree-bindings/leds/leds-pwm.txt
+F: drivers/led/led_pwm.c
+
LOGGING
M: Simon Glass <sjg@chromium.org>
S: Maintained
compatible = "ti,omap5430-timer";
reg = <0x0 0x40400000 0x0 0x80>;
ti,timer-alwon;
- clock-frequency = <25000000>;
+ clock-frequency = <250000000>;
u-boot,dm-spl;
};
#include <mapmem.h>
#include <asm/io.h>
#include <malloc.h>
+#include <memalign.h>
#include <asm/global_data.h>
#ifdef CONFIG_DM_HASH
#include <dm.h>
static int fit_image_check_hash(const void *fit, int noffset, const void *data,
size_t size, char **err_msgp)
{
- uint8_t value[FIT_MAX_HASH_LEN];
+ DEFINE_ALIGN_BUFFER(uint8_t, value, FIT_MAX_HASH_LEN,
+ ARCH_DMA_MINALIGN);
int value_len;
const char *algo;
uint8_t *fit_value;
#include <common.h>
#include <command.h>
+#include <dm.h>
#include <env.h>
#include <image.h>
#include <log.h>
#include <lcd.h>
#include <net.h>
#include <fdt_support.h>
+#include <video.h>
#include <linux/libfdt.h>
#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/list.h>
#ifdef CONFIG_DM_RNG
-#include <dm.h>
#include <rng.h>
#endif
/* display BMP if available */
if (cfg->bmp) {
if (get_relfile(ctx, cfg->bmp, image_load_addr, NULL)) {
- if (CONFIG_IS_ENABLED(CMD_CLS))
- run_command("cls", 0);
+#if defined(CONFIG_DM_VIDEO)
+ struct udevice *dev;
+
+ err = uclass_first_device_err(UCLASS_VIDEO, &dev);
+ if (!err)
+ video_clear(dev);
+#endif
bmp_display(image_load_addr,
BMP_ALIGN_CENTER, BMP_ALIGN_CENTER);
} else {
default 1
help
Partition on the MMC to load U-Boot from when the MMC is being
- used in fs mode
+ used in fs mode.
+ Use -1 as a special value to use the first bootable partition.
config SPL_MMC_TINY
bool "Tiny MMC framework in SPL"
{
int err = -ENOSYS;
+ __maybe_unused int partition = CONFIG_SYS_MMCSD_FS_BOOT_PARTITION;
+
+#if CONFIG_SYS_MMCSD_FS_BOOT_PARTITION == -1
+ {
+ struct disk_partition info;
+ debug("Checking for the first MBR bootable partition\n");
+ for (int type_part = 1; type_part <= DOS_ENTRY_NUMBERS; type_part++) {
+ err = part_get_info(mmc_get_blk_desc(mmc), type_part, &info);
+ if (err)
+ continue;
+ debug("Partition %d is of type %d and bootable=%d\n", type_part, info.sys_ind, info.bootable);
+ if (info.bootable != 0) {
+ debug("Partition %d is bootable, using it\n", type_part);
+ partition = type_part;
+ break;
+ }
+ }
+ printf("Using first bootable partition: %d\n", partition);
+ if (partition == CONFIG_SYS_MMCSD_FS_BOOT_PARTITION) {
+ return -ENOSYS;
+ }
+ }
+#endif
+
#ifdef CONFIG_SPL_FS_FAT
if (!spl_start_uboot()) {
err = spl_load_image_fat_os(spl_image, bootdev, mmc_get_blk_desc(mmc),
- CONFIG_SYS_MMCSD_FS_BOOT_PARTITION);
+ partition);
if (!err)
return err;
}
#ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
err = spl_load_image_fat(spl_image, bootdev, mmc_get_blk_desc(mmc),
- CONFIG_SYS_MMCSD_FS_BOOT_PARTITION,
+ partition,
filename);
if (!err)
return err;
#ifdef CONFIG_SPL_FS_EXT4
if (!spl_start_uboot()) {
err = spl_load_image_ext_os(spl_image, bootdev, mmc_get_blk_desc(mmc),
- CONFIG_SYS_MMCSD_FS_BOOT_PARTITION);
+ partition);
if (!err)
return err;
}
#ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
err = spl_load_image_ext(spl_image, bootdev, mmc_get_blk_desc(mmc),
- CONFIG_SYS_MMCSD_FS_BOOT_PARTITION,
+ partition,
filename);
if (!err)
return err;
--- /dev/null
+LEDs connected to PWM (Linux compatible)
+
+Required properties:
+- compatible : should be "pwm-leds".
+
+Each LED is represented as a sub-node of the pwm-leds device. Each
+node's name represents the name of the corresponding LED.
+
+LED sub-node properties:
+- pwms : (required) LED pwm channel, see "pwms property" in
+ doc/device-tree-bindings/pwm/pwm.txt
+- label : (optional) LED label, see "label property" in
+ doc/device-tree-bindings/led/common.txt
+- max-brightness : (optional, unsigned, default 255) Maximum brightness possible
+ for the LED
+- active-low : (optional, boolean, default false) For PWMs where the LED is
+ wired to supply rather than ground
+- u-boot,default-brightness : (optional, unsigned, default 0) Initial state
+ of pwm-leds
+
+Example:
+
+leds {
+ compatible = "pwm-leds";
+ status = "okay";
+
+ blue {
+ label = "led-blue";
+ pwms = <&pwm1 0 100000 0>;
+ max-brightness = <255>;
+ u-boot,default-brightness = <127>;
+ };
+
+ green {
+ label = "led-green";
+ pwms = <&pwm2 0 100000 0>;
+ max-brightness = <255>;
+ u-boot,default-brightness = <127>;
+ };
+
+ red {
+ label = "led-red";
+ pwms = <&pwm3 0 100000 0>;
+ max-brightness = <255>;
+ u-boot,default-brightness = <127>;
+ };
+}
static struct pci_device_id ahci_pci_supported[] = {
{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, ~0) },
{ PCI_DEVICE(0x1b21, 0x0611) },
+ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x6121) },
+ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x6145) },
{},
};
This option enables support for LEDs connected to the Cortina
Access CAxxxx SOCs.
+config LED_PWM
+ bool "LED PWM"
+ depends on LED && DM_PWM
+ help
+ Enable support for LEDs connected to PWM.
+ Linux compatible ofdata.
config LED_BLINK
bool "Support LED blinking"
obj-$(CONFIG_LED_BCM6358) += led_bcm6358.o
obj-$(CONFIG_LED_BCM6753) += led_bcm6753.o
obj-$(CONFIG_LED_BCM6858) += led_bcm6858.o
+obj-$(CONFIG_LED_PWM) += led_pwm.o
obj-$(CONFIG_$(SPL_)LED_GPIO) += led_gpio.o
obj-$(CONFIG_LED_CORTINA) += led_cortina.o
#define LEDS_MAX 32
#define LEDS_WAIT 100
+#define LEDS_MAX_BRIGHTNESS 7
/* LED Mode register */
#define LED_MODE_REG 0x0
#define LED_HW_LED_EN_REG 0x08
/* LED Flash control register0 */
#define LED_FLASH_RATE_CONTROL_REG0 0x10
+/* LED Brightness control register0 */
+#define LED_BRIGHTNESS_CONTROL_REG0 0x20
/* Soft LED input register */
#define LED_SW_LED_IP_REG 0xb8
/* Parallel LED Output Polarity Register */
}
#endif
+static int led_set_brightness(struct udevice *dev, unsigned int brightness)
+{
+ struct bcm6858_led_priv *priv = dev_get_priv(dev);
+ u32 offset, shift, mask, value;
+
+ offset = (priv->pin / 8) * 4;
+ shift = (priv->pin % 8) * 4;
+ mask = 0xf << shift;
+
+ /* 8 levels of brightness achieved through PWM */
+ value = (brightness > LEDS_MAX_BRIGHTNESS ?
+ LEDS_MAX_BRIGHTNESS : brightness) << shift;
+
+ debug("%s: %s brightness set to %u\n", __func__, dev->name, value >> shift);
+
+ clrbits_32(priv->regs + LED_BRIGHTNESS_CONTROL_REG0 + offset, mask);
+ setbits_32(priv->regs + LED_BRIGHTNESS_CONTROL_REG0 + offset, value);
+
+ return 0;
+}
+
static enum led_state_t bcm6858_led_get_state(struct udevice *dev)
{
struct bcm6858_led_priv *priv = dev_get_priv(dev);
{
struct bcm6858_led_priv *priv = dev_get_priv(dev);
+ debug("%s: Set led %s to %d\n", __func__, dev->name, state);
+
switch (state) {
case LEDST_OFF:
clrbits_32(priv->regs + LED_SW_LED_IP_REG, (1 << priv->pin));
} else {
struct bcm6858_led_priv *priv = dev_get_priv(dev);
void __iomem *regs;
- unsigned int pin;
+ unsigned int pin, brightness;
regs = dev_remap_addr(dev_get_parent(dev));
if (!regs)
clrbits_32(regs + LED_PLED_OP_PPOL_REG, 1 << pin);
else
setbits_32(regs + LED_PLED_OP_PPOL_REG, 1 << pin);
+
+ brightness = dev_read_u32_default(dev, "default-brightness",
+ LEDS_MAX_BRIGHTNESS);
+ led_set_brightness(dev, brightness);
}
return 0;
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2022 VK
+ * Author: Ivan Vozvakhov <i.vozvakhov@vk.team>
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <errno.h>
+#include <led.h>
+#include <malloc.h>
+#include <dm/lists.h>
+#include <pwm.h>
+
+#define LEDS_PWM_DRIVER_NAME "led_pwm"
+
+struct led_pwm_priv {
+ struct udevice *pwm;
+ uint period; /* period in ns */
+ uint duty; /* duty cycle in ns */
+ uint channel; /* pwm channel number */
+ bool active_low; /* pwm polarity */
+ bool enabled;
+};
+
+static int led_pwm_enable(struct udevice *dev)
+{
+ struct led_pwm_priv *priv = dev_get_priv(dev);
+ int ret;
+
+ ret = pwm_set_invert(priv->pwm, priv->channel, priv->active_low);
+ if (ret)
+ return ret;
+
+ ret = pwm_set_config(priv->pwm, priv->channel, priv->period, priv->duty);
+ if (ret)
+ return ret;
+
+ ret = pwm_set_enable(priv->pwm, priv->channel, true);
+ if (ret)
+ return ret;
+
+ priv->enabled = true;
+
+ return 0;
+}
+
+static int led_pwm_disable(struct udevice *dev)
+{
+ struct led_pwm_priv *priv = dev_get_priv(dev);
+ int ret;
+
+ ret = pwm_set_config(priv->pwm, priv->channel, priv->period, 0);
+ if (ret)
+ return ret;
+
+ ret = pwm_set_enable(priv->pwm, priv->channel, false);
+ if (ret)
+ return ret;
+
+ priv->enabled = false;
+
+ return 0;
+}
+
+static int led_pwm_set_state(struct udevice *dev, enum led_state_t state)
+{
+ struct led_pwm_priv *priv = dev_get_priv(dev);
+ int ret;
+
+ switch (state) {
+ case LEDST_OFF:
+ ret = led_pwm_disable(dev);
+ break;
+ case LEDST_ON:
+ ret = led_pwm_enable(dev);
+ break;
+ case LEDST_TOGGLE:
+ ret = (priv->enabled) ? led_pwm_disable(dev) : led_pwm_enable(dev);
+ break;
+ default:
+ ret = -ENOSYS;
+ }
+
+ return ret;
+}
+
+static enum led_state_t led_pwm_get_state(struct udevice *dev)
+{
+ struct led_pwm_priv *priv = dev_get_priv(dev);
+
+ return (priv->enabled) ? LEDST_ON : LEDST_OFF;
+}
+
+static int led_pwm_probe(struct udevice *dev)
+{
+ struct led_pwm_priv *priv = dev_get_priv(dev);
+ struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev);
+
+ /* Ignore the top-level LED node */
+ if (!uc_plat->label)
+ return 0;
+
+ return led_pwm_set_state(dev, (priv->enabled) ? LEDST_ON : LEDST_OFF);
+}
+
+static int led_pwm_of_to_plat(struct udevice *dev)
+{
+ struct led_uc_plat *uc_plat = dev_get_uclass_plat(dev);
+ struct led_pwm_priv *priv = dev_get_priv(dev);
+ struct ofnode_phandle_args args;
+ uint def_brightness, max_brightness;
+ int ret;
+
+ /* Ignore the top-level LED node */
+ if (!uc_plat->label)
+ return 0;
+
+ ret = dev_read_phandle_with_args(dev, "pwms", "#pwm-cells", 0, 0, &args);
+ if (ret)
+ return ret;
+
+ ret = uclass_get_device_by_ofnode(UCLASS_PWM, args.node, &priv->pwm);
+ if (ret)
+ return ret;
+
+ priv->channel = args.args[0];
+ priv->period = args.args[1];
+ priv->active_low = dev_read_bool(dev, "active-low");
+
+ def_brightness = dev_read_u32_default(dev, "u-boot,default-brightness", 0);
+ max_brightness = dev_read_u32_default(dev, "max-brightness", 255);
+ priv->enabled = !!def_brightness;
+
+ /*
+ * No need to handle pwm iverted case (active_low)
+ * because of pwm_set_invert function
+ */
+ if (def_brightness < max_brightness)
+ priv->duty = priv->period * def_brightness / max_brightness;
+ else
+ priv->duty = priv->period;
+
+ return 0;
+}
+
+static int led_pwm_bind(struct udevice *parent)
+{
+ struct udevice *dev;
+ ofnode node;
+ int ret;
+
+ dev_for_each_subnode(node, parent) {
+ struct led_uc_plat *uc_plat;
+ const char *label;
+
+ label = ofnode_read_string(node, "label");
+ if (!label)
+ label = ofnode_get_name(node);
+
+ ret = device_bind_driver_to_node(parent, LEDS_PWM_DRIVER_NAME,
+ ofnode_get_name(node),
+ node, &dev);
+ if (ret)
+ return ret;
+
+ uc_plat = dev_get_uclass_plat(dev);
+ uc_plat->label = label;
+ }
+ return 0;
+}
+
+static const struct led_ops led_pwm_ops = {
+ .set_state = led_pwm_set_state,
+ .get_state = led_pwm_get_state,
+};
+
+static const struct udevice_id led_pwm_ids[] = {
+ { .compatible = "pwm-leds" },
+ { }
+};
+
+U_BOOT_DRIVER(led_pwm) = {
+ .name = LEDS_PWM_DRIVER_NAME,
+ .id = UCLASS_LED,
+ .of_match = led_pwm_ids,
+ .ops = &led_pwm_ops,
+ .priv_auto = sizeof(struct led_pwm_priv),
+ .bind = led_pwm_bind,
+ .probe = led_pwm_probe,
+ .of_to_plat = led_pwm_of_to_plat,
+};
ofnode parts, child;
int i = 0;
- if (!master->dev)
+ if (!master->dev && !ofnode_valid(master->flash_node))
return 0;
- parts = ofnode_find_subnode(mtd_get_ofnode(master), "partitions");
+ if (master->dev)
+ parts = ofnode_find_subnode(mtd_get_ofnode(master), "partitions");
+ else
+ parts = ofnode_find_subnode(master->flash_node, "partitions");
+
if (!ofnode_valid(parts) || !ofnode_is_available(parts) ||
!ofnode_device_is_compatible(parts, "fixed-partitions"))
return 0;
break;
}
+ mtd->flash_node = chip->flash_node;
/* Fill in remaining MTD driver data */
mtd->type = nand_is_slc(chip) ? MTD_NANDFLASH : MTD_MLCNANDFLASH;
mtd->flags = (chip->options & NAND_ROM) ? MTD_CAP_ROM :
NOT_ON_MEDIA = 3,
};
+static int try_read_node(const struct ubifs_info *c, void *buf, int type,
+ int len, int lnum, int offs);
+static int fallible_read_node(struct ubifs_info *c, const union ubifs_key *key,
+ struct ubifs_zbranch *zbr, void *node);
+
/**
* insert_old_idx - record an index node obsoleted since the last commit start.
* @c: UBIFS file-system description object
return 0;
}
- err = ubifs_tnc_read_node(c, zbr, node);
+ if (c->replaying) {
+ err = fallible_read_node(c, &zbr->key, zbr, node);
+ /*
+ * When the node was not found, return -ENOENT, 0 otherwise.
+ * Negative return codes stay as-is.
+ */
+ if (err == 0)
+ err = -ENOENT;
+ else if (err == 1)
+ err = 0;
+ } else {
+ err = ubifs_tnc_read_node(c, zbr, node);
+ }
if (err)
return err;
if (nm->name) {
if (err) {
/* Handle collisions */
- err = resolve_collision(c, key, &znode, &n, nm);
+ if (c->replaying)
+ err = fallible_resolve_collision(c, key, &znode, &n,
+ nm, 0);
+ else
+ err = resolve_collision(c, key, &znode, &n, nm);
dbg_tnc("rc returned %d, znode %p, n %d",
err, znode, n);
if (unlikely(err < 0))
struct padding_algo {
const char *name;
int (*verify)(struct image_sign_info *info,
- uint8_t *pad, int pad_len,
+ const uint8_t *pad, int pad_len,
const uint8_t *hash, int hash_len);
};
struct device dev;
#else
struct udevice *dev;
+ ofnode flash_node;
#endif
int usecount;
const void *hash, uint8_t *sig, uint sig_len);
int padding_pkcs_15_verify(struct image_sign_info *info,
- uint8_t *msg, int msg_len,
+ const uint8_t *msg, int msg_len,
const uint8_t *hash, int hash_len);
int padding_pss_verify(struct image_sign_info *info,
- uint8_t *msg, int msg_len,
+ const uint8_t *msg, int msg_len,
const uint8_t *hash, int hash_len);
#define RSA_DEFAULT_PADDING_NAME "pkcs-1.5"
return -ENOPKG;
if (!strcmp(sinfo->sig->hash_algo, "sha256"))
sig->digest_size = SHA256_SUM_LEN;
+ else if (!strcmp(sinfo->sig->hash_algo, "sha384"))
+ sig->digest_size = SHA384_SUM_LEN;
+ else if (!strcmp(sinfo->sig->hash_algo, "sha512"))
+ sig->digest_size = SHA512_SUM_LEN;
else if (!strcmp(sinfo->sig->hash_algo, "sha1"))
sig->digest_size = SHA1_SUM_LEN;
else
return -ENOPKG;
if (!strcmp(sig->hash_algo, "sha256"))
sig->digest_size = SHA256_SUM_LEN;
+ else if (!strcmp(sig->hash_algo, "sha384"))
+ sig->digest_size = SHA384_SUM_LEN;
+ else if (!strcmp(sig->hash_algo, "sha512"))
+ sig->digest_size = SHA512_SUM_LEN;
else if (!strcmp(sig->hash_algo, "sha1"))
sig->digest_size = SHA1_SUM_LEN;
else
}
int padding_pkcs_15_verify(struct image_sign_info *info,
- uint8_t *msg, int msg_len,
+ const uint8_t *msg, int msg_len,
const uint8_t *hash, int hash_len)
{
struct checksum_algo *checksum = info->checksum;
* Return: 0 if the octet string was correctly generated, others on error
*/
static int mask_generation_function1(struct checksum_algo *checksum,
- uint8_t *seed, int seed_len,
+ const uint8_t *seed, int seed_len,
uint8_t *output, int output_len)
{
struct image_region region[2];
}
static int compute_hash_prime(struct checksum_algo *checksum,
- uint8_t *pad, int pad_len,
- uint8_t *hash, int hash_len,
- uint8_t *salt, int salt_len,
+ const uint8_t *pad, int pad_len,
+ const uint8_t *hash, int hash_len,
+ const uint8_t *salt, int salt_len,
uint8_t *hprime)
{
struct image_region region[3];
/*
* padding_pss_verify() - verify the pss padding of a signature
*
- * Only works with a rsa_pss_saltlen:-2 (default value) right now
- * saltlen:-1 "set the salt length to the digest length" is currently
- * not supported.
+ * Works with any salt length
+ *
+ * msg is a concatenation of : masked_db + h + 0xbc
+ * Once unmasked, db is a concatenation of : [0x00]* + 0x01 + salt
+ * Length of 0-padding at begin of db depends on salt length.
*
* @info: Specifies key and FIT information
* @msg: byte array of message, len equal to msg_len
* @hash_len: Length of the hash
*/
int padding_pss_verify(struct image_sign_info *info,
- uint8_t *msg, int msg_len,
+ const uint8_t *msg, int msg_len,
const uint8_t *hash, int hash_len)
{
- uint8_t *masked_db = NULL;
- int masked_db_len = msg_len - hash_len - 1;
- uint8_t *h = NULL, *hprime = NULL;
- int h_len = hash_len;
+ const uint8_t *masked_db = NULL;
uint8_t *db_mask = NULL;
- int db_mask_len = masked_db_len;
- uint8_t *db = NULL, *salt = NULL;
- int db_len = masked_db_len, salt_len = msg_len - hash_len - 2;
+ uint8_t *db = NULL;
+ int db_len = msg_len - hash_len - 1;
+ const uint8_t *h = NULL;
+ uint8_t *hprime = NULL;
+ int h_len = hash_len;
+ uint8_t *db_nopad = NULL, *salt = NULL;
+ int db_padlen, salt_len;
uint8_t pad_zero[8] = { 0 };
int ret, i, leftmost_bits = 1;
uint8_t leftmost_mask;
struct checksum_algo *checksum = info->checksum;
/* first, allocate everything */
- masked_db = malloc(masked_db_len);
- h = malloc(h_len);
- db_mask = malloc(db_mask_len);
+ db_mask = malloc(db_len);
db = malloc(db_len);
- salt = malloc(salt_len);
hprime = malloc(hash_len);
- if (!masked_db || !h || !db_mask || !db || !salt || !hprime) {
+ if (!db_mask || !db || !hprime) {
printf("%s: can't allocate some buffer\n", __func__);
ret = -ENOMEM;
goto out;
}
/* step 5 */
- memcpy(masked_db, msg, masked_db_len);
- memcpy(h, msg + masked_db_len, h_len);
+ masked_db = &msg[0];
+ h = &msg[db_len];
/* step 6 */
leftmost_mask = (0xff >> (8 - leftmost_bits)) << (8 - leftmost_bits);
}
/* step 7 */
- mask_generation_function1(checksum, h, h_len, db_mask, db_mask_len);
+ mask_generation_function1(checksum, h, h_len, db_mask, db_len);
/* step 8 */
for (i = 0; i < db_len; i++)
db[0] &= 0xff >> leftmost_bits;
/* step 10 */
- if (db[0] != 0x01) {
+ db_padlen = 0;
+ while (db[db_padlen] == 0x00 && db_padlen < (db_len - 1))
+ db_padlen++;
+ db_nopad = &db[db_padlen];
+ if (db_nopad[0] != 0x01) {
printf("%s: invalid pss padding ", __func__);
- printf("(leftmost byte of db isn't 0x01)\n");
+ printf("(leftmost byte of db after 0-padding isn't 0x01)\n");
ret = EINVAL;
goto out;
}
/* step 11 */
- memcpy(salt, &db[1], salt_len);
+ salt_len = db_len - db_padlen - 1;
+ salt = &db_nopad[1];
/* step 12 & 13 */
compute_hash_prime(checksum, pad_zero, 8,
- (uint8_t *)hash, hash_len,
+ hash, hash_len,
salt, salt_len, hprime);
/* step 14 */
out:
free(hprime);
- free(salt);
free(db);
free(db_mask);
- free(h);
- free(masked_db);
return ret;
}
return (ulong)(uintptr_t)ptr;
}
+#define ARCH_DMA_MINALIGN 1
+#define DEFINE_ALIGN_BUFFER(type, name, size, alugn) type name[size]
+
#define MKIMAGE_TMPFILE_SUFFIX ".tmp"
#define MKIMAGE_MAX_TMPFILE_LEN 256
#define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"