aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2010-02-02 17:48:25 -0800
committerDima Zavin <dima@android.com>2010-02-02 17:49:12 -0800
commitaecf30ba1f51f5ca80ef39d014916cb5b5a84c1d (patch)
tree216279bacbb9dc56f29012fa893b5f2fdc807051
parentd7c41ab35a5cfb1375dc8e0db8ce4649361ae0f0 (diff)
downloadlk-aecf30ba1f51f5ca80ef39d014916cb5b5a84c1d.tar.gz
aboot: make sure fastboot usb buffer is page aligned.
Signed-off-by: Dima Zavin <dima@android.com>
-rw-r--r--app/aboot/fastboot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/aboot/fastboot.c b/app/aboot/fastboot.c
index 6752dde9..2701be08 100644
--- a/app/aboot/fastboot.c
+++ b/app/aboot/fastboot.c
@@ -109,7 +109,7 @@ void fastboot_publish(const char *name, const char *value)
static event_t usb_online;
static event_t txn_done;
-static unsigned char buffer[4096];
+static unsigned char *buffer;
static struct udc_endpoint *in, *out;
static struct udc_request *req;
int txn_status;
@@ -330,6 +330,8 @@ int fastboot_init(void *base, unsigned size)
thread_t *thr;
dprintf(INFO, "fastboot_init()\n");
+ buffer = memalign(4096, 4096);
+
download_base = base;
download_max = size;